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

EbnfLaNode Class Reference

#include <ebnf_la_node.hh>

Inheritance diagram for EbnfLaNode:

Inheritance graph
Collaboration diagram for EbnfLaNode:

Collaboration graph
List of all members.

Public Types

enum  Colours { white, grey, black }

Public Methods

 EbnfLaNode (const Position &pos_, NumberedLaSpec *laSpec_=NULL)
 EbnfLaNode (const EbnfLaNode &o)
 ~EbnfLaNode ()

Public Attributes

CodeChunk startCode
CodeChunk endCode
bool forceStartCode
bool forceEndCode
vBitset first
vBitset follow
bool nullable
Colours colour

Static Public Attributes

ITokenSpectokens = NULL

Protected Methods

void dumpAttributes (ostream &os) const

Static Protected Methods

void indent ()
void unindent ()
ostream& format (ostream &os)

Static Protected Attributes

int indent_level = 0

Detailed Description

This class adds to the EbnfNode the stuff needed for generating a LA parser.

Definition at line 86 of file ebnf_la_node.hh.

Member Enumeration Documentation

enum EbnfLaNode::Colours

During the recursive traversal we use colours to mark visited nodes.

Enumeration values:

Definition at line 198 of file ebnf_la_node.hh.

Constructor & Destructor Documentation

EbnfLaNode::EbnfLaNode ( const Position & pos_,
NumberedLaSpec * laSpec_ = NULL ) [inline]

Creates a new EbnfLaNode associated with the given position in the input file and having the associated (possibly NULL) lookahead specification.

Definition at line 95 of file ebnf_la_node.hh.

EbnfLaNode::EbnfLaNode ( const EbnfLaNode & o ) [inline]

Copy constructor. It has an in-depth semantics (the lookahead spec, if any is cloned).

Definition at line 103 of file ebnf_la_node.hh.

EbnfLaNode::~EbnfLaNode ( ) [inline]

Definition at line 113 of file ebnf_la_node.hh.

Member Function Documentation

void EbnfLaNode::indent ( ) [inline, static, protected]

Definition at line 123 of file ebnf_la_node.hh.

void EbnfLaNode::unindent ( ) [inline, static, protected]

Definition at line 128 of file ebnf_la_node.hh.

ostream & EbnfLaNode::format ( ostream & os ) [inline, static, protected]

Definition at line 133 of file ebnf_la_node.hh.

void EbnfLaNode::dumpAttributes ( ostream & os ) const [protected]

Definition at line 55 of file

Referenced by EbnfLambdaNode::dump(), EbnfTerminalNode::dump(), EbnfNonterminalNode::dump(), EbnfStarNode::dump(), EbnfCatNode::dump(), and EbnfOrNode::dump().

Member Data Documentation

int EbnfLaNode::indent_level = 0 [static, protected]

Definition at line 121 of file ebnf_la_node.hh.

ITokenSpec * EbnfLaNode::tokens = NULL [static]

Definition at line 143 of file ebnf_la_node.hh.

NumberedLaSpec * EbnfLaNode::laSpec

The lookahead associated with this node, if any (can be NULL).

Definition at line 151 of file ebnf_la_node.hh.

CodeChunk EbnfLaNode::startCode

Contains the user code found before the expansion represented by this node in the input file.

Definition at line 157 of file ebnf_la_node.hh.

CodeChunk EbnfLaNode::endCode

Contains the user code found after the expansion represented by this node in the input file.

Definition at line 163 of file ebnf_la_node.hh.

bool EbnfLaNode::forceStartCode

Definition at line 165 of file ebnf_la_node.hh.

bool EbnfLaNode::forceEndCode

Definition at line 165 of file ebnf_la_node.hh.

vector< CatchClause > EbnfLaNode::catchList

Contains any CatchClause objects resulted from the catch constructions found in the input file after the production represented by this node.

Definition at line 171 of file ebnf_la_node.hh.

vBitset EbnfLaNode::first

Contains the FIRST set of terminals for this node.

See also:

Definition at line 178 of file ebnf_la_node.hh.

vBitset EbnfLaNode::follow

Contains the FOLLOW set of terminals for this node.

See also:

Definition at line 185 of file ebnf_la_node.hh.

bool EbnfLaNode::nullable

Indicates whether the expansion represented by this node can match an empty string of tokens.

See also:

Definition at line 193 of file ebnf_la_node.hh.

Colours EbnfLaNode::colour

This field is used during recursive traversal of EBNF nodes, which may reffer to each other. Their meanings are the classical: white : not visited yet, grey : being visited now, black: already visited. This field can be (and is) used by the EbnfNodeAlgo implementations in order to avoid infinite recursion if some productions mutually refer each other.

Definition at line 207 of file ebnf_la_node.hh.

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