* src/gram.c (rule_rhs_print): Use %empty for empty rules.
* tests/conflicts.at, tests/regression.at, tests/sets.at: Adjust.
void
rule_rhs_print (rule const *r, FILE *out)
{
void
rule_rhs_print (rule const *r, FILE *out)
{
{
item_number *rp;
for (rp = r->rhs; *rp >= 0; rp++)
fprintf (out, " %s", symbols[*rp]->tag);
}
else
{
item_number *rp;
for (rp = r->rhs; *rp >= 0; rp++)
fprintf (out, " %s", symbols[*rp]->tag);
}
else
- {
- fprintf (out, " /* %s */", _("empty"));
- }
+ fputs (" %empty", out);
2 resolved_conflict: 'a' unreachable1
4 unreachable1: 'a' unreachable2
2 resolved_conflict: 'a' unreachable1
4 unreachable1: 'a' unreachable2
- 6 unreachable2: /* empty */
- 7 | /* empty */
+ 6 unreachable2: %empty
+ 7 | %empty
9 reported_conflicts: 'a'
9 reported_conflicts: 'a'
State 4 conflicts: 1 shift/reduce
State 4 conflicts: 1 shift/reduce
1 start: resolved_conflict 'a' reported_conflicts 'a'
2 resolved_conflict: 'a' unreachable1
1 start: resolved_conflict 'a' reported_conflicts 'a'
2 resolved_conflict: 'a' unreachable1
4 unreachable1: 'a' unreachable2
4 unreachable1: 'a' unreachable2
- 6 unreachable2: /* empty */
- 7 | /* empty */
+ 6 unreachable2: %empty
+ 7 | %empty
8 reported_conflicts: 'a'
9 | 'a'
8 reported_conflicts: 'a'
9 | 'a'
Terminals, with rules where they appear
Terminals, with rules where they appear
2 CONST_DEC_LIST: CONST_DEC
3 | CONST_DEC_LIST CONST_DEC
2 CONST_DEC_LIST: CONST_DEC
3 | CONST_DEC_LIST CONST_DEC
5 CONST_DEC: $@1 undef_id_tok '=' const_id_tok ';'
5 CONST_DEC: $@1 undef_id_tok '=' const_id_tok ';'
NULLABLE
$accept: no
e: yes
NULLABLE
$accept: no
e: yes
$accept derives
0 e $end
1 'e'
$accept derives
0 e $end
1 'e'