public virtual void Recover(Parser recognizer, RecognitionException e){if (lastErrorIndex == ((ITokenStream)recognizer.InputStream).Index && lastErrorStates != null && lastErrorStates.Contains(recognizer.State)){recognizer.Consume();}lastErrorIndex = ((ITokenStream)recognizer.InputStream).Index;if (lastErrorStates == null){lastErrorStates = new IntervalSet();}lastErrorStates.Add(recognizer.State);IntervalSet followSet = GetErrorRecoverySet(recognizer);ConsumeUntil(recognizer, followSet);}