Skip to content
Snippets Groups Projects
Commit 5767ba52 authored by ilor's avatar ilor
Browse files

fix parser grammar passing emptu string as channel name in ass/annsub operators (fixes issue 1453)

parent 9166259e
No related branches found
No related tags found
No related merge requests found
...@@ -1329,17 +1329,16 @@ bool_ann ...@@ -1329,17 +1329,16 @@ bool_ann
{ {
boost::shared_ptr< Function<Match> > match_from; boost::shared_ptr< Function<Match> > match_from;
boost::shared_ptr< Function<Match> > match_to; boost::shared_ptr< Function<Match> > match_to;
std::string chan_name;
} }
: "ann" LPAREN : "ann" LPAREN
match_from = match_operator [scope] COMMA match_from = match_operator [scope] COMMA
(match_to = match_operator [scope] COMMA)? (match_to = match_operator [scope] COMMA)?
name : STRING channel : STRING
RPAREN { RPAREN {
if (match_to) { if (match_to) {
op.reset(new Ann(match_from, match_to, chan_name)); op.reset(new Ann(match_from, match_to, token_ref_to_std_string(channel)));
} else { } else {
op.reset(new Ann(match_from, chan_name)); op.reset(new Ann(match_from, token_ref_to_std_string(channel)));
} }
} }
; ;
...@@ -1353,18 +1352,17 @@ bool_annsub ...@@ -1353,18 +1352,17 @@ bool_annsub
{ {
boost::shared_ptr< Function<Match> > match_from; boost::shared_ptr< Function<Match> > match_from;
boost::shared_ptr< Function<Match> > match_to; boost::shared_ptr< Function<Match> > match_to;
std::string chan_name;
} }
: "annsub" LPAREN : "annsub" LPAREN
match_from = match_operator [scope] COMMA match_from = match_operator [scope] COMMA
(match_to = match_operator [scope] COMMA)? (match_to = match_operator [scope] COMMA)?
name : STRING channel : STRING
RPAREN RPAREN
{ {
if (match_to) { if (match_to) {
op.reset(new AnnSub(match_from, match_to, chan_name)); op.reset(new AnnSub(match_from, match_to, token_ref_to_std_string(channel)));
} else { } else {
op.reset(new AnnSub(match_from, chan_name)); op.reset(new AnnSub(match_from, token_ref_to_std_string(channel)));
} }
} }
; ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment