[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])])
yydebug |= 1;]], [[
(void) argc;
(void) argv;]])[
- return yyparse ();
+ return ]AT_NAME_PREFIX[parse ();
}]],
[c++],
[[#include <cstdlib> // getenv.
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"))))