%# %c-or-c++ - The following lines are printed in BOTH C and C++ scanners.
%# %if-reentrant - Print for reentrant scanners.(push)
%# %if-not-reentrant - Print for non-reentrant scanners. (push)
+%# %if-bison-bridge - Print for bison-bridge. (push)
+%# %if-not-bison-bridge - Print for non-bison-bridge. (push)
%# %endif - Same as pop.
%# %% - A stop-point, where code is inserted by flex.
%# Each stop-point is numbered here and also in the code generator.
int yy_more_len;
#endif
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
YYSTYPE * yylval_r;
#ifdef YYLTYPE
YYLTYPE * yylloc_r;
#endif
-#endif
+%endif
};
%ok-for-header
/* This must go here because YYSTYPE and YYLSTYPE are included
* from bison output in section 1.*/
%if-reentrant
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
# define yylval YY_G(yylval_r)
# ifdef YYLTYPE
# define yylloc YY_G(yylloc_r)
# endif
-#endif /* YY_BISON_BRIDGE */
+%endif
%endif
%ok-for-header
void yyset_lineno YY_PARAMS(( int line_number YY_PROTO_LAST_ARG ));
#endif
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
#ifndef YY_NO_GET_LVAL
YYSTYPE * yyget_lval YY_PARAMS(( YY_PROTO_ONLY_ARG ));
#endif
void yyset_lloc YY_PARAMS(( YYLTYPE * yyllocp YY_PROTO_LAST_ARG ));
#endif
#endif /* YYLTYPE */
-#endif /* YY_BISON_BRIDGE */
+%endif
/* Macros after this point can all be overridden by user definitions in
* section 1.
/* If the bison pure parser is used, then bison will provide
one or two additional arguments. */
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
# ifdef YYLTYPE
# define YY_LEX_PROTO YY_PARAMS((YYSTYPE * yylvalp, YYLTYPE * yyllocp YY_PROTO_LAST_ARG))
# define YY_LEX_DECLARATION YYFARGS2(YYSTYPE *,yylvalp, YYLTYPE *,yyllocp)
# define YY_LEX_PROTO YY_PARAMS((YYSTYPE * yylvalp YY_PROTO_LAST_ARG))
# define YY_LEX_DECLARATION YYFARGS1(YYSTYPE *,yylvalp)
# endif
-#else
+%endif
+
+%if-not-bison-bridge
# define YY_LEX_PROTO YY_PARAMS((YY_PROTO_ONLY_ARG))
# define YY_LEX_DECLARATION YYFARGS0(void)
-#endif
+%endif
extern int yylex YY_LEX_PROTO;
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
%if-not-reentrant
YYSTYPE * yylval;
# ifdef YYLTYPE
YYLTYPE * yylloc;
# endif
%endif
-#endif
+%endif
%% [7.0] user's declarations go here
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
yylval = yylvalp;
#ifdef YYLTYPE
yylloc = yyllocp;
#endif
-#endif
+%endif
if ( YY_G(yy_init) )
{
%if-reentrant
/* Accessor methods for yylval and yylloc */
-#ifdef YY_BISON_BRIDGE
+%if-bison-bridge
#ifndef YY_NO_GET_LVAL
YYSTYPE * yyget_lval YYFARGS0(void)
{
#endif /* !YY_NO_SET_LLOC */
#endif /* YYLTYPE */
-#endif /* YY_BISON_BRIDGE */
+%endif
static int yy_init_globals YYFARGS0(void)
#define CMD_POP "%pop"
#define CMD_IF_REENTRANT "%if-reentrant"
#define CMD_IF_NOT_REENTRANT "%if-not-reentrant"
+#define CMD_IF_BISON_BRIDGE "%if-bison-bridge"
+#define CMD_IF_NOT_BISON_BRIDGE "%if-not-bison-bridge"
#define CMD_ENDIF "%endif"
/* we allow the skeleton to push and pop. */
sko_push(do_copy);
do_copy = !reentrant && do_copy;
}
+ else if (cmd_match(CMD_IF_BISON_BRIDGE)){
+ sko_push(do_copy);
+ do_copy = bison_bridge && do_copy;
+ }
+ else if (cmd_match(CMD_IF_NOT_BISON_BRIDGE)){
+ sko_push(do_copy);
+ do_copy = !bison_bridge && do_copy;
+ }
else if (cmd_match (CMD_ENDIF)){
sko_pop(&do_copy);
}