Update of /cvsroot/cpptool/rfta/src/rftaparser
In directory sc8-pr-cvs1:/tmp/cvs-serv20978/src/rftaparser
Modified Files:
Parser.cpp
Log Message:
-- additional function for scanning character sequences
Index: Parser.cpp
===================================================================
RCS file: /cvsroot/cpptool/rfta/src/rftaparser/Parser.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Parser.cpp 12 Apr 2003 19:05:16 -0000 1.6
--- Parser.cpp 26 Apr 2003 10:51:59 -0000 1.7
***************
*** 205,208 ****
--- 205,219 ----
}
+ bool
+ Parser::tryReadNext( std::string s)
+ {
+ int idx = 0;
+ if (s.empty()) return true;
+ while ( hasNext() && idx<s.length() && *current_ == s[idx] )
+ {
+ ++idx; ++current_;
+ }
+ return idx==s.length();
+ }
bool
|