flex++
lexer for 'mootpp' rudimentary raw-text preprocessor
More...
Public Types | |
enum | TokenType { PPEOF, UNKNOWN, EOS, XML_START_TAG, XML_END_TAG, XML_ENTITY, WORD, INTEGER, FLOAT, PUNCT } |
Public Member Functions | |
int | yylex (void) |
mootPPLexer () | |
virtual | ~mootPPLexer (void) |
virtual void * | mgl_yy_current_buffer_p (void) |
virtual void * | mgl_yy_create_buffer (int size, FILE *unused=stdin) |
virtual void | mgl_yy_init_buffer (void *buf, FILE *unused=stdin) |
virtual void | mgl_yy_delete_buffer (void *buf) |
virtual void | mgl_yy_switch_to_buffer (void *buf) |
virtual void | mgl_begin (int stateno) |
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 | reset (void) |
virtual void | clear (bool clear_input=true, bool clear_output=true) |
virtual void | from_mstream (mootio::mistream *in=__null) |
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 | |
unsigned char * | yytext |
int | yyleng |
FILE * | yyin |
FILE * | yyout |
bool | verbose |
unsigned int | ntokens |
std::string | output_sentence_separator |
std::string | output_token_separator |
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 |
Protected Member Functions | |
void | yyrestart (FILE *input_file) |
void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
void | yy_load_buffer_state (void) |
YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
void | yy_delete_buffer (YY_BUFFER_STATE b) |
void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
virtual void | yy_echo () |
virtual int | yy_input (char *buf, int &result, int max_size) |
virtual void | yy_fatal_error (const char *msg) |
virtual int | yy_wrap () |
Protected Attributes | |
YY_BUFFER_STATE | yy_current_buffer |
Private Member Functions | |
void | yy_initialize () |
int | input () |
int | yyinput () |
int | yy_get_next_buffer () |
void | yyunput (unsigned char c, unsigned char *buf_ptr) |
long | yy_get_previous_state_ (void) |
long | yy_try_NUL_trans_ (long current_state_) |
Private Attributes | |
unsigned char * | yy_c_buf_p |
unsigned char | yy_hold_char |
int | yy_n_chars |
int | yy_init |
int | yy_start |
int | yy_did_buffer_switch_on_eof |
Additional Inherited Members | |
Static Public Attributes inherited from moot::GenericLexer | |
static const int | MGL_DEFAULT_BUFFER_SIZE = 16384 |
Does rudimentary end-of-sentence and abbreviation recognition, and filters out (most) XML markup.
mootPPLexer::mootPPLexer | ( | ) |
|
inlinevirtual |
References ~mootPPLexer().
Referenced by ~mootPPLexer().
|
private |
|
private |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
int mootPPLexer::yylex | ( | void | ) |
|
inlinevirtual |
Reimplemented from moot::GenericLexer.
|
inlinevirtual |
Flex++ should define this (backwards), but it doesn't get through to us
Implements moot::GenericLexer.
|
inlinevirtual |
Flex++ should define this, but it doesn't get through to us
Implements moot::GenericLexer.
References mgl_yy_init_buffer().
Referenced by mgl_yy_init_buffer().
|
inlinevirtual |
Flex++ should define this, but it doesn't get through to us
Reimplemented from moot::GenericLexer.
|
inlinevirtual |
Flex++ should define this, but it doesn't get through to us
Implements moot::GenericLexer.
References mgl_yy_switch_to_buffer().
Referenced by mgl_yy_switch_to_buffer().
|
virtual |
Set current start-state. Descendants must override this method (section 3 only!)
Reimplemented from moot::GenericLexer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
unsigned char* mootPPLexer::yytext |
int mootPPLexer::yyleng |
FILE* mootPPLexer::yyin |
FILE * mootPPLexer::yyout |
bool mootPPLexer::verbose |
unsigned int mootPPLexer::ntokens |
std::string mootPPLexer::output_sentence_separator |
std::string mootPPLexer::output_token_separator |