Lexer.recover

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.

  1. void recover(LexerNoViableAltException e)
  2. void recover(RecognitionException re)
    class Lexer

Meta