Loading CompilerGeneration.jrag +10 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,15 @@ aspect Misc { } } aspect Subclasses { static int Element.superClassNum = 0; inh String Element.superClass(); // eq ComplexElement.getElement().superClass(); eq Start.getSpecification().superClass() = "ComplexElement"; // eq XsChoice.getElement(int i).superClass() = "Choice_"+superClassNum; // eq XsSequence.getElement(int i).superClass() = "Choice_"+superClassNum; } aspect AbsGrammarGeneration { void ASTNode.genAbsGrammar(PrintStream pStream) { for (int i=0; i<getNumChild(); i++) { Loading Loading @@ -82,7 +91,7 @@ aspect AbsGrammarGeneration { void XsElement.genAbsGrammar(PrintStream pStream) { if (hasName()) { // If not, it's just a reference to an element declaration String name = fixName(name()); pStream.print(name + " : ComplexElement ::= "); pStream.print(name + " : "+superClass()+" ::= "); // for (Element e : getElements()) { // e.genAbsGrammarNTA(pStream); // } Loading tools/jastadd2.jar −9.71 KiB (582 KiB) File changed.No diff preview for this file type. View original file View changed file Loading
CompilerGeneration.jrag +10 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,15 @@ aspect Misc { } } aspect Subclasses { static int Element.superClassNum = 0; inh String Element.superClass(); // eq ComplexElement.getElement().superClass(); eq Start.getSpecification().superClass() = "ComplexElement"; // eq XsChoice.getElement(int i).superClass() = "Choice_"+superClassNum; // eq XsSequence.getElement(int i).superClass() = "Choice_"+superClassNum; } aspect AbsGrammarGeneration { void ASTNode.genAbsGrammar(PrintStream pStream) { for (int i=0; i<getNumChild(); i++) { Loading Loading @@ -82,7 +91,7 @@ aspect AbsGrammarGeneration { void XsElement.genAbsGrammar(PrintStream pStream) { if (hasName()) { // If not, it's just a reference to an element declaration String name = fixName(name()); pStream.print(name + " : ComplexElement ::= "); pStream.print(name + " : "+superClass()+" ::= "); // for (Element e : getElements()) { // e.genAbsGrammarNTA(pStream); // } Loading
tools/jastadd2.jar −9.71 KiB (582 KiB) File changed.No diff preview for this file type. View original file View changed file