summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Scanner.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-11-21 11:33:13 +0000
committerJose <jose@zeroc.com>2018-11-21 11:33:13 +0000
commit42e9122371fbe2443a322913cdae27c5bf229a35 (patch)
tree1b4893425c8736c137209a3baf393e64345a3ea8 /cpp/src/Slice/Scanner.cpp
parentFix missing index increment introduce in previous commit (diff)
downloadice-42e9122371fbe2443a322913cdae27c5bf229a35.tar.bz2
ice-42e9122371fbe2443a322913cdae27c5bf229a35.tar.xz
ice-42e9122371fbe2443a322913cdae27c5bf229a35.zip
Regenerate cpp/src/Slice/Scanner.cpp with flex 2.5.37
Diffstat (limited to 'cpp/src/Slice/Scanner.cpp')
-rw-r--r--cpp/src/Slice/Scanner.cpp61
1 files changed, 31 insertions, 30 deletions
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
index ece12353a4d..792930b436b 100644
--- a/cpp/src/Slice/Scanner.cpp
+++ b/cpp/src/Slice/Scanner.cpp
@@ -29,7 +29,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 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -74,7 +74,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -105,6 +104,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -173,7 +174,12 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int slice_leng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t slice_leng;
extern FILE *slice_in, *slice_out;
@@ -199,11 +205,6 @@ extern FILE *slice_in, *slice_out;
#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
@@ -221,7 +222,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
@@ -291,8 +292,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when slice_text is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int slice_leng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t slice_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@@ -320,7 +321,7 @@ static void slice__init_buffer (YY_BUFFER_STATE b,FILE *file );
YY_BUFFER_STATE slice__scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE slice__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE slice__scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE slice__scan_bytes (yyconst char *bytes,yy_size_t len );
void *slice_alloc (yy_size_t );
void *slice_realloc (void *,yy_size_t );
@@ -352,7 +353,7 @@ void slice_free (void * );
/* Begin user sect3 */
-#define slice_wrap(n) 1
+#define slice_wrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -622,7 +623,7 @@ int checkIdentifier(string&);
-#line 625 "src/Slice/Scanner.cpp"
+#line 626 "src/Slice/Scanner.cpp"
#define INITIAL 0
#define BOMSCAN 1
@@ -663,7 +664,7 @@ FILE *slice_get_out (void );
void slice_set_out (FILE * out_str );
-int slice_get_leng (void );
+yy_size_t slice_get_leng (void );
char *slice_get_text (void );
@@ -724,7 +725,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( slice_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -812,7 +813,7 @@ YY_DECL
#line 93 "src/Slice/Scanner.l"
-#line 815 "src/Slice/Scanner.cpp"
+#line 816 "src/Slice/Scanner.cpp"
if ( !(yy_init) )
{
@@ -1399,7 +1400,7 @@ YY_RULE_SETUP
#line 527 "src/Slice/Scanner.l"
ECHO;
YY_BREAK
-#line 1402 "src/Slice/Scanner.cpp"
+#line 1403 "src/Slice/Scanner.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(BOMSCAN):
case YY_STATE_EOF(MAINSCAN):
@@ -1588,21 +1589,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;
@@ -1633,7 +1634,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);
}
@@ -1729,7 +1730,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 == 75);
- 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 )
@@ -1744,7 +1745,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 =
@@ -1793,7 +1794,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( ) )
@@ -2067,7 +2068,7 @@ void slice_pop_buffer_state (void)
*/
static void slice_ensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -2159,12 +2160,12 @@ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to slice_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2251,7 +2252,7 @@ FILE *slice_get_out (void)
/** Get the length of the current token.
*
*/
-int slice_get_leng (void)
+yy_size_t slice_get_leng (void)
{
return slice_leng;
}