Doxygen
TokenMgrError.h
浏览该文件的文档.
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 
9 namespace vhdl {
10 namespace 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 
35 public:
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;
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 
60 private:
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  */
72 public:
74 
75  /*
76  * Constructors of various flavors follow.
77  */
78 
79  /** No arg constructor. */
80  TokenMgrError() ;
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=4ab4cdcdef6a3feec22fd9c00ba86e07 (do not edit this line) */
vhdl::parser::TokenMgrError::TokenMgrError
TokenMgrError()
No arg constructor.
vhdl::parser::TokenMgrError::message
JJString message
Definition: TokenMgrError.h:61
JJChar
JAVACC_CHAR_TYPE JJChar
Definition: JavaCC.h:21
vhdl::parser::LexerErrors
LexerErrors
Definition: TokenMgrError.h:12
vhdl::parser::TokenMgrError
Definition: TokenMgrError.h:34
vhdl::parser::TokenMgrError::LexicalError
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...
vhdl::parser::TokenMgrError::getMessage
JJString getMessage()
You can also modify the body of this method to customize your error messages.
vhdl::parser::INVALID_LEXICAL_STATE
@ INVALID_LEXICAL_STATE
Tried to change to an invalid lexical state.
Definition: TokenMgrError.h:26
vhdl::parser::LOOP_DETECTED
@ LOOP_DETECTED
Detected (and bailed out of) an infinite loop in the token manager.
Definition: TokenMgrError.h:31
vhdl
Token literal values and constants.
Definition: CharStream.h:12
JJString
JAVACC_STRING_TYPE JJString
Definition: JavaCC.h:22
vhdl::parser::STATIC_LEXER_ERROR
@ STATIC_LEXER_ERROR
An attempt was made to create a second instance of a token manager.
Definition: TokenMgrError.h:21
vhdl::parser::TokenMgrError::errorCode
int errorCode
Indicates the reason why the exception is thrown.
Definition: TokenMgrError.h:44
vhdl::parser::LEXICAL_ERROR
@ LEXICAL_ERROR
Lexical error occurred.
Definition: TokenMgrError.h:16
JavaCC.h