/** set up an NFA NFAState that will yield eof tokens or, * in the case of a lexer grammar, an EOT token when the conversion * hits the end of a rule. */ private void build_EOFState(NFAState endNFAState) { NFAState end = newState(); int label = Label.EOF; if ( nfa.grammar.type==Grammar.LEXER ) { label = Label.EOT; end.setEOTTargetState(true); } /* System.out.println("build "+nfa.grammar.getTokenDisplayName(label)+ " loop on end of state "+endNFAState.getDescription()+ " to state "+end.stateNumber); */ Transition toEnd = new Transition(label, end); endNFAState.addTransition(toEnd); }
/** set up an NFA NFAState that will yield eof tokens or, * in the case of a lexer grammar, an EOT token when the conversion * hits the end of a rule. */ private void build_EOFState(NFAState endNFAState) { NFAState end = newState(); int label = Label.EOF; if ( nfa.grammar.type==Grammar.LEXER ) { label = Label.EOT; end.setEOTTargetState(true); } /* System.out.println("build "+nfa.grammar.getTokenDisplayName(label)+ " loop on end of state "+endNFAState.getDescription()+ " to state "+end.stateNumber); */ Transition toEnd = new Transition(label, end); endNFAState.addTransition(toEnd); }
/** set up an NFA NFAState that will yield eof tokens or, * in the case of a lexer grammar, an EOT token when the conversion * hits the end of a rule. */ private void build_EOFState(NFAState endNFAState) { NFAState end = newState(); int label = Label.EOF; if ( nfa.grammar.type==Grammar.LEXER ) { label = Label.EOT; end.setEOTTargetState(true); } /* System.out.println("build "+nfa.grammar.getTokenDisplayName(label)+ " loop on end of state "+endNFAState.getDescription()+ " to state "+end.stateNumber); */ Transition toEnd = new Transition(label, end); endNFAState.addTransition(toEnd); }
/** set up an NFA NFAState that will yield eof tokens or, * in the case of a lexer grammar, an EOT token when the conversion * hits the end of a rule. */ private void build_EOFState(NFAState endNFAState) { NFAState end = newState(); int label = Label.EOF; if ( nfa.grammar.type==Grammar.LEXER ) { label = Label.EOT; end.setEOTTargetState(true); } /* System.out.println("build "+nfa.grammar.getTokenDisplayName(label)+ " loop on end of state "+endNFAState.getDescription()+ " to state "+end.stateNumber); */ Transition toEnd = new Transition(label, end); endNFAState.addTransition(toEnd); }