@Test public void test1() throws Exception { ConstraintsGrammar parser = new ConstraintsGrammar(new FileInputStream( "src/test/resources/rules/1.rules")); Parse p = parser.Parse(); }
final public RuleDeclaration RuleDeclaration() throws ParseException {Conditions n0; NodeToken n1; Token n2; Restrictions n3; NodeToken n4; Token n5; n0 = Conditions(); n2 = jj_consume_token(IMPLIES); n1 = JTBToolkit.makeNodeToken(n2); n3 = Restrictions(); n5 = jj_consume_token(SEMICOLON); n4 = JTBToolkit.makeNodeToken(n5); {if ("" != null) return new RuleDeclaration(n0,n1,n3,n4);} throw new Error("Missing return statement in function"); }
final public Imports Imports() throws ParseException {NodeList n0 = new NodeList(); ImportDeclaration n1; label_3: while (true) { n1 = ImportDeclaration(); n0.addNode(n1); if (jj_2_4(2)) { ; } else { break label_3; } } n0.nodes.trimToSize(); {if ("" != null) return new Imports(n0);} throw new Error("Missing return statement in function"); }
final public Condition Condition() throws ParseException {Path n0; NodeToken n1; Token n2; NodeToken n3; Token n4; n0 = Path(); n2 = jj_consume_token(EQUALS); n1 = JTBToolkit.makeNodeToken(n2); n4 = jj_consume_token(QUOTED); n3 = JTBToolkit.makeNodeToken(n4); {if ("" != null) return new Condition(n0,n1,n3);} throw new Error("Missing return statement in function"); }
final public Parse Parse() throws ParseException {NodeOptional n0 = new NodeOptional(); Imports n1; NodeList n2 = new NodeList(); ScopedDeclarations n3; NodeToken n4; Token n5; if (jj_2_1(2)) { n1 = Imports(); n0.addNode(n1); } else { ; } label_1: while (true) { n3 = ScopedDeclarations(); n2.addNode(n3); if (jj_2_2(2)) { ; } else { break label_1; } } n2.nodes.trimToSize(); n5 = jj_consume_token(0); n5.beginColumn++; n5.endColumn++; n4 = JTBToolkit.makeNodeToken(n5); {if ("" != null) return new Parse(n0,n2,n4);} throw new Error("Missing return statement in function"); }
final public Conditions Conditions() throws ParseException {Condition n0; NodeListOptional n1 = new NodeListOptional(); NodeSequence n2; NodeToken n3; Token n4; Condition n5; n0 = Condition(); label_5: while (true) { if (jj_2_6(2)) { ; } else { break label_5; } n2 = new NodeSequence(2); n4 = jj_consume_token(21); n3 = JTBToolkit.makeNodeToken(n4); n2.addNode(n3); n5 = Condition(); n2.addNode(n5); n1.addNode(n2); } n1.nodes.trimToSize(); {if ("" != null) return new Conditions(n0,n1);} throw new Error("Missing return statement in function"); }
final public Restrictions Restrictions() throws ParseException {Restriction n0; NodeListOptional n1 = new NodeListOptional(); NodeSequence n2; NodeToken n3; Token n4; Restriction n5; n0 = Restriction(); label_6: while (true) { if (jj_2_7(2)) { ; } else { break label_6; } n2 = new NodeSequence(2); n4 = jj_consume_token(22); n3 = JTBToolkit.makeNodeToken(n4); n2.addNode(n3); n5 = Restriction(); n2.addNode(n5); n1.addNode(n2); } n1.nodes.trimToSize(); {if ("" != null) return new Restrictions(n0,n1);} throw new Error("Missing return statement in function"); }
NodeToken n11; Token n12; n0 = Path(); n2 = jj_consume_token(EQUALS); n1 = JTBToolkit.makeNodeToken(n2); n4 = jj_consume_token(QUOTED); n3 = JTBToolkit.makeNodeToken(n4); if (jj_2_8(2)) { n6 = new NodeSequence(3); n8 = jj_consume_token(23); n7 = JTBToolkit.makeNodeToken(n8); n6.addNode(n7); n10 = jj_consume_token(FLAG); n9 = JTBToolkit.makeNodeToken(n10); n6.addNode(n9); n12 = jj_consume_token(24); n11 = JTBToolkit.makeNodeToken(n12); n6.addNode(n11);
/** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */
final public Parse Parse() throws ParseException {NodeOptional n0 = new NodeOptional(); Imports n1; NodeList n2 = new NodeList(); ScopedDeclarations n3; NodeToken n4; Token n5; if (jj_2_1(2)) { n1 = Imports(); n0.addNode(n1); } else { ; } label_1: while (true) { n3 = ScopedDeclarations(); n2.addNode(n3); if (jj_2_2(2)) { ; } else { break label_1; } } n2.nodes.trimToSize(); n5 = jj_consume_token(0); n5.beginColumn++; n5.endColumn++; n4 = JTBToolkit.makeNodeToken(n5); {if ("" != null) return new Parse(n0,n2,n4);} throw new Error("Missing return statement in function"); }
final public Conditions Conditions() throws ParseException {Condition n0; NodeListOptional n1 = new NodeListOptional(); NodeSequence n2; NodeToken n3; Token n4; Condition n5; n0 = Condition(); label_5: while (true) { if (jj_2_6(2)) { ; } else { break label_5; } n2 = new NodeSequence(2); n4 = jj_consume_token(21); n3 = JTBToolkit.makeNodeToken(n4); n2.addNode(n3); n5 = Condition(); n2.addNode(n5); n1.addNode(n2); } n1.nodes.trimToSize(); {if ("" != null) return new Conditions(n0,n1);} throw new Error("Missing return statement in function"); }
final public Restrictions Restrictions() throws ParseException {Restriction n0; NodeListOptional n1 = new NodeListOptional(); NodeSequence n2; NodeToken n3; Token n4; Restriction n5; n0 = Restriction(); label_6: while (true) { if (jj_2_7(2)) { ; } else { break label_6; } n2 = new NodeSequence(2); n4 = jj_consume_token(22); n3 = JTBToolkit.makeNodeToken(n4); n2.addNode(n3); n5 = Restriction(); n2.addNode(n5); n1.addNode(n2); } n1.nodes.trimToSize(); {if ("" != null) return new Restrictions(n0,n1);} throw new Error("Missing return statement in function"); }
NodeToken n11; Token n12; n0 = Path(); n2 = jj_consume_token(EQUALS); n1 = JTBToolkit.makeNodeToken(n2); n4 = jj_consume_token(QUOTED); n3 = JTBToolkit.makeNodeToken(n4); if (jj_2_8(2)) { n6 = new NodeSequence(3); n8 = jj_consume_token(23); n7 = JTBToolkit.makeNodeToken(n8); n6.addNode(n7); n10 = jj_consume_token(FLAG); n9 = JTBToolkit.makeNodeToken(n10); n6.addNode(n9); n12 = jj_consume_token(24); n11 = JTBToolkit.makeNodeToken(n12); n6.addNode(n11);
final public Condition Condition() throws ParseException {Path n0; NodeToken n1; Token n2; NodeToken n3; Token n4; n0 = Path(); n2 = jj_consume_token(EQUALS); n1 = JTBToolkit.makeNodeToken(n2); n4 = jj_consume_token(QUOTED); n3 = JTBToolkit.makeNodeToken(n4); {if ("" != null) return new Condition(n0,n1,n3);} throw new Error("Missing return statement in function"); }
/** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */
@Test public void test3() throws Exception { ConstraintsGrammar parser = new ConstraintsGrammar(new FileInputStream( "src/test/resources/rules/3.rules")); Parse p = parser.Parse(); }
final public RuleDeclaration RuleDeclaration() throws ParseException {Conditions n0; NodeToken n1; Token n2; Restrictions n3; NodeToken n4; Token n5; n0 = Conditions(); n2 = jj_consume_token(IMPLIES); n1 = JTBToolkit.makeNodeToken(n2); n3 = Restrictions(); n5 = jj_consume_token(SEMICOLON); n4 = JTBToolkit.makeNodeToken(n5); {if ("" != null) return new RuleDeclaration(n0,n1,n3,n4);} throw new Error("Missing return statement in function"); }
final public Imports Imports() throws ParseException {NodeList n0 = new NodeList(); ImportDeclaration n1; label_3: while (true) { n1 = ImportDeclaration(); n0.addNode(n1); if (jj_2_4(2)) { ; } else { break label_3; } } n0.nodes.trimToSize(); {if ("" != null) return new Imports(n0);} throw new Error("Missing return statement in function"); }
@Test public void test4() throws Exception { ConstraintsGrammar parser = new ConstraintsGrammar(new FileInputStream( "src/test/resources/rules/4.rules")); Parse p = parser.Parse(); }
@Test public void test2() throws Exception { ConstraintsGrammar parser = new ConstraintsGrammar(new FileInputStream( "src/test/resources/rules/2.rules")); Parse p = parser.Parse(); }