summaryrefslogtreecommitdiff
path: root/flex.skl
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@golden-gryphon.com>2006-02-25 11:25:45 -0800
committerManoj Srivastava <srivasta@golden-gryphon.com>2006-02-25 11:25:45 -0800
commit174cabe1a0b3cc6b2a061106f74e9b1c04252eec (patch)
tree3fe25aa13e39b2553ee696816df57a3384dc682b /flex.skl
parentc2b22e08bd48278f2cf125f054c9f6286e345ff0 (diff)
Imported Upstream version 2.5.33
Diffstat (limited to 'flex.skl')
-rw-r--r--flex.skl259
1 files changed, 144 insertions, 115 deletions
diff --git a/flex.skl b/flex.skl
index 1e07795..683ead6 100644
--- a/flex.skl
+++ b/flex.skl
@@ -66,6 +66,10 @@ m4_changequote([[, ]])
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.
@@ -78,7 +82,10 @@ m4preproc_define(`M4_GEN_PREFIX',
%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
@@ -168,6 +175,7 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
%endif
%if-tables-serialization
+#include <sys/types.h>
#include <netinet/in.h>
%endif
/* end standard C headers. */
@@ -345,19 +353,19 @@ m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
%# 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]])
]],
[[
@@ -410,6 +418,10 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
#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))
]])
@@ -609,7 +621,7 @@ int yyleng;
/* 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
@@ -724,6 +736,7 @@ m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]])
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.
@@ -734,6 +747,7 @@ m4_ifdef( [[M4_YY_NO_UNISTD_H]],,
%if-c++-only
#include <unistd.h>
%endif
+#endif
]])
#ifndef YY_EXTRA_TYPE
@@ -808,10 +822,12 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
]])
-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
@@ -975,7 +991,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
[[
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;
]])
]])
@@ -1100,7 +1116,7 @@ static struct yytbl_dmap yydmap[] =
/** 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
@@ -1206,9 +1222,9 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
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;
@@ -1216,8 +1232,9 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
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) )
@@ -1415,7 +1432,7 @@ yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
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
@@ -1428,7 +1445,7 @@ yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
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;
@@ -1437,7 +1454,7 @@ yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
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;
@@ -1561,7 +1578,7 @@ int yyFlexLexer::yy_get_next_buffer()
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 )
@@ -1684,7 +1701,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
%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;
@@ -2251,11 +2268,11 @@ m4_ifdef( [[M4_YY_NO_SCAN_STRING]],,
* @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
]])
@@ -2271,7 +2288,7 @@ m4_ifdef( [[M4_YY_NO_SCAN_BYTES]],,
* 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;
@@ -2280,15 +2297,15 @@ YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,bytes, int ,len)
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 )
@@ -2666,11 +2683,48 @@ void yyset_lloc YYFARGS1( YYLTYPE * ,yylloc_param)
%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]],
[[
@@ -2684,11 +2738,15 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
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]],
[[
@@ -2719,41 +2777,9 @@ m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],
*/
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)
@@ -2771,10 +2797,7 @@ int yylex_destroy YYFARGS0(void)
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 );
@@ -2784,11 +2807,17 @@ m4_ifdef( [[M4_YY_DESTROY_START_STACK]],
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;
}
@@ -2808,7 +2837,6 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
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];
}
@@ -2821,7 +2849,6 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
static int yy_flex_strlen YYFARGS1( yyconst char *,s)
{
register int n;
- M4_YY_DECL_GUTS_VAR();
for ( n = 0; s[n]; ++n )
;
@@ -2867,35 +2894,35 @@ m4preproc_include(`tables_shared.c')
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;
}
@@ -3028,22 +3055,22 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
* 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;
@@ -3065,26 +3092,26 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
: &(((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);
@@ -3122,29 +3149,29 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
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);
@@ -3160,7 +3187,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
int pad;
pad = yypad64(rd->bread);
while(--pad >= 0){
- int8_t t8;
+ flex_int8_t t8;
if(yytbl_read8(&t8,rd) != 0)
return -1;
}
@@ -3275,15 +3302,17 @@ int main ()
]])
%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
+]])