浏览该文件的文档.
3 #ifndef JAVACC_CHARSTREAM_H_
4 #define JAVACC_CHARSTREAM_H_
8 #ifndef INITIAL_BUFFER_SIZE
9 #define INITIAL_BUFFER_SIZE 4096
69 virtual inline void backup(
int amount) {
143 if ((
bufpos + 1) >= len) {
167 int startcolumn,
int buffersize) :
184 int startcolumn,
int buffersize) :
189 ReInit(str, startline, startcolumn, buffersize);
201 int startcolumn,
int buffersize) :
206 ReInit(input_stream, startline, startcolumn, buffersize);
225 virtual void ReInit(
ReaderStream *input_stream,
int startline,
int startcolumn,
int buffersize);
236 int startcolumn,
int buffersize);
#define INITIAL_BUFFER_SIZE
virtual void UpdateLineColumn(JJChar c)
CharStream(ReaderStream *input_stream, int startline, int startcolumn, int buffersize)
virtual void ReInit(const JJString &str, int startline, int startcolumn)
virtual JJChar BeginToken()
Returns the next character that marks the beginning of the next token.
virtual JJString GetImage()
Returns a string made up of characters from the marked token beginning to the current buffer position...
virtual void ReInit(ReaderStream *input_stream, int startline, int startcolumn, int buffersize)
virtual JJString GetSuffix(int len)
Returns an array of characters that make up the suffix of length 'len' for the currently matched toke...
virtual bool endOfInput()
int getBufcolumn(int pos)
virtual void ExpandBuff(bool wrapAround)
Token literal values and constants.
virtual int getBeginLine()
virtual void ReInit(ReaderStream *input_stream, int startline, int startcolumn)
virtual int getEndColumn()
CharStream(const JJChar *buf, int sz, int startline, int startcolumn, int buffersize)
CharStream(const JJString &str, int startline, int startcolumn)
JAVACC_STRING_TYPE JJString
virtual void backup(int amount)
Backs up the input stream by amount steps.
virtual bool getTrackLineColumn()
virtual JJChar readChar()
Returns the next character from the selected input.
virtual void setTrackLineColumn(bool val)
virtual void adjustBeginLineColumn(int newLine, int newCol)
CharStream(const JJChar *buf, int sz, int startline, int startcolumn)
CharStream(ReaderStream *input_stream, int startline, int startcolumn)
virtual void DeleteBuffers()
The lexer calls this function to indicate that it is done with the stream and hence implementations c...
CharStream(const JJString &str, int startline, int startcolumn, int buffersize)
This class describes a character stream that maintains line and column number positions of the charac...
virtual void ReInit(ReaderStream *input_stream)
CharStream(ReaderStream *input_stream)
virtual int getBeginColumn()
ReaderStream * inputStream