On this grammar:

> %%
> start:
>   'a' b 'c' d
> | 'a' b 'c' d
> ;
> b: 'b';
> d: /* nada.  */;
> %%

with input a b c d, the current code reports:

> Option 1,
>   start -> <Rule 1, tokens 1 .. 3>
>     $end <tokens 1 .. 1>
>     'a' <tokens 2 .. 2>
>     b <tokens 3 .. 3>
>     'c' <empty>
> 
> Option 2,
>   start -> <Rule 2, tokens 1 .. 3>
>     $end <tokens 1 .. 1>
>     'a' <tokens 2 .. 2>
>     b <tokens 3 .. 3>
>     'c' <empty>

instead of:

> Option 1,
>   start -> <Rule 1, tokens 1 .. 3>
>     'a' <tokens 1 .. 1>
>     b <tokens 2 .. 2>
>     'c' <tokens 3 .. 3>
>     d <empty>
> 
> Option 2,
>   start -> <Rule 2, tokens 1 .. 3>
>     'a' <tokens 1 .. 1>
>     b <tokens 2 .. 2>
>     'c' <tokens 3 .. 3>
>     d <empty>

This is a regression I introduced in master only with
commit 783aa653f4ca70a75919c8516b950494c612cbfe.
http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00291.html

Attachment: 0001-glr-fix-ambiguity-reports.patch
Description: Binary data


Reply via email to