diff options
Diffstat (limited to 'src/parse.y')
-rw-r--r-- | src/parse.y | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/parse.y b/src/parse.y index db959df..0b8b992 100644 --- a/src/parse.y +++ b/src/parse.y @@ -69,14 +69,12 @@ directive |= "%extra_arg" BLOCK(type) csymbol(name) { } directive |= SYMBOL(lhs) "|=" rhs(rhs) action(action) { - grammar->add_rule({item_t(*lhs, rhs->first), rhs->second, *action}); + grammar->add_rule(item_t(*lhs, rhs->first), rhs->second, *action); } -directive |= SYMBOL(lhs) "|=" '(' CHAR(c1) "..." CHAR(c2) ')' ';' { - vars_t vars(1); - +directive |= SYMBOL(lhs) "|=" '(' CHAR(c1) "..." CHAR(c2) ')' action(action) { for (unsigned int c = c1; c <= c2; c++) - grammar->add_rule({item_t(*lhs, {symbol_t::make_char(c)}), vars, std::string()}); + grammar->add_rule(item_t(*lhs, {symbol_t::make_char(c)}), vars_t(1), *action); } |