Click or drag to resize

LexerRecover Method

Overload List
  NameDescription
Public methodRecover(RecognitionException)
Lexers can normally match any char in it's vocabulary after matching a token, so do the easy thing and just kill a character and hope it all works out. You can instead use the rule invocation stack to do sophisticated error recovery if you are in a fragment rule.
Public methodRecover(IIntStream, RecognitionException)
Recover from an error found on the input stream. This is for NoViableAlt and mismatched symbol exceptions. If you enable single token insertion and deletion, this will usually not handle mismatched symbol exceptions but there could be a mismatched token that the match() routine could not recover from.
(Inherited from BaseRecognizer.)
Top
See Also