> On 12 Mar 2015, at 13:21, Zdenek Prikryl <iprik...@fit.vutbr.cz> wrote:
> 
> I have a valid reduce/reduce conflict.

> Can someone give me a hint how to deal with this? 

See the Bison manual calculator example, sec. 10.1.6.3: keep all in the "expr" 
rules, adding a precedence rule for ":".

For lists, etc:

expr:
  ...
| list
;

list: "[" sequence "]"

sequence:
  /* empty */
| expr
| sequence "," expr
;

It is typically needed some extra separating token to avoid conflicts.



_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to