p = factory.alt(cmds);
factory.setCurrentOuterAlt(alt); state._fsp--; alts.add(a); factory.setCurrentOuterAlt(++alt); p = factory.block((BlockAST)BLOCK1, ebnfRoot, alts);
cmd = factory.lexerCallCommand(ID5, (lexerCommandExpr6!=null?((GrammarAST)lexerCommandExpr6.start):null)); cmd = factory.lexerCommand(ID7);
p = factory.lexerAltCommands(a,lexerCommands3); match(input, Token.UP, null); p = factory.epsilon(EPSILON4); p = factory.alt(els);
retval.p = factory.action((ActionAST)ACTION11); retval.p = factory.sempred((PredAST)SEMPRED12); match(input, Token.UP, null); retval.p = factory.action((ActionAST)ACTION13); match(input, Token.UP, null); retval.p = factory.sempred((PredAST)SEMPRED14); retval.p = factory.charSetLiteral(((GrammarAST)retval.start));
public void processNonCombinedGrammar(Grammar g, boolean gencode) { if ( g.ast==null || g.ast.hasErrors ) return; if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree()); boolean ruleFail = checkForRuleIssues(g); if ( ruleFail ) return; int prevErrors = errMgr.getNumErrors(); // MAKE SURE GRAMMAR IS SEMANTICALLY CORRECT (FILL IN GRAMMAR OBJECT) SemanticPipeline sem = new SemanticPipeline(g); sem.process(); if ( errMgr.getNumErrors()>prevErrors ) return; // BUILD ATN FROM AST ATNFactory factory; if ( g.isLexer() ) factory = new LexerATNFactory((LexerGrammar)g); else factory = new ParserATNFactory(g); g.atn = factory.createATN(); if ( generate_ATN_dot ) generateATNs(g); if (gencode && g.tool.getNumErrors()==0 ) generateInterpreterData(g); // PERFORM GRAMMAR ANALYSIS ON ATN: BUILD DECISION DFAs AnalysisPipeline anal = new AnalysisPipeline(g); anal.process(); //if ( generate_DFA_dot ) generateDFAs(g); if ( g.tool.getNumErrors()>prevErrors ) return; // GENERATE CODE if ( gencode ) { CodeGenPipeline gen = new CodeGenPipeline(g); gen.process(); } }
p = factory.block((BlockAST)BLOCK2, ebnfRoot, alts);
p = factory.lexerAltCommands(a,lexerCommands3); match(input, Token.UP, null); p = factory.epsilon(EPSILON4); p = factory.alt(els);
retval.p = factory.action((ActionAST)ACTION11); retval.p = factory.sempred((PredAST)SEMPRED12); match(input, Token.UP, null); retval.p = factory.action((ActionAST)ACTION13); match(input, Token.UP, null); retval.p = factory.sempred((PredAST)SEMPRED14); retval.p = factory.charSetLiteral(((GrammarAST)retval.start));
if ( g.isLexer() ) factory = new LexerATNFactory((LexerGrammar)g); else factory = new ParserATNFactory(g); g.atn = factory.createATN();
p = factory.block((BlockAST)BLOCK2, ebnfRoot, alts);
p = factory.lexerAltCommands(a,lexerCommands3); match(input, Token.UP, null); p = factory.epsilon(EPSILON4); p = factory.alt(els);
retval.p = factory.action((ActionAST)ACTION11); retval.p = factory.sempred((PredAST)SEMPRED12); match(input, Token.UP, null); retval.p = factory.action((ActionAST)ACTION13); match(input, Token.UP, null); retval.p = factory.sempred((PredAST)SEMPRED14); retval.p = factory.charSetLiteral(((GrammarAST)retval.start));
cmd = factory.lexerCallCommand(ID5, (lexerCommandExpr6!=null?((GrammarAST)lexerCommandExpr6.start):null)); cmd = factory.lexerCommand(ID7);
factory.setCurrentOuterAlt(alt); state._fsp--; alts.add(a); factory.setCurrentOuterAlt(++alt); p = factory.block((BlockAST)BLOCK1, ebnfRoot, alts);
if ( g.isLexer() ) factory = new LexerATNFactory((LexerGrammar)g); else factory = new ParserATNFactory(g); g.atn = factory.createATN();
p = factory.alt(cmds);