Doxygen
Loading...
Searching...
No Matches
VhdlParserTokenManager.h
Go to the documentation of this file.
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"
10#include "vhdlstring.h"
11
12
13namespace vhdl {
14namespace parser {
15class VhdlParser;
16
17/** Token Manager. */
19public:
20
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);
42int jjMoveNfa_0(int startState, int curPos);
43bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
44bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
46
47public:
48 int curLexState = 0;
50 int jjround = 0;
51 int jjmatchedPos = 0;
53
55void SkipLexicalActions(Token *matchedToken);
56void 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
88private:
90
91public:
92 VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0);
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[83];
102 int jjstateSet[2 * 83];
109
110public:
112 if (errorHandler) delete errorHandler, errorHandler = nullptr;
113 errorHandler = eh;
114 }
115
116};
117}
118}
119#endif
JAVACC_STRING_TYPE JJString
Definition JavaCC.h:22
JAVACC_CHAR_TYPE JJChar
Definition JavaCC.h:21
JAVACC_SIMPLE_STRING JJSimpleString
Definition JavaCC.h:24
#define JAVACC_CHARSTREAM
Describes the input token stream.
Definition Token.h:17
An implementation for this interface is generated by JavaCCParser.
void TokenLexicalActions(Token *matchedToken)
void ReInit(JAVACC_CHARSTREAM *stream, int lexState=0)
int jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2)
int jjMoveStringLiteralDfa14_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
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)
int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
int jjMoveStringLiteralDfa17_0(unsigned long long old1, unsigned long long active1)
int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
int jjMoveNfa_0(int startState, int curPos)
int jjMoveStringLiteralDfa16_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
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)
VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState=0)
int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2)
const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec)
int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
int jjMoveStringLiteralDfa15_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
void SkipLexicalActions(Token *matchedToken)
int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
Token * getNextToken()
This gets the next token from the input stream.
const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end)
int jjMoveStringLiteralDfa10_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2)
int jjStopAtPos(int pos, int kind)
int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
int jjMoveStringLiteralDfa11_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
int jjMoveStringLiteralDfa12_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
void setErrorHandler(TokenManagerErrorHandler *eh)
int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1)
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
Token literal values and constants.
Definition CharStream.h:12