Public Member Functions | |
cmt_zero_one (cmt_regexp_node *n) | |
~cmt_zero_one () | |
const cmt_regexp::iterator | match (const cmt_string &text, int pos) const |
void | dump () const |
Protected Attributes | |
cmt_regexp_node * | _node |
|
Definition at line 532 of file cmt_regexp.cxx.
00532 : _node (n) 00533 { 00534 } |
|
Definition at line 536 of file cmt_regexp.cxx. References _node.
00537 { 00538 delete _node; 00539 } |
|
Reimplemented from cmt_regexp_node. Definition at line 564 of file cmt_regexp.cxx. References _node, cmt_regexp_node::dump(), tab(), and tab_level.
|
|
Reimplemented from cmt_regexp_node. Definition at line 541 of file cmt_regexp.cxx. References cmt_regexp::iterator::_length, _node, cmt_regexp_node::match(), cmt_regexp::iterator::null(), and cmt_string::size().
00543 { 00544 if ((pos < 0) || (pos > text.size ())) 00545 { 00546 return (cmt_regexp::iterator::null ()); 00547 } 00548 00549 int total = 0; 00550 00551 if (pos < text.size ()) 00552 { 00553 const cmt_regexp::iterator it = _node->match (text, pos); 00554 if (it != cmt_regexp::iterator::null ()) 00555 { 00556 total += it._length; 00557 pos += it._length; 00558 } 00559 } 00560 00561 return (cmt_regexp::iterator (pos, total)); 00562 } |
|
Definition at line 132 of file cmt_regexp.cxx. Referenced by dump(), match(), and ~cmt_zero_one(). |