From a49d9fa1a802de6e0df0575d4fb6a3c5670d474f Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Fri, 11 Feb 2011 13:06:25 +0100 Subject: [PATCH] fix grammar wrt RuleSequence --- libwccl/parser/grammar.g | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g index e12c691..d2a7019 100644 --- a/libwccl/parser/grammar.g +++ b/libwccl/parser/grammar.g @@ -1446,17 +1446,16 @@ rule_sequence returns [boost::shared_ptr<RuleSequence> rule_seq] { // FIXME czy tutaj przypadkiem nie powinno byc shared_ptr? - std::vector<Rule> rls; boost::shared_ptr<Rule> rle; - rule_seq.reset(new RuleSequence(rls)); + rule_seq.reset(new RuleSequence()); } : rle = rule [tagset, vars] { - rls.push_back(*rle); + rule_seq->push_back(*rle); } ( COMMA rle = rule [tagset, vars] { - rls.push_back(*rle); + rule_seq->push_back(*rle); } )* ; @@ -1519,14 +1518,14 @@ action_delete pos = position_operator [tagset, vars] COMMA condition = bool_operator [tagset, vars] { // delete(positon, condition); - action.reset(new Delete(condition)); + action.reset(new Delete(condition, pos)); } ) | ( condition = bool_operator [tagset, vars] { // delete(condition); - action.reset(new Delete(condition, pos)); + action.reset(new Delete(condition)); } ) ) -- GitLab