Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ScannerDfaWriter Class Reference

#include <scanner_dfa_writer.hh>

Inheritance diagram for ScannerDfaWriter:

Inheritance graph
[legend]
Collaboration diagram for ScannerDfaWriter:

Collaboration graph
[legend]
List of all members.

Public Methods

 ScannerDfaWriter (TokenSpec &tSpec_, PropRegistry &registry_)
void writeScanner (ScannerDfaSpec &dfa)

Protected Methods

void writeDfa (BasicDfaSpec &dfa, BasicDfaProfile &sdp)
int writeCharCompare (vector< unsigned char > v, int i)
void writeExceptionCode (const string &what, const string &handlerName, bool isName=false)

Private Attributes

TokenSpectSpec

Detailed Description

This is the C++ code dumper class for the scanner's sources.

Definition at line 70 of file scanner_dfa_writer.hh.


Constructor & Destructor Documentation

ScannerDfaWriter::ScannerDfaWriter ( TokenSpec & tSpec_,
PropRegistry & registry_ )
 

Definition at line 103 of file scanner_dfa_writer.cc.


Member Function Documentation

void ScannerDfaWriter::writeScanner ( ScannerDfaSpec & dfa )
 

Definition at line 109 of file scanner_dfa_writer.cc.

void ScannerDfaWriter::writeDfa ( BasicDfaSpec & dfa,
BasicDfaProfile & sdp ) [protected]
 

Referenced by writeScanner().

int ScannerDfaWriter::writeCharCompare ( vector< unsigned char > v,
int i ) [protected]
 

Writes char comparison condition like : (c == 'a') or (('a' <= c) && (c <= 'f')), depending on what characters are found at v[i]; If a single izolated characetr is found, it writes the first form of condition; if a certain amount of successive characters is found, it writed the condition in the second form. IT always returns the first index past the last character in v it has wrtten the condition for.

Referenced by writeScanner().

void ScannerDfaWriter::writeExceptionCode ( const string & what,
const string & handlerName,
bool isName = false ) [protected]
 

Dumps the code that creates an exception object, calls the handler function whose name is given (onScanError or on IOError) with that object as argument and depending on the return code either throws the exception or calls abort if use of exceptions was disabled.

Referenced by writeScanner().


Member Data Documentation

TokenSpec & ScannerDfaWriter::tSpec [private]
 

Definition at line 103 of file scanner_dfa_writer.hh.


The documentation for this class was generated from the following files:
Generated at Tue Jul 9 21:08:34 2002 for CppCC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001