examples: bistromathic: don't use Flex

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.
This commit is contained in:
Akim Demaille
2020-02-29 12:04:01 +01:00
parent c4a7e7a1ab
commit 535281f0ff
5 changed files with 100 additions and 91 deletions

View File

@@ -52,13 +52,12 @@ push-parser model.
## bistromathic - all the bells and whistles
This example demonstrates the best practices when using Bison.
- Its interface is pure.
- It uses a custom syntax error with location tracking, lookahead correction
and token internationalization.
- 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.
It also uses Flex to generate the scanner.
<!---
Local Variables: