diff options
author | graydon <graydon> | 2005-08-10 03:15:21 +0000 |
---|---|---|
committer | graydon <graydon> | 2005-08-10 03:15:21 +0000 |
commit | d7f3e0c5d0b0af0dcb5f8168e1184f15a0554a4e (patch) | |
tree | 905bbe1cff9ae08a6cf9f314fd4d5bc8976215fa /parse.h | |
parent | 0110f903329ab531bcbe9d555d5b6f6dc77d8a54 (diff) | |
download | systemtap-steved-d7f3e0c5d0b0af0dcb5f8168e1184f15a0554a4e.tar.gz systemtap-steved-d7f3e0c5d0b0af0dcb5f8168e1184f15a0554a4e.tar.xz systemtap-steved-d7f3e0c5d0b0af0dcb5f8168e1184f15a0554a4e.zip |
2005-08-09 Graydon Hoare <graydon@redhat.com>
* staptree.{cxx,h}
(target_symbol): New struct.
(*_visitor::visit_target_symbol): Support it.
(visitor::active_lvalues)
(visitor::is_active_lvalue)
(visitor::push_active_lvalue)
(visitor::pop_active_lvalue): Support lvalue-detection.
(delete_statement::visit)
(pre_crement::visit)
(post_crement::visit)
(assignment::visit): Push and pop lvalue expressions.
* elaborate.{cxx,h}
(lvalule_aware_traversing_visitor): Remove class.
(no_map_mutation_during_iteration_check)
(mutated_map_collector): Update lvalue logic.
(typeresolution_info::visit_target_symbol): Add, throw error.
* parse.{cxx,h}
(tt2str)
(tok_is)
(parser::expect_*)
(parser::peek_*): New helpers.
(parser::parse_symbol): Rewrite, support target_symbols.
* translate.cxx (c_unparser::visit_target_symbol): Implement.
* tapsets.cxx (var_expanding_copy_visitor): Update lvalue logic,
change visit_symbol to visit_target_symbol.
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -92,6 +92,17 @@ private: const token* last_t; // the last value returned by peek() or next() const token* next_t; // lookahead token + + // expectations + const token* expect_known (token_type tt, std::string const & expected); + const token* expect_unknown (token_type tt, std::string & target); + + // convenience forms + const token* expect_op (std::string const & expected); + const token* expect_kw (std::string const & expected); + const token* expect_ident (std::string & target); + bool peek_op (std::string const & op); + bool peek_kw (std::string const & kw); void print_error (const parse_error& pe); unsigned num_errors; |