mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Currently the example really looks like C. Instead of a union of structs to implement the AST, use a hierarchy. It would be nice to feature a C++17 version with std variants. * examples/c++/glr/c++-types.yy (Node, free_node, new_nterm) (new_term): Move into... * examples/c++/glr/ast.hh: here, a proper C++ hierarchy.
glr
This example demonstrates the use of GLR parsers to handle (local) ambiguities in the C++ language. See the node "Merging GLR Parses" in Bison's documentation.