diff options
author | Akim Demaille <demaille@gostai.com> | 2010-12-20 22:35:07 +0100 |
---|---|---|
committer | Akim Demaille <demaille@gostai.com> | 2011-06-30 10:51:57 +0200 |
commit | a51f9291a7c9141a2ed757370714f1f62c19a8c5 (patch) | |
tree | df733283af65c1582811cf1aebd76fedfbaf19e2 | |
parent | ff654ad228fe39fbd7cb7c2b466cf9f85550c8c4 (diff) | |
download | bison-a51f9291a7c9141a2ed757370714f1f62c19a8c5.tar.gz |
glr.cc: fix.
* data/glr.cc: Define the variant structure.
* examples/variant.yy: Adjust calling conventions.
-rw-r--r-- | data/bison.m4 | 1 | ||||
-rw-r--r-- | data/glr.cc | 4 | ||||
-rw-r--r-- | examples/variant.yy | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/data/bison.m4 b/data/bison.m4 index bbf90aae..32508c10 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -788,7 +788,6 @@ b4_percent_define_if_define([parse.assert]) b4_percent_define_if_define([parse.trace]) b4_percent_define_if_define([variant]) - # b4_error_verbose_if([IF-ERRORS-ARE-VERBOSE], [IF-NOT]) # ------------------------------------------------------ # Map %define parse.error "(simple|verbose)" to b4_error_verbose_if and diff --git a/data/glr.cc b/data/glr.cc index 0faf823f..f7e86a41 100644 --- a/data/glr.cc +++ b/data/glr.cc @@ -272,6 +272,10 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], ]b4_percent_define_ifdef([[location_type]], [], [[#include "location.hh"]])[ +]b4_variant_if([b4_namespace_open +b4_variant_define +b4_namespace_close])[ + /* Using locations. */ #define YYLSP_NEEDED ]b4_locations_if([1], [0])[ diff --git a/examples/variant.yy b/examples/variant.yy index 85109a92..40220261 100644 --- a/examples/variant.yy +++ b/examples/variant.yy @@ -1,7 +1,7 @@ %debug %skeleton "glr.cc" %defines -%define assert +%define parse.assert %define variant %define lex_symbol %locations |