Update of /cvsroot/cpptool/rfta/src/rftaparser
In directory sc8-pr-cvs1:/tmp/cvs-serv26301/src/rftaparser
Modified Files:
Parser.cpp
Log Message:
-- bug fixes found while class body parsing tests
Index: Parser.cpp
===================================================================
RCS file: /cvsroot/cpptool/rfta/src/rftaparser/Parser.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Parser.cpp 26 Apr 2003 21:11:30 -0000 1.8
--- Parser.cpp 28 Apr 2003 20:39:14 -0000 1.9
***************
*** 225,233 ****
int idx = 0;
if (s.empty()) return true;
while ( hasNext() && idx<s.length() && *current_ == s[idx] )
{
++idx; ++current_;
}
! return idx==s.length();
}
--- 225,240 ----
int idx = 0;
if (s.empty()) return true;
+ const char * rollback = current_;
+
while ( hasNext() && idx<s.length() && *current_ == s[idx] )
{
++idx; ++current_;
}
! if (idx!=s.length())
! {
! current_=rollback;
! return false;
! } else
! return true;
}
|