doc: an introductory example for C++

Suggested by Victor Khomenko.
http://lists.gnu.org/archive/html/bug-bison/2018-08/msg00037.html

* doc/bison.texi (A Simple C++ Example): New.
* examples/c++/local.mk, examples/c++/simple.test: New.
Extract, check, and install this new example.
* examples/local.mk: Adjust.
* examples/test: Adjust to the case where the dirname differs
from the test name.
This commit is contained in:
Akim Demaille
2018-10-23 20:14:47 +02:00
parent 7c4b40de61
commit a4dce889a4
9 changed files with 283 additions and 7 deletions

View File

@@ -80,6 +80,7 @@ BISON_CXXSTD([14])
BISON_CXXSTD([17])
BISON_CXXSTD([2a])
AM_CONDITIONAL([ENABLE_CXX11], [test x"$CXX11_CXXFLAGS" != x])
AM_CONDITIONAL([ENABLE_CXX14], [test x"$CXX14_CXXFLAGS" != x])
AC_LANG_POP([C++])
AC_ARG_ENABLE([gcc-warnings],
@@ -161,7 +162,7 @@ if test "$enable_gcc_warnings" = yes; then
do
gl_WARN_ADD([$i], [WARN_CXXFLAGS_TEST])
done
# Clang++ 3.2+ reject C code generated by Flex.
# Clang++ 3.2+ rejects C code generated by Flex.
gl_WARN_ADD([-Wno-null-conversion], [FLEX_SCANNER_CXXFLAGS])
# So does G++ 4.8...
gl_WARN_ADD([-Wno-sign-compare], [FLEX_SCANNER_CXXFLAGS])