Low-level class for raw text scanning. More...
Public Member Functions | |
Constructors etc. | |
wasteScanner (const std::string &myname="wasteScanner", size_t line=0, size_t column=0, mootio::ByteOffset byte=0, size_t init_bufsize=GenericLexer::MGL_DEFAULT_BUFFER_SIZE) | |
virtual | ~wasteScanner () |
Required Wrapper Methods (from GenericLexer) | |
virtual void * | mgl_yy_create_buffer (int size, FILE *unused=stdin) |
virtual void | mgl_yy_switch_to_buffer (void *buf) |
virtual void | mgl_yy_init_buffer (void *buf, FILE *unused=stdin) |
mootWasteScanner's real funcionalities | |
int | yylex () |
std::string | yytext () |
int | yyleng () |
bool | fill (size_t n) |
virtual void | reset () |
virtual void | from_mstream (mootio::mistream *in) |
Public Member Functions inherited from moot::GenericLexer | |
GenericLexer (const std::string &myname="moot::GenericLexer", size_t line=0, size_t column=0, mootio::ByteOffset byte=0) | |
virtual | ~GenericLexer (void) |
virtual void | clear (bool clear_input=true, bool clear_output=true) |
virtual void * | mgl_yy_current_buffer_p (void) |
virtual void | mgl_begin (int stateno) |
virtual void | mgl_yy_delete_buffer (void *buf) |
virtual void | from_filename (const std::string &filename) |
virtual void | from_file (FILE *in=stdin) |
virtual void | from_buffer (const char *buf, size_t len) |
void | from_string (const char *s) |
void | from_string (const std::string &s) |
void | select_streams (FILE *in, FILE *out=stdout, const char *myname=__null) |
void | select_string (const char *in, FILE *out=stderr, const char *myname=__null) |
virtual void | to_mstream (mootio::mostream *out=__null) |
virtual void | to_filename (const std::string &filename) |
virtual void | to_file (FILE *out=stdout) |
int | yyinput (char *buffer, int &result, int max_size) |
void | tokbuf_append (const char *text, size_t len) |
void | add_columns (ByteOffset len) |
void | add_lines (ByteOffset len=1) |
virtual void | yycarp (const char *fmt,...) |
Public Attributes | |
Low-level data | |
char * | yybuffer |
char * | yycursor |
char * | yylimit |
char * | yytoken |
char * | yymarker |
size_t | buffer_size |
Public Attributes inherited from moot::GenericLexer | |
mootio::mistream * | mglin |
mootio::mostream * | mglout |
bool | mgl_in_created |
bool | mgl_out_created |
size_t | theLine |
size_t | theColumn |
mootio::ByteOffset | theByte |
std::string | lexname |
std::string | tokbuf |
bool | tokbuf_clear |
Additional Inherited Members | |
Static Public Attributes inherited from moot::GenericLexer | |
static const int | MGL_DEFAULT_BUFFER_SIZE = 16384 |
moot::wasteScanner::wasteScanner | ( | const std::string & | myname = "wasteScanner" , |
size_t | line = 0 , |
||
size_t | column = 0 , |
||
mootio::ByteOffset | byte = 0 , |
||
size_t | init_bufsize = GenericLexer::MGL_DEFAULT_BUFFER_SIZE |
||
) |
Default constructor
|
virtual |
Destructor
|
inlinevirtual |
All other moot lexers are based on flex. Dummy implementation.
Implements moot::GenericLexer.
References moot::GenericLexer::yycarp().
|
inlinevirtual |
All other moot lexers are based on flex. Dummy implementation.
Implements moot::GenericLexer.
References moot::GenericLexer::yycarp().
|
inlinevirtual |
All other moot lexers are based on flex. Dummy implementation.
Implements moot::GenericLexer.
References moot::GenericLexer::yycarp(), and yylex().
int moot::wasteScanner::yylex | ( | ) |
yylex () (from wasteScannerScan.re.skel)
Referenced by mgl_yy_init_buffer().
|
inline |
Returns contents of the current segment.
References yyleng().
|
inline |
Returns length of the current segment.
References fill(), from_mstream(), and reset().
Referenced by yytext().
bool moot::wasteScanner::fill | ( | size_t | n | ) |
Grabs new characters from input stream, called by yylex.
Referenced by yyleng().
|
virtual |
|
virtual |
char* moot::wasteScanner::yybuffer |
used for token-buffering
char* moot::wasteScanner::yycursor |
current position in buffer
char* moot::wasteScanner::yylimit |
end of buffer content
char* moot::wasteScanner::yytoken |
beginning of current token
char* moot::wasteScanner::yymarker |
last matching position
size_t moot::wasteScanner::buffer_size |
current allocated length of yybuffer