Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
doxygen-1.8.11
vhdlparser
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
11
enum
LexerErrors
{
12
/**
13
* Lexical error occurred.
14
*/
15
LEXICAL_ERROR
= 0,
16
17
/**
18
* An attempt was made to create a second instance of a token manager.
19
*/
20
STATIC_LEXER_ERROR
= 1,
21
22
/**
23
* Tried to change to an invalid lexical state.
24
*/
25
INVALID_LEXICAL_STATE
= 2,
26
27
/**
28
* Detected (and bailed out of) an infinite loop in the token manager.
29
*/
30
LOOP_DETECTED
= 3,
31
};
32
33
class
TokenMgrError
{
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
:
60
JAVACC_STRING_TYPE
message
;
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
:
72
JAVACC_STRING_TYPE
getMessage
() ;
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) */
vhdl::parser::LOOP_DETECTED
Definition:
TokenMgrError.h:30
JAVACC_STRING_TYPE
#define JAVACC_STRING_TYPE
Definition:
JavaCC.h:16
vhdl::parser::TokenMgrError::getMessage
JAVACC_STRING_TYPE getMessage()
Definition:
TokenMgrError.cc:41
vhdl::parser::LexerErrors
LexerErrors
Definition:
TokenMgrError.h:11
JavaCC.h
vhdl::parser::LEXICAL_ERROR
Definition:
TokenMgrError.h:15
vhdl
Definition:
CharStream.cc:34
vhdl::parser::TokenMgrError::LexicalError
JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar)
Definition:
TokenMgrError.cc:20
JAVACC_CHAR_TYPE
#define JAVACC_CHAR_TYPE
Definition:
JavaCC.h:12
ValidateOpDetReco.parser
parser
Definition:
ValidateOpDetReco.py:22
vhdl::parser::STATIC_LEXER_ERROR
Definition:
TokenMgrError.h:20
vhdl::parser::TokenMgrError::errorCode
int errorCode
Definition:
TokenMgrError.h:43
vhdl::parser::TokenMgrError
Definition:
TokenMgrError.h:33
vhdl::parser::TokenMgrError::message
JAVACC_STRING_TYPE message
Definition:
TokenMgrError.h:60
vhdl::parser::INVALID_LEXICAL_STATE
Definition:
TokenMgrError.h:25
vhdl::parser::TokenMgrError::TokenMgrError
TokenMgrError()
Definition:
TokenMgrError.cc:50
Generated by
1.8.11