mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
The user should think of yypcontext fields as accessible only via yypcontext_* functions. So let's rename yyexpected_tokens to reflect that. Let's _not_ rename yyreport_syntax_error, as the user may define this function, and is not allowed to access directly the fields of yypcontext_t: she *must* use the "accessors". This is comparable to the case of C++/Java where the user defines parser::report_syntax_error, not parser::context::report_syntax_error. * data/skeletons/glr.c, data/skeletons/yacc.c (yyexpected_tokens): Rename as... (yypcontext_expected_tokens): this. Adjust dependencies.
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.