Class KGCLSyntaxError


  • public class KGCLSyntaxError
    extends Object
    A syntax error encountered when parsing a KGCL program.
    • Constructor Detail

      • KGCLSyntaxError

        public KGCLSyntaxError​(int line,
                               int position,
                               String message)
        Creates a new instance.
        Parameters:
        line - The line number where the error occurred.
        position - The position in the line where the error occurred.
        message - The error message from the ANTLR parser.
    • Method Detail

      • getLine

        public int getLine()
        Gets the line where the error occurred.
        Returns:
        The 1-based index of the offending line, starting from the beginning of the input.
      • getPosition

        public int getPosition()
        Gets the position in the line where the error occurred.
        Returns:
        The 0-based index of the offending character, starting from the beginning of the line.
      • getMessage

        public String getMessage()
        Gets the error message.
        Returns:
        The error message from the ANTLR parser.