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

LaParserWriter Class Reference

#include <la_parser_writer.hh>

Inheritance diagram for LaParserWriter:

Inheritance graph
[legend]
Collaboration diagram for LaParserWriter:

Collaboration graph
[legend]
List of all members.

Public Methods

 LaParserWriter (PropRegistry &registry_)
void writeParser (ParserSpec &pSpec, ITokenSpec &tSpec, const string &scannerClass)

Protected Methods

void writeProductionDecls (vector< ProductionSpec > &prods)
void writeProductionLaDecls (vector< ProductionSpec > &prods)
void writeLaEpDecls (vector< ProductionSpec > &prods)
void writeProductionDefs (vector< ProductionSpec > &prods, const string &parserClass, ITokenSpec &tokens)
ostream& makeLaCondition (vBitset &tMask, NumberedLaSpec *la, ITokenSpec &tokens)
void writeEbnf (EbnfLaNode &n, ITokenSpec &tokens)
void writeEbnfLa (EbnfLaNode &n, ITokenSpec &tokens)
void writeLaDefs (vector< ProductionSpec > &prods, const string &parserClass, ITokenSpec &tokens, PropRegistry &registry)

Friends

class  LaEpDefWriter
class  LaEpDeclWriter

Detailed Description

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

Definition at line 66 of file la_parser_writer.hh.


Constructor & Destructor Documentation

LaParserWriter::LaParserWriter ( PropRegistry & registry_ ) [inline]
 

Definition at line 73 of file la_parser_writer.hh.


Member Function Documentation

void LaParserWriter::writeParser ( ParserSpec & pSpec,
ITokenSpec & tSpec,
const string & scannerClass )
 

This is the method that dumps the whole thing into source files.

Definition at line 63 of file la_parser_writer.cc.

Referenced by CppCcDriver::run().

void LaParserWriter::writeProductionDecls ( vector< ProductionSpec > & prods ) [protected]
 

Writes the metho declaration for each production in the given vector.

Definition at line 265 of file la_parser_writer.cc.

Referenced by writeParser().

void LaParserWriter::writeProductionLaDecls ( vector< ProductionSpec > & prods ) [protected]
 

Writes the declaration of the lookahead method for each production in the given vector.

Definition at line 300 of file la_parser_writer.cc.

Referenced by writeParser().

void LaParserWriter::writeLaEpDecls ( vector< ProductionSpec > & prods ) [protected]
 

Writes the declarations for lookahead entry points that are needed for each production in the given vector.

Definition at line 357 of file la_parser_writer.cc.

Referenced by writeParser().

void LaParserWriter::writeProductionDefs ( vector< ProductionSpec > & prods,
const string & parserClass,
ITokenSpec & tokens ) [protected]
 

Writes the definition of each production's method.

Definition at line 483 of file la_parser_writer.cc.

Referenced by writeParser().

ostream & LaParserWriter::makeLaCondition ( vBitset & tMask,
NumberedLaSpec * la,
ITokenSpec & tokens ) [protected]
 

Writes a boolean expression that tests whether the current token kind is any of those in the tmask set. If the la structures is not NULL, the condition also contains any lookahead tests required by the lookahead hint.

Definition at line 376 of file la_parser_writer.cc.

Referenced by writeEbnf(), and writeEbnfLa().

void LaParserWriter::writeEbnf ( EbnfLaNode & n,
ITokenSpec & tokens ) [protected]
 

Writes the code that matches the given EBNF expansion.

Definition at line 412 of file la_parser_writer.cc.

Referenced by writeProductionDefs().

void LaParserWriter::writeEbnfLa ( EbnfLaNode & n,
ITokenSpec & tokens ) [protected]
 

Wtrites the code that matches the given EBNF expansion while in lookahead mode.

Definition at line 531 of file la_parser_writer.cc.

Referenced by LaEpDefWriter::operator()(), and writeLaDefs().

void LaParserWriter::writeLaDefs ( vector< ProductionSpec > & prods,
const string & parserClass,
ITokenSpec & tokens,
PropRegistry & registry ) [protected]
 

Writes the lookahead method definitions for all the productions in the given vector.

Definition at line 667 of file la_parser_writer.cc.

Referenced by writeParser().


Friends And Related Function Documentation

class LaEpDefWriter [friend]
 

Definition at line 68 of file la_parser_writer.hh.

class LaEpDeclWriter [friend]
 

Definition at line 69 of file la_parser_writer.hh.


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