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

项目:Scratch-ApuC    文件:Parser.java   
/** reset the parser's state */
public void reset() {
    if ( getInputStream()!=null ) getInputStream().seek(0);
    _errHandler.reset(this);
    _ctx = null;
    _syntaxErrors = 0;
    setTrace(false);
    _precedenceStack.clear();
    _precedenceStack.push(0);
    ATNSimulator interpreter = getInterpreter();
    if (interpreter != null) {
        interpreter.reset();
    }
}