Package org.incenp.obofoundry.kgcl
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 Summary
Constructors Constructor Description KGCLSyntaxError(int line, int position, String message)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLine()Gets the line where the error occurred.StringgetMessage()Gets the error message.intgetPosition()Gets the position in the line where the error occurred.StringtoString()
-
-
-
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.
-
-