summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/prebuilt/levcomp.lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/prebuilt/levcomp.lex.cc')
-rw-r--r--crawl-ref/source/prebuilt/levcomp.lex.cc81
1 files changed, 45 insertions, 36 deletions
diff --git a/crawl-ref/source/prebuilt/levcomp.lex.cc b/crawl-ref/source/prebuilt/levcomp.lex.cc
index d021b7633c..deb92c6277 100644
--- a/crawl-ref/source/prebuilt/levcomp.lex.cc
+++ b/crawl-ref/source/prebuilt/levcomp.lex.cc
@@ -9,7 +9,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
@@ -162,7 +162,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;
@@ -184,6 +189,13 @@ extern FILE *yyin, *yyout;
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -201,11 +213,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
@@ -223,7 +230,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
@@ -293,8 +300,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;
@@ -322,7 +329,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 );
@@ -1831,13 +1838,13 @@ char *yytext;
#include <algorithm>
#include <cstring>
#include <queue>
+#include "end.h"
#include "mapdef.h"
#include "levcomp.tab.h"
-#include "stuff.h"
static bool alloced = false;
-queue<const char *> free_queue;
+static queue<const char *> free_queue;
static void flush_free_queue(unsigned int max_allowed)
{
@@ -1902,7 +1909,7 @@ static char *copy_text(bool trim_right, int strip_trailing, int strip_leading)
alloced = true;
post_proc_text(newstring, trim_right, strip_trailing, strip_leading);
}
- return newstring;
+ return (newstring);
}
static void settext(bool trim_right = false,
@@ -1955,7 +1962,7 @@ static void cattext(bool trim_right = false, int strip_trailing = 0)
-#line 1959 "levcomp.lex.cc"
+#line 1966 "levcomp.lex.cc"
#define INITIAL 0
#define MAPDEF 1
@@ -2001,7 +2008,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 );
@@ -2152,11 +2159,6 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 145 "levcomp.lpp"
-
-
-#line 2159 "levcomp.lex.cc"
-
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -2183,6 +2185,12 @@ YY_DECL
yy_load_buffer_state( );
}
+ {
+#line 145 "levcomp.lpp"
+
+
+#line 2193 "levcomp.lex.cc"
+
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -2200,7 +2208,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;
@@ -2226,7 +2234,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -2752,7 +2760,7 @@ YY_RULE_SETUP
#line 305 "levcomp.lpp"
ECHO;
YY_BREAK
-#line 2756 "levcomp.lex.cc"
+#line 2764 "levcomp.lex.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(MAPDEF):
case YY_STATE_EOF(LUA):
@@ -2891,6 +2899,7 @@ case YY_STATE_EOF(ITEM_LIST):
"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
@@ -2946,21 +2955,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;
@@ -2991,7 +3000,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);
}
@@ -3087,7 +3096,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 == 1242);
- 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 )
@@ -3102,7 +3111,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 =
@@ -3155,7 +3164,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( ) )
@@ -3433,7 +3442,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)) {
@@ -3530,12 +3539,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;
@@ -3617,7 +3626,7 @@ FILE *yyget_out (void)
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t yyget_leng (void)
{
return yyleng;
}
@@ -3768,7 +3777,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 305 "levcomp.lpp"
+#line 304 "levcomp.lpp"