ParseException.h
Go to the documentation of this file.
1 /* Generated By:JavaCC: Do not edit this line. ParseException.h Version 6.2 */
2 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
3 #ifndef _PARSE_EXCEPTION_H
4 #define _PARSE_EXCEPTION_H
5 #include "JavaCC.h"
6 #include "Token.h"
7 
8 
9 namespace vhdl {
10 namespace parser {
11 /**
12  * This exception is thrown when parse errors are encountered.
13  * You can explicitly create objects of this exception type by
14  * calling the method generateParseException in the generated
15  * parser.
16  *
17  * You can modify this class to customize your error reporting
18  * mechanisms so long as you retain the fields.
19  */
21  public:
22 
23  /**
24  * This constructor is used by the method "generateParseException"
25  * in the generated parser. Calling this constructor generates
26  * a new object of this type with the fields "currentToken",
27  * "expectedTokenSequences", and "tokenImage" set.
28  */
29  ParseException(Token currentTokenVal,
30  int** expectedTokenSequencesVal,
31  JAVACC_STRING_TYPE* tokenImageVal
32  );
33 
34  /**
35  * The following constructors are for use by you for whatever
36  * purpose you can think of. Constructing the exception in this
37  * manner makes the exception behave in the normal way - i.e., as
38  * documented in the class "Throwable". The fields "errorToken",
39  * "expectedTokenSequences", and "tokenImage" do not contain
40  * relevant information. The JavaCC generated code does not use
41  * these constructors.
42  */
43 
45 
46  /** Constructor with message. */
48 
49 
50  /**
51  * This is the last token that has been consumed successfully. If
52  * this object has been created due to a parse error, the token
53  * followng this token will (therefore) be the first error token.
54  */
56 
57  /**
58  * Each entry in this array is an array of integers. Each array
59  * of integers represents a sequence of tokens (by their ordinal
60  * values) that is expected at this point of the parse.
61  */
63 
64  /**
65  * This is a reference to the "tokenImage" array of the generated
66  * parser within which the parse error occurred. This array is
67  * defined in the generated ...Constants class.
68  */
70 
71  /**
72  * It uses "currentToken" and "expectedTokenSequences" to generate a parse
73  * error message and returns it. If this object has been created
74  * due to a parse error, and you do not catch it (it gets thrown
75  * from the parser) the correct error message
76  * gets displayed.
77  */
78  private: JAVACC_STRING_TYPE initialise(Token currentToken,
79  int** expectedTokenSequences,
80  JAVACC_STRING_TYPE* tokenImage);
81 
82  /**
83  * The end of line string for this machine.
84  */
85 #define eol "\n"
86 
87  /**
88  * Used to convert raw characters to their escaped version
89  * when these raw version cannot be used as part of an ASCII
90  * string literal.
91  */
93 
94 };
95 
96 }
97 }
98 #endif
99 /* JavaCC - OriginalChecksum=bd87c2fc11a4306bd2c2482fd1025b7c (do not edit this line) */
JAVACC_STRING_TYPE * tokenImage
#define JAVACC_STRING_TYPE
Definition: JavaCC.h:16
JAVACC_STRING_TYPE add_escapes(JAVACC_STRING_TYPE str)
JAVACC_STRING_TYPE initialise(Token currentToken, int **expectedTokenSequences, JAVACC_STRING_TYPE *tokenImage)
static QCString str