Commit c8925d78 authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Regen flex/bison

parent e81af1e5
#line 2 "lexer.cc"
#line 1 "lexer.cc"
#line 4 "lexer.cc"
#line 3 "lexer.cc"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer eval_create_buffer
......@@ -35,8 +34,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 37
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 3
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
......@@ -45,11 +44,88 @@
/* %endif */
/* %if-c-only */
#define yy_create_buffer eval_create_buffer
#define yy_delete_buffer eval_delete_buffer
#define yy_scan_buffer eval_scan_buffer
#define yy_scan_string eval_scan_string
#define yy_scan_bytes eval_scan_bytes
#define yy_init_buffer eval_init_buffer
#define yy_flush_buffer eval_flush_buffer
#define yy_load_buffer_state eval_load_buffer_state
#define yy_switch_to_buffer eval_switch_to_buffer
#define yypush_buffer_state evalpush_buffer_state
#define yypop_buffer_state evalpop_buffer_state
#define yyensure_buffer_stack evalensure_buffer_stack
#define yylex evallex
#define yyrestart evalrestart
#define yylex_init evallex_init
#define yylex_init_extra evallex_init_extra
#define yylex_destroy evallex_destroy
#define yyget_debug evalget_debug
#define yyset_debug evalset_debug
#define yyget_extra evalget_extra
#define yyset_extra evalset_extra
#define yyget_in evalget_in
#define yyset_in evalset_in
#define yyget_out evalget_out
#define yyset_out evalset_out
#define yyget_leng evalget_leng
#define yyget_text evalget_text
#define yyget_lineno evalget_lineno
#define yyset_lineno evalset_lineno
#define yywrap evalwrap
/* %endif */
#define yyalloc evalalloc
#define yyrealloc evalrealloc
#define yyfree evalfree
/* %if-c-only */
#define yytext evaltext
#define yyleng evalleng
#define yyin evalin
#define yyout evalout
#define yy_flex_debug eval_flex_debug
#define yylineno evallineno
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
......@@ -136,41 +212,25 @@ typedef unsigned int flex_uint32_t;
/* %if-c++-only */
/* %endif */
#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
/* %not-for-header */
/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */
/* %not-for-header */
/* Promotes a possibly negative, possibly signed char to an unsigned
* 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.
/* Promotes a possibly negative, possibly signed char to an
* integer in range [0..255] for use as an array index.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* %ok-for-header */
/* %if-reentrant */
......@@ -185,25 +245,29 @@ typedef unsigned int flex_uint32_t;
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
/* 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
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE evalrestart(evalin )
#define YY_END_OF_BUFFER_CHAR 0
/* 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.
......@@ -221,7 +285,7 @@ typedef size_t yy_size_t;
#endif
/* %if-not-reentrant */
extern yy_size_t evalleng;
extern int evalleng;
/* %endif */
/* %if-c-only */
......@@ -233,10 +297,10 @@ extern FILE *evalin, *evalout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
* existing scanners that call yyless() from OUTSIDE evallex.
* existing scanners that call yyless() from OUTSIDE evallex.
* One obvious solution it to make yy_act a global. I tried that, and saw
* a 5% performance hit in a non-evallineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
......@@ -248,6 +312,13 @@ extern FILE *evalin, *evalout;
if ( evaltext[yyl] == '\n' )\
--evallineno;\
}while(0)
#define YY_LINENO_REWIND_TO(dst) \
do {\
const char *p;\
for ( p = yy_cp-1; p >= (dst); --p)\
if ( *p == '\n' )\
--evallineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
......@@ -262,7 +333,6 @@ extern FILE *evalin, *evalout;
YY_DO_BEFORE_ACTION; /* set up evaltext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
......@@ -282,12 +352,12 @@ 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.
*/
yy_size_t yy_n_chars;
int 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
......@@ -310,7 +380,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
......@@ -337,13 +407,12 @@ struct yy_buffer_state
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
/* %if-not-reentrant */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
......@@ -358,7 +427,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
/* 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.
*/
......@@ -368,14 +436,13 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* %if-not-reentrant */
/* %not-for-header */
/* yy_hold_char holds the character lost when evaltext is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
yy_size_t evalleng;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int evalleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
......@@ -387,32 +454,30 @@ static int yy_did_buffer_switch_on_eof;
/* %endif */
void evalrestart (FILE *input_file );
void eval_switch_to_buffer (YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE eval_create_buffer (FILE *file,int size );
void eval_delete_buffer (YY_BUFFER_STATE b );
void eval_flush_buffer (YY_BUFFER_STATE b );
void evalpush_buffer_state (YY_BUFFER_STATE new_buffer );
void evalpop_buffer_state (void );
static void evalensure_buffer_stack (void );
static void eval_load_buffer_state (void );
static void eval_init_buffer (YY_BUFFER_STATE b,FILE *file );
void evalrestart ( FILE *input_file );
void eval_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE eval_create_buffer ( FILE *file, int size );
void eval_delete_buffer ( YY_BUFFER_STATE b );
void eval_flush_buffer ( YY_BUFFER_STATE b );
void evalpush_buffer_state ( YY_BUFFER_STATE new_buffer );
void evalpop_buffer_state ( void );
static void evalensure_buffer_stack ( void );
static void eval_load_buffer_state ( void );
static void eval_init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER eval_flush_buffer(YY_CURRENT_BUFFER )
YY_BUFFER_STATE eval_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE eval_scan_string (yyconst char *yy_str );
YY_BUFFER_STATE eval_scan_bytes (yyconst char *bytes,yy_size_t len );
YY_BUFFER_STATE eval_scan_buffer ( char *base, yy_size_t size );
YY_BUFFER_STATE eval_scan_string ( const char *yy_str );
YY_BUFFER_STATE eval_scan_bytes ( const char *bytes, int len );
/* %endif */
void *evalalloc (yy_size_t );
void *evalrealloc (void *,yy_size_t );
void evalfree (void * );
void *evalalloc ( yy_size_t );
void *evalrealloc ( void *, yy_size_t );
void evalfree ( void * );
#define yy_new_buffer eval_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
......@@ -422,7 +487,6 @@ void evalfree (void * );
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
......@@ -432,36 +496,38 @@ void evalfree (void * );
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* %% [1.0] evaltext/evalin/evalout/yy_state_type/evallineno etc. def's & init go here */
/* Begin user sect3 */
#define evalwrap() 1
#define evalwrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
typedef flex_uint8_t YY_CHAR;
typedef unsigned char YY_CHAR;
FILE *evalin = (FILE *) 0, *evalout = (FILE *) 0;
FILE *evalin = NULL, *evalout = NULL;
typedef int yy_state_type;
extern int evallineno;
int evallineno = 1;
extern char *evaltext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#define yytext_ptr evaltext
/* %% [1.5] DFA */
/* %if-c-only Standard (non-C++) definition */
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[] );
static yy_state_type yy_get_previous_state ( void );
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
static int yy_get_next_buffer ( void );
static void yynoreturn yy_fatal_error ( const char* msg );
/* %endif */
......@@ -471,12 +537,11 @@ static void yy_fatal_error (yyconst char msg[] );
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle evaltext and evalleng for yymore() goes here \ */\
evalleng = (size_t) (yy_cp - yy_bp); \
evalleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to evaltext[] goes here, if %array \ */\
(yy_c_buf_p) = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 51
#define YY_END_OF_BUFFER 52
......@@ -487,7 +552,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_acclist[280] =
static const flex_int16_t yy_acclist[280] =
{ 0,
52, 50, 51, 1, 50, 51, 2, 51, 50, 51,
44, 50, 51, 45, 50, 51, 49, 50, 51, 48,
......@@ -521,7 +586,7 @@ static yyconst flex_int16_t yy_acclist[280] =
37,16390,16390, 36,16390,16390,16390, 34,16390
} ;
static yyconst flex_int16_t yy_accept[199] =
static const flex_int16_t yy_accept[199] =
{ 0,
1, 1, 1, 2, 4, 7, 9, 11, 14, 17,
20, 23, 25, 28, 31, 34, 36, 38, 41, 44,
......@@ -547,7 +612,7 @@ static yyconst flex_int16_t yy_accept[199] =
} ;
static yyconst flex_int32_t yy_ec[256] =
static const 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,
......@@ -579,7 +644,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[45] =
static const YY_CHAR yy_meta[45] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
4, 4, 4, 4, 5, 1, 4, 1, 1, 1,
......@@ -588,7 +653,7 @@ static yyconst flex_int32_t yy_meta[45] =
1, 1, 1, 1
} ;
static yyconst flex_int16_t yy_base[203] =
static const flex_int16_t yy_base[203] =
{ 0,
0, 0, 310, 311, 307, 305, 303, 311, 311, 311,
311, 34, 311, 39, 36, 291, 289, 81, 115, 311,
......@@ -615,7 +680,7 @@ static yyconst flex_int16_t yy_base[203] =
71, 215
} ;
static yyconst flex_int16_t yy_def[203] =
static const flex_int16_t yy_def[203] =
{ 0,
197, 1, 197, 197, 197, 197, 198, 197, 197, 197,
197, 197, 197, 197, 14, 199, 197, 197, 18, 197,
......@@ -642,7 +707,7 @@ static yyconst flex_int16_t yy_def[203] =
197, 197
} ;
static yyconst flex_int16_t yy_nxt[356] =
static const flex_int16_t yy_nxt[356] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 15, 15, 16, 17, 18, 19, 19, 20,
......@@ -685,7 +750,7 @@ static yyconst flex_int16_t yy_nxt[356] =
197, 197, 197, 197, 197
} ;
static yyconst flex_int16_t yy_chk[356] =
static const flex_int16_t yy_chk[356] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
......@@ -729,7 +794,7 @@ static yyconst flex_int16_t yy_chk[356] =
} ;
/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[52] =
static const flex_int32_t yy_rule_can_match_eol[52] =
{ 0,
0, 1, 0, 0, 0, 1, 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,
......@@ -738,13 +803,13 @@ static yyconst flex_int32_t yy_rule_can_match_eol[52] =
extern int eval_flex_debug;
int eval_flex_debug = 1;
static yyconst flex_int16_t yy_rule_linenum[51] =
static const flex_int16_t yy_rule_linenum[51] =
{ 0,
99, 104, 110, 120, 126, 144, 151, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
198, 199, 200, 201, 202, 203, 204, 205, 206, 207
100, 105, 111, 121, 127, 145, 152, 166, 167, 168,
169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208
} ;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
......@@ -790,8 +855,8 @@ char *evaltext;
// 2.5.31 through 2.5.33): it generates code that does
// not conform to C89. See Debian bug 333231
// <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.
# undef evalwrap
# define evalwrap() 1
# undef yywrap
# define yywrap() 1
// The location of the current token. The lexer will keep updating it. This
// variable will be useful for logging errors.
......@@ -804,9 +869,10 @@ namespace {
// To avoid the call to exit... oops!
#define YY_FATAL_ERROR(msg) isc::eval::EvalContext::fatal(msg)
#line 872 "lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
using evalwrap requires linking with -lfl, which provides the default evalwrap
using yywrap requires linking with -lfl, which provides the default yywrap
implementation that always returns 1 anyway. */
/* nounput simplifies the lexer, by removing support for putting a character
back into the input stream. We never use such capability anyway. */
......@@ -825,10 +891,11 @@ namespace {
incorrect inputs (e.g., IP addresses) which must be checked. */
#line 74 "lexer.ll"
// This code run each time a pattern is matched. It updates the location
// by moving it ahead by evalleng bytes. evalleng specifies the length of the
// by moving it ahead by yyleng bytes. yyleng specifies the length of the
// currently matched token.
#define YY_USER_ACTION loc.columns(evalleng);
#line 832 "lexer.cc"
#line 897 "lexer.cc"
#line 898 "lexer.cc"
#define INITIAL 0
......@@ -852,7 +919,7 @@ namespace {
/* %if-reentrant */
/* %if-c-only */
static int yy_init_globals (void );
static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
......@@ -862,31 +929,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int evallex_destroy (void );
int evallex_destroy ( void );
int evalget_debug (void );
int evalget_debug ( void );
void evalset_debug (int debug_flag );
void evalset_debug ( int debug_flag );
YY_EXTRA_TYPE evalget_extra (void );
YY_EXTRA_TYPE evalget_extra ( void );
void evalset_extra (YY_EXTRA_TYPE user_defined );
void evalset_extra ( YY_EXTRA_TYPE user_defined );
FILE *evalget_in (void );
FILE *evalget_in ( void );
void evalset_in (FILE * in_str );
void evalset_in ( FILE * _in_str );
FILE *evalget_out (void );
FILE *evalget_out ( void );
void evalset_out (FILE * out_str );
void evalset_out ( FILE * _out_str );
yy_size_t evalget_leng (void );
int evalget_leng ( void );
char *evalget_text (void );
char *evalget_text ( void );
int evalget_lineno (void );
int evalget_lineno ( void );
void evalset_lineno (int line_number );
void evalset_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
......@@ -897,34 +964,35 @@ void evalset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int evalwrap (void );
extern "C" int evalwrap ( void );
#else
extern int evalwrap (void );
extern int evalwrap ( void );
#endif
#endif
/* %not-for-header */
#ifndef YY_NO_UNPUT
#endif
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * );
static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
#ifdef __cplusplus
static int yyinput (void );
static int yyinput ( void );
#else
static int input (void );