Apply --prefix to C++ skeletons too: they change the namespace.

The test suite already exercize these cases.
* data/c++.m4 (b4_namespace): New.
* data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
* data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
* data/yacc.c, data/glr.c: Remove a useless `[]'.
* doc/bison.texinfo: Document it.
(Option Cross Key): Use @multitable in all formats.  It looks
nicer, even in TeX outputs.
(Rules): Use the same code whatever the output type is.
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
(_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
* tests/calc.at: Use it, instead of hard coding `yy'.
This commit is contained in:
Akim Demaille
2006-03-12 14:45:27 +00:00
parent 455671735e
commit aa08666d72
11 changed files with 123 additions and 132 deletions

View File

@@ -28,7 +28,7 @@ b4_copyright([Position class for Bison C++ parsers],
/**
** \file position.hh
** Define the yy::position class.
** Define the ]b4_namespace[::position class.
*/
#ifndef BISON_POSITION_HH
@@ -37,7 +37,7 @@ b4_copyright([Position class for Bison C++ parsers],
# include <iostream>
# include <string>
namespace yy
namespace ]b4_namespace[
{
/// Abstract a position.
class position
@@ -140,7 +140,7 @@ b4_copyright([Location class for Bison C++ parsers],
/**
** \file location.hh
** Define the yy::location class.
** Define the ]b4_namespace[::location class.
*/
#ifndef BISON_LOCATION_HH
@@ -150,7 +150,7 @@ b4_copyright([Location class for Bison C++ parsers],
# include <string>
# include "position.hh"
namespace yy
namespace ]b4_namespace[
{
/// Abstract a location.