From 61fdd89866518d188d30b996b5b6ab93b930c876 Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(win7-laptop)> Date: Tue, 5 Apr 2011 13:45:46 +0200 Subject: [PATCH] "$m:_M" -> "_M": names used in Variables class should not be prefixed. The prefix like "$m:" signifies type in WCCL, but in Variables code it comes from template argument; in this particular example, the <Match> type. --- libwccl/parser/grammar.g | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g index 998e823..376de76 100644 --- a/libwccl/parser/grammar.g +++ b/libwccl/parser/grammar.g @@ -248,7 +248,7 @@ parse_match_rule returns [boost::shared_ptr<Expression> ret_match] { Variables vars; - vars.get_put<Match>("$m:_M"); + vars.get_put<Match>("_M"); } : ret_match = match_rule_operator[tagset, vars] ; @@ -644,7 +644,7 @@ symset_operator [const Corpus2::Tagset& tagset, Variables& vars] returns [boost::shared_ptr<Function<TSet> > ret] : ret = symset_condition [tagset, vars] - | (SYMBOL LBRACKET) => (ret = symset_getsymbol [tagset, vars]) + | {LA(1)==SYMBOL && LA(2)==LBRACKET}? (ret = symset_getsymbol [tagset, vars]) | ret = symset_var_val [tagset, vars] | ret = symset_class [tagset, vars] | ret = symset_range [tagset, vars] @@ -1718,7 +1718,7 @@ match_apply_operator [const Corpus2::Tagset& tagset, Variables& vars] returns [boost::shared_ptr<ApplyOperator> ret_op] { - VariableAccessor<Match> matches = vars.create_accessor<Match>("$m:_M");; + VariableAccessor<Match> matches = vars.create_accessor<Match>("_M");; boost::shared_ptr<const MatchOperator> match_op; boost::shared_ptr<std::vector<boost::shared_ptr<MatchAction> > > actions; boost::shared_ptr<std::vector<boost::shared_ptr<Function<Bool> > > > conditions; -- GitLab