mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
We always refer to the triplet "kind, value, location". All of them are nouns, and we support api.value.type and api.location.type. On this regard, "semantic_type" was a poor choice. Make it "value_type". The test suite was not updated to use value_type, on purpose, to enforce backward compatibility. * data/skeletons/c++.m4, data/skeletons/glr.cc, data/skeletons/glr2.cc, * data/skeletons/variant.hh, doc/bison.texi: Define value_type rather than semantic_type. Add a backward compatibility typedef. * examples/c++/glr/c++-types.yy: Migrate.
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.