> ! is a prefix operator; = is infix.

Sorry, but I read bison's documentation regarding infix operators and
precedence levels, and I still don't understand your short explanation.
Here is another simple grammar with only infix operators that has conflicts:

%left '&'
%left '='
%left '+'

%%

start : bool_expr;

bool_expr : bool_expr '&' bool_expr
          | num_expr '=' num_expr
          | 'b'
          ;

num_expr : bool_expr
         | num_expr '+' num_expr
         | 'n'
         ;

%%

All operators have defined precedence levels, so why is it ambiguous?

Thanks,
Florent

_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to