public virtual void Reset()
{
// wack everything related to error recovery
if ( state == null )
{
return; // no shared state work to do
}
state._fsp = -1;
state.errorRecovery = false;
state.lastErrorIndex = -1;
state.failed = false;
state.syntaxErrors = 0;
// wack everything related to backtracking and memoization
state.backtracking = 0;
for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ )
{ // wipe cache
state.ruleMemo[i] = null;
}
}