PrivateFlexLexer Class Reference

List of all members.


Detailed Description

FlexLexer wrapper which catches lexical errors
Note:
NVI

Definition at line 40 of file scanner.cc.


Public Member Functions

 PrivateFlexLexer (std::istream &input, string fileName)
bool hasError () const
 Return true if already read source is not lexically valid.
EToken readNext ()
 NVI equivalent of virtual method yylex.
void postError (const char *msg)
 NVI equivalent of virtual method LexerError.

Protected Member Functions

virtual void LexerOutput (const char *buf, int size)
 override default output behavior
virtual void LexerError (const char *msg)
 override default error behavior

Private Attributes

string fileName_
 name (or alias) of input file
bool hasError_
 true if any error has been detected

Constructor & Destructor Documentation

PrivateFlexLexer ( std::istream &  input,
string  fileName 
) [inline]

Definition at line 42 of file scanner.cc.


Member Function Documentation

bool hasError (  )  const [inline]

Return true if already read source is not lexically valid.

Definition at line 49 of file scanner.cc.

References hasError_.

Referenced by FlexScanner::hasError().

Here is the caller graph for this function:

EToken readNext (  )  [inline]

NVI equivalent of virtual method yylex.

Definition at line 53 of file scanner.cc.

References yy::yylex().

Referenced by FlexScanner::readNext().

Here is the call graph for this function:

Here is the caller graph for this function:

void postError ( const char *  msg  )  [inline]

NVI equivalent of virtual method LexerError.

Definition at line 58 of file scanner.cc.

References LexerError().

Referenced by FlexScanner::readNext().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LexerOutput ( const char *  buf,
int  size 
) [inline, protected, virtual]

override default output behavior

Definition at line 63 of file scanner.cc.

References LexerError().

Here is the call graph for this function:

virtual void LexerError ( const char *  msg  )  [inline, protected, virtual]

override default error behavior

Definition at line 68 of file scanner.cc.

References StreamDecorator::E_ERROR, fileName_, and hasError_.

Referenced by LexerOutput(), and postError().

Here is the caller graph for this function:


Member Data Documentation

string fileName_ [private]

name (or alias) of input file

Definition at line 75 of file scanner.cc.

Referenced by LexerError().

bool hasError_ [private]

true if any error has been detected

Definition at line 76 of file scanner.cc.

Referenced by hasError(), and LexerError().


The documentation for this class was generated from the following file:
Generated on Sat Jul 4 18:33:17 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4