summaryrefslogtreecommitdiff
path: root/vhdlparser/Token.cc
diff options
context:
space:
mode:
Diffstat (limited to 'vhdlparser/Token.cc')
-rw-r--r--vhdlparser/Token.cc37
1 files changed, 22 insertions, 15 deletions
diff --git a/vhdlparser/Token.cc b/vhdlparser/Token.cc
index 735091d..d47dc68 100644
--- a/vhdlparser/Token.cc
+++ b/vhdlparser/Token.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. Token.cc Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. Token.cc Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
#include "Token.h"
@@ -18,42 +18,46 @@ namespace parser {
* override this method as appropriate.
*/
void * Token::getValue() {
- return NULL;
+ return nullptr;
}
/**
* No-argument constructor
*/
- Token::Token() {
- this->next = NULL;
- this->specialToken = NULL;
+ Token::Token() :
+ beginLine(0), beginColumn(0), endLine(0), endColumn(0)
+ {
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Constructs a new token for the specified Image.
*/
- Token::Token(int kind)
+ Token::Token(int kind) :
+ beginLine(0), beginColumn(0), endLine(0), endColumn(0)
{
this->kind = kind;
- this->next = NULL;
- this->specialToken = NULL;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Constructs a new token for the specified Image and Kind.
*/
- Token::Token(int kind, JAVACC_STRING_TYPE image)
+ Token::Token(int kind, const JJString& image)
+ : beginLine(0), beginColumn(0), endLine(0), endColumn(0)
{
this->kind = kind;
this->image = image;
- this->next = NULL;
- this->specialToken = NULL;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Returns the image.
*/
- JAVACC_STRING_TYPE Token::toString()
+ const JJString& Token::toString()
{
return image;
}
@@ -70,7 +74,7 @@ namespace parser {
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use sit in your lexical actions.
*/
- Token *Token::newToken(int ofKind, JAVACC_STRING_TYPE image)
+ Token *Token::newToken(int ofKind, const JJString& image)
{
switch(ofKind)
{
@@ -80,13 +84,16 @@ namespace parser {
Token *Token::newToken(int ofKind)
{
- return newToken(ofKind, JAVACC_STRING_TYPE((JAVACC_CHAR_TYPE*)""));
+ return newToken(ofKind, JJString());
}
Token::~Token() {
if (specialToken) delete specialToken;
+ this->kind = 0;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
}
}
-/* JavaCC - OriginalChecksum=dcb0f64486aa6455ae5af05d6bb539ec (do not edit this line) */
+/* JavaCC - OriginalChecksum=01131f3b3906a670aa8fee6224233701 (do not edit this line) */