mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
This example will soon use GNU readline, so its scanner should be easy to use (concurrently) on strings, not streams. This is not a place where Flex shines, and anyway, these are examples of Bison, not Flex. There's already lexcalc and reccalc that demonstrate the use of Flex. * examples/c/bistromathic/scan.l: Remove. * examples/c/bistromathic/parse.y (yylex): New. Adjust dependencies.
bistromathic - all the bells and whistles
This example demonstrates the best practices when using Bison.
- Its interface is pure.
- Its hand-written scanner tracks locations.
- It uses a custom syntax error with location, lookahead correction and token internationalization.
- It supports debug traces with semantic values.
- It uses named references instead of the traditional $1, $2, etc.