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

ScannerDfaSpec Class Reference

#include <scanner_dfa_spec.hh>

Collaboration diagram for ScannerDfaSpec:

Collaboration graph
[legend]
List of all members.

Public Methods

 ScannerDfaSpec (const string &className_, const CodeChunk &preambleCode_, const vector< CodeChunk > &userCode_, const CodeChunk &inheritance_)
void addBasicDfa (BasicDfaSpec &dfa)

Public Attributes

string className
CodeChunk preambleCode
vector<CodeChunkuserCode
CodeChunk inheritance
vector<BasicDfaSpec*> states

Detailed Description

This class describes the multi-DFA for a scanner. It contains a DFA for each lexical state of the scanner and some xtra stuff such as user code to be inserted into the final scanner sources, the scanner's class name, etc.

Definition at line 68 of file scanner_dfa_spec.hh.


Constructor & Destructor Documentation

ScannerDfaSpec::ScannerDfaSpec ( const string & className_,
const CodeChunk & preambleCode_,
const vector< CodeChunk > & userCode_,
const CodeChunk & inheritance_ ) [inline]
 

Creates a new ScannerDfaSpec object with the given extra stuff into it.

Definition at line 75 of file scanner_dfa_spec.hh.


Member Function Documentation

void ScannerDfaSpec::addBasicDfa ( BasicDfaSpec & dfa )
 

Adds a new basig dfa description into this scanner spec. A basic dfa describes a lexical state of the scanner.

Definition at line 40 of file scanner_dfa_spec.cc.

Referenced by DfaGenerator::createScannerDfa().


Member Data Documentation

string ScannerDfaSpec::className
 

The name of the generated scanner class.

Definition at line 92 of file scanner_dfa_spec.hh.

CodeChunk ScannerDfaSpec::preambleCode
 

The user code to be inserted before the scanner's class declaration.

Definition at line 97 of file scanner_dfa_spec.hh.

vector< CodeChunk > ScannerDfaSpec::userCode
 

The user code that will be lumped inside the scanner's class. If multiple blocks or code are found inside the lexical section, they are concatenated into one big chunk of code stored into this string.

Definition at line 104 of file scanner_dfa_spec.hh.

CodeChunk ScannerDfaSpec::inheritance
 

This string contains the inheritance provided by the user for the scanner class.

Definition at line 110 of file scanner_dfa_spec.hh.

vector< BasicDfaSpec *> ScannerDfaSpec::states
 

This holds the list with the DFAs for each lexical state.

Definition at line 115 of file scanner_dfa_spec.hh.


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