Now we show and explain three sample programs written using Ocamlyacc: a reverse polish notation calculator, an algebraic (infix) notation calculator, and a multi-function calculator. These examples are simple, but Ocamlyacc grammars for real programming languages are written the same way
Reverse Polish Notation Calculator: rpcalc
Infix Notation Calculator: calc
Simple Error Recovery
Location Tracking Calculator: ltcalc
Multi-Function Calculator: mfcalc