def reset(self):
        
        # wack everything related to error recovery
        if self._state is None:
            # no shared state work to do
            return
        
        self._state.following = []
        self._state.errorRecovery = False
        self._state.lastErrorIndex = -1
        self._state.syntaxErrors = 0
        # wack everything related to backtracking and memoization
        self._state.backtracking = 0
        if self._state.ruleMemo is not None:
            self._state.ruleMemo = {}
reset the parser's state; subclasses must rewinds the input stream
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/recognizers.py/BaseRecognizer.reset