1 /* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 6.0 */
2 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
3 #ifndef _TOKENMGRERROR_H
4 #define _TOKENMGRERROR_H
13 * Lexical error occurred.
18 * An attempt was made to create a second instance of a token manager.
20 STATIC_LEXER_ERROR = 1,
23 * Tried to change to an invalid lexical state.
25 INVALID_LEXICAL_STATE = 2,
28 * Detected (and bailed out of) an infinite loop in the token manager.
37 * Ordinals for various reasons why an Error of this type can be thrown.
41 * Indicates the reason why the exception is thrown. It will have
42 * one of the above 4 values.
47 * Returns a detailed message for the Error when it is thrown by the
48 * token manager to indicate a lexical error.
50 * EOFSeen : indicates if EOF caused the lexical error
51 * curLexState : lexical state in which this error occurred
52 * errorLine : line number when the error occurred
53 * errorColumn : column number when the error occurred
54 * errorAfter : prefix that was seen before this error occurred
55 * curchar : the offending character
56 * Note: You can customize the lexical error message by modifying this method.
58 JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar);
60 private: JAVACC_STRING_TYPE message;
63 * You can also modify the body of this method to customize your error messages.
64 * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
65 * of end-users concern, so you can return something like :
67 * "Internal Error : Please file a bug report .... "
69 * from this method for such cases in the release version of your parser.
71 JAVACC_STRING_TYPE getMessage() ;
74 * Constructors of various flavors follow.
77 /** No arg constructor. */
78 public: TokenMgrError() ;
80 /** Constructor with message and reason. */
81 public: TokenMgrError(JAVACC_STRING_TYPE message, int reason) ;
83 /** Full Constructor. */
84 public: TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) ;
90 /* JavaCC - OriginalChecksum=c7d825cb4d037b031ae43569d383f738 (do not edit this line) */