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