Is there a way to tell the new '%define api.prefix {prefix}' to act like the old 
'%name-prefix "prefix"'?

If I try to change it, I really come into trouble with the string we are using as prefix: "Spark::SetDefaultParser" because of the "::" in the name. It ends up with:

.../Parser.hpp:176:14: warning: extra tokens at end of #ifndef directive
  176 | #ifndef SPARK::SETDEFAULTPARSERDEBUG

Because the c++ preprocessor does not like the "::".

The old '%name-prefix "prefix"' does not rename the types and macros, including YYDEBUG, YYTOKENTYPE, yytokentype, YYSTYPE, YYLTYPE, etc. It is just using YYDEBUG and the new one builds a lot of macro stuff with the prefix string around the YYDEBUG.

It would be great to have an option for the new api.prefix to do it in this old 
way.

https://lists.gnu.org/archive/html/help-bison/2019-02/msg00001.html
https://www.gnu.org/software/bison/manual/html_node/Multiple-Parsers.html

I can not rename the prefix to something like Spark_SetDefaultParser because it is also used as namespace and end up with a mess like this:
.../Parser.hpp:188:namespace Spark_SetDefaultParser {
.../Parser.hpp:202:    typedef SPARK_SETDEFAULTPARSERSTYPE value_type;

Thank you in advise! Jorg
begin:vcard
fn;quoted-printable:J=C3=B6rg Ullmann
n;quoted-printable:Ullmann;J=C3=B6rg
email;internet:ullm...@nt.upb.de
tel;work:05251 60 3676
url:http://nt.uni-paderborn.de/mitarbeiter/joerg-ullmann/
version:2.1
end:vcard

Reply via email to