Do not allow deprecated features for flex

This commit is contained in:
Tim Zimmermann 2017-09-05 10:24:13 +00:00
parent 6edc862d97
commit 2316e07d52
5 changed files with 403 additions and 391 deletions

View File

@ -50,7 +50,7 @@ $(LIB_BUILD): $(LIB_OBJ)
$(CXX) $(LIB_LFLAGS) -o $(LIB_BUILD) $(LIB_OBJ)
$(SRCPARSER)/flex_lexer.o: $(SRCPARSER)/flex_lexer.cpp $(SRCPARSER)/bison_parser.cpp
$(CXX) $(LIB_CFLAGS) -c -o $@ $< -Wno-sign-compare -Wno-unneeded-internal-declaration -Wno-deprecated-register
$(CXX) $(LIB_CFLAGS) -c -o $@ $< -Wno-sign-compare -Wno-unneeded-internal-declaration
%.o: %.cpp $(PARSER_CPP) $(LIB_H)
$(CXX) $(LIB_CFLAGS) -c -o $@ $<

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.2. */
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -214,7 +214,7 @@ extern int hsql_debug;
/* Value type. */
#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED
typedef union HSQL_STYPE HSQL_STYPE;
union HSQL_STYPE
{
#line 93 "bison_parser.y" /* yacc.c:1909 */
@ -257,6 +257,8 @@ union HSQL_STYPE
#line 259 "bison_parser.h" /* yacc.c:1909 */
};
typedef union HSQL_STYPE HSQL_STYPE;
# define HSQL_STYPE_IS_TRIVIAL 1
# define HSQL_STYPE_IS_DECLARED 1
#endif

View File

