Files
bison/examples
Akim Demaille 44ac18d136 yacc.c: yypstate_expected_tokens
In push parsers, when asking for the list of expected tokens at some
point, it makes no sense to build a yyparse_context_t: the yypstate
alone suffices (the only difference being the lookahead).  Instead of
forcing the user to build a useless shell around yypstate, let's offer
yypstate_expected_tokens.

See https://lists.gnu.org/r/bison-patches/2020-03/msg00025.html.

* data/skeletons/yacc.c (yypstate): Declare earlier, so that we can
use it for...
(yypstate_expected_tokens): this new function, when in push parsers.
Adjust dependencies.
* examples/c/bistromathic/parse.y: Simplify: use
yypstate_expected_tokens.
Style fixes.
Reduce scopes (reported by Joel E. Denny).
2020-03-17 19:20:13 +01:00
..
2020-03-17 19:20:13 +01:00
2020-01-05 10:26:35 +01:00
2020-01-05 10:26:35 +01:00
2020-01-05 10:26:35 +01:00
2020-01-05 10:26:35 +01:00
2020-02-29 12:22:31 +01:00

This directory contains examples of Bison grammar files, sorted per language.

Several of them come from the documentation, which should be installed together with Bison. The URLs are provided for convenience.

These examples come with a README and a Makefile. Not only can they be used to toy with Bison, they can also be starting points for your own grammars.

Please, be sure to read the C examples before looking at the other languages, as these examples are simpler.