Files
bison/examples/c
Akim Demaille d657da9fb4 examples: add a simple Flex+Bison example in C
Suggested by Askar Safin.
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00003.html

* examples/c/lexcalc/Makefile, examples/c/lexcalc/README.md,
* examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/local.mk,
* examples/c/lexcalc/parse.y, examples/c/lexcalc/scan.l:
New.
2018-12-09 15:30:25 +01:00
..

This directory contains examples of Bison grammar files.

Most of them come from the documentation, which should be installed together with Bison. The URLs are provided for convenience.

rpcalc - Reverse Polish Notation Calculator

The first example is that of a simple double-precision Reverse Polish Notation calculator (a calculator using postfix operators). This example provides a good starting point, since operator precedence is not an issue.

Extracted from the documentation: "Reverse Polish Notation Calculator" https://www.gnu.org/software/bison/manual/html_node/RPN-Calc.html

mfcalc - Multi-Function Calculator

A more complete C example: a multi-function calculator.

Extracted from the documentation: "Multi-Function Calculator: mfcalc". https://www.gnu.org/software/bison/manual/html_node/Multi_002dfunction-Calc.html