expr : expr expr binop { [ BINOP => [ $item[3], $item[1], $item[2] ] ] } | term #### expr : term { push($item[1]) } expr_ | term expr_ : expr binop { [ BINOP => [ $item[2], pop(), $item[1] ] ] } #### expr : term { push($item[1]) } expr_1 expr_1 : expr_2 | # Automatic match { pop() } expr_2 : expr binop { [ BINOP => [ $item[2], pop(), $item[1] ] ] } #### expr : term { push($item[1]) } expr_ expr_ : expr binop { [ BINOP => [ $item[2], pop(), $item[1] ] ] } | # Automatic match { pop() }