Doxygen
VhdlParserTokenManager.h
浏览该文件的文档.
1 #ifndef VHDLPARSERTOKENMANAGER_H
2 #define VHDLPARSERTOKENMANAGER_H
3 #include "stdio.h"
4 #include "JavaCC.h"
5 #include "CharStream.h"
6 #include "Token.h"
7 #include "ErrorHandler.h"
8 #include "TokenManager.h"
9 #include "VhdlParserConstants.h"
10 #include "vhdlstring.h"
11 
12 
13 namespace vhdl {
14 namespace parser {
15 class VhdlParser;
16 
17 /** Token Manager. */
19 public:
20 
21  FILE *debugStream;
22  void setDebugStream(FILE *ds);
23  int jjStopAtPos(int pos, int kind);
25  int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2);
26  int jjMoveStringLiteralDfa2_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
27  int jjMoveStringLiteralDfa3_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
28  int jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
29  int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
30  int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
31  int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
32  int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
33  int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
34  int jjMoveStringLiteralDfa10_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
35  int jjMoveStringLiteralDfa11_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
36  int jjMoveStringLiteralDfa12_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
37  int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
38  int jjMoveStringLiteralDfa14_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
39  int jjMoveStringLiteralDfa15_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
40  int jjMoveStringLiteralDfa16_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
41  int jjMoveStringLiteralDfa17_0(unsigned long long old1, unsigned long long active1);
42 int jjMoveNfa_0(int startState, int curPos);
43 bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
44 bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
45 Token * jjFillToken();
46 
47 public:
50  int jjround;
53 
55 void SkipLexicalActions(Token *matchedToken);
56 void TokenLexicalActions(Token *matchedToken);
57 #define jjCheckNAdd(state)\
58 {\
59  if (jjrounds[state] != jjround)\
60  {\
61  jjstateSet[jjnewStateCnt++] = state;\
62  jjrounds[state] = jjround;\
63  }\
64 }
65 #define jjAddStates(start, end)\
66 {\
67  for (int x = start; x <= end; x++) {\
68  jjstateSet[jjnewStateCnt++] = jjnextStates[x];\
69  } /*while (start++ != end);*/\
70 }
71 #define jjCheckNAddTwoStates(state1, state2)\
72 {\
73  jjCheckNAdd(state1);\
74  jjCheckNAdd(state2);\
75 }
76 
77 #define jjCheckNAddStates(start, end)\
78 {\
79  for (int x = start; x <= end; x++) {\
80  jjCheckNAdd(jjnextStates[x]);\
81  } /*while (start++ != end);*/\
82 }
83 
84 #ifndef JAVACC_CHARSTREAM
85 #define JAVACC_CHARSTREAM CharStream
86 #endif
87 
88 private:
89  void ReInitRounds();
90 
91 public:
92  VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0);
93  virtual ~VhdlParserTokenManager();
94  void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0);
95  void SwitchTo(int lexState);
96  void clear();
97  const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec);
98  const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end);
99 
101  int jjrounds[87];
102  int jjstateSet[2 * 87];
109 
110 public:
112  if (errorHandler) delete errorHandler, errorHandler = nullptr;
113  errorHandler = eh;
114  }
115 
116 };
117 }
118 }
119 #endif
ErrorHandler.h
vhdl::parser::VhdlParserTokenManager::~VhdlParserTokenManager
virtual ~VhdlParserTokenManager()
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa17_0
int jjMoveStringLiteralDfa17_0(unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjMoveNfa_0
int jjMoveNfa_0(int startState, int curPos)
vhdl::parser::VhdlParserTokenManager::setDebugStream
void setDebugStream(FILE *ds)
vhdl::parser::VhdlParserTokenManager::SkipLexicalActions
void SkipLexicalActions(Token *matchedToken)
vhdl::parser::VhdlParserTokenManager::jjimage
JJString jjimage
Definition: VhdlParserTokenManager.h:103
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa14_0
int jjMoveStringLiteralDfa14_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjKindsForBitVector
const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec)
vhdl::parser::VhdlParserTokenManager::jjmatchedKind
int jjmatchedKind
Definition: VhdlParserTokenManager.h:52
vhdl::parser::Token
Describes the input token stream.
Definition: Token.h:16
JJSimpleString
JAVACC_SIMPLE_STRING JJSimpleString
Definition: JavaCC.h:24
JJChar
JAVACC_CHAR_TYPE JJChar
Definition: JavaCC.h:21
Token.h
vhdl::parser::VhdlParserTokenManager::image
JJString image
Definition: VhdlParserTokenManager.h:104
JAVACC_CHARSTREAM
#define JAVACC_CHARSTREAM
Definition: VhdlParserTokenManager.h:85
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa5_0
int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa4_0
int jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa12_0
int jjMoveStringLiteralDfa12_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjnewStateCnt
int jjnewStateCnt
Definition: VhdlParserTokenManager.h:49
vhdl::parser::VhdlParserTokenManager
Token Manager.
Definition: VhdlParserTokenManager.h:18
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa1_0
int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa9_0
int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::clear
void clear()
vhdl::parser::VhdlParserTokenManager::jjstateSet
int jjstateSet[2 *87]
Definition: VhdlParserTokenManager.h:102
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa6_0
int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjmatchedPos
int jjmatchedPos
Definition: VhdlParserTokenManager.h:51
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa16_0
int jjMoveStringLiteralDfa16_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa15_0
int jjMoveStringLiteralDfa15_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
vhdl::parser::VhdlParserTokenManager::setErrorHandler
void setErrorHandler(TokenManagerErrorHandler *eh)
Definition: VhdlParserTokenManager.h:111
CharStream.h
vhdl::parser::VhdlParserTokenManager::jjKindsForStateVector
const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end)
vhdl::parser::VhdlParserTokenManager::jjrounds
int jjrounds[87]
Definition: VhdlParserTokenManager.h:101
vhdl::parser::VhdlParserTokenManager::ReInitRounds
void ReInitRounds()
vhdl::parser::VhdlParserTokenManager::jjStopAtPos
int jjStopAtPos(int pos, int kind)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa11_0
int jjMoveStringLiteralDfa11_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::lengthOfMatch
int lengthOfMatch
Definition: VhdlParserTokenManager.h:106
vhdl::parser::VhdlParserTokenManager::ReInit
void ReInit(JAVACC_CHARSTREAM *stream, int lexState=0)
vhdl::parser::TokenParser
Definition: vhdlstring.h:17
vhdl::parser::VhdlParserTokenManager::jjimageLen
int jjimageLen
Definition: VhdlParserTokenManager.h:105
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa0_0
int jjMoveStringLiteralDfa0_0()
vhdl::parser::VhdlParserTokenManager::VhdlParserTokenManager
VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState=0)
vhdl
Token literal values and constants.
Definition: CharStream.h:12
vhdl::parser::VhdlParserTokenManager::input_stream
JAVACC_CHARSTREAM * input_stream
Definition: VhdlParserTokenManager.h:100
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa13_0
int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjFillToken
Token * jjFillToken()
vhdl::parser::VhdlParserTokenManager::SwitchTo
void SwitchTo(int lexState)
vhdl::parser::VhdlParserTokenManager::curLexState
int curLexState
Definition: VhdlParserTokenManager.h:48
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa8_0
int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
JJString
JAVACC_STRING_TYPE JJString
Definition: JavaCC.h:22
vhdl::parser::VhdlParserTokenManager::TokenLexicalActions
void TokenLexicalActions(Token *matchedToken)
vhdlstring.h
vhdl::parser::VhdlParserTokenManager::jjCanMove_0
bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2)
vhdl::parser::VhdlParserTokenManager::curChar
JJChar curChar
Definition: VhdlParserTokenManager.h:107
vhdl::parser::VhdlParserTokenManager::jjround
int jjround
Definition: VhdlParserTokenManager.h:50
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa7_0
int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa2_0
int jjMoveStringLiteralDfa2_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2)
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa3_0
int jjMoveStringLiteralDfa3_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2)
TokenManager.h
vhdl::parser::VhdlParserTokenManager::getNextToken
Token * getNextToken()
VhdlParserConstants.h
vhdl::parser::VhdlParserTokenManager::errorHandler
TokenManagerErrorHandler * errorHandler
Definition: VhdlParserTokenManager.h:108
vhdl::parser::TokenManagerErrorHandler
Definition: ErrorHandler.h:51
JavaCC.h
vhdl::parser::TokenManager
An implementation for this interface is generated by JavaCCParser.
Definition: TokenManager.h:18
vhdl::parser::VhdlParserTokenManager::debugStream
FILE * debugStream
Definition: VhdlParserTokenManager.h:21
vhdl::parser::VhdlParserTokenManager::jjMoveStringLiteralDfa10_0
int jjMoveStringLiteralDfa10_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
vhdl::parser::VhdlParserTokenManager::jjCanMove_1
bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2)