getLexerErrorMessage abstract method

String getLexerErrorMessage(
  1. int lineNo,
  2. int position,
  3. String input,
  4. String matched,
  5. String match,
)

Retrieves the error message for a lexer error.

  • lineNo which line the error occurs. It starts from 0.
  • position Which position the error occurs. It starts from 0. Note: \n is also counted.
  • input the substring that the error was detected.
  • matched the substring that was parsed successfully. It includes match. So, past is matched - match.
  • match the latest matched token. Currently, it is always empty since we don't support flex option.

Implementation

String getLexerErrorMessage(int lineNo, int position,
    String input, String matched, String match);