From 54dc938047649bd88e0c829a5ac4bc0fbdd7a006 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 15 Jul 2015 08:54:10 +0300 Subject: Update flex generated files Change-Id: I1faa7a5b1ac16de7b7176e52de228494887b4994 Reviewed-by: Joerg Bornemann --- src/jomlib/ppexpr-lex.inc | 69 ++++++++++++---------------- src/jomlib/ppexpr_grammar.cpp | 104 ++++++++++++++++++++++-------------------- src/jomlib/ppexpr_grammar_p.h | 4 +- 3 files changed, 84 insertions(+), 93 deletions(-) (limited to 'src') diff --git a/src/jomlib/ppexpr-lex.inc b/src/jomlib/ppexpr-lex.inc index 44f6f4f..f9681c5 100644 --- a/src/jomlib/ppexpr-lex.inc +++ b/src/jomlib/ppexpr-lex.inc @@ -8,7 +8,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -141,15 +141,7 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #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 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -161,7 +153,12 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; extern FILE *yyin, *yyout; @@ -170,6 +167,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -187,11 +185,6 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -209,7 +202,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -279,8 +272,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -308,7 +301,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -606,7 +599,7 @@ FILE *yyget_out (void ); void yyset_out (FILE * out_str ); -int yyget_leng (void ); +yy_size_t yyget_leng (void ); char *yyget_text (void ); @@ -648,12 +641,7 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #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 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -780,6 +768,8 @@ YY_DECL yy_load_buffer_state( ); } + { + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -796,7 +786,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1196,6 +1186,7 @@ case YY_STATE_EOF(STATE_SHELLCOMMAND): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1251,21 +1242,21 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1296,7 +1287,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1391,7 +1382,7 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 85); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) @@ -1406,7 +1397,7 @@ static int yy_get_next_buffer (void) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; + register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -1455,7 +1446,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1615,10 +1606,6 @@ static void yy_load_buffer_state (void) yyfree((void *) b ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1731,7 +1718,7 @@ void yypop_buffer_state (void) */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1828,12 +1815,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1915,7 +1902,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -int yyget_leng (void) +yy_size_t yyget_leng (void) { return yyleng; } diff --git a/src/jomlib/ppexpr_grammar.cpp b/src/jomlib/ppexpr_grammar.cpp index 8a10479..95185af 100644 --- a/src/jomlib/ppexpr_grammar.cpp +++ b/src/jomlib/ppexpr_grammar.cpp @@ -82,63 +82,67 @@ const short ppexpr_grammar::goto_default [] = { 0}; const short ppexpr_grammar::action_index [] = { - 93, 13, 10, 58, 3, -25, 2, 1, -25, -25, - 16, -25, 89, -6, -3, -1, -25, -25, -25, 33, - 117, 86, 93, 117, -25, -25, -25, -25, -25, -25, - 21, -2, -25, -25, -25, 32, 42, 45, 69, 69, - 69, -11, 45, 45, -10, 69, 45, 9, 45, 45, - 45, -25, -25, -25, 12, -10, -6, -11, -11, -11, - -6, + 117, 1, 2, 76, 5, -25, 3, 0, -25, -25, + 45, -25, 113, 6, -8, 18, -25, -25, -25, 57, + 110, 117, 85, 141, -25, -25, -25, -25, -25, -25, + 23, -1, -25, -25, -25, 51, 93, 69, 25, 37, + 69, 15, 69, 69, -3, 69, 93, 18, 69, 69, + 69, -25, -25, -25, 18, 16, 20, 20, -9, 4, + 8, - -11, -4, -2, 7, -3, -11, -11, -11, -11, -11, + -11, -9, -7, 3, -8, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - 10, 0, 16, 19, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, 5, -1, 8, 12, 22, - 15, -11, 3, 13, -11, 9, 4, -11, -8, -5, - -7, -11, -11, -11, -11, -11, -11, -11, -11, -11, + 1, 12, 4, 21, -11, -11, -11, -11, -11, -11, + -11, -11, -11, -11, -11, 10, 15, 16, 0, 6, + 7, -11, 11, 13, -11, 9, 17, -11, -1, 2, + 5, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11}; const short ppexpr_grammar::action_info [] = { - 33, 34, 42, 43, 5, 46, 45, 42, 43, 30, - 31, 5, 46, 45, 5, 0, 50, 48, 49, 22, - 23, 20, 21, 32, 0, 3, 50, 48, 49, 50, - 48, 49, 3, 5, 0, 3, 22, 23, 20, 21, - 0, 0, 0, 5, 0, 0, 5, 0, 4, 0, - 0, 0, 1, 2, 3, 0, 24, 0, 4, 5, - 6, 4, 1, 2, 3, 1, 2, 3, 0, 0, - 5, 0, 0, 0, 4, 0, 0, 0, 1, 2, - 3, 0, 0, 0, 0, 4, 0, 5, 6, 1, - 2, 3, 0, 0, 5, 6, 35, 40, 39, 38, - 37, 36, 4, 0, 0, 0, 1, 2, 3, 4, - 0, 0, 0, 1, 2, 3, 0, 0, 5, 6, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 0, 0, 1, 2, 3, - 0, 0, + 34, 33, 5, 5, 42, 43, 5, 46, 45, 0, + 30, 31, 46, 45, 0, 0, 0, 42, 43, 42, + 43, 42, 43, 3, 3, 32, 5, 3, 42, 43, + 0, 46, 45, 42, 43, 50, 48, 49, 5, 0, + 0, 4, 0, 0, 0, 1, 2, 3, 22, 23, + 20, 21, 5, 4, 0, 0, 0, 1, 2, 3, + 22, 23, 20, 21, 0, 0, 0, 4, 0, 0, + 5, 1, 2, 3, 0, 0, 0, 5, 6, 0, + 24, 0, 0, 0, 0, 4, 5, 6, 0, 1, + 2, 3, 4, 0, 5, 0, 1, 2, 3, 0, + 0, 4, 0, 0, 0, 1, 2, 3, 0, 4, + 0, 5, 6, 1, 2, 3, 0, 0, 5, 6, + 35, 40, 39, 38, 37, 36, 4, 0, 0, 0, + 1, 2, 3, 4, 0, 0, 0, 1, 2, 3, + 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, 1, 2, 3, 0, 0, - 51, 53, 26, 52, 56, 17, 29, 18, 19, 44, - 41, 54, 25, 57, 0, 0, 47, 58, 27, 55, - 60, 28, 0, 0, 0, 0, 0, 59, 0, 0, - 0, 0, 0}; + 17, 29, 18, 25, 19, 58, 27, 51, 0, 0, + 52, 59, 60, 53, 26, 41, 47, 44, 0, 55, + 56, 57, 0, 28, 54, 0, 0, 0, 0, 0, + 0, 0}; const short ppexpr_grammar::action_check [] = { - 2, 0, 13, 14, 1, 15, 16, 13, 14, 7, - 8, 1, 15, 16, 1, -1, 17, 18, 19, 3, - 4, 5, 6, 2, -1, 22, 17, 18, 19, 17, - 18, 19, 22, 1, -1, 22, 3, 4, 5, 6, - -1, -1, -1, 1, -1, -1, 1, -1, 16, -1, - -1, -1, 20, 21, 22, -1, 23, -1, 16, 1, - 2, 16, 20, 21, 22, 20, 21, 22, -1, -1, - 1, -1, -1, -1, 16, -1, -1, -1, 20, 21, - 22, -1, -1, -1, -1, 16, -1, 1, 2, 20, - 21, 22, -1, -1, 1, 2, 7, 8, 9, 10, - 11, 12, 16, -1, -1, -1, 20, 21, 22, 16, - -1, -1, -1, 20, 21, 22, -1, -1, 1, 2, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 16, -1, -1, -1, 20, 21, 22, - -1, -1, + 0, 2, 1, 1, 13, 14, 1, 15, 16, -1, + 7, 8, 15, 16, -1, -1, -1, 13, 14, 13, + 14, 13, 14, 22, 22, 2, 1, 22, 13, 14, + -1, 15, 16, 13, 14, 17, 18, 19, 1, -1, + -1, 16, -1, -1, -1, 20, 21, 22, 3, 4, + 5, 6, 1, 16, -1, -1, -1, 20, 21, 22, + 3, 4, 5, 6, -1, -1, -1, 16, -1, -1, + 1, 20, 21, 22, -1, -1, -1, 1, 2, -1, + 23, -1, -1, -1, -1, 16, 1, 2, -1, 20, + 21, 22, 16, -1, 1, -1, 20, 21, 22, -1, + -1, 16, -1, -1, -1, 20, 21, 22, -1, 16, + -1, 1, 2, 20, 21, 22, -1, -1, 1, 2, + 7, 8, 9, 10, 11, 12, 16, -1, -1, -1, + 20, 21, 22, 16, -1, -1, -1, 20, 21, 22, + -1, -1, 1, 2, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, + -1, 20, 21, 22, -1, -1, - 8, 8, 2, 8, 5, 9, 9, 9, 1, 6, - 5, 7, 2, 5, -1, -1, 7, 5, 2, 6, - 5, 2, -1, -1, -1, -1, -1, 5, -1, -1, - -1, -1, -1}; + 9, 9, 9, 2, 1, 5, 2, 8, -1, -1, + 8, 5, 5, 8, 2, 5, 7, 6, -1, 6, + 5, 5, -1, 2, 7, -1, -1, -1, -1, -1, + -1, -1}; diff --git a/src/jomlib/ppexpr_grammar_p.h b/src/jomlib/ppexpr_grammar_p.h index 5550aaa..8bc4480 100644 --- a/src/jomlib/ppexpr_grammar_p.h +++ b/src/jomlib/ppexpr_grammar_p.h @@ -39,8 +39,8 @@ public: NON_TERMINAL_COUNT = 11, GOTO_INDEX_OFFSET = 61, - GOTO_INFO_OFFSET = 142, - GOTO_CHECK_OFFSET = 142 + GOTO_INFO_OFFSET = 166, + GOTO_CHECK_OFFSET = 166 }; static const char *const spell []; -- cgit v1.2.3