[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: C++: make sure the generated header is self container
From: |
Akim Demaille |
Subject: |
FYI: C++: make sure the generated header is self container |
Date: |
Sun, 26 Aug 2018 18:54:53 +0200 |
The matrix of possible combinations is frightening…
commit 3d0fd181b9ae290c84d632c2f3a8eab78b8a087c
Author: Akim Demaille <address@hidden>
Date: Sun Aug 26 18:51:31 2018 +0200
C++: make sure the generated header is self container
See the previous commit.
* data/lalr1.cc: Be sure to define YY_NULLPTR.
* tests/headers.at: Check the case that was failing.
diff --git a/data/lalr1.cc b/data/lalr1.cc
index 95bc61d9..c10b410e 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -160,6 +160,7 @@ m4_define([b4_shared_declarations],
]b4_attribute_define[
]b4_YYDEBUG_define[
+]b4_null_define[
]b4_namespace_open[
diff --git a/tests/headers.at b/tests/headers.at
index bade94ed..93b70b73 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -178,7 +178,7 @@ AT_TEST([%define api.pure %define api.push-pull both])
AT_TEST([%language "c++"])
AT_TEST([%locations %debug %language "c++"])
-# AT_TEST([%language "c++" %define api.value.type variant %define
parse.assert])
+AT_TEST([%language "c++" %define api.value.type variant %define parse.assert])
AT_TEST([%locations %language "c++" %glr-parser])
@@ -193,8 +193,8 @@ AT_SETUP([Several parsers])
# AT_TEST([PREFIX], [DIRECTIVES])
# -------------------------------
# Generate and compile to *.o. Make sure there is no (allowed) YY*
-# nor yy* identifiers in the header. Check that headers can be
-# compiled by a C++ compiler.
+# nor yy* identifiers in the header after applying api.prefix. Check
+# that headers can be compiled by a C++ compiler.
m4_pushdef([AT_TEST],
[AT_BISON_OPTION_PUSHDEFS([%define api.prefix {$1_} $2])
AT_DATA_GRAMMAR([$1.y],
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: C++: make sure the generated header is self container,
Akim Demaille <=