2 Examples

Now we show and explain several sample programs written using Bison: a
reverse polish notation calculator, an algebraic (infix) notation
calculator — later extended to track “locations” —
and a multi-function calculator. All
produce usable, though limited, interactive desk-top calculators.

These examples are simple, but Bison grammars for real programming
languages are written the same way. You can copy these examples into a
source file to try them.