mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
glr2.cc: make the example more C++
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.
This commit is contained in:
@@ -37,6 +37,7 @@ $(%C%_c___types_OBJECTS): $(cxx_types_sources_generated)
|
||||
if ENABLE_CXX
|
||||
check_PROGRAMS += %D%/c++-types
|
||||
nodist_%C%_c___types_SOURCES = \
|
||||
%D%/ast.hh \
|
||||
%D%/c++-types.cc \
|
||||
%D%/c++-types.hh
|
||||
# Don't use gnulib's system headers.
|
||||
|
||||
Reference in New Issue
Block a user