Files
bison/examples/c/bistromathic
Akim Demaille c90110efd3 examples: bistromathic: when quitting, close the current line
When the user ctrl-d the line, we left the cursor not at col 0.
Let's fix that.
This revealed a few short-comings in the testing framework.

* examples/test (run): Also display the diffs.
And support -n.
* examples/c/bistromathic/bistromathic.test
* examples/c/bistromathic/parse.y
2020-04-26 16:08:47 +02:00
..

bistromathic - all the bells and whistles

This example demonstrates best practices when using Bison.

  • Its hand-written scanner tracks locations.
  • Its interface is pure.
  • Its interface is "incremental", well suited for interaction: it uses the push-parser API to feed the parser with the incoming tokens.
  • It features an interactive command line with completion based on the parser state, based on yyexpected_tokens.
  • It uses Bison's standard catalogue for internationalization of generated messages.
  • 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.