@ -8,8 +8,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@ -88,25 +88,13 @@ typedef unsigned int flex_uint32_t;
#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. */
#if defined (__STDC__)
#define YY_USE_CONST
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
/* TODO: this is always defined, so inline it */
#define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yyconst
#define yynoreturn
#endif
/* Returned upon end-of-file. */
@ -179,11 +167,17 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#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_END_OF_FILE 1
#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) \
@ -201,11 +195,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#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
@ -218,7 +207,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@ -334,7 +323,7 @@ void hsql_free (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
#define hsql_wrap(n) 1
#define hsql_wrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@ -346,14 +335,14 @@ typedef int yy_state_type;
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 void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \
yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@ -474,7 +463,7 @@ static yyconst flex_int16_t yy_accept[938] =
2, 2, 5, 6, 2, 2, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
static yyconst YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@ -506,7 +495,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[68] =
static yyconst YY_CHAR yy_meta[68] =
{ 0,
1, 1, 2, 1, 3, 1, 1, 1, 1, 4,
1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
@ -517,7 +506,7 @@ static yyconst flex_int32_t yy_meta[68] =
4, 4, 4, 4, 4, 4, 1
} ;
static yyconst flex_int16_t yy_base[945] =
static yyconst flex_uint16_t yy_base[945] =
{ 0,
0, 0, 67, 0, 433, 3713, 133, 135, 418, 0,
3713, 410, 131, 401, 133, 132, 384, 129, 129, 137,
@ -733,7 +722,7 @@ static yyconst flex_int16_t yy_def[945] =
937, 937, 937, 937
} ;
static yyconst flex_int16_t yy_nxt[3781] =
static yyconst flex_uint16_t yy_nxt[3781] =
{ 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 11, 17, 18, 19, 20, 21, 22, 23, 24,
@ -1607,7 +1596,7 @@ static yyconst flex_int16_t yy_chk[3781] =
/***************************
** Section 3: Rules
***************************/
#line 1611 "flex_lexer.cpp"
#line 1600 "flex_lexer.cpp"
#define INITIAL 0
#define COMMENT 1
@ -1689,19 +1678,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *hsql_get_in (yyscan_t yyscanner );
void hsql_set_in (FILE * in_str ,yyscan_t yyscanner );
void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner );
FILE *hsql_get_out (yyscan_t yyscanner );
void hsql_set_out (FILE * out_str ,yyscan_t yyscanner );
void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner );
int hsql_get_leng (yyscan_t yyscanner );
int hsql_get_leng (yyscan_t yyscanner );
char *hsql_get_text (yyscan_t yyscanner );
int hsql_get_lineno (yyscan_t yyscanner );
void hsql_set_lineno (int line_number ,yyscan_t yyscanner );
void hsql_set_lineno (int _line_number ,yyscan_t yyscanner );
int hsql_get_column (yyscan_t yyscanner );
void hsql_set_column (int _column_no ,yyscan_t yyscanner );
YYSTYPE * hsql_get_lval (yyscan_t yyscanner );
@ -1723,6 +1716,10 @@ extern int hsql_wrap (yyscan_t yyscanner );
#endif
#endif
#ifndef YY_NO_UNPUT
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
@ -1756,7 +1753,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* 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
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@ -1780,7 +1777,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@ -1837,7 +1834,7 @@ extern int hsql_lex \
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@ -1847,16 +1844,11 @@ extern int hsql_lex \
*/
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 51 "flex_lexer.l"
#line 1859 "flex_lexer.cpp"
yylval = yylval_param;
yylloc = yylloc_param;
@ -1887,7 +1879,13 @@ YY_DECL
hsql__load_buffer_state(yyscanner );
}
while ( 1 ) /* loops until end-of-file is reached */
{
#line 51 "flex_lexer.l"
#line 1887 "flex_lexer.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@ -1903,7 +1901,7 @@ YY_DECL
yy_match:
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] )
{
yyg->yy_last_accepting_state = yy_current_state;
@ -1915,7 +1913,7 @@ yy_match:
if ( yy_current_state >= 938 )
yy_c = yy_meta[(unsigned int) 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] + (flex_int16_t) yy_c];
++yy_cp;
}
while ( yy_current_state != 937 );
@ -2634,7 +2632,7 @@ YY_RULE_SETUP
#line 217 "flex_lexer.l"
ECHO;
YY_BREAK
#line 2638 "flex_lexer.cpp"
#line 2636 "flex_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT):
yyterminate();
@ -2767,6 +2765,7 @@ case YY_STATE_EOF(COMMENT):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
} /* end of hsql_lex */
/* yy_get_next_buffer - try to read in a new buffer
@ -2779,9 +2778,9 @@ case YY_STATE_EOF(COMMENT):
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = yyg->yytext_ptr;
register int number_to_move, i;
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = yyg->yytext_ptr;
int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@ -2810,7 +2809,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* 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 )
*(dest++) = *(source++);
@ -2830,7 +2829,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{ /* 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) (yyg->yy_c_buf_p - b->yy_ch_buf);
@ -2850,7 +2849,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@ -2868,7 +2867,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, (size_t) num_to_read );
yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@ -2892,9 +2891,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
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. */
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 *) hsql_realloc((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()" );
@ -2913,15 +2912,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_state_type yy_current_state;
char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
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] )
{
yyg->yy_last_accepting_state = yy_current_state;
@ -2933,7 +2932,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yy_current_state >= 938 )
yy_c = yy_meta[(unsigned int) 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] + (flex_int16_t) yy_c];
}
return yy_current_state;
@ -2946,11 +2945,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)
{
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. */
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] )
{
yyg->yy_last_accepting_state = yy_current_state;
@ -2962,12 +2961,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yy_current_state >= 938 )
yy_c = yy_meta[(unsigned int) 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] + (flex_int16_t) yy_c];
yy_is_jam = (yy_current_state == 937);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
@ -3017,7 +3021,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( hsql_wrap(yyscanner ) )
return EOF;
return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@ -3121,7 +3125,7 @@ static void hsql__load_buffer_state (yyscan_t yyscanner)
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" );
b->yy_buf_size = size;
b->yy_buf_size = (yy_size_t)size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
@ -3282,7 +3286,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* 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**)hsql_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
@ -3299,7 +3303,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* 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 = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc
@ -3329,7 +3333,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
return NULL;
b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
@ -3338,7 +3342,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc
b->yy_buf_size = 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 = 0;
b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
@ -3361,7 +3365,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc
YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
return hsql__scan_bytes(yystr,strlen(yystr) ,yyscanner);
return hsql__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}
/** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will
@ -3379,7 +3383,7 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) hsql_alloc(n ,yyscanner );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" );
@ -3405,9 +3409,11 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
(void) fprintf( stderr, "%s\n", msg );
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@ -3513,51 +3519,51 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
}
/** Set the current line number.
* @param line_number
* @param _line_number line number
* @param yyscanner The scanner object.
*/
void hsql_set_lineno (int line_number , yyscan_t yyscanner)
void hsql_set_lineno (int _line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
yy_fatal_error( "hsql_set_lineno called with no buffer" , yyscanner);
YY_FATAL_ERROR( "hsql_set_lineno called with no buffer" );
yylineno = line_number;
yylineno = _line_number;
}
/** Set the current column.
* @param line_number
* @param _column_no column number
* @param yyscanner The scanner object.
*/
void hsql_set_column (int column_no , yyscan_t yyscanner)
void hsql_set_column (int _column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
yy_fatal_error( "hsql_set_column called with no buffer" , yyscanner);
YY_FATAL_ERROR( "hsql_set_column called with no buffer" );
yycolumn = column_no;
yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
* @param _in_str A readable stream.
* @param yyscanner The scanner object.
* @see hsql__switch_to_buffer
*/
void hsql_set_in (FILE * in_str , yyscan_t yyscanner)
void hsql_set_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = in_str ;
yyin = _in_str ;
}
void hsql_set_out (FILE * out_str , yyscan_t yyscanner)
void hsql_set_out (FILE * _out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyout = out_str ;
yyout = _out_str ;
}
int hsql_get_debug (yyscan_t yyscanner)
@ -3566,10 +3572,10 @@ int hsql_get_debug (yyscan_t yyscanner)
return yy_flex_debug;
}
void hsql_set_debug (int bdebug , yyscan_t yyscanner)
void hsql_set_debug (int _bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = bdebug ;
yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
@ -3669,10 +3675,10 @@ static int yy_init_globals (yyscan_t yyscanner)
* This function is called from hsql_lex_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_max = 0;
yyg->yy_c_buf_p = (char *) 0;
yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0;
yyg->yy_start = 0;
@ -3685,8 +3691,8 @@ static int yy_init_globals (yyscan_t yyscanner)
yyin = stdin;
yyout = stdout;
#else
yyin = (FILE *) 0;
yyout = (FILE *) 0;
yyin = NULL;
yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@ -3732,7 +3738,10 @@ int hsql_lex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst 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 )
s1[i] = s2[i];
}
@ -3741,7 +3750,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
register int n;
int n;
for ( n = 0; s[n]; ++n )
;
@ -3751,11 +3760,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
void *hsql_alloc (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 *hsql_realloc (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
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@ -3763,11 +3777,13 @@ void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
return realloc(ptr, size);
}
void hsql_free (void * ptr , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */
}

View File

@ -12,8 +12,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@ -92,25 +92,13 @@ typedef unsigned int flex_uint32_t;
#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. */
#if defined (__STDC__)
#define YY_USE_CONST
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
/* TODO: this is always defined, so inline it */
#define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yyconst
#define yynoreturn
#endif
/* An opaque pointer. */
@ -165,7 +153,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@ -222,7 +210,7 @@ void hsql_free (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
#define hsql_wrap(n) 1
#define hsql_wrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@ -264,19 +252,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *hsql_get_in (yyscan_t yyscanner );
void hsql_set_in (FILE * in_str ,yyscan_t yyscanner );
void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner );
FILE *hsql_get_out (yyscan_t yyscanner );
void hsql_set_out (FILE * out_str ,yyscan_t yyscanner );
void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner );
int hsql_get_leng (yyscan_t yyscanner );
int hsql_get_leng (yyscan_t yyscanner );
char *hsql_get_text (yyscan_t yyscanner );
int hsql_get_lineno (yyscan_t yyscanner );
void hsql_set_lineno (int line_number ,yyscan_t yyscanner );
void hsql_set_lineno (int _line_number ,yyscan_t yyscanner );
int hsql_get_column (yyscan_t yyscanner );
void hsql_set_column (int _column_no ,yyscan_t yyscanner );
YYSTYPE * hsql_get_lval (yyscan_t yyscanner );
@ -355,6 +347,6 @@ extern int hsql_lex \
#line 217 "flex_lexer.l"
#line 359 "flex_lexer.h"
#line 351 "flex_lexer.h"
#undef hsql_IN_HEADER
#endif /* hsql_HEADER_H */