All Implemented Interfaces:
Serializable

public final class ParseException extends RuntimeException
Thrown by RelAlgebraParser when the input does not conform to the relational algebra grammar.

In addition to the standard exception message, a ParseException exposes the precise source position (line(), column()) and the offending token (found()) so callers can produce IDE-quality diagnostics. The diagnostic() method returns a multi-line string that reproduces the source line with a ^ caret under the error position.

Example message:

   Expected ')' at line 3, column 12; found ','
   π name, (Users)
              ^
 
See Also:
  • Constructor Details

    • ParseException

      public ParseException(String message, String input, Token token)
  • Method Details

    • line

      public int line()
    • column

      public int column()
    • found

      public String found()
    • diagnostic

      public String diagnostic()