diff options
Diffstat (limited to 'skel.c')
-rw-r--r-- | skel.c | 271 |
1 files changed, 154 insertions, 117 deletions
@@ -62,7 +62,7 @@ const char *skel[] = { "#define FLEX_SCANNER", "#define YY_FLEX_MAJOR_VERSION 2", "#define YY_FLEX_MINOR_VERSION 5", - "#define YY_FLEX_SUBMINOR_VERSION 31", + "#define YY_FLEX_SUBMINOR_VERSION 33", "#if YY_FLEX_SUBMINOR_VERSION > 0", "#define FLEX_BETA", "#endif", @@ -71,6 +71,10 @@ const char *skel[] = { "m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]])", "m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]])", "", + "%# This is the m4 way to say \"(stack_used || is_reentrant)", + "m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])", + "m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])", + "", "%# Prefixes.", "%# The complexity here is necessary so that m4 preserves", "%# the argument lists to each C function.", @@ -82,7 +86,10 @@ const char *skel[] = { "", "%if-c++-only", " /* The c++ scanner is a mess. The FlexLexer.h header file relies on the", - " * following macro.", + " * following macro. This is required in order to pass the c++-multiple-scanners", + " * test in the regression suite. We get reports that it breaks inheritance.", + " * We will address this in a future release of flex, or omit the C++ scanner", + " * altogether.", " */", " #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]]", "%endif", @@ -172,6 +179,7 @@ const char *skel[] = { "%endif", "", "%if-tables-serialization", + "#include <sys/types.h>", "#include <netinet/in.h>", "%endif", "/* end standard C headers. */", @@ -184,7 +192,15 @@ const char *skel[] = { "", "/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */", "", - "#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L", + "#if __STDC_VERSION__ >= 199901L", + "", + "/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,", + " * if you want the limit (max/min) macros for int types. ", + " */", + "#ifndef __STDC_LIMIT_MACROS", + "#define __STDC_LIMIT_MACROS 1", + "#endif", + "", "#include <inttypes.h>", "typedef int8_t flex_int8_t;", "typedef uint8_t flex_uint8_t;", @@ -404,19 +420,19 @@ const char *skel[] = { "%# yyscan_t yyscanner;", "%#", "%# Generate traditional function defs", - " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)", + " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\\]]", " M4_YY_DECL_LAST_ARG]])", - " m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG)", - " $1 $2;", + " m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2; [[\\]]", " M4_YY_DECL_LAST_ARG]])", - " m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG)", - " $1 $2;", - " $3 $4;", + " m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2; [[\\]]", + " $3 $4; [[\\]]", " M4_YY_DECL_LAST_ARG]])", - " m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG)", - " $1 $2;", - " $3 $4;", - " $5 $6;", + " m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2; [[\\]]", + " $3 $4; [[\\]]", + " $5 $6; [[\\]]", " M4_YY_DECL_LAST_ARG]])", "]],", "[[", @@ -469,6 +485,10 @@ const char *skel[] = { "#ifndef YY_BUF_SIZE", "#define YY_BUF_SIZE 16384", "#endif", + "", + "/* The state buf must be large enough to hold one state per character in the main buffer.", + " */", + "#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))", "]])", "", "", @@ -668,7 +688,7 @@ const char *skel[] = { "", "/* Points to current character in buffer. */", "static char *yy_c_buf_p = (char *) 0;", - "static int yy_init = 1; /* whether we need to initialize */", + "static int yy_init = 0; /* whether we need to initialize */", "static int yy_start = 0; /* start state number */", "", "/* Flag which is used to allow yywrap()'s to do buffer switches", @@ -783,6 +803,7 @@ const char *skel[] = { "", "m4_ifdef( [[M4_YY_NO_UNISTD_H]],,", "[[", + "#ifndef YY_NO_UNISTD_H", "/* Special case for \"unistd.h\", since it is non-ANSI. We include it way", " * down here because we want the user's section 1 to have been scanned first.", " * The user has a chance to override it with an option.", @@ -793,6 +814,7 @@ const char *skel[] = { "%if-c++-only", "#include <unistd.h>", "%endif", + "#endif", "]])", "", "#ifndef YY_EXTRA_TYPE", @@ -867,10 +889,12 @@ const char *skel[] = { "]])", "", "", - "m4_ifdef( [[M4_YY_IN_HEADER]],", + "%if-c-only", + "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", "[[", "static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );", "]])", + "%endif", "", "%if-reentrant", "", @@ -1034,7 +1058,7 @@ const char *skel[] = { " [[", " static int yy_start_stack_ptr = 0;", " static int yy_start_stack_depth = 0;", - " static int *yy_start_stack = 0;", + " static int *yy_start_stack = NULL;", " ]])", "]])", "", @@ -1303,7 +1327,7 @@ const char *skel[] = { "/** A tables-reader object to maintain some state in the read. */", "struct yytbl_reader {", " FILE * fp; /**< input stream */", - " uint32_t bread; /**< bytes read since beginning of current tableset */", + " flex_uint32_t bread; /**< bytes read since beginning of current tableset */", "};", "", "%endif", @@ -1409,9 +1433,9 @@ const char *skel[] = { " yylloc = yylloc_param;", "]])", "", - " if ( YY_G(yy_init) )", + " if ( !YY_G(yy_init) )", " {", - " YY_G(yy_init) = 0;", + " YY_G(yy_init) = 1;", "", "#ifdef YY_USER_INIT", " YY_USER_INIT;", @@ -1419,8 +1443,9 @@ const char *skel[] = { "", "m4_ifdef( [[M4_YY_USES_REJECT]],", "[[", + " /* Create the reject buffer large enough to save one state per allowed character. */", " if ( ! YY_G(yy_state_buf) )", - " YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_BUF_SIZE + 2 M4_YY_CALL_LAST_ARG);", + " YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG);", "]])", "", " if ( ! YY_G(yy_start) )", @@ -1618,7 +1643,7 @@ const char *skel[] = { " yyin = arg_yyin;", " yyout = arg_yyout;", " yy_c_buf_p = 0;", - " yy_init = 1;", + " yy_init = 0;", " yy_start = 0;", " yy_flex_debug = 0;", " yylineno = 1; // this will only get updated if %option yylineno", @@ -1631,7 +1656,7 @@ const char *skel[] = { " yy_more_offset = yy_prev_more_offset = 0;", "", " yy_start_stack_ptr = yy_start_stack_depth = 0;", - " yy_start_stack = 0;", + " yy_start_stack = NULL;", "", " YY_G(yy_buffer_stack) = 0;", " YY_G(yy_buffer_stack_top) = 0;", @@ -1640,7 +1665,7 @@ const char *skel[] = { "", "m4_ifdef( [[M4_YY_USES_REJECT]],", "[[", - " yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];", + " yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];", "]],", "[[", " yy_state_buf = 0;", @@ -1764,7 +1789,7 @@ const char *skel[] = { "", " else", " {", - " size_t num_to_read =", + " int num_to_read =", " YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;", "", " while ( num_to_read <= 0 )", @@ -1887,7 +1912,7 @@ const char *skel[] = { "%endif", "{", " register int yy_is_jam;", - " M4_YY_DECL_GUTS_VAR();", + " M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */", "%% [17.0] code to find the next state, and perhaps do backing up, goes here", "", " return yy_is_jam ? 0 : yy_current_state;", @@ -2454,11 +2479,11 @@ const char *skel[] = { " * @note If you want to scan bytes that may contain NUL values, then use", " * yy_scan_bytes() instead.", " */", - "YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,str)", + "YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *, yystr)", "{", " m4_dnl M4_YY_DECL_GUTS_VAR();", "", - " return yy_scan_bytes( str, strlen(str) M4_YY_CALL_LAST_ARG);", + " return yy_scan_bytes( yystr, strlen(yystr) M4_YY_CALL_LAST_ARG);", "}", "%endif", "]])", @@ -2474,7 +2499,7 @@ const char *skel[] = { " * M4_YY_DOC_PARAM", " * @return the newly allocated buffer state object.", " */", - "YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,bytes, int ,len)", + "YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,yybytes, int ,_yybytes_len)", "{", " YY_BUFFER_STATE b;", " char *buf;", @@ -2483,15 +2508,15 @@ const char *skel[] = { " m4_dnl M4_YY_DECL_GUTS_VAR();", "", " /* Get memory for full buffer, including space for trailing EOB's. */", - " n = len + 2;", + " n = _yybytes_len + 2;", " buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG );", " if ( ! buf )", " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_bytes()\" );", "", - " for ( i = 0; i < len; ++i )", - " buf[i] = bytes[i];", + " for ( i = 0; i < _yybytes_len; ++i )", + " buf[i] = yybytes[i];", "", - " buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;", + " buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;", "", " b = yy_scan_buffer( buf, n M4_YY_CALL_LAST_ARG);", " if ( ! b )", @@ -2869,11 +2894,48 @@ const char *skel[] = { "%endif", "", "", + "/* User-visible API */", + "", + "/* yylex_init is special because it creates the scanner itself, so it is", + " * the ONLY reentrant function that doesn't take the scanner as the last argument.", + " * That's why we explicitly handle the declaration, instead of using our macros.", + " */", + "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],", + "[[", + "int yylex_init( ptr_yy_globals )", + " yyscan_t* ptr_yy_globals;", + "]],", + "[[", + "int yylex_init(yyscan_t* ptr_yy_globals)", + "]])", + "{", + " if (ptr_yy_globals == NULL){", + " errno = EINVAL;", + " return 1;", + " }", + "", + " *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );", + "", + " if (*ptr_yy_globals == NULL){", + " errno = ENOMEM;", + " return 1;", + " }", + "", + " /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */", + " memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));", + "", + " return yy_init_globals ( *ptr_yy_globals );", + "}", + "", + "%endif", + "", + "%if-c-only", "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. */", + " * This function is called from yylex_destroy(), so don't allocate here.", + " */", "", "m4_ifdef( [[M4_YY_USE_LINENO]],", "[[", @@ -2887,11 +2949,15 @@ const char *skel[] = { " YY_G(yy_buffer_stack_top) = 0;", " YY_G(yy_buffer_stack_max) = 0;", " YY_G(yy_c_buf_p) = (char *) 0;", - " YY_G(yy_init) = 1;", + " YY_G(yy_init) = 0;", " YY_G(yy_start) = 0;", + "", + "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],", + "[[", " YY_G(yy_start_stack_ptr) = 0;", " YY_G(yy_start_stack_depth) = 0;", - " YY_G(yy_start_stack) = (int *) 0;", + " YY_G(yy_start_stack) = NULL;", + "]])", "", "m4_ifdef( [[M4_YY_USES_REJECT]],", "[[", @@ -2922,41 +2988,9 @@ const char *skel[] = { " */", " return 0;", "}", - "", - "/* User-visible API */", - "", - "/* yylex_init is special because it creates the scanner itself, so it is", - " * the ONLY reentrant function that doesn't take the scanner as the last argument.", - " * That's why we explicitly handle the declaration, instead of using our macros.", - " */", - "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],", - "[[", - "int yylex_init( ptr_yy_globals )", - " yyscan_t* ptr_yy_globals;", - "]],", - "[[", - "int yylex_init(yyscan_t* ptr_yy_globals)", - "]])", - "{", - " if (ptr_yy_globals == NULL){", - " errno = EINVAL;", - " return 1;", - " }", - "", - " *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );", - "", - " if (*ptr_yy_globals == NULL){", - " errno = ENOMEM;", - " return 1;", - " }", - "", - " memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));", - "", - " return yy_init_globals ( *ptr_yy_globals );", - "}", - "", "%endif", "", + "", "%if-c-only SNIP! this currently causes conflicts with the c++ scanner", "/* yylex_destroy is for both reentrant and non-reentrant scanners. */", "int yylex_destroy YYFARGS0(void)", @@ -2974,10 +3008,7 @@ const char *skel[] = { " yyfree(YY_G(yy_buffer_stack) M4_YY_CALL_LAST_ARG);", " YY_G(yy_buffer_stack) = NULL;", "", - "%# This is the m4 way to say \"if (stack_used || is_reentrant){ destroy_stack }\"", - "m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_DESTROY_START_STACK]])]])", - "m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_DESTROY_START_STACK]])]])", - "m4_ifdef( [[M4_YY_DESTROY_START_STACK]],", + "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],", "[[", " /* Destroy the start condition stack. */", " yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );", @@ -2987,11 +3018,17 @@ const char *skel[] = { "m4_ifdef( [[M4_YY_USES_REJECT]],", "[[", " yyfree ( YY_G(yy_state_buf) M4_YY_CALL_LAST_ARG);", + " YY_G(yy_state_buf) = NULL;", "]])", "", + " /* Reset the globals. This is important in a non-reentrant scanner so the next time", + " * yylex() is called, initialization will occur. */", + " yy_init_globals( M4_YY_CALL_ONLY_ARG);", + "", "%if-reentrant", " /* Destroy the main struct (reentrant only). */", " yyfree ( yyscanner M4_YY_CALL_LAST_ARG );", + " yyscanner = NULL;", "%endif", " return 0;", "}", @@ -3011,7 +3048,6 @@ const char *skel[] = { "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];", "}", @@ -3024,7 +3060,6 @@ const char *skel[] = { "static int yy_flex_strlen YYFARGS1( yyconst char *,s)", "{", " register int n;", - " M4_YY_DECL_GUTS_VAR();", " for ( n = 0; s[n]; ++n )", " ;", "", @@ -3140,35 +3175,35 @@ const char *skel[] = { "static int yytbl_read8 (void *v, struct yytbl_reader * rd)", "{", " errno = 0;", - " if (fread (v, sizeof (uint8_t), 1, rd->fp) != 1){", + " if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){", " errno = EIO;", " return -1;", " }", - " rd->bread += sizeof(uint8_t);", + " rd->bread += sizeof(flex_uint8_t);", " return 0;", "}", "", "static int yytbl_read16 (void *v, struct yytbl_reader * rd)", "{", " errno = 0;", - " if (fread (v, sizeof (uint16_t), 1, rd->fp) != 1){", + " if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){", " errno = EIO;", " return -1;", " }", - " *((uint16_t *) v) = ntohs (*((uint16_t *) v));", - " rd->bread += sizeof(uint16_t);", + " *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));", + " rd->bread += sizeof(flex_uint16_t);", " return 0;", "}", "", "static int yytbl_read32 (void *v, struct yytbl_reader * rd)", "{", " errno = 0;", - " if (fread (v, sizeof (uint32_t), 1, rd->fp) != 1){", + " if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){", " errno = EIO;", " return -1;", " }", - " *((uint32_t *) v) = ntohl (*((uint32_t *) v));", - " rd->bread += sizeof(uint32_t);", + " *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));", + " rd->bread += sizeof(flex_uint32_t);", " return 0;", "}", "", @@ -3301,22 +3336,22 @@ const char *skel[] = { " * YYTD_STRUCT for the yy_transition array.", " */", " for (j = 0; j < inner_loop_count; j++, i++) {", - " int32_t t32;", + " flex_int32_t t32;", "", " /* read into t32 no matter what the real size is. */", " {", - " int16_t t16;", - " int8_t t8;", + " flex_int16_t t16;", + " flex_int8_t t8;", "", " switch (YYTDFLAGS2BYTES (td.td_flags)) {", - " case sizeof (int32_t):", + " case sizeof (flex_int32_t):", " rv = yytbl_read32 (&t32, rd);", " break;", - " case sizeof (int16_t):", + " case sizeof (flex_int16_t):", " rv = yytbl_read16 (&t16, rd);", " t32 = t16;", " break;", - " case sizeof (int8_t):", + " case sizeof (flex_int8_t):", " rv = yytbl_read8 (&t8, rd);", " t32 = t8;", " break;", @@ -3338,26 +3373,26 @@ const char *skel[] = { " : &(((struct yy_trans_info *) p)->yy_nxt);", "", " switch (dmap->dm_sz) {", - " case sizeof (int32_t):", + " case sizeof (flex_int32_t):", " if (M4_YY_TABLES_VERIFY){", - " if( ((int32_t *) v)[0] != (int32_t) t32)", - " yy_fatal_error(\"tables verification failed at YYTD_STRUCT int32_t\" M4_YY_CALL_LAST_ARG);", + " if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)", + " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int32_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int32_t *) v)[0] = (int32_t) t32;", + " ((flex_int32_t *) v)[0] = (flex_int32_t) t32;", " break;", - " case sizeof (int16_t):", + " case sizeof (flex_int16_t):", " if (M4_YY_TABLES_VERIFY ){", - " if(((int16_t *) v)[0] != (int16_t) t32)", - " yy_fatal_error(\"tables verification failed at YYTD_STRUCT int16_t\" M4_YY_CALL_LAST_ARG);", + " if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)", + " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int16_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int16_t *) v)[0] = (int16_t) t32;", + " ((flex_int16_t *) v)[0] = (flex_int16_t) t32;", " break;", - " case sizeof(int8_t):", + " case sizeof(flex_int8_t):", " if (M4_YY_TABLES_VERIFY ){", - " if( ((int8_t *) v)[0] != (int8_t) t32)", - " yy_fatal_error(\"tables verification failed at YYTD_STRUCT int8_t\" M4_YY_CALL_LAST_ARG);", + " if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)", + " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int8_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int8_t *) v)[0] = (int8_t) t32;", + " ((flex_int8_t *) v)[0] = (flex_int8_t) t32;", " break;", " default:", " yy_fatal_error(\"invalid dmap->dm_sz for struct\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);", @@ -3395,29 +3430,29 @@ const char *skel[] = { " else {", " /* t32 is a plain int. copy data, then incrememnt p. */", " switch (dmap->dm_sz) {", - " case sizeof (int32_t):", + " case sizeof (flex_int32_t):", " if(M4_YY_TABLES_VERIFY ){", - " if( ((int32_t *) p)[0] != (int32_t) t32)", - " yy_fatal_error(\"tables verification failed at int32_t\" M4_YY_CALL_LAST_ARG);", + " if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)", + " yy_fatal_error(\"tables verification failed at flex_int32_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int32_t *) p)[0] = (int32_t) t32;", - " p = ((int32_t *) p) + 1;", + " ((flex_int32_t *) p)[0] = (flex_int32_t) t32;", + " p = ((flex_int32_t *) p) + 1;", " break;", - " case sizeof (int16_t):", + " case sizeof (flex_int16_t):", " if(M4_YY_TABLES_VERIFY ){", - " if( ((int16_t *) p)[0] != (int16_t) t32)", - " yy_fatal_error(\"tables verification failed at int16_t\" M4_YY_CALL_LAST_ARG);", + " if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)", + " yy_fatal_error(\"tables verification failed at flex_int16_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int16_t *) p)[0] = (int16_t) t32;", - " p = ((int16_t *) p) + 1;", + " ((flex_int16_t *) p)[0] = (flex_int16_t) t32;", + " p = ((flex_int16_t *) p) + 1;", " break;", - " case sizeof (int8_t):", + " case sizeof (flex_int8_t):", " if(M4_YY_TABLES_VERIFY ){", - " if( ((int8_t *) p)[0] != (int8_t) t32)", - " yy_fatal_error(\"tables verification failed at int8_t\" M4_YY_CALL_LAST_ARG);", + " if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)", + " yy_fatal_error(\"tables verification failed at flex_int8_t\" M4_YY_CALL_LAST_ARG);", " }else", - " ((int8_t *) p)[0] = (int8_t) t32;", - " p = ((int8_t *) p) + 1;", + " ((flex_int8_t *) p)[0] = (flex_int8_t) t32;", + " p = ((flex_int8_t *) p) + 1;", " break;", " default:", " yy_fatal_error(\"invalid dmap->dm_sz for plain int\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);", @@ -3433,7 +3468,7 @@ const char *skel[] = { " int pad;", " pad = yypad64(rd->bread);", " while(--pad >= 0){", - " int8_t t8;", + " flex_int8_t t8;", " if(yytbl_read8(&t8,rd) != 0)", " return -1;", " }", @@ -3548,17 +3583,19 @@ const char *skel[] = { "]])", "", "%ok-for-header", + "m4_ifdef( [[M4_YY_IN_HEADER]],", + "[[", "#undef YY_NEW_FILE", "#undef YY_FLUSH_BUFFER", "#undef yy_set_bol", "#undef yy_new_buffer", "#undef yy_set_interactive", - "#undef yytext_ptr", "#undef YY_DO_BEFORE_ACTION", "", "#ifdef YY_DECL_IS_OURS", "#undef YY_DECL_IS_OURS", "#undef YY_DECL", "#endif", + "]])", 0 }; |