Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

moot::mootNgramsCompiler Class Reference

N-gram parameter-file compiler. More...

#include <mootNgramsCompiler.h>

Inheritance diagram for moot::mootNgramsCompiler:

Inheritance graph
[legend]
Collaboration diagram for moot::mootNgramsCompiler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Public Attributes


Detailed Description

mootNgramsCompiler compiles n-gram parameter files into internal frequency tables, using a lexer/parser pair generated by Alain Coetmeur's flex++ and bison++ programs.


Constructor & Destructor Documentation

moot::mootNgramsCompiler::mootNgramsCompiler  )  [inline]
 

Default constructor

virtual moot::mootNgramsCompiler::~mootNgramsCompiler  )  [inline, virtual]
 

Default destructor


Member Function Documentation

mootNgrams* moot::mootNgramsCompiler::parse_from_file FILE *  file,
const char *  filename = 0
[inline]
 

parse n-gram parameters from a C-stream. Returns NULL on error.

mootNgrams* moot::mootNgramsCompiler::parse_from_string const char *  string,
const char *  srcname = 0
[inline]
 

parse one regular expression from a C-string. Returns NULL on error.

mootNgrams* moot::mootNgramsCompiler::parse_ngrams  ) 
 

low-level parsing method: parse all remaining n-grams from the currently selected input source.

void moot::mootNgramsCompiler::select_streams FILE *  in,
FILE *  out,
const char *  my_srcname = 0
[inline]
 

low-level input selection: input from a C-stream.

void moot::mootNgramsCompiler::select_string const char *  in,
const char *  my_srcname = 0
[inline]
 

low-level input selection: input from a C-string. WARNING: do NOT free the string 'in' until parsing has finished!

virtual void moot::mootNgramsCompiler::yyerror const char *  msg  )  [virtual]
 

yyerror: report parse errors.

virtual int moot::mootNgramsCompiler::yylex  )  [virtual]
 

Implements mootNgramsParser.

virtual void moot::mootNgramsCompiler::yywarn const char *  msg  )  [virtual]
 

yywarn: report parse warnings.

Reimplemented from mootNgramsParser.


Member Data Documentation

char* moot::mootNgramsCompiler::objname
 

objname: name to use for object when reporting errors -- default: "mootNgramsCompiler" Warning: no copying is performed on this string; you must alloc&free it yourself!

char* moot::mootNgramsCompiler::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!

mootNgramsLexer moot::mootNgramsCompiler::theLexer
 

flex++ lexer object


The documentation for this class was generated from the following file:
Generated on Mon Jun 27 13:05:28 2005 for libmoot by  doxygen 1.3.8-20040913