summaryrefslogtreecommitdiffstats
path: root/vhdlparser/CharStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'vhdlparser/CharStream.h')
-rw-r--r--vhdlparser/CharStream.h106
1 files changed, 55 insertions, 51 deletions
diff --git a/vhdlparser/CharStream.h b/vhdlparser/CharStream.h
index 69b8ab5..a955d8e 100644
--- a/vhdlparser/CharStream.h
+++ b/vhdlparser/CharStream.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef CHARSTREAM_H
-#define CHARSTREAM_H
+#ifndef JAVACC_CHARSTREAM_H_
+#define JAVACC_CHARSTREAM_H_
+
#include "JavaCC.h"
#ifndef INITIAL_BUFFER_SIZE
@@ -29,9 +30,10 @@ namespace parser {
class CharStream {
public:
- void setTabSize(int i) { tabSize = i; }
- int getTabSize(int i) { return tabSize; }
- private:
+ void setTabSize(int i) { tabSize = i; }
+ int getTabSize(int i) { return tabSize; }
+
+private:
int getBufcolumn(int pos) {
if (trackLineColumn && pos>=0) {
return bufcolumn[pos];
@@ -46,13 +48,14 @@ public:
return -1;
}
}
- public:
- virtual int getColumn() { return getBufcolumn(bufpos); }
- virtual int getLine() { return getBufline(bufpos); }
- virtual int getEndColumn() { return getBufcolumn(bufpos); }
- virtual int getEndLine() { return getBufline(bufpos); }
- virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
- virtual int getBeginLine() { return getBufline(tokenBegin); }
+
+public:
+ virtual int getColumn() { return getBufcolumn(bufpos); }
+ virtual int getLine() { return getBufline(bufpos); }
+ virtual int getEndColumn() { return getBufcolumn(bufpos); }
+ virtual int getEndLine() { return getBufline(bufpos); }
+ virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
+ virtual int getBeginLine() { return getBufline(tokenBegin); }
virtual bool getTrackLineColumn() { return trackLineColumn; }
virtual void setTrackLineColumn(bool val) { trackLineColumn = val; }
@@ -61,7 +64,7 @@ public:
* Backs up the input stream by amount steps. Lexer calls this method if it
* had already read some characters, but could not use them to match a
* (longer) token. So, they will be used again as the prefix of the next
- * token and it is the implementation's responsibility to do this right.
+ * token and it is the implemetation's responsibility to do this right.
*/
virtual inline void backup(int amount) {
inBuf += amount;
@@ -76,9 +79,9 @@ public:
* All characters must remain in the buffer between two successive calls
* to this method to implement backup correctly.
*/
- virtual inline JAVACC_CHAR_TYPE BeginToken() {
+ virtual inline JJChar BeginToken() {
tokenBegin = -1;
- JAVACC_CHAR_TYPE c = readChar();
+ JJChar c = readChar();
tokenBegin = bufpos;
return c;
}
@@ -89,7 +92,7 @@ public:
* of selecting the input is the responsibility of the class
* implementing this class.
*/
- virtual inline JAVACC_CHAR_TYPE readChar() {
+ virtual inline JJChar readChar() {
if (inBuf > 0) {
--inBuf;
++bufpos;
@@ -104,7 +107,7 @@ public:
FillBuff();
}
- JAVACC_CHAR_TYPE c = buffer[bufpos];
+ JJChar c = buffer[bufpos];
if (trackLineColumn) {
UpdateLineColumn(c);
@@ -123,11 +126,11 @@ public:
* anything that they want to. For example, for efficiency, one might decide
* to just return NULL, which is a valid implementation.
*/
- virtual JAVACC_STRING_TYPE GetImage() {
+ virtual JJString GetImage() {
if (bufpos >= tokenBegin)
- return JAVACC_STRING_TYPE(buffer + tokenBegin, bufpos - tokenBegin + 1);
+ return JJString(buffer + tokenBegin, bufpos - tokenBegin + 1);
else
- return JAVACC_STRING_TYPE(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
+ return JJString(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
}
/**
@@ -136,11 +139,11 @@ public:
* for use in actions in the case of MORE. A simple and inefficient
* implementation of this is as follows :
*/
- virtual JAVACC_STRING_TYPE GetSuffix(int len) {
+ virtual JJString GetSuffix(int len) {
if ((bufpos + 1) >= len) {
- return JAVACC_STRING_TYPE(buffer + bufpos - len + 1, len);
+ return JJString(buffer + bufpos - len + 1, len);
}
- return JAVACC_STRING_TYPE(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
+ return JJString(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
}
/**
@@ -160,62 +163,62 @@ public:
return inBuf == 0 && bufpos + 1 >= maxNextCharInd && inputStream->endOfInput();
}
- CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline,
+ CharStream(const JJChar *buf, int sz, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, buffersize);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(JJString(buf, sz), startline, startcolumn, buffersize);
}
- CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ CharStream(const JJChar *buf, int sz, int startline, int startcolumn) :
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(JJString(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
}
- CharStream(const JAVACC_STRING_TYPE& str, int startline,
+ CharStream(const JJString& str, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(str, startline, startcolumn, buffersize);
}
- CharStream(const JAVACC_STRING_TYPE& str, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ CharStream(const JJString& str, int startline, int startcolumn) :
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(input_stream, startline, startcolumn, buffersize);
}
CharStream(ReaderStream *input_stream, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
@@ -229,22 +232,22 @@ public:
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
- virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
+ virtual void ReInit(const JJString& str, int startline,
int startcolumn, int buffersize);
- virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
+ virtual void ReInit(const JJString& str, int startline,
int startcolumn) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
virtual void adjustBeginLineColumn(int newLine, int newCol);
- protected:
- virtual void UpdateLineColumn(JAVACC_CHAR_TYPE c);
+protected:
+ virtual void UpdateLineColumn(JJChar c);
int* bufline;
int* bufcolumn;
- JAVACC_CHAR_TYPE* buffer;
+ JJChar* buffer;
int bufpos;
int bufsize;
int tokenBegin;
@@ -263,5 +266,6 @@ public:
}
}
+
#endif
-/* JavaCC - OriginalChecksum=3f0e693d1617236429891c8c95713d73 (do not edit this line) */
+/* JavaCC - OriginalChecksum=c5b4b2e72393f865547f405cc9def169 (do not edit this line) */