Doxygen
Loading...
Searching...
No Matches
TokenMgrError.h
Go to the documentation of this file.
1/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 7.0 */
2/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
3#ifndef JAVACC_TOKENMGRERROR_H
4#define JAVACC_TOKENMGRERROR_H
5
6#include "JavaCC.h"
7
8
9namespace vhdl {
10namespace parser {
11
13 /**
14 * Lexical error occurred.
15 */
17
18 /**
19 * An attempt was made to create a second instance of a token manager.
20 */
22
23 /**
24 * Tried to change to an invalid lexical state.
25 */
27
28 /**
29 * Detected (and bailed out of) an infinite loop in the token manager.
30 */
32};
33
35public:
36 /*
37 * Ordinals for various reasons why an Error of this type can be thrown.
38 */
39
40 /**
41 * Indicates the reason why the exception is thrown. It will have
42 * one of the above 4 values.
43 */
44 int errorCode = -1;
45
46 /**
47 * Returns a detailed message for the Error when it is thrown by the
48 * token manager to indicate a lexical error.
49 * Parameters :
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.
57 */
58 JJString LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar);
59
60private:
62
63 /**
64 * You can also modify the body of this method to customize your error messages.
65 * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
66 * of end-users concern, so you can return something like :
67 *
68 * "Internal Error : Please file a bug report .... "
69 *
70 * from this method for such cases in the release version of your parser.
71 */
72public:
74
75 /*
76 * Constructors of various flavors follow.
77 */
78
79 /** No arg constructor. */
81
82 /** Constructor with message and reason. */
83 TokenMgrError(const JJString& message, int reason) ;
84
85 /** Full Constructor. */
86 TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) ;
87};
88
89}
90}
91
92#endif
93/* JavaCC - OriginalChecksum=1d70bcaf73c58a19d4427d29908696e5 (do not edit this line) */
JAVACC_STRING_TYPE JJString
Definition JavaCC.h:22
JAVACC_CHAR_TYPE JJChar
Definition JavaCC.h:21
JJString getMessage()
You can also modify the body of this method to customize your error messages.
JJString LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString &errorAfter, JJChar curChar)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical...
TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString &errorAfter, JJChar curChar, int reason)
Full Constructor.
TokenMgrError()
No arg constructor.
TokenMgrError(const JJString &message, int reason)
Constructor with message and reason.
int errorCode
Indicates the reason why the exception is thrown.
@ STATIC_LEXER_ERROR
An attempt was made to create a second instance of a token manager.
@ LOOP_DETECTED
Detected (and bailed out of) an infinite loop in the token manager.
@ INVALID_LEXICAL_STATE
Tried to change to an invalid lexical state.
@ LEXICAL_ERROR
Lexical error occurred.
Token literal values and constants.
Definition CharStream.h:12