[Escapek-commits] SF.net SVN: escapek:[822] org.escapek.mofparser/trunk
Status: Pre-Alpha
Brought to you by:
nicolasjouanin
|
From: <nic...@us...> - 2008-09-06 20:00:52
|
Revision: 822
http://escapek.svn.sourceforge.net/escapek/?rev=822&view=rev
Author: nicolasjouanin
Date: 2008-09-06 20:00:44 +0000 (Sat, 06 Sep 2008)
Log Message:
-----------
Added Paths:
-----------
org.escapek.mofparser/trunk/.classpath
org.escapek.mofparser/trunk/.project
org.escapek.mofparser/trunk/LICENSE
org.escapek.mofparser/trunk/META-INF/
org.escapek.mofparser/trunk/META-INF/MANIFEST.MF
org.escapek.mofparser/trunk/build.properties
org.escapek.mofparser/trunk/pom.xml
org.escapek.mofparser/trunk/src/
org.escapek.mofparser/trunk/src/assembly/
org.escapek.mofparser/trunk/src/assembly/dependencies.xml
org.escapek.mofparser/trunk/src/assembly/no-dependencies.xml
org.escapek.mofparser/trunk/src/assembly/with-dependencies.xml
org.escapek.mofparser/trunk/src/main/
org.escapek.mofparser/trunk/src/main/antlr/
org.escapek.mofparser/trunk/src/main/antlr/org/
org.escapek.mofparser/trunk/src/main/antlr/org/escapek/
org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/
org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/internal/
org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/internal/cim23.g3
org.escapek.mofparser/trunk/src/main/java/
org.escapek.mofparser/trunk/src/main/java/org/
org.escapek.mofparser/trunk/src/main/java/org/escapek/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/CompilerDirective.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/DataType.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/FlavorType.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/IContentHandler.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/MOFParser.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/Production.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/ScopeType.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/ClassDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/InstDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/InstancePropertyDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/MethodDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/ParameterDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/PragmaDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/PropertyDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/Qualifier.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/QualifierDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/decl/TypeDecl.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/exceptions/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/exceptions/MOFParserException.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/helpers/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/helpers/DefaultHandler.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/helpers/GenerateHandler.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/helpers/LoggingHandler.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/internal/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/internal/CaseInsensitiveStringStream.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/samples/
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/samples/MOFViewer.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/samples/Sample1.java
org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/samples/Sample2.java
org.escapek.mofparser/trunk/src/main/resources/
org.escapek.mofparser/trunk/src/main/resources/org/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/classDecl.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/header.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/instDecl.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/pragmaDecl.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/qualifierDecl.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/internal/templates/typeDecl.st
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/samples/
org.escapek.mofparser/trunk/src/main/resources/org/escapek/mofparser/samples/sample.mof
org.escapek.mofparser/trunk/src/test/
org.escapek.mofparser/trunk/src/test/java/
org.escapek.mofparser/trunk/src/test/java/org/
org.escapek.mofparser/trunk/src/test/java/org/escapek/
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/TestMOFParserPhaseOne.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/TestMOFParserPhaseTwo.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestClassDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestInstDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestInstancePropertyDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestMethodDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestParameterDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestPropertyDecl.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestQualifier.java
org.escapek.mofparser/trunk/src/test/java/org/escapek/mofparser/decl/TestQualifierDecl.java
org.escapek.mofparser/trunk/src/test/resources/
org.escapek.mofparser/trunk/src/test/resources/org/
org.escapek.mofparser/trunk/src/test/resources/org/escapek/
org.escapek.mofparser/trunk/src/test/resources/org/escapek/mofparser/
org.escapek.mofparser/trunk/src/test/resources/org/escapek/mofparser/CIM_ManagedElement.mof
org.escapek.mofparser/trunk/src/test/resources/org/escapek/mofparser/CIM_MessageLog.mof
org.escapek.mofparser/trunk/src/test/resources/org/escapek/mofparser/CIM_StoragePool.mof
org.escapek.mofparser/trunk/src/test/resources/org/escapek/mofparser/qualifiers.mof
Added: org.escapek.mofparser/trunk/.classpath
===================================================================
--- org.escapek.mofparser/trunk/.classpath (rev 0)
+++ org.escapek.mofparser/trunk/.classpath 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" path="target/generated-sources/antlr"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: org.escapek.mofparser/trunk/.project
===================================================================
--- org.escapek.mofparser/trunk/.project (rev 0)
+++ org.escapek.mofparser/trunk/.project 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.escapek.mofparser</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: org.escapek.mofparser/trunk/LICENSE
===================================================================
--- org.escapek.mofparser/trunk/LICENSE (rev 0)
+++ org.escapek.mofparser/trunk/LICENSE 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2007 EscapeK
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: org.escapek.mofparser/trunk/META-INF/MANIFEST.MF
===================================================================
--- org.escapek.mofparser/trunk/META-INF/MANIFEST.MF (rev 0)
+++ org.escapek.mofparser/trunk/META-INF/MANIFEST.MF 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Mofparser
+Bundle-SymbolicName: org.escapek.mofparser
+Bundle-Version: 1.0.0.m1_SNAPSHOT
+Export-Package: org.escapek.mofparser,
+ org.escapek.mofparser.decl,
+ org.escapek.mofparser.exceptions,
+ org.escapek.mofparser.helpers
+Import-Package: antlr;version="2.7.7",
+ org.antlr.runtime;version="3.0.1",
+ org.antlr.runtime.tree;version="3.0.1",
+ org.antlr.stringtemplate,
+ org.apache.commons.logging,
+ org.eclipse.swt,
+ org.eclipse.swt.graphics,
+ org.eclipse.swt.layout,
+ org.eclipse.swt.widgets
Added: org.escapek.mofparser/trunk/build.properties
===================================================================
--- org.escapek.mofparser/trunk/build.properties (rev 0)
+++ org.escapek.mofparser/trunk/build.properties 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,23 @@
+# Copyright 2008 EscapeK
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# --------------------------------------------------------------------------
+# $Id$
+# --------------------------------------------------------------------------
+source.. = src/main/java/,\
+ target/generated-sources/antlr/, \
+ samples/
+output.. = target/classes/
+version=0.3
+bin.includes = META-INF/,\
+ .
Added: org.escapek.mofparser/trunk/pom.xml
===================================================================
--- org.escapek.mofparser/trunk/pom.xml (rev 0)
+++ org.escapek.mofparser/trunk/pom.xml 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2008 EscapeK
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.escapek</groupId>
+ <artifactId>mofparser</artifactId>
+ <packaging>jar</packaging>
+ <name>org.escapek.mofparser</name>
+ <url>http://wiki.escapek.org</url>
+ <version>1.0-m1-SNAPSHOT</version>
+ <description>MOF parser library</description>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>EscapeK</name>
+ <url>http://www.escapek.org</url>
+ </organization>
+
+ <ciManagement>
+ <system>bamboo</system>
+ <url>http://bamboo.escapek.org/browse/MPL-TRUNK</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>ni...@es...</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
+ <developers>
+ <developer>
+ <id>nico</id>
+ <name>Nicolas Jouanin</name>
+ <email>ni...@es...</email>
+ <url>http://wiki.escapek.org/display/~nico/Home</url>
+ <organization>EscapeK</organization>
+ <organizationUrl>http://www.escapek.org</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ </developers>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.escapek.org/</url>
+ </issueManagement>
+ <scm>
+ <connection>
+ scm:https://svn.escapek.org/repos/org.escapek.mofparser/trunk/
+ </connection>
+ <developerConnection>
+ scm:svn:https://svn.escapek.org/escapek/org.escapek.mofparser/trunk/
+ </developerConnection>
+ <url>
+ http://fisheye.escapek.org/browse/repos/org.escapek.mofparser/trunk/
+ </url>
+ </scm>
+ <inceptionYear>2007</inceptionYear>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>com.springsource.org.antlr</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.escapek.osgi</groupId>
+ <artifactId>stringtemplate</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>windows</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.swt.win32.win32</groupId>
+ <artifactId>x86</artifactId>
+ <version>3.4.0.v3448f</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>unix</id>
+ <activation>
+ <os>
+ <family>unix</family>
+ </os>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.swt.gtk.linux</groupId>
+ <artifactId>x86</artifactId>
+ <version>3.4.0.v3448f</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mac</id>
+ <activation>
+ <os>
+ <family>mac</family>
+ </os>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.swt.carbon</groupId>
+ <artifactId>macosx</artifactId>
+ <version>3.4.0.v3448f</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <!-- no dependencies -->
+ <execution>
+ <id>no-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>
+ src/assembly/no-dependencies.xml
+ </descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <!-- with dependencies -->
+ <execution>
+ <id>with-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>
+ src/assembly/with-dependencies.xml
+ </descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>
+ META-INF/MANIFEST.MF
+ </manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>pde-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>antlr</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <includes>
+ <include>**/*.g3</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <excludePackageNames>
+ *.internal
+ </excludePackageNames>
+ <quiet>true</quiet>
+ <verbose>false</verbose>
+ <source>1.5</source>
+ <links>
+ <link>
+ http://java.sun.com/j2se/1.5.0/docs/api/
+ </link>
+ <link>
+ http://www.antlr.org/api/Java/index.html
+ </link>
+ </links>
+ </configuration>
+ </plugin>
+ <!-- CheckStyle plugin -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <!-- SureFire report plugin -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <!-- Cobertura reporte plugin -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration>
+ <instrumentation>
+ <excludes>
+ <exclude>org/escapek/mofparser/**/Test*.class</exclude>
+ </excludes>
+ </instrumentation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <repositories>
+ <repository>
+ <id>internal</id>
+ <name>EscapeK Managed Internal Repository</name>
+ <url>
+ http://repo.escapek.org/archiva/repository/internal/
+ </url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots</id>
+ <name>EscapeK Managed Snapshot Repository</name>
+ <url>
+ http://repo.escapek.org/archiva/repository/snapshots/
+ </url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <downloadUrl>
+ http://wiki.escapek.org/display/MPL/Home
+ </downloadUrl>
+ <site>
+ <id>static.escapek.org</id>
+ <name>EscapeK</name>
+ <url>
+ scp://static.escapek.org:6791/var/www/static/maven/MPL/site/${version}
+ </url>
+ </site>
+ <repository>
+ <id>internal</id>
+ <name>EscapeK Managed Internal Repository</name>
+ <url>
+ http://repo.escapek.org/archiva/repository/internal/
+ </url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots</id>
+ <name>EscapeK Managed Snapshot Repository</name>
+ <url>
+ http://repo.escapek.org/archiva/repository/snapshots
+ </url>
+ </snapshotRepository>
+ </distributionManagement>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>atlassian-m2-repository</id>
+ <name>Atlassian Maven 2.x Repository</name>
+ <url>http://repository.atlassian.com/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
Added: org.escapek.mofparser/trunk/src/assembly/dependencies.xml
===================================================================
--- org.escapek.mofparser/trunk/src/assembly/dependencies.xml (rev 0)
+++ org.escapek.mofparser/trunk/src/assembly/dependencies.xml 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+ </dependencySets>
+</component>
\ No newline at end of file
Added: org.escapek.mofparser/trunk/src/assembly/no-dependencies.xml
===================================================================
--- org.escapek.mofparser/trunk/src/assembly/no-dependencies.xml (rev 0)
+++ org.escapek.mofparser/trunk/src/assembly/no-dependencies.xml 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,29 @@
+<assembly>
+ <id>no-dependencies</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory></outputDirectory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory>dist/</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ <!-- docs -->
+ <fileSet>
+ <directory>target/site</directory>
+ <outputDirectory>docs</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: org.escapek.mofparser/trunk/src/assembly/with-dependencies.xml
===================================================================
--- org.escapek.mofparser/trunk/src/assembly/with-dependencies.xml (rev 0)
+++ org.escapek.mofparser/trunk/src/assembly/with-dependencies.xml 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,32 @@
+<assembly>
+ <id>with-dependencies</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <componentDescriptors>
+ <componentDescriptor>src/assembly/dependencies.xml</componentDescriptor>
+ </componentDescriptors>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory></outputDirectory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory>dist/</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ <!-- docs -->
+ <fileSet>
+ <directory>target/site</directory>
+ <outputDirectory>docs</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/internal/cim23.g3
===================================================================
--- org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/internal/cim23.g3 (rev 0)
+++ org.escapek.mofparser/trunk/src/main/antlr/org/escapek/mofparser/internal/cim23.g3 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,421 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ *
+ * This is a complete CIM v2.3 meta-model parser, based on an ANTLR 3 grammar syntax.
+ * It makes use of the available DMTF MOF syntax grammar description, this should be LL(1) parseable
+ * Parser output is a generated AST tree which can be walked to extract data.
+ *
+ * Token and literrals rules MUST be written in lowercase in this grammar. Streams parsed by this
+ * grammar must be read by a case insensitive String stream.
+ *
+ */
+grammar cim23;
+
+options {
+ output=AST;
+ ASTLabelType=CommonTree;
+ }
+
+tokens {
+ CLASS = 'class';
+ PRAGMA = '#pragma';
+ QUALIFIER = 'qualifier';
+ SCOPE = 'scope';
+ FLAVOR = 'flavor';
+ ASSOCIATION = 'association';
+ INDICATION = 'indication';
+ PROPERTY = 'property';
+ SCHEMA = 'schema';
+ Type;
+ Array;
+ Qualifiers;
+ SuperClass;
+ Class;
+ Property;
+ Reference;
+ Object;
+ Method;
+ Returns;
+ Parameter;
+ Default;
+ Instance;
+ Alias;
+ Value;
+ CompilerDirective;
+}
+
+@header {
+package org.escapek.mofparser.internal;
+
+import java.lang.String;
+}
+@lexer::header {
+package org.escapek.mofparser.internal;
+}
+
+mofSpecification
+ : mofProduction+
+ ;
+
+mofProduction
+ : compilerDirective|
+ classDeclaration |
+ qualifierDeclaration |
+ instanceDeclaration
+ ;
+
+compilerDirective
+ : PRAGMA pragmaName '(' pragmaParameter ')' -> ^(CompilerDirective pragmaName pragmaParameter)
+ ;
+
+
+pragmaName
+ : IDENTIFIER
+ ;
+
+pragmaParameter
+ : STRING_VALUE
+ ;
+
+classDeclaration
+ : (qualifierList)?
+ CLASS className (scl=superClass)?
+ '{' classFeature* '}' ';'
+ -> ^(Class ^(className ^(SuperClass $scl)? (qualifierList)? ^(classFeature)*))
+ ;
+
+className
+ : IDENTIFIER
+ ;
+
+alias : AS aliasIdentifier -> aliasIdentifier
+ ;
+
+aliasIdentifier
+ : '$' IDENTIFIER -> IDENTIFIER // NO whitespace !
+ ;
+
+superClass
+ : ':' className -> className
+ ;
+
+classFeature
+ : propertyDeclaration | methodDeclaration | referenceDeclaration
+ ;
+
+qualifierList
+ : '[' qualifier ( ',' qualifier )* ']' -> ^(Qualifiers qualifier+)
+ ;
+
+qualifier
+ : qualifierName (qualifierParameter)? (':' flavor+)?
+ -> ^(qualifierName qualifierParameter? (flavor+)?)
+ ;
+
+qualifierName
+ : IDENTIFIER | ASSOCIATION | INDICATION | SCHEMA
+ //Identifier + Meta qualifiers name
+ ;
+
+qualifierParameter
+ : '(' constantValue ')' -> constantValue
+ | arrayInitializer -> arrayInitializer
+ ;
+
+flavor
+ : ( ENABLEOVERRIDE
+ | DISABLEOVERRIDE
+ | RESTRICTED
+ | TOSUBCLASS
+ | TRANSLATABLE
+ )
+ ;
+
+propertyDeclaration
+ : (qualifierList)? dataType propertyName
+ (array)? (defaultValue)? ';'
+ -> ^(Property propertyName ^(Type ^(dataType array? )) ^(Default defaultValue?) qualifierList?)
+ ;
+
+referenceDeclaration
+ : (qualifierList)? objectRef referenceName (defaultValue)? ';'
+ -> ^(Property referenceName ^(Type ^(Reference objectRef )) ^(Default defaultValue?) qualifierList?)
+ ;
+
+methodDeclaration
+ : (qualifierList)? dataType methodName '(' parameterList? ')' ';'
+ -> ^(Method methodName ^(Returns dataType) parameterList? qualifierList?)
+ ;
+
+propertyName
+ : IDENTIFIER
+ ;
+
+referenceName
+ : IDENTIFIER
+ ;
+
+methodName
+ : IDENTIFIER
+ ;
+
+dataType: (DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 |
+ DT_UINT32 | DT_SINT32 | DT_UINT64 | DT_SINT64 |
+ DT_REAL32 | DT_REAL64 | DT_CHAR16 |
+ DT_STR | DT_BOOL | DT_DATETIME)
+ ;
+
+objectRef
+ : className REF -> className
+ ;
+
+parameterList
+ : parameter ( ',' parameter )* -> parameter+
+ ;
+
+parameter
+ : (qualifierList)? dataType parameterName (array)?
+ -> ^(Parameter parameterName ^(Type ^(dataType array?)) qualifierList?)
+ |
+ (qualifierList)? objectRef parameterName (array)?
+ -> ^(Parameter parameterName ^(Type ^(Reference objectRef )) qualifierList?)
+ ;
+
+parameterName
+ : IDENTIFIER
+ ;
+
+array : '[' (positiveDecimalValue)? ']' -> ^(Array positiveDecimalValue?)
+ ;
+
+positiveDecimalValue
+ : DECIMAL_DIGIT+
+ ;
+
+defaultValue
+ : '=' initializer -> initializer
+ ;
+
+initializer
+ : constantValue | arrayInitializer | referenceInitializer
+ ;
+
+arrayInitializer
+ : '{' constantValue ( ',' constantValue)* '}' ->constantValue+
+ ;
+
+constantValue
+ : integerValue
+ | multi_line_string
+ | real_value | CHAR_VALUE |
+ boolean_value | NULL_VALUE
+ ;
+
+boolean_value
+ : TRUE | FALSE
+ ;
+
+integerValue
+ : BINARY_VALUE | OCTAL_VALUE | DECIMAL_VALUE | HEX_VALUE
+ ;
+
+referenceInitializer
+ : objectHandle | aliasIdentifier
+ ;
+
+objectHandle
+ : '"' objectName '"'
+ ;
+
+objectName
+ : (namespacePath ':')? modelPath
+ ;
+
+namespacePath
+ : (namespaceType '://')? namespaceHandle
+ ;
+
+namespaceType
+ : CHAR_VALUE+
+ ;
+
+namespaceHandle
+ : CHAR_VALUE+
+ ;
+
+modelPath
+ : className '.' keyValuePairList
+ ;
+
+keyValuePairList
+ : keyValuePair ( ',' keyValuePair )*
+ ;
+
+keyValuePair
+ : ( propertyName '=' constantValue ) | ( referenceName '=' objectHandle )
+ ;
+
+qualifierDeclaration
+ : QUALIFIER qualifierName qualifierType qualifierScope defaultFlavor? ';'
+ -> ^(QUALIFIER qualifierName qualifierType qualifierScope defaultFlavor?)
+ ;
+
+qualifierType
+ : ':' dataType (array)? (defaultValue)? -> ^(Type ^(dataType array? ) ^(Default defaultValue?))
+ ;
+
+qualifierScope : ',' SCOPE '(' metaElement ( ',' metaElement )* ')'
+ -> ^(SCOPE ^(metaElement)+)
+;
+
+metaElement
+ : CLASS | ASSOCIATION | INDICATION | QUALIFIER |
+ PROPERTY | REFERENCE | METHOD | PARAMETER | ANY
+ ;
+
+defaultFlavor
+ : ',' FLAVOR '(' flavor ( ',' flavor )* ')'
+ -> ^(FLAVOR ^(flavor)+)
+ ;
+
+instanceDeclaration
+ : (qualifierList)? INSTANCE OF className alias?
+ '{' valueInitializer+ '}' ';'
+ -> ^(Instance ^(className ^(Alias alias)? (qualifierList)? ^(Property valueInitializer)+))
+ ;
+
+valueInitializer
+ : (qualifierList)? initializerName '=' initializer ';'
+ -> ^(initializerName (qualifierList)?) ^(Value initializer)
+ ;
+
+initializerName
+ : IDENTIFIER
+ ;
+
+fileName: STRING_VALUE
+ ;
+
+multi_line_string
+ : (STRING_VALUE)*
+ ;
+
+BINARY_VALUE
+ :
+ ('+' | '-')? ('0'|'1')+ ( 'b' | 'B' )
+ ;
+
+HEX_VALUE: ('+' | '-')? ( '0x' | '0X' ) ('0'..'9' | 'a'..'f' | 'A'..'F')+
+ ;
+
+DECIMAL_VALUE
+ : ('+' | '-')? ('0'..'9')+
+ ;
+
+OCTAL_VALUE
+ : ('+' | '-')? '0' ('0'|'1'|'2'|'3'|'4'|'5'|'6'|'7')+
+ ;
+
+real_value
+ : ('+' | '-') DECIMAL_DIGIT* '.' DECIMAL_DIGIT+
+ ( ('e' | 'E') ( '+' | '-')? DECIMAL_DIGIT+)?
+ ;
+
+
+WS : (' '|'\t')+ {$channel=HIDDEN;}
+ ;
+EOL : '\r'? '\n' {$channel=HIDDEN;}
+ ;
+SL_COMMENT
+ : '//' ~('\n'|'\r')* EOL {$channel=HIDDEN;}
+ ;
+
+ML_COMMENT
+ : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;}
+ ;
+
+
+ANY : 'any';
+AS : 'as';
+DISABLEOVERRIDE
+ : 'disableoverride';
+DT_BOOL : 'boolean';
+DT_CHAR16 : 'char16';
+DT_DATETIME : 'datetime';
+DT_REAL32 : 'real32';
+DT_REAL64 : 'real64';
+DT_SINT16 : 'sint16';
+DT_SINT32 : 'sint32';
+DT_SINT64 : 'sint64';
+DT_SINT8 : 'sint8';
+DT_STR : 'string';
+DT_UINT16 : 'uint16';
+DT_UINT32 : 'uint32';
+DT_UINT64 : 'uint64';
+DT_UINT8 : 'uint8';
+ENABLEOVERRIDE : 'enableoverride';
+FALSE : 'false';
+INSTANCE : 'instance';
+METHOD : 'method';
+NULL_VALUE : 'null';
+OF : 'of';
+PARAMETER : 'parameter';
+REF : 'ref';
+REFERENCE : 'reference';
+RESTRICTED : 'restricted';
+SCHEMA : 'schema';
+TOSUBCLASS : 'tosubclass';
+TRANSLATABLE: 'translatable';
+TRUE : 'true';
+
+fragment
+DECIMAL_DIGIT
+ : ('0'..'9');
+
+CHAR_VALUE
+ : '"' (ESC | ~('\\'|'"')) '"'
+ ;
+
+STRING_CHAR
+ : ('\u0001'..'\uFFEF') | ESC
+ ;
+
+STRING_VALUE
+ : ('"' ( options { greedy = false; } : STRING_CHAR )* '"')+;
+
+ESC
+ : '\\'
+ ( 'n'
+ | 't'
+ | 'v'
+ | 'b'
+ | 'r'
+ | 'f'
+ | 'a'
+ | '\\'
+ | '?'
+ | '\''
+ | '"'
+ | ('0' | '1' | '2' | '3') ('0'..'7')?
+ | 'x' ('0'..'9' | 'a'..'f' | 'A'..'F')?
+ )
+ ;
+
+IDENTIFIER : ( '\u0041'..'\u005A'|'\u0061'..'\u007A' )
+ ( '\u005F'|'\u0030'..'\u0039'|'\u0041'..'\u005A'|'\u0061'..'\u007A' )*
+ ;
Added: org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/CompilerDirective.java
===================================================================
--- org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/CompilerDirective.java (rev 0)
+++ org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/CompilerDirective.java 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,32 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.mofparser;
+
+/**
+ * Enumerates supported compiler directives. See <a href="http://www.dmtf.org/standards/published_documents/DSP0004V2.3_final.pdf">
+ * CIM specifications</a> for details.
+ * @author nico
+ *
+ */
+public enum CompilerDirective {
+ include,
+ instancelocale,
+ locale,
+ namespace;
+}
Added: org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/DataType.java
===================================================================
--- org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/DataType.java (rev 0)
+++ org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/DataType.java 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.mofparser;
+
+/**
+ * Enumerates supported data types. See <a href="http://www.dmtf.org/standards/published_documents/DSP0004V2.3_final.pdf">
+ * CIM specifications</a> for details.
+ * @author nico
+ *
+ */
+public enum DataType {
+ UINT8,
+ SINT8,
+ UINT16,
+ SINT16,
+ UINT32,
+ SINT32,
+ UINT64,
+ SINT64,
+ STRING,
+ BOOLEAN,
+ REAL32,
+ REAL64,
+ DATETIME,
+ REFERENCE,
+ CHAR16;
+}
Added: org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/FlavorType.java
===================================================================
--- org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/FlavorType.java (rev 0)
+++ org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/FlavorType.java 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.mofparser;
+
+/**
+ * Enumerates supported flavors. See <a href="http://www.dmtf.org/standards/published_documents/DSP0004V2.3_final.pdf">
+ * CIM specifications</a> for details.
+ * @author nico
+ *
+ */
+public enum FlavorType {
+ /**
+ * this qualifier is overridable
+ */
+ ENABLEOVERRIDE,
+
+ /**
+ * this qualifier cannot be overridden
+ */
+ DISABLEOVERRIDE,
+
+ /**
+ * this qualifier applies only to the class in which it is declared
+ */
+ RESTRICTED,
+
+ /**
+ * this qualifier is inherited by any subclass
+ */
+ TOSUBCLASS,
+
+ /**
+ * this qualifier can be specified in multiple locales (language and country
+ * combination).
+ */
+ TRANSLATE;
+}
Added: org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/IContentHandler.java
===================================================================
--- org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/IContentHandler.java (rev 0)
+++ org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/IContentHandler.java 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,135 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.mofparser;
+
+import org.escapek.mofparser.decl.ClassDecl;
+import org.escapek.mofparser.decl.InstDecl;
+import org.escapek.mofparser.decl.PragmaDecl;
+import org.escapek.mofparser.decl.QualifierDecl;
+import org.escapek.mofparser.exceptions.MOFParserException;
+
+/**
+ * Interface defining methods that must be implemented by a mof parse events.
+ * These methods are called by MOFParser when it parses MOF declaration.
+ * @author nico
+ *
+ */
+public interface IContentHandler {
+ /**
+ * Receive notification of the beginning of MOF document parsing
+ */
+ public void startDocument() throws MOFParserException;
+
+ /**
+ * Receive notification of the end of MOF document parsing
+ */
+ public void endDocument() throws MOFParserException;
+
+ /**
+ * Receive notification of a parse error. This method is responsible
+ * of managing the exception, and eventually throw it back.
+ * @param ex exception thrown by the parser
+ * @throws MOFParserException new exception thrown if needed.
+ */
+ public void error(MOFParserException ex) throws MOFParserException;
+
+ /**
+ * Receive notification of the beginning of a production parsing
+ * @param productionType production type being parsed
+ */
+ public void startProduction(Production productionType) throws MOFParserException;
+
+ /**
+ * Receive notification of the end of a production parsing.
+ */
+ public void endProduction() throws MOFParserException;
+
+ /**
+ * Receive notification of the beginning of a compiler directive parsing
+ */
+ public void startCompilerDirective() throws MOFParserException;
+
+ /**
+ * Receive data of a successfully parsed compiler directive.
+ * @param decl compiler directive parsed
+ */
+ public void compilerDirective(PragmaDecl decl) throws MOFParserException;
+
+ /**
+ * Receive notification of the end of a compiler directive parsing.
+ * This method can be used to clean space after processing the compiler directive received.
+ */
+ public void endCompilerDirective() throws MOFParserException;
+
+ /**
+ * Receive notification of the beginning of a qualifier declaration parsing
+ */
+ public void startQualifierDeclaration() throws MOFParserException;
+
+ /**
+ * Receive data of a successfully parsed qualifier declaration.
+ * @param decl qualifier declaration parsed
+ */
+ public void qualifierDeclaration(QualifierDecl decl) throws MOFParserException;
+
+ /**
+ * Receive notification of the end of a qualifier declaration parsing.
+ * This method can be used to clean space after processing the qualifier declaration received.
+ */
+ public void endQualifierDeclaration() throws MOFParserException;
+
+ /**
+ * Receive notification of the beginning of a class declaration parsing
+ */
+ public void startClassDeclaration() throws MOFParserException;
+
+ /**
+ * Receive data of a successfully parsed class declaration.
+ * @param decl class declaration parsed
+ */
+ public void classDeclaration(ClassDecl decl) throws MOFParserException;
+
+ /**
+ * Receive notification of the end of a class declaration parsing.
+ * This method can be used to clean space after processing the class declaration received.
+ */
+ public void endClassDeclaration() throws MOFParserException;
+
+ /**
+ * Receive notification of the beginning of MOF document parsing
+ */
+ public void include(String name);
+
+ /**
+ * Receive notification of the beginning of an instance declaration parsing
+ */
+ public void startInstanceDeclaration() throws MOFParserException;
+
+ /**
+ * Receive data of a successfully parsed instance declaration.
+ * @param decl instance declaration parsed
+ */
+ public void instanceDeclaration(InstDecl decl) throws MOFParserException;
+
+ /**
+ * Receive notification of the end of an instance declaration parsing.
+ * This method can be used to clean space after processing the instance declaration received.
+ */
+ public void endInstanceDeclaration() throws MOFParserException;
+}
Added: org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/MOFParser.java
===================================================================
--- org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/MOFParser.java (rev 0)
+++ org.escapek.mofparser/trunk/src/main/java/org/escapek/mofparser/MOFParser.java 2008-09-06 20:00:44 UTC (rev 822)
@@ -0,0 +1,816 @@
+/**
+ * Copyright 2008 EscapeK
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.mofparser;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.stringtemplate.StringTemplate;
+import org.antlr.stringtemplate.StringTemplateGroup;
+import org.escapek.mofparser.decl.ClassDecl;
+import org.escapek.mofparser.decl.InstDecl;
+import org.escapek.mofparser.decl.InstancePropertyDecl;
+import org.escapek.mofparser.decl.MethodDecl;
+import org.escapek.mofparser.decl.ParameterDecl;
+import org.escapek.mofparser.decl.PragmaDecl;
+import org.escapek.mofparser.decl.PropertyDecl;
+import org.escapek.mofparser.decl.Qualifier;
+import org.escapek.mofparser.decl.QualifierDecl;
+import org.escapek.mofparser.decl.TypeDecl;
+import org.escapek.mofparser.exceptions.MOFParserException;
+import org.escapek.mofparser.internal.CaseInsensitiveStringStream;
+import org.escapek.mofparser.internal.cim23Lexer;
+import org.escapek.mofparser.internal.cim23Parser;
+
+
+/**
+ * MOFParser provides methods for parsing a input stream containing a MOF syntax production.
+ * Parsing is based on a callback system. Once the parser has been initialized, parsin is ran
+ * by passing the parser an event handler instance. Event handler methods will be automatically
+ * called by the parser when it detects some MOF language specification, so the handler can easily
+ * manage the data.
+ * MOFParser also provides some basic checks on MOF syntax which can be intercepted by the handler.
+ * @author nico
+ *
+ */
+public class MOFParser {
+ private static String PRAGMA_DECL = "CompilerDirective";
+ private static String QUALIFIER_DECL = "qualifier";
+ private static String CLASS_DECL = "class";
+ private static String INSTANCE_DECL = "instance";
+ private static String TYPE = "Type";
+ private static String METHOD = "Method";
+ private static String SCOPE = "Scope";
+ private static String FLAVOR = "Flavor";
+ private static String DEFAULT = "Default";
+ private static String QUALIFIERS = "Qualifiers";
+ private static String SUPERCLASS = "SuperClass";
+ private static String PROPERTY = "Property";
+ private static String PARAMETER = "Parameter";
+ private static String ALIAS = "Alias";
+ private static String VALUE = "Value";
+ private static String RETURNS = "Returns";
+
+
+ private cim23Lexer lexer;
+
+ /**
+ * Default constructor.
+ * CIM 2.3 lexer is initialized by this constructor.
+ */
+ public MOFParser() {
+ lexer = new cim23Lexer();
+ }
+
+ /**
+ * <p>Parse a MOF specification read from an InputStream.</p>
+ * <p>Parsing events are sent to the given handler instance.</p>
+ * @param iStream stream containing MOF specification to read. This stream can come from a file, a socket or whatever.
+ * @param handler instance of the handler which will receive parsing events.
+ * @throws MOFParserException thrown if an error is detected during parse.
+ * @throws IOException if an error occurs while reading the stream
+ */
+ public void parse(InputStream iStream, IContentHandler handler) throws MOFParserException, IOException {
+ OutputStream out = new ByteArrayOutputStream();
+ byte[] buf = new byte[1024];
+ int numRead=0;
+ while((numRead=iStream.read(buf)) != -1){
+ out.write(buf, 0, numRead);
+ }
+
+ parse(out.toString(), handler);
+ }
+
+ /**
+ * <p>Parse a MOF specification read from an InputStream.</p>
+ * <p>Parsing events are sent to the given handler instance.</p>
+ * @param mofContent String containing a MOF specification.
+ * @param handler instance of the handler which will receive parsing events.
+ * @throws MOFParserException thrown if an error is detected during parse.
+ */
+ public void parse(String mofContent, IContentHandler handler) throws MOFParserException {
+ handler.startDocument();
+ lexer.setCharStream(new CaseInsensitiveStringStream(mofContent));
+ CommonTokenStream tokens = new CommonTokenStream(lexer);
+ cim23Parser parser = new cim23Parser(tokens);
+
+ CommonTree specTree;
+ try {
+ specTree = (CommonTree)parser.mofSpecification().getTree();
+ //MPL-17
+ //Test 'nil' to know is only one production has been parsed
+ if(specTree.toString().equalsIgnoreCase("nil"...
[truncated message content] |