#include <re_node.hh>
Inheritance diagram for ReNode:
Public Methods | |
ReNode (const Position &pos_) | |
virtual | ~ReNode () |
virtual ReNode* | clone ()=0 |
virtual bool | isLeaf () |
virtual int | getChildCount ()=0 |
virtual ReNode& | operator[] (int index)=0 |
virtual bool | dfTraverse (ReNodeAlgo &algo) |
const Position& | getPos () const |
virtual void | dump (ostream &os) const=0 |
Private Attributes | |
Position | pos |
Definition at line 50 of file re_node.hh.
|
Definition at line 54 of file re_node.hh. |
|
Definition at line 58 of file re_node.hh. |
|
Creates a copy of the regexp parse tree rooted in this node. Reimplemented in ReCatNode, ReOrNode, ReStarNode, ReCharNode, ReEotNode, and ReLambdaNode. Referenced by ReStarNode::clone(), ReOrNode::clone(), ReCatNode::clone(), DfaReNodeBuilder::createPlusNode(), and ScannerSpec::updateStates().
|
|
Returns true if this node is a leaf node. Definition at line 68 of file re_node.hh. |
|
Returns the number of child nodes of this node. Reimplemented in ReCatNode, ReOrNode, ReStarNode, ReCharNode, ReEotNode, and ReLambdaNode. Referenced by dfTraverse(), and isLeaf().
|
|
Returns the index'th child of this node.
Reimplemented in ReCatNode, ReOrNode, ReStarNode, ReCharNode, ReEotNode, and ReLambdaNode. |
|
Generic depth-first traversal method. At each node, the () operator of the ReNodeAlgo object is invoked, with *this as argument. The traversal continues as long as the () operator returns true. Definition at line 39 of file re_node.cc. |
|
Definition at line 90 of file re_node.hh. Referenced by ReLambdaNode::clone(), ReEotNode::clone(), ReCharNode::clone(), ReStarNode::clone(), ReOrNode::clone(), ReCatNode::clone(), and DfaSourceRe::dump().
|
|
Reimplemented in DfaSourceRe, ReCatNode, ReOrNode, ReStarNode, ReCharNode, ReEotNode, and ReLambdaNode. Referenced by TokenDesc::dump().
|
|
Reimplemented in ReCharNode, ReEotNode, and ReLambdaNode. Definition at line 100 of file re_node.hh. |