X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f42c012fcf0c4eb4d07b59caca90de5442f988c3..56b91ae0b1fedff810bdd8317816a7073910ccb0:/tests/local.at?ds=sidebyside diff --git a/tests/local.at b/tests/local.at index a0e911fe..52f7a09e 100644 --- a/tests/local.at +++ b/tests/local.at @@ -168,9 +168,10 @@ m4_pushdef([AT_PURE_IF], [m4_bmatch([$3], [%define *api\.pure\|%pure-parser], [m4_bmatch([$3], [%define *api\.pure *"?false"?], [$2], [$1])], [$2])]) +# AT_NAME_PREFIX: also consider api.namespace. m4_pushdef([AT_NAME_PREFIX], -[m4_bmatch([$3], [\(%define api\.prefix\|%name-prefix\) ".*"], - [m4_bregexp([$3], [\(%define api\.prefix\|%name-prefix\) "\([^""]*\)"], [\2])], +[m4_bmatch([$3], [\(%define api\.\(namespace\|prefix\)\|%name-prefix\) ".*"], + [m4_bregexp([$3], [\(%define api\.\(namespace\|prefix\)\|%name-prefix\) "\([^""]*\)"], [\3])], [yy])]) m4_pushdef([AT_TOKEN_CTOR_IF], [m4_bmatch([$3], [%define api.token.constructor], [$1], [$2])]) @@ -462,7 +463,7 @@ main (int argc, char const* argv[]) yydebug |= 1;]], [[ (void) argc; (void) argv;]])[ - return yyparse (); + return ]AT_NAME_PREFIX[parse (); }]], [c++], [[#include // getenv. @@ -470,7 +471,7 @@ main (int argc, char const* argv[]) int main (int argc, char const* argv[]) { - yy::parser p;]AT_DEBUG_IF([[ + ]AT_NAME_PREFIX[::parser p;]AT_DEBUG_IF([[ if (getenv("YYDEBUG") || (argc == 2 && (!strcmp (argv[1], "-d") || !strcmp (argv[1], "--debug"))))