/** For each decision in this grammar, compute a single DFA using the * NFA states associated with the decision. The DFA construction * determines whether or not the alternatives in the decision are * separable using a regular lookahead language. * * Store the lookahead DFAs in the AST created from the user's grammar * so the code generator or whoever can easily access it. * * This is a separate method because you might want to create a * Grammar without doing the expensive analysis. */ public void createLookaheadDFAs() { createLookaheadDFAs(true); }
/** For each decision in this grammar, compute a single DFA using the * NFA states associated with the decision. The DFA construction * determines whether or not the alternatives in the decision are * separable using a regular lookahead language. * * Store the lookahead DFAs in the AST created from the user's grammar * so the code generator or whoever can easily access it. * * This is a separate method because you might want to create a * Grammar without doing the expensive analysis. */ public void createLookaheadDFAs() { createLookaheadDFAs(true); }
/** For each decision in this grammar, compute a single DFA using the * NFA states associated with the decision. The DFA construction * determines whether or not the alternatives in the decision are * separable using a regular lookahead language. * * Store the lookahead DFAs in the AST created from the user's grammar * so the code generator or whoever can easily access it. * * This is a separate method because you might want to create a * Grammar without doing the expensive analysis. */ public void createLookaheadDFAs() { createLookaheadDFAs(true); }
/** For each decision in this grammar, compute a single DFA using the * NFA states associated with the decision. The DFA construction * determines whether or not the alternatives in the decision are * separable using a regular lookahead language. * * Store the lookahead DFAs in the AST created from the user's grammar * so the code generator or whoever can easily access it. * * This is a separate method because you might want to create a * Grammar without doing the expensive analysis. */ public void createLookaheadDFAs() { createLookaheadDFAs(true); }
protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Build NFAs from the grammar AST grammar.buildNFA(); // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); }
protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Build NFAs from the grammar AST grammar.buildNFA(); // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); }
protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Build NFAs from the grammar AST grammar.buildNFA(); // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); }
protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Build NFAs from the grammar AST grammar.buildNFA(); // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); }
public void parse(String startRule, DebugEventListener actions, List visitedStates) throws RecognitionException { //System.out.println("parse("+startRule+")"); // Build NFAs/DFAs from the grammar AST if NFAs haven't been built yet if ( grammar.getRuleStartState(startRule)==null ) { grammar.buildNFA(); } if ( !grammar.allDecisionDFAHaveBeenCreated() ) { // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); } // do the parse Stack ruleInvocationStack = new Stack(); NFAState start = grammar.getRuleStartState(startRule); NFAState stop = grammar.getRuleStopState(startRule); parseEngine(startRule, start, stop, input, ruleInvocationStack, actions, visitedStates); }
public void parse(String startRule, DebugEventListener actions, List<NFAState> visitedStates) throws RecognitionException { //System.out.println("parse("+startRule+")"); // Build NFAs/DFAs from the grammar AST if NFAs haven't been built yet if ( grammar.getRuleStartState(startRule)==null ) { grammar.buildNFA(); } if ( !grammar.allDecisionDFAHaveBeenCreated() ) { // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); } // do the parse Stack<NFAState> ruleInvocationStack = new Stack<NFAState>(); NFAState start = grammar.getRuleStartState(startRule); NFAState stop = grammar.getRuleStopState(startRule); parseEngine(startRule, start, stop, input, ruleInvocationStack, actions, visitedStates); }
public void parse(String startRule, DebugEventListener actions, List<NFAState> visitedStates) throws RecognitionException { //System.out.println("parse("+startRule+")"); // Build NFAs/DFAs from the grammar AST if NFAs haven't been built yet if ( grammar.getRuleStartState(startRule)==null ) { grammar.buildNFA(); } if ( !grammar.allDecisionDFAHaveBeenCreated() ) { // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); } // do the parse Stack<NFAState> ruleInvocationStack = new Stack<NFAState>(); NFAState start = grammar.getRuleStartState(startRule); NFAState stop = grammar.getRuleStopState(startRule); parseEngine(startRule, start, stop, input, ruleInvocationStack, actions, visitedStates); }
public void parse(String startRule, DebugEventListener actions, List visitedStates) throws RecognitionException { //System.out.println("parse("+startRule+")"); // Build NFAs/DFAs from the grammar AST if NFAs haven't been built yet if ( grammar.getRuleStartState(startRule)==null ) { grammar.buildNFA(); } if ( !grammar.allDecisionDFAHaveBeenCreated() ) { // Create the DFA predictors for each decision grammar.createLookaheadDFAs(); } // do the parse Stack ruleInvocationStack = new Stack(); NFAState start = grammar.getRuleStartState(startRule); NFAState stop = grammar.getRuleStopState(startRule); parseEngine(startRule, start, stop, input, ruleInvocationStack, actions, visitedStates); }
grammar.createLookaheadDFAs();
grammar.createLookaheadDFAs();
g.composite.createNFAs(); g.createLookaheadDFAs(); if(engine.isCombinedGrammar()) { lexerGrammar.createLookaheadDFAs();
s.nfa.grammar.createLookaheadDFAs();
s.nfa.grammar.createLookaheadDFAs();