Lexical frequency parameter-file compiler. More...
Public Member Functions | |
mootLexfreqsCompiler () | |
virtual | ~mootLexfreqsCompiler () |
mootLexfreqs * | parse_from_file (FILE *file, const char *filename=__null) |
mootLexfreqs * | parse_from_string (const char *string, const char *srcname=__null) |
void | select_streams (FILE *in, FILE *out, const char *my_srcname=__null) |
void | select_string (const char *in, const char *my_srcname=__null) |
virtual int | yylex () |
mootLexfreqs * | parse_lexfreqs () |
virtual void | yyerror (const char *msg) |
virtual void | yywarn (const char *msg) |
Public Member Functions inherited from mootLexfreqsParser | |
int | yyparse (void) |
mootLexfreqsParser () | |
virtual | ~mootLexfreqsParser (void) |
virtual void | yycarp (const char *fmt,...) |
Public Attributes | |
mootLexfreqsLexer | theLexer |
const char * | objname |
const char * | srcname |
Public Attributes inherited from mootLexfreqsParser | |
yy_mootLexfreqsParser_stype | yylval |
mootLexfreqsParserLType | yylloc |
int | yynerrs |
int | yychar |
int | yydebug |
moot::mootLexfreqs * | lexfreqs |
std::set< moot::mootTagString > * | alltags |
Additional Inherited Members | |
Static Public Attributes inherited from mootLexfreqsParser | |
static const int | TOKEN |
static const int | COUNT |
mootLexfreqsCompiler compiles lexical frequency parameter files into internal frequency tables, using a lexer/parser pair generated by Alain Coetmeur's flex++ and bison++ programs.
|
inline |
Default constructor
|
inlinevirtual |
Default destructor
|
inline |
parse n-gram parameters from a C-stream. Returns NULL on error.
References parse_lexfreqs(), and select_streams().
|
inline |
parse one regular expression from a C-string. Returns NULL on error.
References parse_lexfreqs(), and select_string().
|
inline |
low-level input selection: input from a C-stream.
References moot::GenericLexer::select_streams().
Referenced by parse_from_file().
|
inline |
low-level input selection: input from a C-string. WARNING: do NOT free the string 'in' until parsing has finished!
References parse_lexfreqs(), moot::GenericLexer::select_string(), yyerror(), yylex(), and yywarn().
Referenced by parse_from_string().
|
virtual |
Implements mootLexfreqsParser.
Referenced by select_string().
mootLexfreqs* moot::mootLexfreqsCompiler::parse_lexfreqs | ( | ) |
low-level parsing method: parse all remaining n-grams from the currently selected input source.
Referenced by parse_from_file(), parse_from_string(), and select_string().
|
virtual |
|
virtual |
yywarn: report parse warnings.
Reimplemented from mootLexfreqsParser.
Referenced by select_string().
mootLexfreqsLexer moot::mootLexfreqsCompiler::theLexer |
flex++ lexer object
const char* moot::mootLexfreqsCompiler::objname |
objname: name to use for object when reporting errors – default: "mootLexfreqsCompiler" Warning: no copying is performed on this string; you must alloc&free it yourself!
const char* moot::mootLexfreqsCompiler::srcname |
srcname: name to use for current file when reporting errors – default: "(unknown)" Warning: no copying is performed on this string; you must alloc&free it yourself!