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

[master] regen flex/bison files using flex 2.6.3

parent 7e1ef0b2
#line 2 "dhcp4_lexer.cc"
#line 1 "dhcp4_lexer.cc"
#line 4 "dhcp4_lexer.cc"
#line 3 "dhcp4_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 parser4__create_buffer
......@@ -36,7 +35,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#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 parser4__create_buffer
#define yy_delete_buffer parser4__delete_buffer
#define yy_scan_buffer parser4__scan_buffer
#define yy_scan_string parser4__scan_string
#define yy_scan_bytes parser4__scan_bytes
#define yy_init_buffer parser4__init_buffer
#define yy_flush_buffer parser4__flush_buffer
#define yy_load_buffer_state parser4__load_buffer_state
#define yy_switch_to_buffer parser4__switch_to_buffer
#define yypush_buffer_state parser4_push_buffer_state
#define yypop_buffer_state parser4_pop_buffer_state
#define yyensure_buffer_stack parser4_ensure_buffer_stack
#define yylex parser4_lex
#define yyrestart parser4_restart
#define yylex_init parser4_lex_init
#define yylex_init_extra parser4_lex_init_extra
#define yylex_destroy parser4_lex_destroy
#define yyget_debug parser4_get_debug
#define yyset_debug parser4_set_debug
#define yyget_extra parser4_get_extra
#define yyset_extra parser4_set_extra
#define yyget_in parser4_get_in
#define yyset_in parser4_set_in
#define yyget_out parser4_get_out
#define yyset_out parser4_set_out
#define yyget_leng parser4_get_leng
#define yyget_text parser4_get_text
#define yyget_lineno parser4_get_lineno
#define yyset_lineno parser4_set_lineno
#define yywrap parser4_wrap
/* %endif */
#define yyalloc parser4_alloc
#define yyrealloc parser4_realloc
#define yyfree parser4_free
/* %if-c-only */
#define yytext parser4_text
#define yyleng parser4_leng
#define yyin parser4_in
#define yyout parser4_out
#define yy_flex_debug parser4__flex_debug
#define yylineno parser4_lineno
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
......@@ -146,19 +222,15 @@ typedef unsigned int flex_uint32_t;
#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 */
......@@ -173,20 +245,16 @@ 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 parser4_restart(parser4_in )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
......@@ -246,7 +314,6 @@ extern FILE *parser4_in, *parser4_out;
YY_DO_BEFORE_ACTION; /* set up parser4_text again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
......@@ -321,7 +388,6 @@ struct yy_buffer_state
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
/* %if-not-reentrant */
/* Stack of input buffers. */
......@@ -342,7 +408,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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.
*/
......@@ -352,7 +417,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %if-not-reentrant */
/* %not-for-header */
/* yy_hold_char holds the character lost when parser4_text is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
......@@ -371,32 +435,30 @@ static int yy_did_buffer_switch_on_eof;
/* %endif */
void parser4_restart (FILE *input_file );
void parser4__switch_to_buffer (YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE parser4__create_buffer (FILE *file,int size );
void parser4__delete_buffer (YY_BUFFER_STATE b );
void parser4__flush_buffer (YY_BUFFER_STATE b );
void parser4_push_buffer_state (YY_BUFFER_STATE new_buffer );
void parser4_pop_buffer_state (void );
static void parser4_ensure_buffer_stack (void );
static void parser4__load_buffer_state (void );
static void parser4__init_buffer (YY_BUFFER_STATE b,FILE *file );
void parser4_restart ( FILE *input_file );
void parser4__switch_to_buffer ( YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE parser4__create_buffer ( FILE *file, int size );
void parser4__delete_buffer ( YY_BUFFER_STATE b );
void parser4__flush_buffer ( YY_BUFFER_STATE b );
void parser4_push_buffer_state ( YY_BUFFER_STATE new_buffer );
void parser4_pop_buffer_state ( void );
static void parser4_ensure_buffer_stack ( void );
static void parser4__load_buffer_state ( void );
static void parser4__init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER parser4__flush_buffer(YY_CURRENT_BUFFER )
YY_BUFFER_STATE parser4__scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE parser4__scan_string (yyconst char *yy_str );
YY_BUFFER_STATE parser4__scan_bytes (yyconst char *bytes,int len );
YY_BUFFER_STATE parser4__scan_buffer ( char *base, yy_size_t size );
YY_BUFFER_STATE parser4__scan_string ( const char *yy_str );
YY_BUFFER_STATE parser4__scan_bytes ( const char *bytes, int len );
/* %endif */
void *parser4_alloc (yy_size_t );
void *parser4_realloc (void *,yy_size_t );
void parser4_free (void * );
void *parser4_alloc ( yy_size_t );
void *parser4_realloc ( void *, yy_size_t );
void parser4_free ( void * );
#define yy_new_buffer parser4__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
......@@ -406,7 +468,6 @@ void parser4_free (void * );
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
......@@ -416,7 +477,6 @@ void parser4_free (void * );
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* %% [1.0] parser4_text/parser4_in/parser4_out/yy_state_type/parser4_lineno etc. def's & init go here */
......@@ -426,15 +486,13 @@ void parser4_free (void * );
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
typedef unsigned char YY_CHAR;
typedef flex_uint8_t YY_CHAR;
FILE *parser4_in = NULL, *parser4_out = NULL;
typedef int yy_state_type;
extern int parser4_lineno;
int parser4_lineno = 1;
extern char *parser4_text;
......@@ -447,10 +505,10 @@ extern char *parser4_text;
/* %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 yynoreturn 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 */
......@@ -465,7 +523,6 @@ static void yynoreturn yy_fatal_error (yyconst char* msg );
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to parser4_text[] 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 141
#define YY_END_OF_BUFFER 142
......@@ -476,7 +533,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[1161] =
static const flex_int16_t yy_accept[1161] =
{ 0,
134, 134, 0, 0, 0, 0, 0, 0, 0, 0,
142, 140, 10, 11, 140, 1, 134, 131, 134, 134,
......@@ -607,7 +664,7 @@ static yyconst flex_int16_t yy_accept[1161] =
0, 0, 0, 0, 0, 51, 0, 0, 79, 0
} ;
static yyconst YY_CHAR yy_ec[256] =
static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
......@@ -639,7 +696,7 @@ static yyconst YY_CHAR yy_ec[256] =
5, 5, 5, 5, 5
} ;
static yyconst YY_CHAR yy_meta[72] =
static const YY_CHAR yy_meta[72] =
{ 0,
1, 1, 2, 3, 3, 4, 3, 3, 3, 3,
3, 3, 3, 5, 5, 5, 3, 3, 3, 3,
......@@ -651,7 +708,7 @@ static yyconst YY_CHAR yy_meta[72] =
3
} ;
static yyconst flex_uint16_t yy_base[1173] =
static const flex_int16_t yy_base[1173] =
{ 0,
0, 70, 19, 29, 41, 49, 52, 58, 87, 95,
1523, 1524, 32, 1519, 141, 0, 201, 1524, 206, 88,
......@@ -784,7 +841,7 @@ static yyconst flex_uint16_t yy_base[1173] =
1000, 1013
} ;
static yyconst flex_int16_t yy_def[1173] =
static const flex_int16_t yy_def[1173] =
{ 0,
1161, 1161, 1162, 1162, 1161, 1161, 1161, 1161, 1161, 1161,
1160, 1160, 1160, 1160, 1160, 1163, 1160, 1160, 1160, 1160,
......@@ -917,7 +974,7 @@ static yyconst flex_int16_t yy_def[1173] =
1160, 1160
} ;
static yyconst flex_uint16_t yy_nxt[1596] =
static const flex_int16_t yy_nxt[1596] =
{ 0,
1160, 13, 14, 13, 1160, 15, 16, 1160, 17, 18,
19, 20, 21, 22, 22, 22, 23, 24, 84, 589,
......@@ -1097,7 +1154,7 @@ static yyconst flex_uint16_t yy_nxt[1596] =
} ;
static yyconst flex_int16_t yy_chk[1596] =
static const flex_int16_t yy_chk[1596] =
{ 0,
0, 1, 1, 1, 0, 1, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 21, 518,
......@@ -1283,23 +1340,23 @@ static char *yy_last_accepting_cpos;
extern int parser4__flex_debug;
int parser4__flex_debug = 1;
static yyconst flex_int16_t yy_rule_linenum[141] =
static const flex_int16_t yy_rule_linenum[141] =
{ 0,
130, 132, 134, 139, 140, 145, 146, 147, 159, 162,
167, 174, 183, 192, 201, 210, 220, 229, 238, 247,
256, 267, 276, 285, 294, 303, 313, 323, 333, 343,
353, 363, 373, 383, 393, 402, 411, 420, 434, 449,
458, 467, 476, 485, 494, 503, 512, 521, 530, 539,
549, 558, 567, 576, 585, 594, 603, 612, 622, 632,
642, 651, 661, 671, 681, 691, 700, 710, 719, 728,
737, 746, 755, 765, 775, 784, 793, 802, 811, 820,
829, 838, 847, 856, 865, 874, 883, 892, 901, 910,
919, 928, 937, 946, 955, 964, 973, 982, 991, 1000,
1009, 1018, 1027, 1036, 1046, 1056, 1066, 1076, 1086, 1096,
1106, 1116, 1126, 1135, 1144, 1153, 1162, 1171, 1181, 1191,
1203, 1214, 1227, 1325, 1330, 1335, 1340, 1341, 1342, 1343,
1344, 1345, 1347, 1365, 1378, 1383, 1387, 1389, 1391, 1393
131, 133, 135, 140, 141, 146, 147, 148, 160, 163,
168, 175, 184, 193, 202, 211, 221, 230, 239, 248,
257, 268, 277, 286, 295, 304, 314, 324, 334, 344,
354, 364, 374, 384, 394, 403, 412, 421, 435, 450,
459, 468, 477, 486, 495, 504, 513, 522, 531, 540,
550, 559, 568, 577, 586, 595, 604, 613, 623, 633,
643, 652, 662, 672, 682, 692, 701, 711, 720, 729,
738, 747, 756, 766, 776, 785, 794, 803, 812, 821,
830, 839, 848, 857, 866, 875, 884, 893, 902, 911,
920, 929, 938, 947, 956, 965, 974, 983, 992, 1001,
1010, 1019, 1028, 1037, 1047, 1057, 1067, 1077, 1087, 1097,
1107, 1117, 1127, 1136, 1145, 1154, 1163, 1172, 1182, 1192,
1204, 1215, 1228, 1326, 1331, 1336, 1341, 1342, 1343, 1344,
1345, 1346, 1348, 1366, 1379, 1384, 1388, 1390, 1392, 1394
} ;
/* The intent behind this definition is that it'll catch
......@@ -1330,8 +1387,8 @@ char *parser4_text;
// 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 parser4_wrap
# define parser4_wrap() 1
# undef yywrap
# define yywrap() 1
namespace {
......@@ -1344,9 +1401,10 @@ unsigned int comment_start_line = 0;
// To avoid the call to exit... oops!
#define YY_FATAL_ERROR(msg) isc::dhcp::Parser4Context::fatal(msg)
#line 1404 "dhcp4_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 parser4_wrap requires linking with -lfl, which provides the default parser4_wrap
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. */
......@@ -1354,23 +1412,23 @@ unsigned int comment_start_line = 0;
/* avoid to get static global variables to remain with C++. */
/* in last resort %option reentrant */
/* Enables debug mode. To see the debug messages, one needs to also set
parser4__flex_debug to 1, then the debug messages will be printed on stderr. */
yy_flex_debug to 1, then the debug messages will be printed on stderr. */
/* I have no idea what this option does, except it was specified in the bison
examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
be on the safe side and keep it. */
#define YY_NO_INPUT 1
/* These are not token expressions yet, just convenience expressions that
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
/* for errors */
#line 86 "dhcp4_lexer.ll"
// This code run each time a pattern is matched. It updates the location
// by moving it ahead by parser4_leng bytes. parser4_leng 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 driver.loc_.columns(parser4_leng);
#line 1374 "dhcp4_lexer.cc"
#define YY_USER_ACTION driver.loc_.columns(yyleng);
#line 1430 "dhcp4_lexer.cc"
#line 1431 "dhcp4_lexer.cc"
#define INITIAL 0
#define COMMENT 1
......@@ -1398,7 +1456,7 @@ unsigned int comment_start_line = 0;
/* %if-reentrant */
/* %if-c-only */
static int yy_init_globals (void );
static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
......@@ -1408,31 +1466,31 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int parser4_lex_destroy (void );
int parser4_lex_destroy ( void );
int parser4_get_debug (void );
int parser4_get_debug ( void );
void parser4_set_debug (int debug_flag );
void parser4_set_debug ( int debug_flag );
YY_EXTRA_TYPE parser4_get_extra (void );
YY_EXTRA_TYPE parser4_get_extra ( void );
void parser4_set_extra (YY_EXTRA_TYPE user_defined );
void parser4_set_extra ( YY_EXTRA_TYPE user_defined );
FILE *parser4_get_in (void );
FILE *parser4_get_in ( void );
void parser4_set_in (FILE * _in_str );
void parser4_set_in ( FILE * _in_str );
FILE *parser4_get_out (void );
FILE *parser4_get_out ( void );
void parser4_set_out (FILE * _out_str );
void parser4_set_out ( FILE * _out_str );
int parser4_get_leng (void );
int parser4_get_leng ( void );
char *parser4_get_text (void );
char *parser4_get_text ( void );
int parser4_get_lineno (void );
int parser4_get_lineno ( void );
void parser4_set_lineno (int _line_number );
void parser4_set_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
......@@ -1443,14 +1501,13 @@ void parser4_set_lineno (int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int parser4_wrap (void );
extern "C" int parser4_wrap ( void );
#else
extern int parser4_wrap (void );
extern int parser4_wrap ( void );
#endif
#endif
/* %not-for-header */
#ifndef YY_NO_UNPUT
#endif
......@@ -1459,21 +1516,20 @@ extern int parser4_wrap (void );
/* %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 );
static int input ( void );
#endif
/* %ok-for-header */
......@@ -1515,7 +1571,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( parser4_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
......@@ -1528,7 +1584,7 @@ static int input (void );
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, max_size, parser4_in))==0 && ferror(parser4_in)) \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, parser4_in)) == 0 && ferror(parser4_in)) \
{ \
if( errno != EINTR) \
{ \
......@@ -1569,11 +1625,9 @@ static int input (void );
/* %if-tables-serialization structures and prototypes */
/* %not-for-header */
/* %ok-for-header */
/* %not-for-header */
/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */
......@@ -1612,7 +1666,6 @@ extern int parser4_lex (void);
YY_USER_ACTION
/* %not-for-header */
/** The main scanner function which does all the work.
*/
YY_DECL
......@@ -1661,11 +1714,12 @@ YY_DECL
#line 96 "dhcp4_lexer.ll"
// This part of the code is copied over to the verbatim to the top
// of the generated parser4_lex function. Explanation:
// of the generated yylex function. Explanation:
// http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html
// Code run each time parser4_lex is called.
// Code run each time yylex is called.
driver.loc_.step();
if (start_token_flag) {
......@@ -1696,7 +1750,7 @@ YY_DECL
}
#line 1700 "dhcp4_lexer.cc"
#line 1753 "dhcp4_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
......@@ -1726,9 +1780,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1161 )
yy_c = yy_meta[(unsigned int) yy_c];
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 1160 );
......@@ -1774,17 +1828,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 130 "dhcp4_lexer.ll"
#line 131 "dhcp4_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
#line 132 "dhcp4_lexer.ll"
#line 133 "dhcp4_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
#line 134 "dhcp4_lexer.ll"
#line 135 "dhcp4_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
......@@ -1792,38 +1846,38 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
#line 139 "dhcp4_lexer.ll"