Class KGCLSyntaxError

java.lang.Object
org.incenp.obofoundry.kgcl.KGCLSyntaxError

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

    • 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 Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object