mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
The name "defines" is incorrect, the generated file contains far more than just #defines. * src/getargs.h, src/getargs.c (-H, --header): New option. With optional argument, just like --defines, --xml, etc. (defines_flag): Rename as... (header_flag): this. Adjust dependencies. * data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.c, * data/skeletons/glr.cc, data/skeletons/glr2.cc, data/skeletons/lalr1.cc, * data/skeletons/yacc.c: Adjust. * examples, doc/bison.texi: Adjust. * tests/headers.at, tests/local.at, tests/output.at: Convert most tests from using --defines to using --header.
pushcalc - push parser with Bison
This directory contains pushcalc, the traditional calculator, implemented as a push parser.
Traditionally Bison is used to create so called "pull parsers": the user invokes the parser once, which repeatedly calls (pulls) the scanner until the input is drained.
This example demonstrates the "push parsers": the user calls scanner to fetch the next token, passes (pushes) it to the parser, and repeats the operation until the input is drained.
This example is a straightforward conversion of the 'calc' example to the push-parser model.