*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+
%if-reentrant
/* An opaque pointer. */
typedef void* yyscan_t;
#endif
+%# Declare yyguts variable
+m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])
%# For use wherever a Global is accessed or assigned.
-m4_define( [[YY_G]], [[(((struct yyguts_t*)yyscanner)->$1)]])
+m4_define( [[YY_G]], [[yyg->$1]])
%# For use in function prototypes to append the additional argument.
m4_define( [[YY_PROTO_LAST_ARG]], [[, yyscan_t yyscanner]])
%if-not-reentrant
%# Define these macros to be no-ops.
+m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])
m4_define( [[YY_G]], [[($1)]])
m4_define( [[YY_PROTO_LAST_ARG]])
m4_define( [[YY_PROTO_ONLY_ARG]], [[void]])
# endif
%endif
%endif
+ M4_YY_DECL_GUTS_VAR();
%% [7.0] user's declarations go here
int yyFlexLexer::yy_get_next_buffer()
%endif
{
+ M4_YY_DECL_GUTS_VAR();
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = YY_G(yytext_ptr);
register int number_to_move, i;
{
register yy_state_type yy_current_state;
register char *yy_cp;
+ M4_YY_DECL_GUTS_VAR();
%% [15.0] code to get the start state into yy_current_state goes here
%endif
{
register int yy_is_jam;
+ M4_YY_DECL_GUTS_VAR();
%% [17.0] code to find the next state, and perhaps do backing up, goes here
return yy_is_jam ? 0 : yy_current_state;
%endif
{
register char *yy_cp = YY_G(yy_c_buf_p);
+ M4_YY_DECL_GUTS_VAR();
/* undo effects of setting up yytext */
*yy_cp = YY_G(yy_hold_char);
{
int c;
+ M4_YY_DECL_GUTS_VAR();
*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
void yyFlexLexer::yyrestart( std::istream* input_file )
%endif
{
+ M4_YY_DECL_GUTS_VAR();
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack (YY_CALL_ONLY_ARG);
YY_CURRENT_BUFFER_LVALUE =
void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
%endif
{
+ M4_YY_DECL_GUTS_VAR();
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
void yyFlexLexer::yy_load_buffer_state()
%endif
{
+ M4_YY_DECL_GUTS_VAR();
YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
%endif
{
YY_BUFFER_STATE b;
+ M4_YY_DECL_GUTS_VAR();
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) YY_CALL_LAST_ARG );
if ( ! b )
void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
%endif
{
+ M4_YY_DECL_GUTS_VAR();
+
if ( ! b )
return;
{
int oerrno = errno;
+ M4_YY_DECL_GUTS_VAR();
yy_flush_buffer( b YY_CALL_LAST_ARG);
void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
%endif
{
+ M4_YY_DECL_GUTS_VAR();
if ( ! b )
return;
void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
%endif
{
+ M4_YY_DECL_GUTS_VAR();
if (new_buffer == NULL)
return;
void yyFlexLexer::yypop_buffer_state (void)
%endif
{
+ M4_YY_DECL_GUTS_VAR();
if (!YY_CURRENT_BUFFER)
return;
%endif
{
int num_to_alloc;
+ M4_YY_DECL_GUTS_VAR();
if (!YY_G(yy_buffer_stack)) {
YY_BUFFER_STATE yy_scan_buffer YYFARGS2( char *,base, yy_size_t ,size)
{
YY_BUFFER_STATE b;
+ M4_YY_DECL_GUTS_VAR();
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,yy_str)
{
int len;
+ M4_YY_DECL_GUTS_VAR();
for ( len = 0; yy_str[len]; ++len )
;
char *buf;
yy_size_t n;
int i;
+ M4_YY_DECL_GUTS_VAR();
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
void yyFlexLexer::yy_push_state( int new_state )
%endif
{
+ M4_YY_DECL_GUTS_VAR();
if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )
{
yy_size_t new_size;
void yyFlexLexer::yy_pop_state()
%endif
{
+ M4_YY_DECL_GUTS_VAR();
if ( --YY_G(yy_start_stack_ptr) < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
int yyFlexLexer::yy_top_state()
%endif
{
+ M4_YY_DECL_GUTS_VAR();
return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];
}
]])
%if-c-only
static void yy_fatal_error YYFARGS1(yyconst char*, msg)
{
+ M4_YY_DECL_GUTS_VAR();
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
%if-c++-only
void yyFlexLexer::LexerError( yyconst char msg[] )
{
+ M4_YY_DECL_GUTS_VAR();
std::cerr << msg << std::endl;
exit( YY_EXIT_FAILURE );
}
[[
YY_EXTRA_TYPE yyget_extra YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yyextra;
}
]])
[[
int yyget_lineno YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yylineno;
}
]])
[[
FILE *yyget_in YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yyin;
}
]])
[[
FILE *yyget_out YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yyout;
}
]])
[[
int yyget_leng YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yyleng;
}
]])
[[
char *yyget_text YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yytext;
}
]])
[[
void yyset_extra YYFARGS1( YY_EXTRA_TYPE ,user_defined)
{
+ M4_YY_DECL_GUTS_VAR();
yyextra = user_defined ;
}
]])
[[
void yyset_lineno YYFARGS1( int ,line_number)
{
+ M4_YY_DECL_GUTS_VAR();
yylineno = line_number;
}
]])
[[
void yyset_in YYFARGS1( FILE * ,in_str)
{
+ M4_YY_DECL_GUTS_VAR();
yyin = in_str ;
}
]])
[[
void yyset_out YYFARGS1( FILE * ,out_str)
{
+ M4_YY_DECL_GUTS_VAR();
yyout = out_str ;
}
]])
[[
int yyget_debug YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yy_flex_debug;
}
]])
[[
void yyset_debug YYFARGS1( int ,bdebug)
{
+ M4_YY_DECL_GUTS_VAR();
yy_flex_debug = bdebug ;
}
]])
[[
YYSTYPE * yyget_lval YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yylval;
}
]])
[[
void yyset_lval YYFARGS1( YYSTYPE * ,yylvalp)
{
+ M4_YY_DECL_GUTS_VAR();
yylval = yylvalp;
}
]])
[[
YYLTYPE *yyget_lloc YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
return yylloc;
}
]])
[[
void yyset_lloc YYFARGS1( YYLTYPE * ,yyllocp)
{
+ M4_YY_DECL_GUTS_VAR();
yylloc = yyllocp;
}
]])
static int yy_init_globals YYFARGS0(void)
{
+ M4_YY_DECL_GUTS_VAR();
/* Initialization is the same as for the non-reentrant scanner.
This function is called once per scanner lifetime. */
int yylex_destroy YYFARGS0(void)
{
int i;
+ M4_YY_DECL_GUTS_VAR();
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)
{
register int i;
+ M4_YY_DECL_GUTS_VAR();
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
static int yy_flex_strlen YYFARGS1( yyconst char *,s)
{
register int n;
+ M4_YY_DECL_GUTS_VAR();
for ( n = 0; s[n]; ++n )
;
[[
void *yyalloc YYFARGS1( yy_size_t ,size)
{
+ M4_YY_DECL_GUTS_VAR();
return (void *) malloc( size );
}
]])
[[
void *yyrealloc YYFARGS2( void *,ptr, yy_size_t ,size)
{
+ M4_YY_DECL_GUTS_VAR();
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
[[
void yyfree YYFARGS1( void *,ptr)
{
+ M4_YY_DECL_GUTS_VAR();
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
]])
static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *, rd)
{
int bytes;
+ M4_YY_DECL_GUTS_VAR();
memset (th, 0, sizeof (struct yytbl_hdr));
if (yytbl_read32 (&(th->th_magic), rd) != 0)
static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,
int, id)
{
+ M4_YY_DECL_GUTS_VAR();
while (dmap->dm_id)
if (dmap->dm_id == id)
return dmap;
struct yytbl_dmap *transdmap=0;
int len, i, rv, inner_loop_count;
void *p=0;
+ M4_YY_DECL_GUTS_VAR();
memset (&td, 0, sizeof (struct yytbl_data));
int rv=0;
struct yytbl_hdr th;
struct yytbl_reader rd;
+ M4_YY_DECL_GUTS_VAR();
rd.fp = fp;
th.th_version = NULL;
/** Load the DFA tables for this scanner from the given stream. */
int yytables_fload YYFARGS1(FILE *, fp)
{
+ M4_YY_DECL_GUTS_VAR();
if( yytbl_fload(fp, YYTABLES_NAME YY_CALL_LAST_ARG) != 0)
return -1;
return 0;
int yytables_destroy YYFARGS0(void)
{
struct yytbl_dmap *dmap=0;
+ M4_YY_DECL_GUTS_VAR();
if(!M4_YY_TABLES_VERIFY){
/* Walk the dmap, freeing the pointers */
return 0;
}
]])
+
%ok-for-header