private final void reset ( ) { backtrackStack . clear ( ) ; actionStack . clear ( ) ; stateStack . clear ( ) ; parserErrors . clear ( ) ; streamPosition = 0 ; stepCounter = 0 ; stateStack . push ( 0 ) ; maxPosition = 0 ; shiftIgnoredTokens ( ) ; }
This method is called just before running the parser to reset all internal values and to clean all stacks .