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
Branches
No related merge requests found
......@@ -1329,17 +1329,16 @@ bool_ann
{
boost::shared_ptr< Function<Match> > match_from;
boost::shared_ptr< Function<Match> > match_to;
std::string chan_name;
}
: "ann" LPAREN
match_from = match_operator [scope] COMMA
(match_to = match_operator [scope] COMMA)?
name : STRING
channel : STRING
RPAREN {
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 {
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
{
boost::shared_ptr< Function<Match> > match_from;
boost::shared_ptr< Function<Match> > match_to;
std::string chan_name;
}
: "annsub" LPAREN
match_from = match_operator [scope] COMMA
(match_to = match_operator [scope] COMMA)?
name : STRING
channel : STRING
RPAREN
{
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 {
op.reset(new AnnSub(match_from, chan_name));
op.reset(new AnnSub(match_from, token_ref_to_std_string(channel)));
}
}
;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment