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

DfaReNodeBuilder Class Reference

#include <dfa_re_node_builder.hh>

Inheritance diagram for DfaReNodeBuilder:

Inheritance graph
[legend]
Collaboration diagram for DfaReNodeBuilder:

Collaboration graph
[legend]
List of all members.

Public Methods

 DfaReNodeBuilder (PropRegistry &registry_)
virtual ReNodecreateOrNode (ReNode *pre, ReNode *post, const Position &pos)
virtual ReNodecreateCatNode (ReNode *pre, ReNode *post, const Position &pos)
virtual ReNodecreatePlusNode (ReNode *in, const Position &pos)
virtual ReNodecreateOptionalNode (ReNode *in, const Position &pos)
virtual ReNodecreateStarNode (ReNode *in, const Position &pos)
virtual ReNodecreateStringLiteralNode (const string &s, const Position &pos)
virtual ReNodecreateCharListNode (bool negated, const vector< CharClassDescriptor > &chars, const Position &pos)
DfaSourceRecreateEotNode (int tokId, const Position &pos)

Protected Methods

DfaSourceRecreateCharNode (unsigned char match, const Position &pos)

Private Attributes

PropRegistryregistry
bool caseSensitive

Constructor & Destructor Documentation

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

Definition at line 53 of file dfa_re_node_builder.hh.


Member Function Documentation

ReNode * DfaReNodeBuilder::createOrNode ( ReNode * pre,
ReNode * post,
const Position & pos ) [virtual]
 

Creates a new "|" node with children pre and post.

Reimplemented from IReNodeBuilder.

Definition at line 60 of file dfa_re_node_builder.cc.

Referenced by ScannerSpec::updateStates().

ReNode * DfaReNodeBuilder::createCatNode ( ReNode * pre,
ReNode * post,
const Position & pos ) [virtual]
 

Creates a new concatenation node with children pre and post.

Reimplemented from IReNodeBuilder.

Definition at line 68 of file dfa_re_node_builder.cc.

ReNode * DfaReNodeBuilder::createPlusNode ( ReNode * in,
const Position & pos ) [virtual]
 

Creates a new "+" node whose operand is in.

Reimplemented from IReNodeBuilder.

Definition at line 76 of file dfa_re_node_builder.cc.

ReNode * DfaReNodeBuilder::createOptionalNode ( ReNode * in,
const Position & pos ) [virtual]
 

Creates a new "?" node whose operand in.

Reimplemented from IReNodeBuilder.

Definition at line 84 of file dfa_re_node_builder.cc.

ReNode * DfaReNodeBuilder::createStarNode ( ReNode * in,
const Position & pos ) [virtual]
 

Creates a "*" node whose operand is in.

Reimplemented from IReNodeBuilder.

Definition at line 91 of file dfa_re_node_builder.cc.

ReNode * DfaReNodeBuilder::createStringLiteralNode ( const string & s,
const Position & pos ) [virtual]
 

Creates a node that matches the gicen string literal s.

Reimplemented from IReNodeBuilder.

Definition at line 97 of file dfa_re_node_builder.cc.

ReNode * DfaReNodeBuilder::createCharListNode ( bool negated,
const vector< CharClassDescriptor > & chars,
const Position & pos ) [virtual]
 

Creates a new node that matches the characters classes given in \s chars or, if negated is true, the characters that do not belong to the classes in chars.

Reimplemented from IReNodeBuilder.

Definition at line 111 of file dfa_re_node_builder.cc.

DfaSourceRe * DfaReNodeBuilder::createEotNode ( int tokId,
const Position & pos )
 

Creates a new reEotNode that signals the end of the token with the given id.

Definition at line 140 of file dfa_re_node_builder.cc.

DfaSourceRe * DfaReNodeBuilder::createCharNode ( unsigned char match,
const Position & pos ) [protected]
 

This is where the "CASE_SENSITIVE" option is implemented. This method does char node(s) construction according to the given option. If the scanner is case-insensitive, for the character 'a' it will actually create the nodes for expression 'a' | 'A'.

Definition at line 146 of file dfa_re_node_builder.cc.

Referenced by createCharListNode(), and createStringLiteralNode().


Member Data Documentation

PropRegistry & DfaReNodeBuilder::registry [private]
 

Definition at line 93 of file dfa_re_node_builder.hh.

bool DfaReNodeBuilder::caseSensitive [private]
 

Caches the CASE_SENSITIVE property from the registry.

Definition at line 98 of file dfa_re_node_builder.hh.


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