>bool_expr : '!' bool_expr
> | num_expr '=' num_expr
> | 'b'
> ;
>
>num_expr : bool_expr
> | 'n'
> ;
Yes, this is ambiguous.
If your input is "!b=n", it can't tell which of these you mean:
! ( b = n )
(!b) = n
R's,
John
__
Hi all,
I am new to bison and would need your kind help to understand why the
following (stupid) simple grammar is ambiguous:
%left '!'
%left '='
%%
start : bool_expr ;
bool_expr : '!' bool_expr
| num_expr '=' num_expr
| 'b'
;
num_expr : bool_expr
| 'n'
Le 16 nov. 2013 à 20:33, Arthur Schwarz a écrit :
> Bison 2.7.1
>
> Hi Akim;
Hi Arthur,
Please, keep the CC so that answer remain public.
> Thanks for the reply. The error occurs in yyerror() below. The code for
> yyerror() is from bison's skeleton.
No, it is not. It typically comes from