Files
bison/examples/c/bistromathic
Akim Demaille 04d62346f3 doc: refer to the token kind rather than the token type
* doc/bison.texi: Replace occurrences of "token type" with "token
kind".
Stop referring to the "macro definitions" of the token kinds, just
name them "definitions".
2020-04-05 19:14:39 +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 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.