#define yynerrs b4_prefix[]nerrs
#define yylloc b4_prefix[]lloc])
-b4_token_defines(b4_tokens)
+b4_token_enums(b4_tokens)
/* Copy the first part of user declarations. */
b4_pre_prologue[
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#include <setjmp.h>
#ifndef YY_
# if YYENABLE_NLS
#define yytrue 1
#define yyfalse 0
+#ifndef YYSETJMP
+# include <setjmp.h>
+# define YYJMP_BUF jmp_buf
+# define YYSETJMP(env) setjmp (env)
+# define YYLONGJMP(env, val) longjmp (env, val)
+#endif
+
/*-----------------.
| GCC extensions. |
`-----------------*/
int yyrawchar;
])[
yySymbol* yytokenp;
- jmp_buf yyexception_buffer;
+ YYJMP_BUF yyexception_buffer;
yyGLRStackItem* yyitems;
yyGLRStackItem* yynextFree;
size_t yyspaceLeft;
{
if (yymsg != NULL)
yyerror (]b4_yyerror_args[yymsg);
- longjmp (yystack->yyexception_buffer, 1);
+ YYLONGJMP (yystack->yyexception_buffer, 1);
}
static void yyMemoryExhausted (yyGLRStack* yystack)
static void
yyMemoryExhausted (yyGLRStack* yystack)
{
- longjmp (yystack->yyexception_buffer, 2);
+ YYLONGJMP (yystack->yyexception_buffer, 2);
}
#if YYDEBUG || YYERROR_VERBOSE
if (yys->yysemantics.yyfirstVal)
{
yySemanticOption *yyoption = yys->yysemantics.yyfirstVal;
- yyGLRState *yyrhs;
+ yyGLRState *yyrh;
int yyn;
- for (yyrhs = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
+ for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
yyn > 0;
- yyrhs = yyrhs->yypred, yyn -= 1)
- yydestroyGLRState (yymsg, yyrhs);
+ yyrh = yyrh->yypred, yyn -= 1)
+ yydestroyGLRState (yymsg, yyrh);
}
}
}
yybest = yyp;
yymerge = yyfalse;
break;
+ default:
+ /* This cannot happen so it is not worth a YYASSERT (yyfalse),
+ but some compilers complain if the default case is
+ omitted. */
+ break;
}
yypp = &yyp->yynext;
}
[
if (! yyinitGLRStack (&yystack, YYINITDEPTH))
goto yyexhaustedlab;
- switch (setjmp (yystack.yyexception_buffer))
+ switch (YYSETJMP (yystack.yyexception_buffer))
{
+ case 0: break;
case 1: goto yyabortlab;
case 2: goto yyexhaustedlab;
+ default: goto yybuglab;
}
yystack.yytokenp = &yytoken;
yyglrShift (&yystack, 0, 0, 0, yylval, &yylloc);
b4_copyright([Skeleton parser for GLR parsing with Bison],
[2002, 2003, 2004, 2005])
-b4_token_defines(b4_tokens)
+b4_token_enums(b4_tokens)
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
m4_ifdef([b4_stype],