| java.lang.Object java.lang.Throwable java.lang.Exception net.percederberg.grammatica.parser.ParseException
ParseException | public class ParseException extends Exception (Code) | | A parse exception.
author: Per Cederberg, version: 1.1 |
ANALYSIS_ERROR | final public static int ANALYSIS_ERROR(Code) | | The analysis error type constant. This type is used when an
error is encountered in the analysis. The additional
information provided should contain the error message.
|
INTERNAL_ERROR | final public static int INTERNAL_ERROR(Code) | | The internal error type constant. This type is only used to
signal an error that is a result of a bug in the parser or
tokenizer code.
|
INVALID_TOKEN_ERROR | final public static int INVALID_TOKEN_ERROR(Code) | | The invalid token error type constant. This type is used when
a token pattern with an error message is matched. The
additional information provided should contain the error
message.
|
IO_ERROR | final public static int IO_ERROR(Code) | | The I/O error type constant. This type is used for stream I/O
errors.
|
UNEXPECTED_CHAR_ERROR | final public static int UNEXPECTED_CHAR_ERROR(Code) | | The unexpected character error type constant. This type is used
when a character is read that isn't handled by one of the token
patterns.
|
UNEXPECTED_EOF_ERROR | final public static int UNEXPECTED_EOF_ERROR(Code) | | The unexpected end of file error type constant. This type is
used when end of file is encountered instead of a valid token.
|
UNEXPECTED_TOKEN_ERROR | final public static int UNEXPECTED_TOKEN_ERROR(Code) | | The unexpected token error type constant. This type is used
when another token than the expected one is encountered.
|
ParseException | public ParseException(int type, String info, int line, int column)(Code) | | Creates a new parse exception.
Parameters: type - the parse error type Parameters: info - the additional information Parameters: line - the line number, or -1 for unknown Parameters: column - the column number, or -1 for unknown |
ParseException | public ParseException(int type, String info, ArrayList details, int line, int column)(Code) | | Creates a new parse exception. This constructor is only used
to supply the detailed information array, which is only used
for expected token errors. The list then contains descriptions
of the expected tokens.
Parameters: type - the parse error type Parameters: info - the additional information Parameters: details - the additional detailed information Parameters: line - the line number, or -1 for unknown Parameters: column - the column number, or -1 for unknown |
getColumn | public int getColumn()(Code) | | Returns the column number where the error occured.
the column number of the error, or -1 if unknown |
getDetails | public ArrayList getDetails()(Code) | | Returns the additional detailed error information.
the additional detailed error information |
getErrorMessage | public String getErrorMessage()(Code) | | Returns the error message. This message will contain all the
information available, except for the line and column number
information.
the error message |
getErrorType | public int getErrorType()(Code) | | Returns the error type.
the error type |
getInfo | public String getInfo()(Code) | | Returns the additional error information.
the additional error information |
getLine | public int getLine()(Code) | | Returns the line number where the error occured.
the line number of the error, or -1 if unknown |
getMessage | public String getMessage()(Code) | | Returns the detailed error message. This message will contain
the same string as getErrorMessage(), but with line number and
column number information appended.
the detailed error message |
|
|