diff options
author | dsmith <dsmith> | 2006-07-13 20:41:00 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2006-07-13 20:41:00 +0000 |
commit | 493ee2241e4f16b196bbe320bba997c9c3df081d (patch) | |
tree | 9e92b57b1dea188cf670621a2fdb6138cd722b8b /parse.h | |
parent | 4eb3a7f59e23c9342fc40db9206d6ac98c2f7ca3 (diff) | |
download | systemtap-steved-493ee2241e4f16b196bbe320bba997c9c3df081d.tar.gz systemtap-steved-493ee2241e4f16b196bbe320bba997c9c3df081d.tar.xz systemtap-steved-493ee2241e4f16b196bbe320bba997c9c3df081d.zip |
2006-07-13 David Smith <dsmith@redhat.com>
* parse.cxx (parser::expect_unknown2): New function that looks for
2 possible token types.
* parse.cxx (parser::expect_ident_or_keyword): New function that
calls parser::expect_unknown2.
* parse.cxx (parser::parse_symbol): Calls
parser::expect_ident_or_keyword to allow keywords to appear when
expanding target symbols (Bugzilla #2913).
* parse.h: Added prototypes for parser::expect_unknown2 and
parser::expect_ident_or_keyword.
* testsuite/parseok/seventeen.stp: New test to check for allowing
keywords when expanding target symbols.
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -112,12 +112,15 @@ private: // expectations const token* expect_known (token_type tt, std::string const & expected); const token* expect_unknown (token_type tt, std::string & target); + const token* expect_unknown2 (token_type tt1, token_type tt2, + std::string & target); // convenience forms const token* expect_op (std::string const & expected); const token* expect_kw (std::string const & expected); const token* expect_number (int64_t & expected); const token* expect_ident (std::string & target); + const token* expect_ident_or_keyword (std::string & target); bool peek_op (std::string const & op); bool peek_kw (std::string const & kw); |