public void process() { GrammarRootAST root = g.ast; if ( root==null ) return; tool.log("grammar", "before: "+root.toStringTree()); integrateImportedGrammars(g); reduceBlocksToSets(root); expandParameterizedLoops(root); tool.log("grammar", "after: "+root.toStringTree()); }
public void process() { GrammarRootAST root = g.ast; if ( root==null ) return; tool.log("grammar", "before: "+root.toStringTree()); integrateImportedGrammars(g); reduceBlocksToSets(root); expandParameterizedLoops(root); tool.log("grammar", "after: "+root.toStringTree()); }
public void process() { GrammarRootAST root = g.ast; if ( root==null ) return; tool.log("grammar", "before: "+root.toStringTree()); integrateImportedGrammars(g); reduceBlocksToSets(root); expandParameterizedLoops(root); tool.log("grammar", "after: "+root.toStringTree()); }
public void process() { GrammarRootAST root = g.ast; if ( root==null ) return; tool.log("grammar", "before: "+root.toStringTree()); integrateImportedGrammars(g); reduceBlocksToSets(root); expandParameterizedLoops(root); tool.log("grammar", "after: "+root.toStringTree()); }
public void process() { GrammarRootAST root = g.ast; if ( root==null ) return; tool.log("grammar", "before: "+root.toStringTree()); integrateImportedGrammars(g); reduceBlocksToSets(root); expandParameterizedLoops(root); tool.log("grammar", "after: "+root.toStringTree()); }
rootGrammar.tool.log("grammar", "Grammar: "+rootGrammar.ast.toStringTree());
rootGrammar.tool.log("grammar", "Grammar: "+rootGrammar.ast.toStringTree());
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(); } }
rootGrammar.tool.log("grammar", "Grammar: "+rootGrammar.ast.toStringTree());
rootGrammar.tool.log("grammar", "Grammar: "+rootGrammar.ast.toStringTree());
public void processNonCombinedGrammar(Grammar g, boolean gencode) { if ( g.ast==null || g.ast.hasErrors ) return; if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
public void processNonCombinedGrammar(Grammar g, boolean gencode) { if ( g.ast==null || g.ast.hasErrors ) return; if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
combinedGrammar.tool.log("grammar", "after extract implicit lexer ="+combinedAST.toStringTree()); combinedGrammar.tool.log("grammar", "lexer ="+lexerAST.toStringTree());
if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
combinedGrammar.tool.log("grammar", "after extract implicit lexer ="+combinedAST.toStringTree()); combinedGrammar.tool.log("grammar", "lexer ="+lexerAST.toStringTree());
public void processNonCombinedGrammar(Grammar g, boolean gencode) { if ( g.ast==null || g.ast.hasErrors ) return; if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
public void processNonCombinedGrammar(Grammar g, boolean gencode) { if ( g.ast==null || g.ast.hasErrors ) return; if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
combinedGrammar.tool.log("grammar", "after extract implicit lexer ="+combinedAST.toStringTree()); combinedGrammar.tool.log("grammar", "lexer ="+lexerAST.toStringTree());
combinedGrammar.tool.log("grammar", "after extract implicit lexer ="+combinedAST.toStringTree()); combinedGrammar.tool.log("grammar", "lexer ="+lexerAST.toStringTree());
combinedGrammar.tool.log("grammar", "after extract implicit lexer ="+combinedAST.toStringTree()); combinedGrammar.tool.log("grammar", "lexer ="+lexerAST.toStringTree());