Java 类org.antlr.v4.runtime.atn.LexerATNSimulator 实例源码

项目:Scratch-ApuC    文件:LexerInterpreter.java   
public LexerInterpreter(String grammarFileName, Collection<String> tokenNames, Collection<String> ruleNames, Collection<String> modeNames, ATN atn, CharStream input) {
    super(input);

    if (atn.grammarType != ATNType.LEXER) {
        throw new IllegalArgumentException("The ATN must be a lexer ATN.");
    }

    this.grammarFileName = grammarFileName;
    this.atn = atn;
    this.tokenNames = tokenNames.toArray(new String[tokenNames.size()]);
    this.ruleNames = ruleNames.toArray(new String[ruleNames.size()]);
    this.modeNames = modeNames.toArray(new String[modeNames.size()]);

    this._decisionToDFA = new DFA[atn.getNumberOfDecisions()];
    for (int i = 0; i < _decisionToDFA.length; i++) {
        _decisionToDFA[i] = new DFA(atn.getDecisionState(i), i);
    }
    this._interp = new LexerATNSimulator(this,atn,_decisionToDFA,_sharedContextCache);
}
项目:rapidminer    文件:FunctionExpressionLexer.java   
public FunctionExpressionLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:BEAST    文件:CLexer.java   
public CLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:oscm-app    文件:FWPolicyLexer.java   
public FWPolicyLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA,
            _sharedContextCache);
}
项目:coherence-sql    文件:SqlGrammarLexer.java   
public SqlGrammarLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:oscm    文件:FWPolicyLexer.java   
public FWPolicyLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA,
            _sharedContextCache);
}
项目:cyp2sql    文件:CypherLexer.java   
public CypherLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:Hydrograph    文件:ExpressionEditorLexer.java   
public ExpressionEditorLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:netlist-graph    文件:Verilog2001Lexer.java   
public Verilog2001Lexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:Objc2Lua    文件:ObjCLexer.java   
public ObjCLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:KeepTry    文件:HelloLexer.java   
public HelloLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:dsl    文件:AccountingLexer.java   
public AccountingLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:rapidminer-studio    文件:FunctionExpressionLexer.java   
public FunctionExpressionLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:development    文件:FWPolicyLexer.java   
public FWPolicyLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA,
            _sharedContextCache);
}
项目:UMLS-Terminology-Server    文件:ExpressionConstraintLexer.java   
/**
 * Instantiates a new expression constraint lexer.
 *
 * @param input the input
 */
public ExpressionConstraintLexer(CharStream input) {
  super(input);
  _interp =
      new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:netbeans-editorconfig-editor    文件:EditorConfigLexer.java   
public EditorConfigLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:SkinnyAssembler    文件:SkinnyLexer.java   
public SkinnyLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:Oscar    文件:tlvLexer.java   
public tlvLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:htools    文件:ByteRegexLexer.java   
public ByteRegexLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:oap    文件:CliLexer.java   
public CliLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:poly-ql    文件:QuestionnaireLexer.java   
public QuestionnaireLexer( CharStream input )
{
    super( input );
    _interp = new LexerATNSimulator( this, _ATN, _decisionToDFA, _sharedContextCache );
}
项目:poly-ql    文件:QLLexer.java   
public QLLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:org.pshdl    文件:MemoryModelLexer.java   
public MemoryModelLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:org.pshdl    文件:PSHDLLangLexer.java   
public PSHDLLangLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:Scratch-ApuC    文件:Lexer.java   
public void pushMode(int m) {
    if ( LexerATNSimulator.debug ) System.out.println("pushMode "+m);
    _modeStack.push(_mode);
    mode(m);
}
项目:Scratch-ApuC    文件:Lexer.java   
public int popMode() {
    if ( _modeStack.isEmpty() ) throw new EmptyStackException();
    if ( LexerATNSimulator.debug ) System.out.println("popMode back to "+ _modeStack.peek());
    mode( _modeStack.pop() );
    return _mode;
}
项目:SqlParser    文件:Sql92ParserLexer.java   
public Sql92ParserLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:SqlParser    文件:CommonLexer.java   
public CommonLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:SqlParser    文件:DateLexer.java   
public DateLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:WHOAMI    文件:Java8Lexer.java   
public Java8Lexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:WHOAMI    文件:CLexer.java   
public CLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:editorconfig-netbeans    文件:EditorConfigLexer.java   
public EditorConfigLexer(CharStream input) {
  super(input);
  _interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
项目:jStyleParser    文件:CSSTokenRecovery.java   
/**
 * Implements Lexer's next token with extra token passing from
 * recovery function
 */
public Token nextToken() {

    if(lexer._input == null) {
        throw new IllegalStateException("nextToken requires a non-null input stream.");
    } else {
        int tokenStartMarker = lexer._input.mark();

        try {
            Token ttype1;
            label110:
            while(!lexer._hitEOF) {
                lexer._token = null;
                lexer._channel = Token.DEFAULT_CHANNEL;
                lexer._tokenStartCharIndex = lexer._input.index();
                lexer._tokenStartCharPositionInLine = ((LexerATNSimulator)lexer.getInterpreter()).getCharPositionInLine();
                lexer._tokenStartLine = ((LexerATNSimulator)lexer.getInterpreter()).getLine();
                lexer._text = null;


                do {
                    lexer._type = 0;

                    int ttype;
                    try {
                        ttype = ((LexerATNSimulator)lexer.getInterpreter()).match(lexer._input, lexer._mode);
                    } catch (LexerNoViableAltException var7) {
                        lexer.notifyListeners(var7);
                        lexer.recover(var7);
                        ttype = -3;
                    }

                    if(lexer._input.LA(1) == -1) {
                        lexer._hitEOF = true;
                    }

                    if(lexer._type == 0) {
                        lexer._type = ttype;
                    }

                    if(lexer._type == -3) {
                        continue label110;
                    }
                } while(lexer._type == -2);

                if(lexer._token == null) {
                    lexer.emit();
                }

                ttype1 = lexer._token;
                //log.trace("return token: >" + ttype1.getText()+"< " + ttype1.getType());
                return ttype1;
            }
            // recover from unexpected EOF
            eof = true;
            if (!ls.isBalanced()) {
                return generateEOFRecover();
            }
            log.trace("lexer state is balanced - emitEOF");
            lexer.emitEOF();
            ttype1 = lexer._token;
            return ttype1;
        } finally {
            lexer._input.release(tokenStartMarker);
        }
    }
}
项目:inline-dsl-sample    文件:WindowLexer.java   
public WindowLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:relsem-bridge-backend    文件:SELECTLexer.java   
public SELECTLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:JKVC    文件:JKVCLexer.java   
public JKVCLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
项目:jbpm-data-modeler    文件:JavaLexer.java   
public JavaLexer(CharStream input) {
    super(input);
    _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}