summaryrefslogtreecommitdiff
path: root/vhdlparser/VhdlParserTokenManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'vhdlparser/VhdlParserTokenManager.h')
-rw-r--r--vhdlparser/VhdlParserTokenManager.h83
1 files changed, 29 insertions, 54 deletions
diff --git a/vhdlparser/VhdlParserTokenManager.h b/vhdlparser/VhdlParserTokenManager.h
index 96a2449..2837737 100644
--- a/vhdlparser/VhdlParserTokenManager.h
+++ b/vhdlparser/VhdlParserTokenManager.h
@@ -7,79 +7,52 @@
#include "ErrorHandler.h"
#include "TokenManager.h"
#include "VhdlParserConstants.h"
-#include "VhdlParser.h"
+#include "vhdlstring.h"
+
namespace vhdl {
namespace parser {
class VhdlParser;
/** Token Manager. */
-class VhdlParserTokenManager : public TokenManager {
- public:
+class VhdlParserTokenManager : public TokenManager, public TokenParser {
+public:
- /** Debug output. */
FILE *debugStream;
- /** Set debug output. */
-
-void setDebugStream(FILE *ds);
-
+ void setDebugStream(FILE *ds);
int jjStopAtPos(int pos, int kind);
-
int jjMoveStringLiteralDfa0_0();
-
int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2);
-
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);
-
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 jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa10_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);
-
int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa14_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);
-
int jjMoveStringLiteralDfa16_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 jjMoveNfa_0(int startState, int curPos);
-
bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
-
bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
-
Token * jjFillToken();
-public: int curLexState;
-public: int jjnewStateCnt;
-public: int jjround;
-public: int jjmatchedPos;
-public: int jjmatchedKind;
-
+public:
+ int curLexState;
+ int jjnewStateCnt;
+ int jjround;
+ int jjmatchedPos;
+ int jjmatchedKind;
Token * getNextToken();
-
void SkipLexicalActions(Token *matchedToken);
-
void TokenLexicalActions(Token *matchedToken);
#define jjCheckNAdd(state)\
{\
@@ -111,31 +84,33 @@ void TokenLexicalActions(Token *matchedToken);
#ifndef JAVACC_CHARSTREAM
#define JAVACC_CHARSTREAM CharStream
#endif
- private: VhdlParser*parser;
- private: void ReInitRounds();
- public: VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
- public: virtual ~VhdlParserTokenManager();
- void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
+
+private:
+ void ReInitRounds();
+
+public:
+ VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0);
+ virtual ~VhdlParserTokenManager();
+ void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0);
void SwitchTo(int lexState);
void clear();
- const JAVACC_SIMPLE_STRING jjKindsForBitVector(int i, unsigned long long vec);
- const JAVACC_SIMPLE_STRING jjKindsForStateVector(int lexState, int vec[], int start, int end);
+ const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec);
+ const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end);
+
JAVACC_CHARSTREAM* input_stream;
- int jjrounds[81];
- int jjstateSet[2 * 81];
- JAVACC_STRING_TYPE jjimage;
- JAVACC_STRING_TYPE image;
+ int jjrounds[87];
+ int jjstateSet[2 * 87];
+ JJString jjimage;
+ JJString image;
int jjimageLen;
int lengthOfMatch;
- JAVACC_CHAR_TYPE curChar;
- TokenManagerErrorHandler* errorHandler;
- bool errorHandlerCreated;
+ JJChar curChar;
+ TokenManagerErrorHandler* errorHandler = nullptr;
public:
void setErrorHandler(TokenManagerErrorHandler *eh) {
- if (errorHandlerCreated && errorHandler != NULL) delete errorHandler;
+ if (errorHandler) delete errorHandler, errorHandler = nullptr;
errorHandler = eh;
- errorHandlerCreated = false;
}
};