TokenMgrError.h
Go to the documentation of this file.
1 /* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 6.2 */
2 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
3 #ifndef _TOKENMGRERROR_H
4 #define _TOKENMGRERROR_H
5 #include "JavaCC.h"
6 
7 
8 namespace vhdl {
9 namespace parser {
10 
12  /**
13  * Lexical error occurred.
14  */
16 
17  /**
18  * An attempt was made to create a second instance of a token manager.
19  */
21 
22  /**
23  * Tried to change to an invalid lexical state.
24  */
26 
27  /**
28  * Detected (and bailed out of) an infinite loop in the token manager.
29  */
31 };
32 
34 public:
35  /*
36  * Ordinals for various reasons why an Error of this type can be thrown.
37  */
38 
39  /**
40  * Indicates the reason why the exception is thrown. It will have
41  * one of the above 4 values.
42  */
43  int errorCode;
44 
45  /**
46  * Returns a detailed message for the Error when it is thrown by the
47  * token manager to indicate a lexical error.
48  * Parameters :
49  * EOFSeen : indicates if EOF caused the lexical error
50  * curLexState : lexical state in which this error occurred
51  * errorLine : line number when the error occurred
52  * errorColumn : column number when the error occurred
53  * errorAfter : prefix that was seen before this error occurred
54  * curchar : the offending character
55  * Note: You can customize the lexical error message by modifying this method.
56  */
57  JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar);
58 
59 private:
61 
62  /**
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 :
66  *
67  * "Internal Error : Please file a bug report .... "
68  *
69  * from this method for such cases in the release version of your parser.
70  */
71 public:
73 
74  /*
75  * Constructors of various flavors follow.
76  */
77 
78  /** No arg constructor. */
79  TokenMgrError() ;
80 
81  /** Constructor with message and reason. */
82  TokenMgrError(JAVACC_STRING_TYPE message, int reason) ;
83 
84  /** Full Constructor. */
85  TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) ;
86 };
87 
88 }
89 }
90 #endif
91 /* JavaCC - OriginalChecksum=c22a1b25630ec91deb47dcba22b6b39d (do not edit this line) */
#define JAVACC_STRING_TYPE
Definition: JavaCC.h:16
JAVACC_STRING_TYPE getMessage()
JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar)
#define JAVACC_CHAR_TYPE
Definition: JavaCC.h:12
JAVACC_STRING_TYPE message
Definition: TokenMgrError.h:60