I'm trying to parse this syntax:
34 + 1 − 8, 32 * 87 + 6 / 4, 34 / 8
I'm expecting to ground it like this:
(, (- (+ 34 1) 8) (/ (+ (* 32 87) 6) 4) (/ 34 8))
This is the code for BISON:
%token NUMBER
%token COMMA
%token OPERATOR
%left OPERATOR
%left COMMA
%%
term: NUMBER | term op term ;
op: OPERATOR | COMMA;
%%
There is a problem:
test.y: conflicts: 2 shift/reduce
How can I solve it?