Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
XMLSchemaCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
XMLSchemaCompiler
Commits
2f3a8898
Commit
2f3a8898
authored
17 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Fixed generated prettyprinter so that workpiece.x3d is now handled completly.
parent
5b39965a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CompilerGeneration.jrag
+14
-6
14 additions, 6 deletions
CompilerGeneration.jrag
JavaCCChunks.jrag
+3
-0
3 additions, 0 deletions
JavaCCChunks.jrag
x3d/test.x3d
+1
-27
1 addition, 27 deletions
x3d/test.x3d
with
18 additions
and
33 deletions
CompilerGeneration.jrag
+
14
−
6
View file @
2f3a8898
...
...
@@ -19,10 +19,10 @@ aspect AbsGrammarGeneration {
public void Start.genAbsGrammar(PrintStream pStream) {
pStream.println("// Predefined types");
pStream.println("Start ::= Specification;");
//
pStream.println("Specification ::= XmlHeader [DocType] Element*;");
pStream.println("Specification ::= XmlHeader Element*;");
pStream.println("Specification ::= XmlHeader [DocType] Element*;");
//
pStream.println("Specification ::= XmlHeader Element*;");
pStream.println("XmlHeader ::= Attribute*;");
pStream.println("DocType ::= ;");
pStream.println("DocType ::=
<STRING>
;");
pStream.println("abstract Thing : ComplexElement ::=;");
pStream.println("abstract Element;");
// pStream.println("ComplexElement : Element ::= OwlIdentifier Attribute* Element*;");
...
...
@@ -109,11 +109,11 @@ aspect GenJavaCC {
pStream.println("void Specification() #Specification : {}");
pStream.println("{");
pStream.println(" XmlHeader()");
//
pStream.println(" [DocType()]");
pStream.println("
(
[DocType()]
) #Opt(true)
");
pStream.println(" ElementList()");
pStream.println("}");
pStream.println();
pStream.println("void DocType() #
Opt
: {String s;}");
pStream.println("void DocType() #
DocType
: {String s;}");
pStream.println("{");
pStream.println(" <LTBANG>");
pStream.println(" {");
...
...
@@ -122,7 +122,8 @@ aspect GenJavaCC {
pStream.println(" s += getData();");
pStream.println(" } ");
pStream.println(" } ");
pStream.println("// {jjtThis.setSTRING(s);}");
pStream.println(" <GT>");
pStream.println(" {jjtThis.setSTRING(s);}");
pStream.println("}");
pStream.println();
pStream.println("JAVACODE");
...
...
@@ -142,6 +143,7 @@ aspect GenJavaCC {
pStream.println(" }");
pStream.println(" }");
pStream.println(" s.append(t.image);");
pStream.println(" s.append(\" \");");
pStream.println(" }");
pStream.println(" return s.toString();");
pStream.println("}");
...
...
@@ -384,6 +386,12 @@ aspect GenPrettyPrinter {
pStream.println(" pStream.println(\"?> \");");
pStream.println(" }\n");
pStream.println(" public void DocType.prettyPrint(String indent, PrintStream pStream) {");
pStream.println(" pStream.print(\"<!\");");
pStream.println(" pStream.print(getSTRING());");
pStream.println(" pStream.println(\"> \");");
pStream.println(" }\n");
pStream.println(" public void AttrValue.prettyPrint(String indent, PrintStream pStream) {");
pStream.println(" pStream.print(getSTRING_LITERAL());");
pStream.println(" }\n");
...
...
This diff is collapsed.
Click to expand it.
JavaCCChunks.jrag
+
3
−
0
View file @
2f3a8898
...
...
@@ -16,6 +16,9 @@ aspect JavaCCChunks {
pStream.println(" NODE_PREFIX = \"\";");
pStream.println(" JAVA_UNICODE_ESCAPE = true;");
pStream.println(" STATIC = false;");
// pStream.println(" DEBUG_PARSER = true;");
// pStream.println(" DEBUG_LOOKAHEAD = true;");
// pStream.println(" DEBUG_TOKEN_MANAGER = true;");
pStream.println("} ");
pStream.println();
pStream.println("PARSER_BEGIN(XmlParser)");
...
...
This diff is collapsed.
Click to expand it.
x3d/test.x3d
+
1
−
27
View file @
2f3a8898
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment