Menu
  • HOME
  • TAGS

Shift/reduce conflict with infix sections

yacc,infix-notation,lalr,shift-reduce-conflict,ocamlyacc

Leaving out a lot of your grammar, you have the following productions, all of which could be simultaneously feasible. atom: LPAREN expr RPAREN expr: expr PLUS expr section: LPAREN atom PLUS RPAREN So let's say we've just read ( 0 -- that is, an LPAREN and an INT -- and...

OCaml Types not compatible - OCamlyacc

compiler-construction,functional-programming,ocaml,yacc,ocamlyacc

I assume you are trying to compose functions with the << operator you have defined elsewhere. Unfortunately $3 does not represent a function but a list of functions, therefore you need to do something to $3 before composing the functions....