M4_GEN_PREFIX(`wrap')
%endif
-m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
M4_GEN_PREFIX(`get_lval')
M4_GEN_PREFIX(`set_lval')
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
M4_GEN_PREFIX(`get_lloc')
M4_GEN_PREFIX(`set_lloc')
m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]])
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
#define BEGIN YY_G(yy_start) = 1 + 2 *
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
#define YYSTATE YY_START
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG )
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define YY_END_OF_BUFFER_CHAR 0
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define EOB_ACT_LAST_MATCH 2
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
m4_ifdef( [[M4_YY_USE_LINENO]],
[[
]])
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
while ( 0 )
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG )
]])
%ok-for-header
%endif
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
: NULL)
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG );
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG)
]])
void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG );
void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG );
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define yy_new_buffer yy_create_buffer
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define yy_set_interactive(is_interactive) \
{ \
}
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define yy_set_bol(at_bol) \
{ \
}
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
]])
%if-c-only Standard (non-C++) definition
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state M4_YY_PROTO_LAST_ARG);
%endif
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
YY_G(yy_c_buf_p) = yy_cp;
]])
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
%% [4.0] data tables for the DFA and the user's section 1 definitions go here
]])
%if-c-only Reentrant structure and macros (non-C++).
%if-reentrant
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
int yy_more_len;
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
YYSTYPE * yylval_r;
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
YYLTYPE * yylloc_r;
]])
%if-reentrant
-m4_ifdef( [[M4_YY_IN_HEADER]],,
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
- m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+ m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval YY_G(yylval_r)
]])
- m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
# define yylloc YY_G(yylloc_r)
]])
void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG );
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
[[
m4_ifdef( [[M4_YY_STACK_USED]],
[[
-m4_ifdef( [[M4_YY_REENTRANT]],,
+m4_ifdef( [[M4_YY_NOT_REENTRANT]],
[[
- m4_ifdef( [[M4_YY_IN_HEADER]],,
+ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
[[
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]])
m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
m4_dnl The bison pure parser is used. Redefine yylex to
m4_dnl accept the lval parameter.
[[YYFARGS1(YYSTYPE *,yylval_param)]])
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
m4_dnl Locations are used. yylex should also accept the ylloc parameter.
register int yy_act;
M4_YY_DECL_GUTS_VAR();
-m4_ifdef( [[M4_YY_REENTRANT]],,
+m4_ifdef( [[M4_YY_NOT_REENTRANT]],
[[
- m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+ m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
YYSTYPE * yylval;
]])
- m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
YYLTYPE * yylloc;
]])
%% [7.0] user's declarations go here
-m4_ifdef( [[M4_YY_BISON_BRIDGE]],
+m4_ifdef( [[M4_YY_BISON_LVAL]],
[[
yylval = yylval_param;
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
yylloc = yylloc_param;
]])
}
]])
-m4_ifdef( [[M4_YY_BISON_BRIDGE_LOCATIONS]],
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
[[
m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
[[
int fullspd, gen_line_dirs, performance_report, backing_up_report;
int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap,
csize;
-int reentrant, bison_bridge, bison_bridge_locations;
+int reentrant, bison_bridge_lval, bison_bridge_lloc;
int yymore_used, reject, real_reject, continued_action, in_rule;
int yymore_really_used, reject_really_used;
int datapos, dataline, linenum, out_linenum;
if (fulltbl || fullspd)
flexerror (_("Can't use -f or -F with -l option"));
- if (reentrant || bison_bridge)
+ if (reentrant || bison_bridge_lval)
flexerror (_
("Can't use --reentrant or --bison-bridge with -l option"));
if (C_plus_plus && (reentrant))
flexerror (_("Options -+ and --reentrant are mutually exclusive."));
- if (C_plus_plus && bison_bridge)
+ if (C_plus_plus && bison_bridge_lval)
flexerror (_("bison bridge not supported for the C++ scanner."));
buf_m4_define (&m4defs_buf, "M4_YY_TEXT_IS_ARRAY", NULL);
}
- if ( bison_bridge)
- buf_m4_define (&m4defs_buf, "M4_YY_BISON_BRIDGE", NULL);
+ if ( bison_bridge_lval)
+ buf_m4_define (&m4defs_buf, "M4_YY_BISON_LVAL", NULL);
- if ( bison_bridge_locations)
- buf_m4_define (&m4defs_buf, "M4_YY_BISON_BRIDGE_LOCATIONS", NULL);
+ if ( bison_bridge_lloc)
+ buf_m4_define (&m4defs_buf, "<M4_YY_BISON_LLOC>", NULL);
buf_m4_define(&m4defs_buf, "M4_YY_PREFIX", prefix);
putc ('s', stderr);
if (reentrant)
fputs ("--reentrant", stderr);
- if (bison_bridge)
+ if (bison_bridge_lval)
fputs ("--bison-bridge", stderr);
- if (bison_bridge_locations)
+ if (bison_bridge_lloc)
fputs ("--bison-locations", stderr);
if (use_stdout)
putc ('t', stderr);
yymore_really_used = reject_really_used = unspecified;
interactive = csize = unspecified;
do_yywrap = gen_line_dirs = usemecs = useecs = true;
- reentrant = bison_bridge = bison_bridge_locations = false;
+ reentrant = bison_bridge_lval = bison_bridge_lloc = false;
performance_report = 0;
did_outfilename = 0;
prefix = "yy";
break;
case OPT_BISON_BRIDGE:
- bison_bridge = true;
+ bison_bridge_lval = true;
break;
case OPT_BISON_BRIDGE_LOCATIONS:
- bison_bridge = bison_bridge_locations = true;
+ bison_bridge_lval = bison_bridge_lloc = true;
break;
case OPT_REENTRANT: