public void reset() { super.reset(); // reset all recognizer state variables // wack Lexer state variables if (input != null) { input.seek(0); // rewind the input } if (state == null) { return; // no shared state work to do } state.token = null; state.type = Token.INVALID_TOKEN_TYPE; state.channel = Token.DEFAULT_CHANNEL; state.tokenStartCharIndex = -1; state.tokenStartCharPositionInLine = -1; state.tokenStartLine = -1; state.text = null; }
public void traceOut(String ruleName, int ruleIndex) { String inputSymbol = ((char) input.LT(1)) + " line=" + getLine() + ":" + getCharPositionInLine(); super.traceOut(ruleName, ruleIndex, inputSymbol); }