diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g index bb69381aaf068285e21ec11b8075da40e91e2db8..c9add9feddd428dcc4929a0dee4764ac7f231640 100644 --- a/libwccl/parser/grammar.g +++ b/libwccl/parser/grammar.g @@ -140,7 +140,7 @@ parse_strset_operator res.reset(new ANTLRParserResult<StrSet>()); boost::shared_ptr<Function<StrSet> > op; } - : op = strset_operator [tagset, *res->variables.get()] { + : op = strset_operator [tagset, *res->variables] { res->op = op; } EOF @@ -156,7 +156,7 @@ parse_bool_operator res.reset(new ANTLRParserResult<Bool>()); boost::shared_ptr<Function<Bool> > op; } - : op = bool_operator [tagset, *res->variables.get()] { + : op = bool_operator [tagset, *res->variables] { res->op = op; } EOF @@ -172,7 +172,7 @@ parse_symset_operator res.reset(new ANTLRParserResult<TSet>()); boost::shared_ptr<Function<TSet> > op; } - : op = symset_operator [tagset, *res->variables.get()] { + : op = symset_operator [tagset, *res->variables] { res->op = op; } EOF @@ -188,7 +188,7 @@ parse_position_operator res.reset(new ANTLRParserResult<Position>()); boost::shared_ptr<Function<Position> > op; } - : op = position_operator [tagset, *res->variables.get()] { + : op = position_operator [tagset, *res->variables] { res->op = op; } EOF @@ -234,7 +234,7 @@ strset_value boost::shared_ptr<StrSet> set; } : set = strset_literal { - val.reset(new Constant<StrSet>(*set.get())); + val.reset(new Constant<StrSet>(*set)); } ; @@ -281,7 +281,7 @@ symset_value boost::shared_ptr<TSet> set; } : set = symset_literal [tagset] { - val.reset(new Constant<TSet>(*set.get())); + val.reset(new Constant<TSet>(*set)); } ; @@ -385,7 +385,7 @@ position_variable boost::shared_ptr<VariableAccessor<Position> > pos_acc; } : pos_acc = position_variable_acc [vars] { - op.reset(new VarGetter<Position>(*pos_acc.get())); + op.reset(new VarGetter<Position>(*pos_acc)); } ; @@ -416,7 +416,7 @@ strset_variable boost::shared_ptr<VariableAccessor<StrSet> > strset_acc; } : strset_acc = strset_variable_acc [vars] { - op.reset(new VarGetter<StrSet>(*strset_acc.get())); + op.reset(new VarGetter<StrSet>(*strset_acc)); } ; @@ -446,7 +446,7 @@ symset_variable boost::shared_ptr<VariableAccessor<TSet> > symset_acc; } : symset_acc = symset_variable_acc [vars] { - op.reset(new VarGetter<TSet>(*symset_acc.get())); + op.reset(new VarGetter<TSet>(*symset_acc)); } ; @@ -476,7 +476,7 @@ bool_variable boost::shared_ptr<VariableAccessor<Bool> > bool_acc; } : bool_acc = bool_variable_acc [vars] { - op.reset(new VarGetter<Bool>(*bool_acc.get())); + op.reset(new VarGetter<Bool>(*bool_acc)); } ; @@ -1098,9 +1098,9 @@ bool_iteration RPAREN { ret.reset(new AtLeast(lpos, rpos, *pacc, expr, min_match)); } - | "llook" LPAREN //note inverted rpos/lpos order + | "llook" LPAREN + lpos = position_operator [tagset, vars] COMMA rpos = position_operator [tagset, vars] COMMA - lpos = position_operator [tagset, vars] COMMA pacc = position_variable_acc [vars] COMMA expr = bool_operator [tagset, vars] RPAREN { @@ -1145,7 +1145,7 @@ position_setvar : ret_acc = position_variable_acc [vars] COMMA ret_op = position_operator [tagset, vars] { - op.reset(new VarSetter<Position>(*ret_acc.get(), ret_op)); + op.reset(new VarSetter<Position>(*ret_acc, ret_op)); } ; @@ -1161,7 +1161,7 @@ bool_setvar : ret_acc = bool_variable_acc [vars] COMMA ret_op = bool_operator [tagset, vars] { - op.reset(new VarSetter<Bool>(*ret_acc.get(), ret_op)); + op.reset(new VarSetter<Bool>(*ret_acc, ret_op)); } ; @@ -1177,7 +1177,7 @@ strset_setvar : ret_acc = strset_variable_acc [vars] COMMA ret_op = strset_operator [tagset, vars] { - op.reset(new VarSetter<StrSet>(*ret_acc.get(), ret_op)); + op.reset(new VarSetter<StrSet>(*ret_acc, ret_op)); } ; @@ -1193,7 +1193,7 @@ symset_setvar : ret_acc = symset_variable_acc [vars] COMMA ret_op = symset_operator [tagset, vars] { - op.reset(new VarSetter<TSet>(*ret_acc.get(), ret_op)); + op.reset(new VarSetter<TSet>(*ret_acc, ret_op)); } ;