Commit 168d5e80 by Corentin Wallez Committed by Commit Bot

compiler: Regenerate parser with latest flex and bison

Flex version is 2.6.4 Bison version is 3.0.4 BUG=chromium:668842 Change-Id: Ia05ae338c9b9e588534f8346ff5c59ed747c56bf Reviewed-on: https://chromium-review.googlesource.com/435553Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 5978e28d
...@@ -2,26 +2,6 @@ diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor ...@@ -2,26 +2,6 @@ diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor
index 0d7ad58..5ef0e5e 100644 index 0d7ad58..5ef0e5e 100644
--- a/src/compiler/preprocessor/Tokenizer.cpp --- a/src/compiler/preprocessor/Tokenizer.cpp
+++ b/src/compiler/preprocessor/Tokenizer.cpp +++ b/src/compiler/preprocessor/Tokenizer.cpp
@@ -1703,7 +1703,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ static_cast<int>(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
@@ -1737,8 +1737,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
+ num_to_read = static_cast<int>(YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1);
}
@@ -1746,8 +1746,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) @@ -1746,8 +1746,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
num_to_read = YY_READ_BUF_SIZE; num_to_read = YY_READ_BUF_SIZE;
...@@ -34,46 +14,3 @@ index 0d7ad58..5ef0e5e 100644 ...@@ -34,46 +14,3 @@ index 0d7ad58..5ef0e5e 100644
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
} }
@@ -1773,13 +1775,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pprealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
- yyg->yy_n_chars += number_to_move;
+ yyg->yy_n_chars += static_cast<int>(number_to_move);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
@@ -2171,7 +2173,7 @@ void pppop_buffer_state (yyscan_t yyscanner)
*/
static void ppensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2238,7 +2240,7 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = static_cast<int>(size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = NULL;
@@ -2293,7 +2295,7 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in pp_scan_bytes()" );
- for ( i = 0; i < _yybytes_len; ++i )
+ for ( i = 0; i < static_cast<yy_size_t>(_yybytes_len); ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
...@@ -22,11 +22,10 @@ ...@@ -22,11 +22,10 @@
#define FLEX_SCANNER #define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1 #define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0 #if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA #define FLEX_BETA
#endif #endif
...@@ -44,52 +43,287 @@ ...@@ -44,52 +43,287 @@
#ifdef yy_create_buffer
#define pp_create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer pp_create_buffer
#endif
#ifdef yy_delete_buffer
#define pp_delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer pp_delete_buffer
#endif
#ifdef yy_scan_buffer
#define pp_scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer pp_scan_buffer
#endif
#ifdef yy_scan_string
#define pp_scan_string_ALREADY_DEFINED
#else
#define yy_scan_string pp_scan_string
#endif
#ifdef yy_scan_bytes
#define pp_scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes pp_scan_bytes
#endif
#ifdef yy_init_buffer
#define pp_init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer pp_init_buffer
#endif
#ifdef yy_flush_buffer
#define pp_flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer pp_flush_buffer
#endif
#ifdef yy_load_buffer_state
#define pp_load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state pp_load_buffer_state
#endif
#ifdef yy_switch_to_buffer
#define pp_switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer pp_switch_to_buffer
#endif
#ifdef yypush_buffer_state
#define pppush_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state pppush_buffer_state
#endif
#ifdef yypop_buffer_state
#define pppop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state pppop_buffer_state
#endif
#ifdef yyensure_buffer_stack
#define ppensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack ppensure_buffer_stack
#endif
#ifdef yylex
#define pplex_ALREADY_DEFINED
#else
#define yylex pplex
#endif
#ifdef yyrestart
#define pprestart_ALREADY_DEFINED
#else
#define yyrestart pprestart
#endif
#ifdef yylex_init
#define pplex_init_ALREADY_DEFINED
#else
#define yylex_init pplex_init
#endif
#ifdef yylex_init_extra
#define pplex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra pplex_init_extra
#endif
#ifdef yylex_destroy
#define pplex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy pplex_destroy
#endif
#ifdef yyget_debug
#define ppget_debug_ALREADY_DEFINED
#else
#define yyget_debug ppget_debug
#endif
#ifdef yyset_debug
#define ppset_debug_ALREADY_DEFINED
#else
#define yyset_debug ppset_debug
#endif
#ifdef yyget_extra
#define ppget_extra_ALREADY_DEFINED
#else
#define yyget_extra ppget_extra
#endif
#ifdef yyset_extra
#define ppset_extra_ALREADY_DEFINED
#else
#define yyset_extra ppset_extra
#endif
#ifdef yyget_in
#define ppget_in_ALREADY_DEFINED
#else
#define yyget_in ppget_in
#endif
#ifdef yyset_in
#define ppset_in_ALREADY_DEFINED
#else
#define yyset_in ppset_in
#endif
#ifdef yyget_out
#define ppget_out_ALREADY_DEFINED
#else
#define yyget_out ppget_out
#endif
#ifdef yyset_out
#define ppset_out_ALREADY_DEFINED
#else
#define yyset_out ppset_out
#endif
#ifdef yyget_leng
#define ppget_leng_ALREADY_DEFINED
#else
#define yyget_leng ppget_leng
#endif
#ifdef yyget_text
#define ppget_text_ALREADY_DEFINED
#else
#define yyget_text ppget_text
#endif
#ifdef yyget_lineno
#define ppget_lineno_ALREADY_DEFINED
#else
#define yyget_lineno ppget_lineno
#endif
#ifdef yyset_lineno
#define ppset_lineno_ALREADY_DEFINED
#else
#define yyset_lineno ppset_lineno
#endif
#ifdef yyget_column
#define ppget_column_ALREADY_DEFINED
#else
#define yyget_column ppget_column
#endif
#ifdef yyset_column
#define ppset_column_ALREADY_DEFINED
#else
#define yyset_column ppset_column
#endif
#ifdef yywrap
#define ppwrap_ALREADY_DEFINED
#else
#define yywrap ppwrap
#endif
#ifdef yyget_lval
#define ppget_lval_ALREADY_DEFINED
#else
#define yyget_lval ppget_lval
#endif
#ifdef yyset_lval
#define ppset_lval_ALREADY_DEFINED
#else
#define yyset_lval ppset_lval
#endif
#ifdef yyget_lloc
#define ppget_lloc_ALREADY_DEFINED
#else
#define yyget_lloc ppget_lloc
#endif
#ifdef yyset_lloc
#define ppset_lloc_ALREADY_DEFINED
#else
#define yyset_lloc ppset_lloc
#endif
#ifdef yyalloc
#define ppalloc_ALREADY_DEFINED
#else
#define yyalloc ppalloc
#endif
#ifdef yyrealloc
#define pprealloc_ALREADY_DEFINED
#else
#define yyrealloc pprealloc
#endif
#ifdef yyfree
#define ppfree_ALREADY_DEFINED
#else
#define yyfree ppfree
#endif
...@@ -169,11 +403,16 @@ typedef unsigned int flex_uint32_t; ...@@ -169,11 +403,16 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U) #define UINT32_MAX (4294967295U)
#endif #endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */ #endif /* ! C99 */
#endif /* ! FLEXINT_H */ #endif /* ! FLEXINT_H */
/* begin standard C++ headers. */
/* TODO: this is always defined, so inline it */ /* TODO: this is always defined, so inline it */
#define yyconst const #define yyconst const
...@@ -184,22 +423,14 @@ typedef unsigned int flex_uint32_t; ...@@ -184,22 +423,14 @@ typedef unsigned int flex_uint32_t;
#define yynoreturn #define yynoreturn
#endif #endif
/* Returned upon end-of-file. */ /* Returned upon end-of-file. */
#define YY_NULL 0 #define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an
/* Promotes a possibly negative, possibly signed char to an unsigned * integer in range [0..255] for use as an array index.
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/ */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
...@@ -227,8 +458,6 @@ typedef void* yyscan_t; ...@@ -227,8 +458,6 @@ typedef void* yyscan_t;
/* For convenience, these vars (plus the bison vars far below) /* For convenience, these vars (plus the bison vars far below)
are macros in the reentrant scanner. */ are macros in the reentrant scanner. */
#define yyin yyg->yyin_r #define yyin yyg->yyin_r
...@@ -252,36 +481,21 @@ typedef void* yyscan_t; ...@@ -252,36 +481,21 @@ typedef void* yyscan_t;
/* Enter a start condition. This macro really ought to take a parameter, /* 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 * but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN. * definition of BEGIN.
*/ */
#define BEGIN yyg->yy_start = 1 + 2 * #define BEGIN yyg->yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed /* 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 * to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility. * compatibility.
*/ */
#define YY_START ((yyg->yy_start - 1) / 2) #define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START #define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */ /* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */ /* Special action meaning "start processing a new file". */
#define YY_NEW_FILE pprestart(yyin ,yyscanner ) #define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0 #define YY_END_OF_BUFFER_CHAR 0
...@@ -322,15 +536,9 @@ typedef size_t yy_size_t; ...@@ -322,15 +536,9 @@ typedef size_t yy_size_t;
#define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2 #define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n) #define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr) #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */ /* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \ #define yyless(n) \
do \ do \
...@@ -344,9 +552,6 @@ typedef size_t yy_size_t; ...@@ -344,9 +552,6 @@ typedef size_t yy_size_t;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \ } \
while ( 0 ) while ( 0 )
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
...@@ -410,7 +615,7 @@ struct yy_buffer_state ...@@ -410,7 +615,7 @@ struct yy_buffer_state
* possible backing-up. * possible backing-up.
* *
* When we actually see the EOF, we change the status to "new" * When we actually see the EOF, we change the status to "new"
* (via pprestart()), so that the user can continue scanning by * (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file. * just pointing yyin at a new input file.
*/ */
#define YY_BUFFER_EOF_PENDING 2 #define YY_BUFFER_EOF_PENDING 2
...@@ -421,7 +626,6 @@ struct yy_buffer_state ...@@ -421,7 +626,6 @@ struct yy_buffer_state
/* We provide macros for accessing buffer states in case in the /* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general * future we want to put the buffer states in a more general
* "scanner state". * "scanner state".
...@@ -431,9 +635,6 @@ struct yy_buffer_state ...@@ -431,9 +635,6 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL) : NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not /* 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. * NULL or when we need an lvalue. For internal use only.
*/ */
...@@ -443,63 +644,50 @@ struct yy_buffer_state ...@@ -443,63 +644,50 @@ struct yy_buffer_state
void yyrestart ( FILE *input_file , yyscan_t yyscanner );
void pprestart (FILE *input_file ,yyscan_t yyscanner ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void pp_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
YY_BUFFER_STATE pp_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void pp_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void pp_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void pppush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void yypop_buffer_state ( yyscan_t yyscanner );
void pppop_buffer_state (yyscan_t yyscanner );
static void ppensure_buffer_stack (yyscan_t yyscanner );
static void pp_load_buffer_state (yyscan_t yyscanner );
static void pp_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
static void yyensure_buffer_stack ( yyscan_t yyscanner );
static void yy_load_buffer_state ( yyscan_t yyscanner );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
#define YY_FLUSH_BUFFER pp_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
void *ppalloc (yy_size_t ,yyscan_t yyscanner );
void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner );
void ppfree (void * ,yyscan_t yyscanner );
#define yy_new_buffer pp_create_buffer
void *yyalloc ( yy_size_t , yyscan_t yyscanner );
void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
void yyfree ( void * , yyscan_t yyscanner );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \ #define yy_set_interactive(is_interactive) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){ \ if ( ! YY_CURRENT_BUFFER ){ \
ppensure_buffer_stack (yyscanner); \ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
pp_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
} }
#define yy_set_bol(at_bol) \ #define yy_set_bol(at_bol) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){\ if ( ! YY_CURRENT_BUFFER ){\
ppensure_buffer_stack (yyscanner); \ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
pp_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
} }
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
...@@ -507,10 +695,7 @@ void ppfree (void * ,yyscan_t yyscanner ); ...@@ -507,10 +695,7 @@ void ppfree (void * ,yyscan_t yyscanner );
#define ppwrap(yyscanner) (/*CONSTCOND*/1) #define ppwrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP #define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;
typedef unsigned char YY_CHAR;
typedef int yy_state_type; typedef int yy_state_type;
...@@ -522,10 +707,10 @@ typedef int yy_state_type; ...@@ -522,10 +707,10 @@ typedef int yy_state_type;
static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner ); static int yy_get_next_buffer ( yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
...@@ -539,9 +724,6 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); ...@@ -539,9 +724,6 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
yyg->yy_hold_char = *yy_cp; \ yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 38 #define YY_NUM_RULES 38
#define YY_END_OF_BUFFER 39 #define YY_END_OF_BUFFER 39
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
...@@ -551,7 +733,7 @@ struct yy_trans_info ...@@ -551,7 +733,7 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[98] = static const flex_int16_t yy_accept[98] =
{ 0, { 0,
0, 0, 0, 0, 39, 37, 34, 35, 35, 33, 0, 0, 0, 0, 39, 37, 34, 35, 35, 33,
7, 33, 33, 33, 33, 33, 33, 33, 33, 9, 7, 33, 33, 33, 33, 33, 33, 33, 33, 9,
...@@ -566,7 +748,7 @@ static yyconst flex_int16_t yy_accept[98] = ...@@ -566,7 +748,7 @@ static yyconst flex_int16_t yy_accept[98] =
} ; } ;
static yyconst YY_CHAR yy_ec[256] = static const YY_CHAR yy_ec[256] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
...@@ -598,14 +780,14 @@ static yyconst YY_CHAR yy_ec[256] = ...@@ -598,14 +780,14 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst YY_CHAR yy_meta[30] = static const YY_CHAR yy_meta[30] =
{ 0, { 0,
1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3,
1, 1, 4, 1, 5, 5, 5, 1, 1, 1, 1, 1, 4, 1, 5, 5, 5, 1, 1, 1,
5, 5, 5, 5, 5, 5, 1, 1, 1 5, 5, 5, 5, 5, 5, 1, 1, 1
} ; } ;
static yyconst flex_uint16_t yy_base[103] = static const flex_int16_t yy_base[103] =
{ 0, { 0,
0, 0, 27, 29, 137, 194, 133, 194, 117, 100, 0, 0, 27, 29, 137, 194, 133, 194, 117, 100,
194, 98, 26, 194, 94, 24, 28, 33, 32, 39, 194, 98, 26, 194, 94, 24, 28, 33, 32, 39,
...@@ -621,7 +803,7 @@ static yyconst flex_uint16_t yy_base[103] = ...@@ -621,7 +803,7 @@ static yyconst flex_uint16_t yy_base[103] =
186, 188 186, 188
} ; } ;
static yyconst flex_int16_t yy_def[103] = static const flex_int16_t yy_def[103] =
{ 0, { 0,
97, 1, 98, 98, 97, 97, 97, 97, 97, 97, 97, 1, 98, 98, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
...@@ -637,7 +819,7 @@ static yyconst flex_int16_t yy_def[103] = ...@@ -637,7 +819,7 @@ static yyconst flex_int16_t yy_def[103] =
97, 97 97, 97
} ; } ;
static yyconst flex_uint16_t yy_nxt[224] = static const flex_int16_t yy_nxt[224] =
{ 0, { 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24,
...@@ -666,7 +848,7 @@ static yyconst flex_uint16_t yy_nxt[224] = ...@@ -666,7 +848,7 @@ static yyconst flex_uint16_t yy_nxt[224] =
97, 97, 97 97, 97, 97
} ; } ;
static yyconst flex_int16_t yy_chk[224] = static const flex_int16_t yy_chk[224] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -838,7 +1020,7 @@ struct yyguts_t ...@@ -838,7 +1020,7 @@ struct yyguts_t
static int yy_init_globals (yyscan_t yyscanner ); static int yy_init_globals ( yyscan_t yyscanner );
...@@ -854,9 +1036,9 @@ static int yy_init_globals (yyscan_t yyscanner ); ...@@ -854,9 +1036,9 @@ static int yy_init_globals (yyscan_t yyscanner );
int pplex_init (yyscan_t* scanner); int yylex_init (yyscan_t* scanner);
int pplex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
...@@ -864,82 +1046,82 @@ int pplex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); ...@@ -864,82 +1046,82 @@ int pplex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
These are made visible to non-reentrant scanners for convenience. */ These are made visible to non-reentrant scanners for convenience. */
int pplex_destroy (yyscan_t yyscanner ); int yylex_destroy ( yyscan_t yyscanner );
int ppget_debug (yyscan_t yyscanner ); int yyget_debug ( yyscan_t yyscanner );
void ppset_debug (int debug_flag ,yyscan_t yyscanner ); void yyset_debug ( int debug_flag , yyscan_t yyscanner );
YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner ); YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
void ppset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
FILE *ppget_in (yyscan_t yyscanner ); FILE *yyget_in ( yyscan_t yyscanner );
void ppset_in (FILE * _in_str ,yyscan_t yyscanner ); void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
FILE *ppget_out (yyscan_t yyscanner ); FILE *yyget_out ( yyscan_t yyscanner );
void ppset_out (FILE * _out_str ,yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
int ppget_leng (yyscan_t yyscanner ); int yyget_leng ( yyscan_t yyscanner );
char *ppget_text (yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner );
int ppget_lineno (yyscan_t yyscanner ); int yyget_lineno ( yyscan_t yyscanner );
void ppset_lineno (int _line_number ,yyscan_t yyscanner ); void yyset_lineno ( int _line_number , yyscan_t yyscanner );
int ppget_column (yyscan_t yyscanner ); int yyget_column ( yyscan_t yyscanner );
void ppset_column (int _column_no ,yyscan_t yyscanner ); void yyset_column ( int _column_no , yyscan_t yyscanner );
YYSTYPE * ppget_lval (yyscan_t yyscanner ); YYSTYPE * yyget_lval ( yyscan_t yyscanner );
void ppset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
YYLTYPE *ppget_lloc (yyscan_t yyscanner ); YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
void ppset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
...@@ -949,32 +1131,30 @@ void ppset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); ...@@ -949,32 +1131,30 @@ void ppset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP #ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus #ifdef __cplusplus
extern "C" int ppwrap (yyscan_t yyscanner ); extern "C" int yywrap ( yyscan_t yyscanner );
#else #else
extern int ppwrap (yyscan_t yyscanner ); extern int yywrap ( yyscan_t yyscanner );
#endif #endif
#endif #endif
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
#endif #endif
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif #endif
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif #endif
#ifndef YY_NO_INPUT #ifndef YY_NO_INPUT
#ifdef __cplusplus #ifdef __cplusplus
static int yyinput (yyscan_t yyscanner ); static int yyinput ( yyscan_t yyscanner );
#else #else
static int input (yyscan_t yyscanner ); static int input ( yyscan_t yyscanner );
#endif #endif
#endif #endif
...@@ -1015,7 +1195,7 @@ static int input (yyscan_t yyscanner ); ...@@ -1015,7 +1195,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \ { \
int c = '*'; \ int c = '*'; \
size_t n; \ int n; \
for ( n = 0; n < max_size && \ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \ buf[n] = (char) c; \
...@@ -1028,7 +1208,7 @@ static int input (yyscan_t yyscanner ); ...@@ -1028,7 +1208,7 @@ static int input (yyscan_t yyscanner );
else \ else \
{ \ { \
errno=0; \ errno=0; \
while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \ { \
if( errno != EINTR) \ if( errno != EINTR) \
{ \ { \
...@@ -1067,8 +1247,6 @@ static int input (yyscan_t yyscanner ); ...@@ -1067,8 +1247,6 @@ static int input (yyscan_t yyscanner );
/* end tables serialization structures and prototypes */ /* end tables serialization structures and prototypes */
...@@ -1095,10 +1273,10 @@ static int input (yyscan_t yyscanner ); ...@@ -1095,10 +1273,10 @@ static int input (yyscan_t yyscanner );
extern int pplex \ extern int yylex \
(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
#define YY_DECL int pplex \ #define YY_DECL int yylex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */ #endif /* !YY_DECL */
...@@ -1123,7 +1301,6 @@ extern int pplex \ ...@@ -1123,7 +1301,6 @@ extern int pplex \
YY_USER_ACTION YY_USER_ACTION
/** The main scanner function which does all the work. /** The main scanner function which does all the work.
*/ */
YY_DECL YY_DECL
...@@ -1163,12 +1340,12 @@ YY_DECL ...@@ -1163,12 +1340,12 @@ YY_DECL
yyout = stdout; yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) { if ( ! YY_CURRENT_BUFFER ) {
ppensure_buffer_stack (yyscanner); yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
pp_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
} }
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
{ {
...@@ -1202,9 +1379,9 @@ yy_match: ...@@ -1202,9 +1379,9 @@ yy_match:
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 98 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 97 ); while ( yy_current_state != 97 );
...@@ -1526,7 +1703,7 @@ ECHO; ...@@ -1526,7 +1703,7 @@ ECHO;
/* We're scanning a new file or input source. It's /* We're scanning a new file or input source. It's
* possible that this happened because the user * possible that this happened because the user
* just pointed yyin at a new source and called * just pointed yyin at a new source and called
* pplex(). If so, then we have to assure * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our * consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because * globals. Here is the right place to do so, because
* this is the first action (other than possibly a * this is the first action (other than possibly a
...@@ -1587,7 +1764,7 @@ ECHO; ...@@ -1587,7 +1764,7 @@ ECHO;
{ {
yyg->yy_did_buffer_switch_on_eof = 0; yyg->yy_did_buffer_switch_on_eof = 0;
if ( ppwrap(yyscanner ) ) if ( yywrap( yyscanner ) )
{ {
/* Note: because we've taken care in /* Note: because we've taken care in
* yy_get_next_buffer() to have set up * yy_get_next_buffer() to have set up
...@@ -1641,8 +1818,7 @@ ECHO; ...@@ -1641,8 +1818,7 @@ ECHO;
} /* end of action switch */ } /* end of action switch */
} /* end of scanning one token */ } /* end of scanning one token */
} /* end of user's declarations */ } /* end of user's declarations */
} /* end of pplex */ } /* end of yylex */
...@@ -1660,7 +1836,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1660,7 +1836,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = yyg->yytext_ptr; char *source = yyg->yytext_ptr;
yy_size_t number_to_move, i; int number_to_move, i;
int ret_val; int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
...@@ -1689,7 +1865,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1689,7 +1865,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */ /* Try to read more data. */
/* First move last chars to start of buffer. */ /* First move last chars to start of buffer. */
number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i ) for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++); *(dest++) = *(source++);
...@@ -1703,7 +1879,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1703,7 +1879,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ {
int num_to_read = int num_to_read =
static_cast<int>(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1); YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 ) while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */ { /* Not enough room in the buffer - grow it. */
...@@ -1725,7 +1901,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1725,7 +1901,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *) b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */ /* Include room in for 2 EOB chars. */
pprealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); yyrealloc( (void *) b->yy_ch_buf,
(yy_size_t) (b->yy_buf_size + 2) , yyscanner );
} }
else else
/* Can't grow it, we don't own it. */ /* Can't grow it, we don't own it. */
...@@ -1737,8 +1914,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1737,8 +1914,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = static_cast<int>(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1); number_to_move - 1;
} }
...@@ -1759,7 +1936,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1759,7 +1936,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ ) if ( number_to_move == YY_MORE_ADJ )
{ {
ret_val = EOB_ACT_END_OF_FILE; ret_val = EOB_ACT_END_OF_FILE;
pprestart(yyin ,yyscanner); yyrestart( yyin , yyscanner);
} }
else else
...@@ -1773,15 +1950,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1773,15 +1950,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
ret_val = EOB_ACT_CONTINUE_SCAN; ret_val = EOB_ACT_CONTINUE_SCAN;
if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */ /* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pprealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
} }
yyg->yy_n_chars += static_cast<int>(number_to_move); yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
...@@ -1793,7 +1973,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1793,7 +1973,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* yy_get_previous_state - get the state just before the EOB char was reached */ /* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{ {
yy_state_type yy_current_state; yy_state_type yy_current_state;
...@@ -1814,9 +1993,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1814,9 +1993,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 98 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
} }
return yy_current_state; return yy_current_state;
...@@ -1844,9 +2023,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1844,9 +2023,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 98 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 97); yy_is_jam = (yy_current_state == 97);
(void)yyg; (void)yyg;
...@@ -1883,7 +2062,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1883,7 +2062,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ /* need more input */ { /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p; ++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) ) switch ( yy_get_next_buffer( yyscanner ) )
...@@ -1900,13 +2079,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1900,13 +2079,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/ */
/* Reset buffer status. */ /* Reset buffer status. */
pprestart(yyin ,yyscanner); yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE: case EOB_ACT_END_OF_FILE:
{ {
if ( ppwrap(yyscanner ) ) if ( yywrap( yyscanner ) )
return 0; return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof ) if ( ! yyg->yy_did_buffer_switch_on_eof )
...@@ -1939,18 +2118,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1939,18 +2118,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL . * @note This function does not reset the start condition to @c INITIAL .
*/ */
void pprestart (FILE * input_file , yyscan_t yyscanner) void yyrestart (FILE * input_file , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){ if ( ! YY_CURRENT_BUFFER ){
ppensure_buffer_stack (yyscanner); yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
pp_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
} }
pp_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
...@@ -1958,16 +2137,16 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1958,16 +2137,16 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param new_buffer The new input buffer. * @param new_buffer The new input buffer.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void pp_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body /* TODO. We should be able to replace this entire function body
* with * with
* pppop_buffer_state(); * yypop_buffer_state();
* pppush_buffer_state(new_buffer); * yypush_buffer_state(new_buffer);
*/ */
ppensure_buffer_stack (yyscanner); yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer ) if ( YY_CURRENT_BUFFER == new_buffer )
return; return;
...@@ -1980,18 +2159,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1980,18 +2159,18 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
} }
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during /* We don't actually know whether we did this switch during
* EOF (ppwrap()) processing, but the only time this flag * EOF (yywrap()) processing, but the only time this flag
* is looked at is after ppwrap() is called, so it's safe * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it. * to go ahead and always set it.
*/ */
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
static void pp_load_buffer_state (yyscan_t yyscanner) static void yy_load_buffer_state (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
...@@ -2006,36 +2185,36 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ...@@ -2006,36 +2185,36 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the allocated buffer state. * @return the allocated buffer state.
*/ */
YY_BUFFER_STATE pp_create_buffer (FILE * file, int size , yyscan_t yyscanner) YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) ppalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = (yy_size_t)size; b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because /* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters. * we need to put in 2 end-of-buffer characters.
*/ */
b->yy_ch_buf = (char *) ppalloc(b->yy_buf_size + 2 ,yyscanner ); b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf ) if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in pp_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1; b->yy_is_our_buffer = 1;
pp_init_buffer(b,file ,yyscanner); yy_init_buffer( b, file , yyscanner);
return b; return b;
} }
/** Destroy the buffer. /** Destroy the buffer.
* @param b a buffer created with pp_create_buffer() * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void pp_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -2046,29 +2225,29 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ...@@ -2046,29 +2225,29 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer ) if ( b->yy_is_our_buffer )
ppfree((void *) b->yy_ch_buf ,yyscanner ); yyfree( (void *) b->yy_ch_buf , yyscanner );
ppfree((void *) b ,yyscanner ); yyfree( (void *) b , yyscanner );
} }
/* Initializes or reinitializes a buffer. /* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer, * This function is sometimes called more than once on the same buffer,
* such as during a pprestart() or at EOF. * such as during a yyrestart() or at EOF.
*/ */
static void pp_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{ {
int oerrno = errno; int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
pp_flush_buffer(b ,yyscanner); yy_flush_buffer( b , yyscanner);
b->yy_input_file = file; b->yy_input_file = file;
b->yy_fill_buffer = 1; b->yy_fill_buffer = 1;
/* If b is the current buffer, then pp_init_buffer was _probably_ /* If b is the current buffer, then yy_init_buffer was _probably_
* called from pprestart() or through yy_get_next_buffer. * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column. * In that case, we don't want to reset the lineno or column.
*/ */
if (b != YY_CURRENT_BUFFER){ if (b != YY_CURRENT_BUFFER){
...@@ -2088,7 +2267,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ...@@ -2088,7 +2267,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void pp_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b ) if ( ! b )
...@@ -2109,7 +2288,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ...@@ -2109,7 +2288,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER ) if ( b == YY_CURRENT_BUFFER )
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
/** Pushes the new state onto the stack. The new state becomes /** Pushes the new state onto the stack. The new state becomes
...@@ -2118,15 +2297,15 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ...@@ -2118,15 +2297,15 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
* @param new_buffer The new state. * @param new_buffer The new state.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL) if (new_buffer == NULL)
return; return;
ppensure_buffer_stack(yyscanner); yyensure_buffer_stack(yyscanner);
/* This block is copied from pp_switch_to_buffer. */ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER ) if ( YY_CURRENT_BUFFER )
{ {
/* Flush out information for old buffer. */ /* Flush out information for old buffer. */
...@@ -2140,8 +2319,8 @@ void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) ...@@ -2140,8 +2319,8 @@ void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++; yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from pp_switch_to_buffer. */ /* copied from yy_switch_to_buffer. */
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
...@@ -2150,19 +2329,19 @@ void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) ...@@ -2150,19 +2329,19 @@ void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top. * The next element becomes the new top.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void pppop_buffer_state (yyscan_t yyscanner) void yypop_buffer_state (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER) if (!YY_CURRENT_BUFFER)
return; return;
pp_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0) if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top; --yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) { if (YY_CURRENT_BUFFER) {
pp_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
} }
...@@ -2171,7 +2350,7 @@ void pppop_buffer_state (yyscan_t yyscanner) ...@@ -2171,7 +2350,7 @@ void pppop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist. /* Allocates the stack if it does not exist.
* Guarantees space for at least one push. * Guarantees space for at least one push.
*/ */
static void ppensure_buffer_stack (yyscan_t yyscanner) static void yyensure_buffer_stack (yyscan_t yyscanner)
{ {
yy_size_t num_to_alloc; yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -2183,11 +2362,11 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) ...@@ -2183,11 +2362,11 @@ static void ppensure_buffer_stack (yyscan_t yyscanner)
* immediate realloc on the next call. * immediate realloc on the next call.
*/ */
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
yyg->yy_buffer_stack = (struct yy_buffer_state**)ppalloc yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*) (num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner); , yyscanner);
if ( ! yyg->yy_buffer_stack ) if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in ppensure_buffer_stack()" ); YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
...@@ -2203,12 +2382,12 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) ...@@ -2203,12 +2382,12 @@ static void ppensure_buffer_stack (yyscan_t yyscanner)
yy_size_t grow_size = 8 /* arbitrary grow size */; yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size; num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)pprealloc yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack, (yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*) num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner); , yyscanner);
if ( ! yyg->yy_buffer_stack ) if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in ppensure_buffer_stack()" ); YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/ /* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
...@@ -2226,7 +2405,7 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) ...@@ -2226,7 +2405,7 @@ static void ppensure_buffer_stack (yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
...@@ -2236,11 +2415,11 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann ...@@ -2236,11 +2415,11 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
/* They forgot to leave room for the EOB's. */ /* They forgot to leave room for the EOB's. */
return NULL; return NULL;
b = (YY_BUFFER_STATE) ppalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_scan_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = static_cast<int>(size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base; b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0; b->yy_is_our_buffer = 0;
b->yy_input_file = NULL; b->yy_input_file = NULL;
...@@ -2250,7 +2429,7 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann ...@@ -2250,7 +2429,7 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
b->yy_fill_buffer = 0; b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
pp_switch_to_buffer(b ,yyscanner ); yy_switch_to_buffer( b , yyscanner );
return b; return b;
} }
...@@ -2258,51 +2437,51 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann ...@@ -2258,51 +2437,51 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
/** Setup the input buffer state to scan a string. The next call to pplex() will /** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str. * scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan * @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use * @note If you want to scan bytes that may contain NUL values, then use
* pp_scan_bytes() instead. * yy_scan_bytes() instead.
*/ */
YY_BUFFER_STATE pp_scan_string (yyconst char * yystr , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{ {
return pp_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
} }
/** Setup the input buffer state to scan the given bytes. The next call to pplex() will /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes. * scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan * @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
char *buf; char *buf;
yy_size_t n; yy_size_t n;
yy_size_t i; int i;
/* Get memory for full buffer, including space for trailing EOB's. */ /* Get memory for full buffer, including space for trailing EOB's. */
n = (yy_size_t) _yybytes_len + 2; n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) ppalloc(n ,yyscanner ); buf = (char *) yyalloc( n , yyscanner );
if ( ! buf ) if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in pp_scan_bytes()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < static_cast<yy_size_t>(_yybytes_len); ++i ) for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i]; buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = pp_scan_buffer(buf,n ,yyscanner); b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "bad buffer in pp_scan_bytes()" ); YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it /* It's okay to grow etc. this buffer, and we should throw it
* away when we're done. * away when we're done.
...@@ -2326,11 +2505,11 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc ...@@ -2326,11 +2505,11 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc
#define YY_EXIT_FAILURE 2 #define YY_EXIT_FAILURE 2
#endif #endif
static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg; (void)yyg;
(void) fprintf( stderr, "%s\n", msg ); fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }
...@@ -2359,7 +2538,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) ...@@ -2359,7 +2538,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
/** Get the user-defined data for this scanner. /** Get the user-defined data for this scanner.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner) YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra; return yyextra;
...@@ -2370,7 +2549,7 @@ YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner) ...@@ -2370,7 +2549,7 @@ YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner)
/** Get the current line number. /** Get the current line number.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
int ppget_lineno (yyscan_t yyscanner) int yyget_lineno (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -2387,7 +2566,7 @@ int ppget_lineno (yyscan_t yyscanner) ...@@ -2387,7 +2566,7 @@ int ppget_lineno (yyscan_t yyscanner)
/** Get the current column number. /** Get the current column number.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
int ppget_column (yyscan_t yyscanner) int yyget_column (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -2404,7 +2583,7 @@ int ppget_column (yyscan_t yyscanner) ...@@ -2404,7 +2583,7 @@ int ppget_column (yyscan_t yyscanner)
/** Get the input stream. /** Get the input stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
FILE *ppget_in (yyscan_t yyscanner) FILE *yyget_in (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin; return yyin;
...@@ -2415,7 +2594,7 @@ FILE *ppget_in (yyscan_t yyscanner) ...@@ -2415,7 +2594,7 @@ FILE *ppget_in (yyscan_t yyscanner)
/** Get the output stream. /** Get the output stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
FILE *ppget_out (yyscan_t yyscanner) FILE *yyget_out (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout; return yyout;
...@@ -2426,7 +2605,7 @@ FILE *ppget_out (yyscan_t yyscanner) ...@@ -2426,7 +2605,7 @@ FILE *ppget_out (yyscan_t yyscanner)
/** Get the length of the current token. /** Get the length of the current token.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
int ppget_leng (yyscan_t yyscanner) int yyget_leng (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng; return yyleng;
...@@ -2437,7 +2616,7 @@ int ppget_leng (yyscan_t yyscanner) ...@@ -2437,7 +2616,7 @@ int ppget_leng (yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
char *ppget_text (yyscan_t yyscanner) char *yyget_text (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext; return yytext;
...@@ -2449,7 +2628,7 @@ char *ppget_text (yyscan_t yyscanner) ...@@ -2449,7 +2628,7 @@ char *ppget_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner. * @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void ppset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ; yyextra = user_defined ;
...@@ -2461,14 +2640,14 @@ void ppset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) ...@@ -2461,14 +2640,14 @@ void ppset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
* @param _line_number line number * @param _line_number line number
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void ppset_lineno (int _line_number , yyscan_t yyscanner) void yyset_lineno (int _line_number , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */ /* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "ppset_lineno called with no buffer" ); YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
yylineno = _line_number; yylineno = _line_number;
} }
...@@ -2480,14 +2659,14 @@ void ppset_lineno (int _line_number , yyscan_t yyscanner) ...@@ -2480,14 +2659,14 @@ void ppset_lineno (int _line_number , yyscan_t yyscanner)
* @param _column_no column number * @param _column_no column number
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void ppset_column (int _column_no , yyscan_t yyscanner) void yyset_column (int _column_no , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */ /* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "ppset_column called with no buffer" ); YY_FATAL_ERROR( "yyset_column called with no buffer" );
yycolumn = _column_no; yycolumn = _column_no;
} }
...@@ -2500,9 +2679,9 @@ void ppset_column (int _column_no , yyscan_t yyscanner) ...@@ -2500,9 +2679,9 @@ void ppset_column (int _column_no , yyscan_t yyscanner)
* input buffer. * input buffer.
* @param _in_str A readable stream. * @param _in_str A readable stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @see pp_switch_to_buffer * @see yy_switch_to_buffer
*/ */
void ppset_in (FILE * _in_str , yyscan_t yyscanner) void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = _in_str ; yyin = _in_str ;
...@@ -2510,7 +2689,7 @@ void ppset_in (FILE * _in_str , yyscan_t yyscanner) ...@@ -2510,7 +2689,7 @@ void ppset_in (FILE * _in_str , yyscan_t yyscanner)
void ppset_out (FILE * _out_str , yyscan_t yyscanner) void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyout = _out_str ; yyout = _out_str ;
...@@ -2519,7 +2698,7 @@ void ppset_out (FILE * _out_str , yyscan_t yyscanner) ...@@ -2519,7 +2698,7 @@ void ppset_out (FILE * _out_str , yyscan_t yyscanner)
int ppget_debug (yyscan_t yyscanner) int yyget_debug (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug; return yy_flex_debug;
...@@ -2527,7 +2706,7 @@ int ppget_debug (yyscan_t yyscanner) ...@@ -2527,7 +2706,7 @@ int ppget_debug (yyscan_t yyscanner)
void ppset_debug (int _bdebug , yyscan_t yyscanner) void yyset_debug (int _bdebug , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = _bdebug ; yy_flex_debug = _bdebug ;
...@@ -2537,7 +2716,7 @@ void ppset_debug (int _bdebug , yyscan_t yyscanner) ...@@ -2537,7 +2716,7 @@ void ppset_debug (int _bdebug , yyscan_t yyscanner)
/* Accessor methods for yylval and yylloc */ /* Accessor methods for yylval and yylloc */
YYSTYPE * ppget_lval (yyscan_t yyscanner) YYSTYPE * yyget_lval (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylval; return yylval;
...@@ -2545,7 +2724,7 @@ YYSTYPE * ppget_lval (yyscan_t yyscanner) ...@@ -2545,7 +2724,7 @@ YYSTYPE * ppget_lval (yyscan_t yyscanner)
void ppset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylval = yylval_param; yylval = yylval_param;
...@@ -2554,7 +2733,7 @@ void ppset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) ...@@ -2554,7 +2733,7 @@ void ppset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
YYLTYPE *ppget_lloc (yyscan_t yyscanner) YYLTYPE *yyget_lloc (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc; return yylloc;
...@@ -2562,7 +2741,7 @@ YYLTYPE *ppget_lloc (yyscan_t yyscanner) ...@@ -2562,7 +2741,7 @@ YYLTYPE *ppget_lloc (yyscan_t yyscanner)
void ppset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param; yylloc = yylloc_param;
...@@ -2574,20 +2753,18 @@ void ppset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) ...@@ -2574,20 +2753,18 @@ void ppset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
/* User-visible API */ /* User-visible API */
/* pplex_init is special because it creates the scanner itself, so it is /* 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. * 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. * That's why we explicitly handle the declaration, instead of using our macros.
*/ */
int yylex_init(yyscan_t* ptr_yy_globals)
int pplex_init(yyscan_t* ptr_yy_globals)
{ {
if (ptr_yy_globals == NULL){ if (ptr_yy_globals == NULL){
errno = EINVAL; errno = EINVAL;
return 1; return 1;
} }
*ptr_yy_globals = (yyscan_t) ppalloc ( sizeof( struct yyguts_t ), NULL ); *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){ if (*ptr_yy_globals == NULL){
errno = ENOMEM; errno = ENOMEM;
...@@ -2601,27 +2778,25 @@ int pplex_init(yyscan_t* ptr_yy_globals) ...@@ -2601,27 +2778,25 @@ int pplex_init(yyscan_t* ptr_yy_globals)
} }
/* pplex_init_extra has the same functionality as pplex_init, but follows the /* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that * convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and * this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration). * is the reason, too, why this function also must handle its own declaration).
* The user defined value in the first argument will be available to ppalloc in * The user defined value in the first argument will be available to yyalloc in
* the yyextra field. * the yyextra field.
*/ */
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
int pplex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
{ {
struct yyguts_t dummy_yyguts; struct yyguts_t dummy_yyguts;
ppset_extra (yy_user_defined, &dummy_yyguts); yyset_extra (yy_user_defined, &dummy_yyguts);
if (ptr_yy_globals == NULL){ if (ptr_yy_globals == NULL){
errno = EINVAL; errno = EINVAL;
return 1; return 1;
} }
*ptr_yy_globals = (yyscan_t) ppalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
if (*ptr_yy_globals == NULL){ if (*ptr_yy_globals == NULL){
errno = ENOMEM; errno = ENOMEM;
...@@ -2632,7 +2807,7 @@ int pplex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) ...@@ -2632,7 +2807,7 @@ int pplex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
yy_init_globals. Leave at 0x00 for releases. */ yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
ppset_extra (yy_user_defined, *ptr_yy_globals); yyset_extra (yy_user_defined, *ptr_yy_globals);
return yy_init_globals ( *ptr_yy_globals ); return yy_init_globals ( *ptr_yy_globals );
} }
...@@ -2642,7 +2817,7 @@ static int yy_init_globals (yyscan_t yyscanner) ...@@ -2642,7 +2817,7 @@ static int yy_init_globals (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Initialization is the same as for the non-reentrant scanner. /* Initialization is the same as for the non-reentrant scanner.
* This function is called from pplex_destroy(), so don't allocate here. * This function is called from yylex_destroy(), so don't allocate here.
*/ */
...@@ -2673,42 +2848,42 @@ static int yy_init_globals (yyscan_t yyscanner) ...@@ -2673,42 +2848,42 @@ static int yy_init_globals (yyscan_t yyscanner)
#endif #endif
/* For future reference: Set errno on error, since we are called by /* For future reference: Set errno on error, since we are called by
* pplex_init() * yylex_init()
*/ */
return 0; return 0;
} }
/* pplex_destroy is for both reentrant and non-reentrant scanners. */ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
int pplex_destroy (yyscan_t yyscanner) int yylex_destroy (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Pop the buffer stack, destroying each element. */ /* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){ while(YY_CURRENT_BUFFER){
pp_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
pppop_buffer_state(yyscanner); yypop_buffer_state(yyscanner);
} }
/* Destroy the stack itself. */ /* Destroy the stack itself. */
ppfree(yyg->yy_buffer_stack ,yyscanner); yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */ /* Destroy the start condition stack. */
ppfree(yyg->yy_start_stack ,yyscanner ); yyfree( yyg->yy_start_stack , yyscanner );
yyg->yy_start_stack = NULL; yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time /* Reset the globals. This is important in a non-reentrant scanner so the next time
* pplex() is called, initialization will occur. */ * yylex() is called, initialization will occur. */
yy_init_globals( yyscanner); yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */ /* Destroy the main struct (reentrant only). */
ppfree ( yyscanner , yyscanner ); yyfree ( yyscanner , yyscanner );
yyscanner = NULL; yyscanner = NULL;
return 0; return 0;
} }
...@@ -2722,7 +2897,7 @@ int pplex_destroy (yyscan_t yyscanner) ...@@ -2722,7 +2897,7 @@ int pplex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg; (void)yyg;
...@@ -2736,7 +2911,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca ...@@ -2736,7 +2911,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{ {
int n; int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
...@@ -2748,7 +2923,7 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) ...@@ -2748,7 +2923,7 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
void *ppalloc (yy_size_t size , yyscan_t yyscanner) void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg; (void)yyg;
...@@ -2757,7 +2932,7 @@ void *ppalloc (yy_size_t size , yyscan_t yyscanner) ...@@ -2757,7 +2932,7 @@ void *ppalloc (yy_size_t size , yyscan_t yyscanner)
void *pprealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg; (void)yyg;
...@@ -2774,11 +2949,11 @@ void *pprealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) ...@@ -2774,11 +2949,11 @@ void *pprealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
void ppfree (void * ptr , yyscan_t yyscanner) void yyfree (void * ptr , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg; (void)yyg;
free( (char *) ptr ); /* see pprealloc() for (char *) cast */ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
} }
...@@ -2791,7 +2966,6 @@ void ppfree (void * ptr , yyscan_t yyscanner) ...@@ -2791,7 +2966,6 @@ void ppfree (void * ptr , yyscan_t yyscanner)
namespace pp { namespace pp {
Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256) Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256)
...@@ -2817,12 +2991,12 @@ void Tokenizer::setFileNumber(int file) ...@@ -2817,12 +2991,12 @@ void Tokenizer::setFileNumber(int file)
{ {
// We use column number as file number. // We use column number as file number.
// See macro yyfileno. // See macro yyfileno.
ppset_column(file,mHandle); yyset_column(file, mHandle);
} }
void Tokenizer::setLineNumber(int line) void Tokenizer::setLineNumber(int line)
{ {
ppset_lineno(line,mHandle); yyset_lineno(line, mHandle);
} }
void Tokenizer::setMaxTokenSize(size_t maxTokenSize) void Tokenizer::setMaxTokenSize(size_t maxTokenSize)
...@@ -2832,7 +3006,7 @@ void Tokenizer::setMaxTokenSize(size_t maxTokenSize) ...@@ -2832,7 +3006,7 @@ void Tokenizer::setMaxTokenSize(size_t maxTokenSize)
void Tokenizer::lex(Token *token) void Tokenizer::lex(Token *token)
{ {
token->type = pplex(&token->text,&token->location,mHandle); token->type = yylex(&token->text, &token->location, mHandle);
if (token->text.size() > mMaxTokenSize) if (token->text.size() > mMaxTokenSize)
{ {
mContext.diagnostics->report(Diagnostics::PP_TOKEN_TOO_LONG, mContext.diagnostics->report(Diagnostics::PP_TOKEN_TOO_LONG,
...@@ -2851,10 +3025,10 @@ void Tokenizer::lex(Token *token) ...@@ -2851,10 +3025,10 @@ void Tokenizer::lex(Token *token)
bool Tokenizer::initScanner() bool Tokenizer::initScanner()
{ {
if ((mHandle == nullptr) && pplex_init_extra(&mContext, &mHandle)) if ((mHandle == nullptr) && yylex_init_extra(&mContext, &mHandle))
return false; return false;
pprestart(0,mHandle); yyrestart(0, mHandle);
return true; return true;
} }
...@@ -2863,7 +3037,7 @@ void Tokenizer::destroyScanner() ...@@ -2863,7 +3037,7 @@ void Tokenizer::destroyScanner()
if (mHandle == nullptr) if (mHandle == nullptr)
return; return;
pplex_destroy(mHandle); yylex_destroy(mHandle);
mHandle = nullptr; mHandle = nullptr;
} }
......
...@@ -2,69 +2,6 @@ diff --git a/src/compiler/translator/glslang_lex.cpp b/src/compiler/translator/g ...@@ -2,69 +2,6 @@ diff --git a/src/compiler/translator/glslang_lex.cpp b/src/compiler/translator/g
index 1ba63df..2a206ab 100644 index 1ba63df..2a206ab 100644
--- a/src/compiler/translator/glslang_lex.cpp --- a/src/compiler/translator/glslang_lex.cpp
+++ b/src/compiler/translator/glslang_lex.cpp +++ b/src/compiler/translator/glslang_lex.cpp
@@ -1,4 +1,3 @@
-#line 17 "./glslang.l"
//
// Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -149,6 +148,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -335,6 +335,11 @@ typedef size_t yy_size_t;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -351,8 +356,8 @@ typedef size_t yy_size_t;
*/
#define YY_LESS_LINENO(n) \
do { \
- int yyl;\
- for ( yyl = n; yyl < yyleng; ++yyl )\
+ yy_size_t yyl;\
+ for ( yyl = n; yyl < static_cast<yy_site_t>(yyleng); ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
@@ -1692,7 +1697,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
yy_size_t yyl;
- for ( yyl = 0; yyl < yyleng; ++yyl )
+ for ( yyl = 0; yyl < static_cast<yy_size_t>(yyleng); ++yyl )
if ( yytext[yyl] == '\n' )
do{ yylineno++;
@@ -2655,7 +2660,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - static_cast<int>(number_to_move) - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
@@ -2690,7 +2695,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
+ static_cast<int>(number_to_move) - 1;
}
@@ -2698,8 +2703,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) @@ -2698,8 +2703,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
num_to_read = YY_READ_BUF_SIZE; num_to_read = YY_READ_BUF_SIZE;
...@@ -77,46 +14,3 @@ index 1ba63df..2a206ab 100644 ...@@ -77,46 +14,3 @@ index 1ba63df..2a206ab 100644
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
} }
@@ -2725,13 +2732,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ int new_size = yyg->yy_n_chars + static_cast<int>(number_to_move) + (yyg->yy_n_chars >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
- yyg->yy_n_chars += number_to_move;
+ yyg->yy_n_chars += static_cast<int>(number_to_move);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
@@ -3158,7 +3165,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
/* Increase the buffer to prepare for a possible push. */
yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ num_to_alloc = static_cast<int>(yyg->yy_buffer_stack_max + grow_size);
yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
@@ -3196,7 +3203,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = static_cast<int>(size) - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = NULL;
@@ -3251,7 +3258,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
- for ( i = 0; i < _yybytes_len; ++i )
+ for ( i = 0; i < static_cast<yy_size_t>(_yybytes_len); ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
...@@ -26,20 +26,84 @@ ...@@ -26,20 +26,84 @@
#line 30 "./glslang_lex.cpp"
#define YY_INT_ALIGNED short int #define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
#define FLEX_SCANNER #define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 39 #define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0 #if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA #define FLEX_BETA
#endif #endif
#ifdef yyget_lval
#define yyget_lval_ALREADY_DEFINED
#else
#define yyget_lval yyget_lval
#endif
#ifdef yyset_lval
#define yyset_lval_ALREADY_DEFINED
#else
#define yyset_lval yyset_lval
#endif
#ifdef yyget_lloc
#define yyget_lloc_ALREADY_DEFINED
#else
#define yyget_lloc yyget_lloc
#endif
#ifdef yyset_lloc
#define yyset_lloc_ALREADY_DEFINED
#else
#define yyset_lloc yyset_lloc
#endif
/* First, we deal with platform-specific or compiler-specific issues. */ /* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */ /* begin standard C headers. */
...@@ -73,7 +137,6 @@ typedef int16_t flex_int16_t; ...@@ -73,7 +137,6 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t; typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t; typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t; typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else #else
typedef signed char flex_int8_t; typedef signed char flex_int8_t;
typedef short int flex_int16_t; typedef short int flex_int16_t;
...@@ -111,40 +174,38 @@ typedef unsigned int flex_uint32_t; ...@@ -111,40 +174,38 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U) #define UINT32_MAX (4294967295U)
#endif #endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */ #endif /* ! C99 */
#endif /* ! FLEXINT_H */ #endif /* ! FLEXINT_H */
#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
/* C99 requires __STDC__ to be defined as 1. */ /* begin standard C++ headers. */
#if defined (__STDC__)
#define YY_USE_CONST /* TODO: this is always defined, so inline it */
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
#define yyconst const #define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else #else
#define yyconst #define yynoreturn
#endif #endif
/* Returned upon end-of-file. */ /* Returned upon end-of-file. */
#define YY_NULL 0 #define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative, /* Promotes a possibly negative, possibly signed char to an
* we want to instead treat it as an 8-bit unsigned char, hence the * integer in range [0..255] for use as an array index.
* double cast.
*/ */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */ /* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T #ifndef YY_TYPEDEF_YY_SCANNER_T
...@@ -152,6 +213,22 @@ typedef unsigned int flex_uint32_t; ...@@ -152,6 +213,22 @@ typedef unsigned int flex_uint32_t;
typedef void* yyscan_t; typedef void* yyscan_t;
#endif #endif
/* For convenience, these vars (plus the bison vars far below) /* For convenience, these vars (plus the bison vars far below)
are macros in the reentrant scanner. */ are macros in the reentrant scanner. */
#define yyin yyg->yyin_r #define yyin yyg->yyin_r
...@@ -163,36 +240,56 @@ typedef void* yyscan_t; ...@@ -163,36 +240,56 @@ typedef void* yyscan_t;
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r #define yy_flex_debug yyg->yy_flex_debug_r
/* Enter a start condition. This macro really ought to take a parameter, /* 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 * but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN. * definition of BEGIN.
*/ */
#define BEGIN yyg->yy_start = 1 + 2 * #define BEGIN yyg->yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed /* 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 * to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility. * compatibility.
*/ */
#define YY_START ((yyg->yy_start - 1) / 2) #define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START #define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */ /* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */ /* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) #define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0 #define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */ /* Size of default input buffer. */
#ifndef YY_BUF_SIZE #ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384 #define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif #endif
/* The state buf must be large enough to hold one state per character in the main buffer. /* 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)) #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE #ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef struct yy_buffer_state *YY_BUFFER_STATE;
...@@ -203,10 +300,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; ...@@ -203,10 +300,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t; typedef size_t yy_size_t;
#endif #endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_END_OF_FILE 1
...@@ -221,8 +316,8 @@ typedef size_t yy_size_t; ...@@ -221,8 +316,8 @@ typedef size_t yy_size_t;
*/ */
#define YY_LESS_LINENO(n) \ #define YY_LESS_LINENO(n) \
do { \ do { \
yy_size_t yyl;\ int yyl;\
for ( yyl = n; yyl < static_cast<yy_site_t>(yyleng); ++yyl )\ for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\ if ( yytext[yyl] == '\n' )\
--yylineno;\ --yylineno;\
}while(0) }while(0)
...@@ -247,27 +342,29 @@ typedef size_t yy_size_t; ...@@ -247,27 +342,29 @@ typedef size_t yy_size_t;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \ } \
while ( 0 ) while ( 0 )
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_STRUCT_YY_BUFFER_STATE #ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state struct yy_buffer_state
{ {
FILE *yy_input_file; FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */ char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */ char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB /* Size of input buffer in bytes, not including room for EOB
* characters. * characters.
*/ */
yy_size_t yy_buf_size; int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB /* Number of characters read into yy_ch_buf, not including EOB
* characters. * characters.
*/ */
yy_size_t yy_n_chars; int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it, /* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to * and can realloc() it to grow it, and should free() it to
...@@ -291,6 +388,7 @@ struct yy_buffer_state ...@@ -291,6 +388,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */ int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */ int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the /* Whether to try to fill the input buffer when we reach the
* end of it. * end of it.
*/ */
...@@ -315,6 +413,9 @@ struct yy_buffer_state ...@@ -315,6 +413,9 @@ struct yy_buffer_state
}; };
#endif /* !YY_STRUCT_YY_BUFFER_STATE */ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* We provide macros for accessing buffer states in case in the /* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general * future we want to put the buffer states in a more general
* "scanner state". * "scanner state".
...@@ -324,84 +425,95 @@ struct yy_buffer_state ...@@ -324,84 +425,95 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL) : NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not /* 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. * NULL or when we need an lvalue. For internal use only.
*/ */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
void yyrestart (FILE *input_file ,yyscan_t yyscanner );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void yypop_buffer_state (yyscan_t yyscanner );
static void yyensure_buffer_stack (yyscan_t yyscanner );
static void yy_load_buffer_state (yyscan_t yyscanner );
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner ); void yyrestart ( FILE *input_file , yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void yyfree (void * ,yyscan_t yyscanner ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void yypop_buffer_state ( yyscan_t yyscanner );
#define yy_new_buffer yy_create_buffer
static void yyensure_buffer_stack ( yyscan_t yyscanner );
static void yy_load_buffer_state ( yyscan_t yyscanner );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
void *yyalloc ( yy_size_t , yyscan_t yyscanner );
void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
void yyfree ( void * , yyscan_t yyscanner );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \ #define yy_set_interactive(is_interactive) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){ \ if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (yyscanner); \ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
} }
#define yy_set_bol(at_bol) \ #define yy_set_bol(at_bol) \
{ \ { \
if ( ! YY_CURRENT_BUFFER ){\ if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (yyscanner); \ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \ YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \ } \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
} }
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */ /* Begin user sect3 */
#define yywrap(yyscanner) 1 #define yywrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP #define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;
typedef unsigned char YY_CHAR;
typedef int yy_state_type; typedef int yy_state_type;
#define yytext_ptr yytext_r #define yytext_ptr yytext_r
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
static int yy_get_next_buffer ( yyscan_t yyscanner );
static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the /* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext. * corresponding action - sets up yytext.
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \ yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \ yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 246 #define YY_NUM_RULES 246
#define YY_END_OF_BUFFER 247 #define YY_END_OF_BUFFER 247
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
...@@ -411,7 +523,7 @@ struct yy_trans_info ...@@ -411,7 +523,7 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[886] = static const flex_int16_t yy_accept[886] =
{ 0, { 0,
0, 0, 0, 0, 247, 245, 244, 244, 228, 234, 0, 0, 0, 0, 247, 245, 244, 244, 228, 234,
239, 223, 224, 232, 231, 220, 229, 227, 233, 186, 239, 223, 224, 232, 231, 220, 229, 227, 233, 186,
...@@ -512,7 +624,7 @@ static yyconst flex_int16_t yy_accept[886] = ...@@ -512,7 +624,7 @@ static yyconst flex_int16_t yy_accept[886] =
183, 183, 183, 81, 0 183, 183, 183, 81, 0
} ; } ;
static yyconst flex_int32_t yy_ec[256] = static const YY_CHAR yy_ec[256] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
...@@ -544,7 +656,7 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -544,7 +656,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst flex_int32_t yy_meta[78] = static const YY_CHAR yy_meta[78] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 2, 3, 1, 4, 4, 4, 4, 4, 4, 1, 2, 3, 1, 4, 4, 4, 4, 4, 4,
...@@ -556,7 +668,7 @@ static yyconst flex_int32_t yy_meta[78] = ...@@ -556,7 +668,7 @@ static yyconst flex_int32_t yy_meta[78] =
8, 8, 8, 1, 1, 1, 1 8, 8, 8, 1, 1, 1, 1
} ; } ;
static yyconst flex_int16_t yy_base[895] = static const flex_int16_t yy_base[895] =
{ 0, { 0,
0, 0, 77, 0, 1089, 1090, 1090, 1090, 1060, 127, 0, 0, 77, 0, 1089, 1090, 1090, 1090, 1060, 127,
151, 1090, 1090, 1059, 148, 1090, 147, 145, 1058, 167, 151, 1090, 1090, 1059, 148, 1090, 147, 145, 1058, 167,
...@@ -659,7 +771,7 @@ static yyconst flex_int16_t yy_base[895] = ...@@ -659,7 +771,7 @@ static yyconst flex_int16_t yy_base[895] =
} ; } ;
static yyconst flex_int16_t yy_def[895] = static const flex_int16_t yy_def[895] =
{ 0, { 0,
885, 1, 885, 3, 885, 885, 885, 885, 885, 885, 885, 1, 885, 3, 885, 885, 885, 885, 885, 885,
885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, 885,
...@@ -762,7 +874,7 @@ static yyconst flex_int16_t yy_def[895] = ...@@ -762,7 +874,7 @@ static yyconst flex_int16_t yy_def[895] =
} ; } ;
static yyconst flex_int16_t yy_nxt[1168] = static const flex_int16_t yy_nxt[1168] =
{ 0, { 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21,
...@@ -894,7 +1006,7 @@ static yyconst flex_int16_t yy_nxt[1168] = ...@@ -894,7 +1006,7 @@ static yyconst flex_int16_t yy_nxt[1168] =
885, 885, 885, 885, 885, 885, 885 885, 885, 885, 885, 885, 885, 885
} ; } ;
static yyconst flex_int16_t yy_chk[1168] = static const flex_int16_t yy_chk[1168] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -1026,8 +1138,9 @@ static yyconst flex_int16_t yy_chk[1168] = ...@@ -1026,8 +1138,9 @@ static yyconst flex_int16_t yy_chk[1168] =
885, 885, 885, 885, 885, 885, 885 885, 885, 885, 885, 885, 885, 885
} ; } ;
/* Table of booleans, true if rule could match eol. */ /* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[247] = static const flex_int32_t yy_rule_can_match_eol[247] =
{ 0, { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...@@ -1111,11 +1224,22 @@ static int float_constant(yyscan_t yyscanner); ...@@ -1111,11 +1224,22 @@ static int float_constant(yyscan_t yyscanner);
static int floatsuffix_check(TParseContext* context); static int floatsuffix_check(TParseContext* context);
static int yuvcscstandardext_constant(TParseContext *context); static int yuvcscstandardext_constant(TParseContext *context);
#define INITIAL 0 #define INITIAL 0
#define FIELDS 1 #define FIELDS 1
#define YY_EXTRA_TYPE TParseContext* #define YY_EXTRA_TYPE TParseContext*
/* Holds the entire state of the reentrant scanner. */ /* Holds the entire state of the reentrant scanner. */
struct yyguts_t struct yyguts_t
{ {
...@@ -1129,8 +1253,8 @@ struct yyguts_t ...@@ -1129,8 +1253,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char; char yy_hold_char;
yy_size_t yy_n_chars; int yy_n_chars;
yy_size_t yyleng_r; int yyleng_r;
char *yy_c_buf_p; char *yy_c_buf_p;
int yy_init; int yy_init;
int yy_start; int yy_start;
...@@ -1144,68 +1268,131 @@ struct yyguts_t ...@@ -1144,68 +1268,131 @@ struct yyguts_t
int yylineno_r; int yylineno_r;
int yy_flex_debug_r; int yy_flex_debug_r;
char *yytext_r; char *yytext_r;
int yy_more_flag; int yy_more_flag;
int yy_more_len; int yy_more_len;
YYSTYPE * yylval_r; YYSTYPE * yylval_r;
YYLTYPE * yylloc_r; YYLTYPE * yylloc_r;
}; /* end struct yyguts_t */ }; /* end struct yyguts_t */
static int yy_init_globals (yyscan_t yyscanner );
static int yy_init_globals ( yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included /* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/ * from bison output in section 1.*/
# define yylval yyg->yylval_r # define yylval yyg->yylval_r
# define yylloc yyg->yylloc_r # define yylloc yyg->yylloc_r
int yylex_init (yyscan_t* scanner); int yylex_init (yyscan_t* scanner);
int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals. /* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */ These are made visible to non-reentrant scanners for convenience. */
int yylex_destroy (yyscan_t yyscanner );
int yyget_debug (yyscan_t yyscanner ); int yylex_destroy ( yyscan_t yyscanner );
int yyget_debug ( yyscan_t yyscanner );
void yyset_debug ( int debug_flag , yyscan_t yyscanner );
YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
FILE *yyget_in ( yyscan_t yyscanner );
void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
FILE *yyget_out ( yyscan_t yyscanner );
void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
int yyget_leng ( yyscan_t yyscanner );
char *yyget_text ( yyscan_t yyscanner );
int yyget_lineno ( yyscan_t yyscanner );
void yyset_lineno ( int _line_number , yyscan_t yyscanner );
void yyset_debug (int debug_flag ,yyscan_t yyscanner );
YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); int yyget_column ( yyscan_t yyscanner );
void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *yyget_in (yyscan_t yyscanner );
void yyset_in (FILE * in_str ,yyscan_t yyscanner );
FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner ); void yyset_column ( int _column_no , yyscan_t yyscanner );
yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
int yyget_lineno (yyscan_t yyscanner );
void yyset_lineno (int line_number ,yyscan_t yyscanner ); YYSTYPE * yyget_lval ( yyscan_t yyscanner );
int yyget_column (yyscan_t yyscanner );
void yyset_column (int column_no ,yyscan_t yyscanner ); void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
YYSTYPE * yyget_lval (yyscan_t yyscanner );
void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *yyget_lloc (yyscan_t yyscanner ); YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
...@@ -1213,43 +1400,62 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); ...@@ -1213,43 +1400,62 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP #ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus #ifdef __cplusplus
extern "C" int yywrap (yyscan_t yyscanner ); extern "C" int yywrap ( yyscan_t yyscanner );
#else #else
extern int yywrap (yyscan_t yyscanner ); extern int yywrap ( yyscan_t yyscanner );
#endif #endif
#endif #endif
#ifndef YY_NO_UNPUT
#endif
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif #endif
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif #endif
#ifndef YY_NO_INPUT #ifndef YY_NO_INPUT
#ifdef __cplusplus #ifdef __cplusplus
static int yyinput (yyscan_t yyscanner ); static int yyinput ( yyscan_t yyscanner );
#else #else
static int input (yyscan_t yyscanner ); static int input ( yyscan_t yyscanner );
#endif #endif
#endif #endif
/* Amount of stuff to slurp up with each read. */ /* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE #ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192 #define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif #endif
/* Copy whatever the last rule matched to the standard output. */ /* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO #ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's, /* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite(). * we now use fwrite().
*/ */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif #endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result". * is returned in "result".
*/ */
...@@ -1258,7 +1464,7 @@ static int input (yyscan_t yyscanner ); ...@@ -1258,7 +1464,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \ { \
int c = '*'; \ int c = '*'; \
size_t n; \ int n; \
for ( n = 0; n < max_size && \ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \ buf[n] = (char) c; \
...@@ -1271,7 +1477,7 @@ static int input (yyscan_t yyscanner ); ...@@ -1271,7 +1477,7 @@ static int input (yyscan_t yyscanner );
else \ else \
{ \ { \
errno=0; \ errno=0; \
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \ { \
if( errno != EINTR) \ if( errno != EINTR) \
{ \ { \
...@@ -1286,6 +1492,8 @@ static int input (yyscan_t yyscanner ); ...@@ -1286,6 +1492,8 @@ static int input (yyscan_t yyscanner );
#endif #endif
/* No semi-colon after return; correct usage is to write "yyterminate();" - /* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause * we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements. * some compilers to complain about unreachable statements.
...@@ -1294,31 +1502,54 @@ static int input (yyscan_t yyscanner ); ...@@ -1294,31 +1502,54 @@ static int input (yyscan_t yyscanner );
#define yyterminate() return YY_NULL #define yyterminate() return YY_NULL
#endif #endif
/* Number of entries by which start-condition stack grows. */ /* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR #ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25 #define YY_START_STACK_INCR 25
#endif #endif
/* Report a fatal error. */ /* Report a fatal error. */
#ifndef YY_FATAL_ERROR #ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
#endif #endif
/* end tables serialization structures and prototypes */ /* end tables serialization structures and prototypes */
/* Default declaration of generated scanner - a define so the user can /* Default declaration of generated scanner - a define so the user can
* easily add parameters. * easily add parameters.
*/ */
#ifndef YY_DECL #ifndef YY_DECL
#define YY_DECL_IS_OURS 1 #define YY_DECL_IS_OURS 1
extern int yylex \ extern int yylex \
(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
#define YY_DECL int yylex \ #define YY_DECL int yylex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */ #endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng /* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up. * have been set up.
*/ */
...@@ -1326,27 +1557,38 @@ extern int yylex \ ...@@ -1326,27 +1557,38 @@ extern int yylex \
#define YY_USER_ACTION #define YY_USER_ACTION
#endif #endif
/* Code executed at the end of each rule. */ /* Code executed at the end of each rule. */
#ifndef YY_BREAK #ifndef YY_BREAK
#define YY_BREAK break; #define YY_BREAK /*LINTED*/break;
#endif #endif
#define YY_RULE_SETUP \ #define YY_RULE_SETUP \
YY_USER_ACTION YY_USER_ACTION
/** The main scanner function which does all the work. /** The main scanner function which does all the work.
*/ */
YY_DECL YY_DECL
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp, *yy_bp; char *yy_cp, *yy_bp;
register int yy_act; int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylval = yylval_param; yylval = yylval_param;
yylloc = yylloc_param; yylloc = yylloc_param;
if ( !yyg->yy_init ) if ( !yyg->yy_init )
{ {
yyg->yy_init = 1; yyg->yy_init = 1;
...@@ -1355,6 +1597,8 @@ YY_DECL ...@@ -1355,6 +1597,8 @@ YY_DECL
YY_USER_INIT; YY_USER_INIT;
#endif #endif
if ( ! yyg->yy_start ) if ( ! yyg->yy_start )
yyg->yy_start = 1; /* first start state */ yyg->yy_start = 1; /* first start state */
...@@ -1367,17 +1611,21 @@ YY_DECL ...@@ -1367,17 +1611,21 @@ YY_DECL
if ( ! YY_CURRENT_BUFFER ) { if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack (yyscanner); yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
} }
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
{ {
TParseContext* context = yyextra; TParseContext* context = yyextra;
while ( 1 ) /* loops until end-of-file is reached */
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{ {
yy_cp = yyg->yy_c_buf_p; yy_cp = yyg->yy_c_buf_p;
...@@ -1393,7 +1641,7 @@ YY_DECL ...@@ -1393,7 +1641,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_state = yy_current_state;
...@@ -1403,9 +1651,9 @@ yy_match: ...@@ -1403,9 +1651,9 @@ yy_match:
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 886 ) if ( yy_current_state >= 886 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 885 ); while ( yy_current_state != 885 );
...@@ -1417,10 +1665,11 @@ yy_find_action: ...@@ -1417,10 +1665,11 @@ yy_find_action:
YY_DO_BEFORE_ACTION; YY_DO_BEFORE_ACTION;
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{ {
yy_size_t yyl; int yyl;
for ( yyl = 0; yyl < static_cast<yy_size_t>(yyleng); ++yyl ) for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' ) if ( yytext[yyl] == '\n' )
do{ yylineno++; do{ yylineno++;
...@@ -1429,8 +1678,10 @@ yy_find_action: ...@@ -1429,8 +1678,10 @@ yy_find_action:
; ;
} }
do_action: /* This label is used only to access EOF actions. */ do_action: /* This label is used only to access EOF actions. */
switch ( yy_act ) switch ( yy_act )
{ /* beginning of action switch */ { /* beginning of action switch */
case 0: /* must back up */ case 0: /* must back up */
...@@ -2307,7 +2558,7 @@ ECHO; ...@@ -2307,7 +2558,7 @@ ECHO;
{ {
yyg->yy_did_buffer_switch_on_eof = 0; yyg->yy_did_buffer_switch_on_eof = 0;
if ( yywrap(yyscanner ) ) if ( yywrap( yyscanner ) )
{ {
/* Note: because we've taken care in /* Note: because we've taken care in
* yy_get_next_buffer() to have set up * yy_get_next_buffer() to have set up
...@@ -2363,6 +2614,10 @@ ECHO; ...@@ -2363,6 +2614,10 @@ ECHO;
} /* end of user's declarations */ } /* end of user's declarations */
} /* end of yylex */ } /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer /* yy_get_next_buffer - try to read in a new buffer
* *
* Returns a code representing an action: * Returns a code representing an action:
...@@ -2373,9 +2628,9 @@ ECHO; ...@@ -2373,9 +2628,9 @@ ECHO;
static int yy_get_next_buffer (yyscan_t yyscanner) static int yy_get_next_buffer (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = yyg->yytext_ptr; char *source = yyg->yytext_ptr;
register int number_to_move, i; int number_to_move, i;
int ret_val; int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
...@@ -2404,7 +2659,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2404,7 +2659,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */ /* Try to read more data. */
/* First move last chars to start of buffer. */ /* First move last chars to start of buffer. */
number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i ) for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++); *(dest++) = *(source++);
...@@ -2417,7 +2672,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2417,7 +2672,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ {
yy_size_t num_to_read = int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 ) while ( num_to_read <= 0 )
...@@ -2431,7 +2686,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2431,7 +2686,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer ) if ( b->yy_is_our_buffer )
{ {
yy_size_t new_size = b->yy_buf_size * 2; int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 ) if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8; b->yy_buf_size += b->yy_buf_size / 8;
...@@ -2440,11 +2695,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2440,11 +2695,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *) b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */ /* Include room in for 2 EOB chars. */
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); yyrealloc( (void *) b->yy_ch_buf,
(yy_size_t) (b->yy_buf_size + 2) , yyscanner );
} }
else else
/* Can't grow it, we don't own it. */ /* Can't grow it, we don't own it. */
b->yy_ch_buf = 0; b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf ) if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( YY_FATAL_ERROR(
...@@ -2453,7 +2709,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2453,7 +2709,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
static_cast<int>(number_to_move) - 1; number_to_move - 1;
} }
...@@ -2474,7 +2730,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2474,7 +2730,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ ) if ( number_to_move == YY_MORE_ADJ )
{ {
ret_val = EOB_ACT_END_OF_FILE; ret_val = EOB_ACT_END_OF_FILE;
yyrestart(yyin ,yyscanner); yyrestart( yyin , yyscanner);
} }
else else
...@@ -2488,12 +2744,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2488,12 +2744,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
ret_val = EOB_ACT_CONTINUE_SCAN; ret_val = EOB_ACT_CONTINUE_SCAN;
if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */ /* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
} }
yyg->yy_n_chars += number_to_move; yyg->yy_n_chars += number_to_move;
...@@ -2505,19 +2764,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2505,19 +2764,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
return ret_val; return ret_val;
} }
/* yy_get_previous_state - get the state just before the EOB char was reached */ /* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{ {
register yy_state_type yy_current_state; yy_state_type yy_current_state;
register char *yy_cp; char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start; yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_state = yy_current_state;
...@@ -2527,14 +2787,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2527,14 +2787,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 886 ) if ( yy_current_state >= 886 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
} }
return yy_current_state; return yy_current_state;
} }
/* yy_try_NUL_trans - try to make a transition on the NUL character /* yy_try_NUL_trans - try to make a transition on the NUL character
* *
* synopsis * synopsis
...@@ -2542,11 +2803,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2542,11 +2803,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/ */
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{ {
register int yy_is_jam; int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
register char *yy_cp = yyg->yy_c_buf_p; char *yy_cp = yyg->yy_c_buf_p;
register YY_CHAR yy_c = 1; YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_state = yy_current_state;
...@@ -2556,15 +2817,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2556,15 +2817,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 886 ) if ( yy_current_state >= 886 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 885); yy_is_jam = (yy_current_state == 885);
(void)yyg; (void)yyg;
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
#ifndef YY_NO_UNPUT
#endif
#ifndef YY_NO_INPUT #ifndef YY_NO_INPUT
#ifdef __cplusplus #ifdef __cplusplus
static int yyinput (yyscan_t yyscanner) static int yyinput (yyscan_t yyscanner)
...@@ -2590,7 +2856,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2590,7 +2856,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ /* need more input */ { /* need more input */
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p; ++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) ) switch ( yy_get_next_buffer( yyscanner ) )
...@@ -2607,14 +2873,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2607,14 +2873,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/ */
/* Reset buffer status. */ /* Reset buffer status. */
yyrestart(yyin ,yyscanner); yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE: case EOB_ACT_END_OF_FILE:
{ {
if ( yywrap(yyscanner ) ) if ( yywrap( yyscanner ) )
return EOF; return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof ) if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE; YY_NEW_FILE;
...@@ -2659,13 +2925,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2659,13 +2925,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( ! YY_CURRENT_BUFFER ){ if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack (yyscanner); yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE = YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
} }
yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
/** Switch to a different input buffer. /** Switch to a different input buffer.
* @param new_buffer The new input buffer. * @param new_buffer The new input buffer.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
...@@ -2692,7 +2959,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2692,7 +2959,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
} }
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during /* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag * EOF (yywrap()) processing, but the only time this flag
...@@ -2702,6 +2969,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2702,6 +2969,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
static void yy_load_buffer_state (yyscan_t yyscanner) static void yy_load_buffer_state (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -2721,7 +2989,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2721,7 +2989,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
...@@ -2730,17 +2998,18 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2730,17 +2998,18 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
/* yy_ch_buf has to be 2 characters longer than the size given because /* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters. * we need to put in 2 end-of-buffer characters.
*/ */
b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf ) if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1; b->yy_is_our_buffer = 1;
yy_init_buffer(b,file ,yyscanner); yy_init_buffer( b, file , yyscanner);
return b; return b;
} }
/** Destroy the buffer. /** Destroy the buffer.
* @param b a buffer created with yy_create_buffer() * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
...@@ -2756,11 +3025,12 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2756,11 +3025,12 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer ) if ( b->yy_is_our_buffer )
yyfree((void *) b->yy_ch_buf ,yyscanner ); yyfree( (void *) b->yy_ch_buf , yyscanner );
yyfree((void *) b ,yyscanner ); yyfree( (void *) b , yyscanner );
} }
/* Initializes or reinitializes a buffer. /* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer, * This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF. * such as during a yyrestart() or at EOF.
...@@ -2771,7 +3041,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2771,7 +3041,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
int oerrno = errno; int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flush_buffer(b ,yyscanner); yy_flush_buffer( b , yyscanner);
b->yy_input_file = file; b->yy_input_file = file;
b->yy_fill_buffer = 1; b->yy_fill_buffer = 1;
...@@ -2785,8 +3055,11 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2785,8 +3055,11 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
b->yy_bs_column = 0; b->yy_bs_column = 0;
} }
b->yy_is_interactive = 0; b->yy_is_interactive = 0;
errno = oerrno; errno = oerrno;
} }
...@@ -2815,7 +3088,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) ...@@ -2815,7 +3088,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER ) if ( b == YY_CURRENT_BUFFER )
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
} }
/** Pushes the new state onto the stack. The new state becomes /** Pushes the new state onto the stack. The new state becomes
...@@ -2847,10 +3120,11 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) ...@@ -2847,10 +3120,11 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = new_buffer; YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */ /* copied from yy_switch_to_buffer. */
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
/** Removes and deletes the top of the stack, if present. /** Removes and deletes the top of the stack, if present.
* The next element becomes the new top. * The next element becomes the new top.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
...@@ -2861,17 +3135,18 @@ void yypop_buffer_state (yyscan_t yyscanner) ...@@ -2861,17 +3135,18 @@ void yypop_buffer_state (yyscan_t yyscanner)
if (!YY_CURRENT_BUFFER) if (!YY_CURRENT_BUFFER)
return; return;
yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0) if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top; --yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) { if (YY_CURRENT_BUFFER) {
yy_load_buffer_state(yyscanner ); yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1; yyg->yy_did_buffer_switch_on_eof = 1;
} }
} }
/* Allocates the stack if it does not exist. /* Allocates the stack if it does not exist.
* Guarantees space for at least one push. * Guarantees space for at least one push.
*/ */
...@@ -2886,13 +3161,14 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) ...@@ -2886,13 +3161,14 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an * scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call. * immediate realloc on the next call.
*/ */
num_to_alloc = 1; num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*) (num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner); , yyscanner);
if ( ! yyg->yy_buffer_stack ) if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_max = num_to_alloc;
...@@ -2903,9 +3179,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) ...@@ -2903,9 +3179,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */ /* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */; yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = static_cast<int>(yyg->yy_buffer_stack_max + grow_size); num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack, (yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*) num_to_alloc * sizeof(struct yy_buffer_state*)
...@@ -2919,6 +3195,10 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) ...@@ -2919,6 +3195,10 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
} }
} }
/** Setup the input buffer state to scan directly from a user-specified character buffer. /** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer * @param base the character buffer
* @param size the size in bytes of the character buffer * @param size the size in bytes of the character buffer
...@@ -2933,27 +3213,30 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann ...@@ -2933,27 +3213,30 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR ) base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */ /* They forgot to leave room for the EOB's. */
return 0; return NULL;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = static_cast<int>(size) - 2; /* "- 2" to take care of EOB's */ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base; b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0; b->yy_is_our_buffer = 0;
b->yy_input_file = 0; b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size; b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0; b->yy_is_interactive = 0;
b->yy_at_bol = 1; b->yy_at_bol = 1;
b->yy_fill_buffer = 0; b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW; b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer(b ,yyscanner ); yy_switch_to_buffer( b , yyscanner );
return b; return b;
} }
/** Setup the input buffer state to scan a string. The next call to yylex() will /** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str. * scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan * @param yystr a NUL-terminated string to scan
...@@ -2962,12 +3245,15 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann ...@@ -2962,12 +3245,15 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
* @note If you want to scan bytes that may contain NUL values, then use * @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead. * yy_scan_bytes() instead.
*/ */
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{ {
return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
} }
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes. * scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan * @param yybytes the byte buffer to scan
...@@ -2975,25 +3261,25 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) ...@@ -2975,25 +3261,25 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
char *buf; char *buf;
yy_size_t n; yy_size_t n;
yy_size_t i; int i;
/* Get memory for full buffer, including space for trailing EOB's. */ /* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2; n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) yyalloc(n ,yyscanner ); buf = (char *) yyalloc( n , yyscanner );
if ( ! buf ) if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < static_cast<yy_size_t>(_yybytes_len); ++i ) for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i]; buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_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 ,yyscanner); b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b ) if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
...@@ -3005,13 +3291,25 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ...@@ -3005,13 +3291,25 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
return b; return b;
} }
#ifndef YY_EXIT_FAILURE #ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2 #define YY_EXIT_FAILURE 2
#endif #endif
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{ {
(void) fprintf( stderr, "%s\n", msg ); struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }
...@@ -3032,8 +3330,11 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) ...@@ -3032,8 +3330,11 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
} \ } \
while ( 0 ) while ( 0 )
/* Accessor methods (get/set functions) to struct members. */ /* Accessor methods (get/set functions) to struct members. */
/** Get the user-defined data for this scanner. /** Get the user-defined data for this scanner.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3043,6 +3344,8 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) ...@@ -3043,6 +3344,8 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
return yyextra; return yyextra;
} }
/** Get the current line number. /** Get the current line number.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3050,12 +3353,16 @@ int yyget_lineno (yyscan_t yyscanner) ...@@ -3050,12 +3353,16 @@ int yyget_lineno (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER) if (! YY_CURRENT_BUFFER)
return 0; return 0;
return yylineno; return yylineno;
} }
/** Get the current column number. /** Get the current column number.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3063,12 +3370,16 @@ int yyget_column (yyscan_t yyscanner) ...@@ -3063,12 +3370,16 @@ int yyget_column (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER) if (! YY_CURRENT_BUFFER)
return 0; return 0;
return yycolumn; return yycolumn;
} }
/** Get the input stream. /** Get the input stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3078,6 +3389,8 @@ FILE *yyget_in (yyscan_t yyscanner) ...@@ -3078,6 +3389,8 @@ FILE *yyget_in (yyscan_t yyscanner)
return yyin; return yyin;
} }
/** Get the output stream. /** Get the output stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3087,15 +3400,18 @@ FILE *yyget_out (yyscan_t yyscanner) ...@@ -3087,15 +3400,18 @@ FILE *yyget_out (yyscan_t yyscanner)
return yyout; return yyout;
} }
/** Get the length of the current token. /** Get the length of the current token.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
yy_size_t yyget_leng (yyscan_t yyscanner) int yyget_leng (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng; return yyleng;
} }
/** Get the current token. /** Get the current token.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
...@@ -3106,6 +3422,8 @@ char *yyget_text (yyscan_t yyscanner) ...@@ -3106,6 +3422,8 @@ char *yyget_text (yyscan_t yyscanner)
return yytext; return yytext;
} }
/** Set the user-defined data. This data is never touched by the scanner. /** Set the user-defined data. This data is never touched by the scanner.
* @param user_defined The data to be associated with this scanner. * @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
...@@ -3116,101 +3434,130 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) ...@@ -3116,101 +3434,130 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
yyextra = user_defined ; yyextra = user_defined ;
} }
/** Set the current line number. /** Set the current line number.
* @param line_number * @param _line_number line number
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void yyset_lineno (int line_number , yyscan_t yyscanner) void yyset_lineno (int _line_number , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */ /* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
yylineno = line_number; yylineno = _line_number;
} }
/** Set the current column. /** Set the current column.
* @param line_number * @param _column_no column number
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
void yyset_column (int column_no , yyscan_t yyscanner) void yyset_column (int _column_no , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */ /* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER ) if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR( "yyset_column called with no buffer" ); YY_FATAL_ERROR( "yyset_column called with no buffer" );
yycolumn = column_no; yycolumn = _column_no;
} }
/** Set the input stream. This does not discard the current /** Set the input stream. This does not discard the current
* input buffer. * input buffer.
* @param in_str A readable stream. * @param _in_str A readable stream.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @see yy_switch_to_buffer * @see yy_switch_to_buffer
*/ */
void yyset_in (FILE * in_str , yyscan_t yyscanner) void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = in_str ; yyin = _in_str ;
} }
void yyset_out (FILE * out_str , yyscan_t yyscanner)
void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyout = out_str ; yyout = _out_str ;
} }
int yyget_debug (yyscan_t yyscanner) int yyget_debug (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug; return yy_flex_debug;
} }
void yyset_debug (int bdebug , yyscan_t yyscanner)
void yyset_debug (int _bdebug , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = bdebug ; yy_flex_debug = _bdebug ;
} }
/* Accessor methods for yylval and yylloc */ /* Accessor methods for yylval and yylloc */
YYSTYPE * yyget_lval (yyscan_t yyscanner) YYSTYPE * yyget_lval (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylval; return yylval;
} }
void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylval = yylval_param; yylval = yylval_param;
} }
YYLTYPE *yyget_lloc (yyscan_t yyscanner) YYLTYPE *yyget_lloc (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc; return yylloc;
} }
void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param; yylloc = yylloc_param;
} }
/* User-visible API */ /* User-visible API */
/* yylex_init is special because it creates the scanner itself, so it is /* 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. * 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. * That's why we explicitly handle the declaration, instead of using our macros.
*/ */
int yylex_init(yyscan_t* ptr_yy_globals) int yylex_init(yyscan_t* ptr_yy_globals)
{ {
if (ptr_yy_globals == NULL){ if (ptr_yy_globals == NULL){
errno = EINVAL; errno = EINVAL;
...@@ -3230,6 +3577,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) ...@@ -3230,6 +3577,7 @@ int yylex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals ); return yy_init_globals ( *ptr_yy_globals );
} }
/* yylex_init_extra has the same functionality as yylex_init, but follows the /* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that * convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and * this is a *pointer* to a scanner, as it will be allocated by this call (and
...@@ -3237,9 +3585,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) ...@@ -3237,9 +3585,7 @@ int yylex_init(yyscan_t* ptr_yy_globals)
* The user defined value in the first argument will be available to yyalloc in * The user defined value in the first argument will be available to yyalloc in
* the yyextra field. * the yyextra field.
*/ */
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
{ {
struct yyguts_t dummy_yyguts; struct yyguts_t dummy_yyguts;
...@@ -3266,6 +3612,7 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) ...@@ -3266,6 +3612,7 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
return yy_init_globals ( *ptr_yy_globals ); return yy_init_globals ( *ptr_yy_globals );
} }
static int yy_init_globals (yyscan_t yyscanner) static int yy_init_globals (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
...@@ -3273,24 +3620,33 @@ static int yy_init_globals (yyscan_t yyscanner) ...@@ -3273,24 +3620,33 @@ static int yy_init_globals (yyscan_t yyscanner)
* This function is called from yylex_destroy(), so don't allocate here. * This function is called from yylex_destroy(), so don't allocate here.
*/ */
yyg->yy_buffer_stack = 0;
yyg->yy_buffer_stack = NULL;
yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0; yyg->yy_buffer_stack_max = 0;
yyg->yy_c_buf_p = (char *) 0; yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0; yyg->yy_init = 0;
yyg->yy_start = 0; yyg->yy_start = 0;
yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_ptr = 0;
yyg->yy_start_stack_depth = 0; yyg->yy_start_stack_depth = 0;
yyg->yy_start_stack = NULL; yyg->yy_start_stack = NULL;
/* Defined in main.c */ /* Defined in main.c */
#ifdef YY_STDINIT #ifdef YY_STDINIT
yyin = stdin; yyin = stdin;
yyout = stdout; yyout = stdout;
#else #else
yyin = (FILE *) 0; yyin = NULL;
yyout = (FILE *) 0; yyout = NULL;
#endif #endif
/* For future reference: Set errno on error, since we are called by /* For future reference: Set errno on error, since we are called by
...@@ -3299,6 +3655,7 @@ static int yy_init_globals (yyscan_t yyscanner) ...@@ -3299,6 +3655,7 @@ static int yy_init_globals (yyscan_t yyscanner)
return 0; return 0;
} }
/* yylex_destroy is for both reentrant and non-reentrant scanners. */ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (yyscan_t yyscanner) int yylex_destroy (yyscan_t yyscanner)
{ {
...@@ -3306,19 +3663,23 @@ int yylex_destroy (yyscan_t yyscanner) ...@@ -3306,19 +3663,23 @@ int yylex_destroy (yyscan_t yyscanner)
/* Pop the buffer stack, destroying each element. */ /* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){ while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL; YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state(yyscanner); yypop_buffer_state(yyscanner);
} }
/* Destroy the stack itself. */ /* Destroy the stack itself. */
yyfree(yyg->yy_buffer_stack ,yyscanner); yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */ /* Destroy the start condition stack. */
yyfree(yyg->yy_start_stack ,yyscanner ); yyfree( yyg->yy_start_stack , yyscanner );
yyg->yy_start_stack = NULL; yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time /* Reset the globals. This is important in a non-reentrant scanner so the next time
* yylex() is called, initialization will occur. */ * yylex() is called, initialization will occur. */
yy_init_globals( yyscanner); yy_init_globals( yyscanner);
...@@ -3329,23 +3690,32 @@ int yylex_destroy (yyscan_t yyscanner) ...@@ -3329,23 +3690,32 @@ int yylex_destroy (yyscan_t yyscanner)
return 0; return 0;
} }
/* /*
* Internal utility routines. * Internal utility routines.
*/ */
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{ {
register int i; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
int i;
for ( i = 0; i < n; ++i ) for ( i = 0; i < n; ++i )
s1[i] = s2[i]; s1[i] = s2[i];
} }
#endif #endif
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{ {
register int n; int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
; ;
...@@ -3353,13 +3723,22 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) ...@@ -3353,13 +3723,22 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
} }
#endif #endif
void *yyalloc (yy_size_t size , yyscan_t yyscanner) void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{ {
return (void *) malloc( size ); struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
return malloc(size);
} }
void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
/* The cast to (char *) in the following accommodates both /* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those * implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter * that use void* generic pointers. It works with the latter
...@@ -3367,24 +3746,36 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) ...@@ -3367,24 +3746,36 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
* any pointer type to void*, and deal with argument conversions * any pointer type to void*, and deal with argument conversions
* as though doing an assignment. * as though doing an assignment.
*/ */
return (void *) realloc( (char *) ptr, size ); return realloc(ptr, size);
} }
void yyfree (void * ptr , yyscan_t yyscanner) void yyfree (void * ptr , yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
} }
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) { yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner) {
pp::Token token; pp::Token token;
yyget_extra(yyscanner)->getPreprocessor().lex(&token); yyget_extra(yyscanner)->getPreprocessor().lex(&token);
yy_size_t len = token.type == pp::Token::LAST ? 0 : token.text.size(); yy_size_t len = token.type == pp::Token::LAST ? 0 : token.text.size();
if (len < max_size) if (len < max_size)
memcpy(buf, token.text.c_str(), len); memcpy(buf, token.text.c_str(), len);
yyset_column(token.location.file,yyscanner); yyset_column(token.location.file, yyscanner);
yyset_lineno(token.location.line,yyscanner); yyset_lineno(token.location.line, yyscanner);
if (len >= max_size) if (len >= max_size)
YY_FATAL_ERROR("Input buffer overflow"); YY_FATAL_ERROR("Input buffer overflow");
...@@ -3609,7 +4000,7 @@ int yuvcscstandardext_constant(TParseContext *context) ...@@ -3609,7 +4000,7 @@ int yuvcscstandardext_constant(TParseContext *context)
int glslang_initialize(TParseContext* context) { int glslang_initialize(TParseContext* context) {
yyscan_t scanner = NULL; yyscan_t scanner = NULL;
if (yylex_init_extra(context,&scanner)) if (yylex_init_extra(context, &scanner))
return 1; return 1;
context->setScanner(scanner); context->setScanner(scanner);
...@@ -3628,9 +4019,9 @@ int glslang_finalize(TParseContext* context) { ...@@ -3628,9 +4019,9 @@ int glslang_finalize(TParseContext* context) {
int glslang_scan(size_t count, const char* const string[], const int length[], int glslang_scan(size_t count, const char* const string[], const int length[],
TParseContext* context) { TParseContext* context) {
yyrestart(NULL,context->getScanner()); yyrestart(NULL, context->getScanner());
yyset_column(0,context->getScanner()); yyset_column(0, context->getScanner());
yyset_lineno(1,context->getScanner()); yyset_lineno(1, context->getScanner());
// Initialize preprocessor. // Initialize preprocessor.
pp::Preprocessor *preprocessor = &context->getPreprocessor(); pp::Preprocessor *preprocessor = &context->getPreprocessor();
......
...@@ -58,8 +58,12 @@ ...@@ -58,8 +58,12 @@
/* Pull parsers. */ /* Pull parsers. */
#define YYPULL 1 #define YYPULL 1
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
// //
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
......
...@@ -31,24 +31,27 @@ ...@@ -31,24 +31,27 @@
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef YY_YY_GLSLANG_TAB_H_INCLUDED #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
#define YY_YY_GLSLANG_TAB_H_INCLUDED # define YY_YY_GLSLANG_TAB_H_INCLUDED
/* Debug traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
#define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
#if YYDEBUG #if YYDEBUG
extern int yydebug; extern int yydebug;
#endif #endif
/* "%code requires" blocks. */ /* "%code requires" blocks. */
#define YYLTYPE TSourceLoc #define YYLTYPE TSourceLoc
#define YYLTYPE_IS_DECLARED 1 #define YYLTYPE_IS_DECLARED 1
/* Token type. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
#define YYTOKENTYPE # define YYTOKENTYPE
enum yytokentype enum yytokentype
{ {
INVARIANT = 258, INVARIANT = 258,
HIGH_PRECISION = 259, HIGH_PRECISION = 259,
MEDIUM_PRECISION = 260, MEDIUM_PRECISION = 260,
...@@ -198,16 +201,17 @@ enum yytokentype ...@@ -198,16 +201,17 @@ enum yytokentype
CARET = 404, CARET = 404,
AMPERSAND = 405, AMPERSAND = 405,
QUESTION = 406 QUESTION = 406
}; };
#endif #endif
/* Value type. */ /* Value type. */
#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
union YYSTYPE {
struct struct {
{
union { union {
TString *string; TString *string;
float f; float f;
...@@ -215,10 +219,9 @@ union YYSTYPE { ...@@ -215,10 +219,9 @@ union YYSTYPE {
unsigned int u; unsigned int u;
bool b; bool b;
}; };
TSymbol *symbol; TSymbol* symbol;
} lex; } lex;
struct struct {
{
TOperator op; TOperator op;
union { union {
TIntermNode *intermNode; TIntermNode *intermNode;
...@@ -246,15 +249,17 @@ union YYSTYPE { ...@@ -246,15 +249,17 @@ union YYSTYPE {
TTypeQualifierBuilder *typeQualifierBuilder; TTypeQualifierBuilder *typeQualifierBuilder;
}; };
} interm; } interm;
}; };
typedef union YYSTYPE YYSTYPE; typedef union YYSTYPE YYSTYPE;
#define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
/* Location type. */ /* Location type. */
#if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE YYLTYPE; typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE struct YYLTYPE
{ {
...@@ -263,10 +268,12 @@ struct YYLTYPE ...@@ -263,10 +268,12 @@ struct YYLTYPE
int last_line; int last_line;
int last_column; int last_column;
}; };
#define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_DECLARED 1
#define YYLTYPE_IS_TRIVIAL 1 # define YYLTYPE_IS_TRIVIAL 1
#endif #endif
int yyparse(TParseContext *context, void *scanner);
int yyparse (TParseContext* context, void *scanner);
#endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */ #endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment