Doxygen
Loading...
Searching...
No Matches
ParseException.h
Go to the documentation of this file.
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
10namespace vhdl {
11namespace 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 * following 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 */
94
95};
96
97}
98}
99
100#endif
101/* JavaCC - OriginalChecksum=15877456661be7c62e39a97606c3e899 (do not edit this line) */
JAVACC_STRING_TYPE JJString
Definition JavaCC.h:22
This exception is thrown when parse errors are encountered.
ParseException(const JJString &message)
Constructor with message.
ParseException(Token currentTokenVal, int **expectedTokenSequencesVal, JJString *tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.
int ** expectedTokenSequences
Each entry in this array is an array of integers.
JJString add_escapes(const JJString &str)
Used to convert raw characters to their escaped version when these raw version cannot be used as part...
JJString initialise(Token currentToken, int **expectedTokenSequences, JJString *tokenImage)
It uses "currentToken" and "expectedTokenSequences" to generate a parse error message and returns it.
ParseException()
The following constructors are for use by you for whatever purpose you can think of.
Token currentToken
This is the last token that has been consumed successfully.
JJString * tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error oc...
Token literal values and constants.
Definition CharStream.h:12