Public Methods | |
cmt_or_node (cmt_node_set* father) | |
const cmt_regexp::iterator | match (const cmt_string& text, int pos) const |
|
Definition at line 906 of file cmt_regexp.cxx. 00906 : cmt_node_set (father) 00907 { 00908 } |
|
Reimplemented from cmt_node. Definition at line 910 of file cmt_regexp.cxx. 00912 { 00913 if ((pos < 0) || (pos >= text.size ())) 00914 { 00915 return (cmt_regexp::iterator::null ()); 00916 } 00917 00918 if (_nodes.size () == 0) return (cmt_regexp::iterator (pos, 0)); 00919 00920 int i; 00921 00922 for (i = 0; i < _nodes.size (); i++) 00923 { 00924 const cmt_node* n = _nodes[i]; 00925 00926 const cmt_regexp::iterator it = n->match (text, pos); 00927 00928 // at least one or-ed expression matches 00929 if (it != cmt_regexp::iterator::null ()) return (it); 00930 } 00931 00932 return (cmt_regexp::iterator::null ()); 00933 } |