-#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
#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
/* %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. */
#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 */
* 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. */
#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)
YY_DO_BEFORE_ACTION; /* set up parser4_text again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_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.
*/
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
#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.
*/
/* %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 */
/* %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 ){ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
} \
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 */
#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;
/* %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 */
*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
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,
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,
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,
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,
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,
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,
} ;
-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,
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
+ 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
+ 170, 177, 186, 195, 204, 213, 223, 232, 241, 250,
+ 259, 270, 279, 288, 297, 306, 316, 326, 336, 346,
+ 356, 366, 376, 386, 396, 405, 414, 423, 437, 452,
+ 461, 470, 479, 488, 497, 506, 515, 524, 533, 542,
+ 552, 561, 570, 579, 588, 597, 606, 615, 625, 635,
+ 645, 654, 664, 674, 684, 694, 703, 713, 722, 731,
+ 740, 749, 758, 768, 778, 787, 796, 805, 814, 823,
+ 832, 841, 850, 859, 868, 877, 886, 895, 904, 913,
+ 922, 931, 940, 949, 958, 967, 976, 985, 994, 1003,
+
+ 1012, 1021, 1030, 1039, 1049, 1059, 1069, 1079, 1089, 1099,
+ 1109, 1119, 1129, 1138, 1147, 1156, 1165, 1174, 1184, 1194,
+ 1206, 1217, 1230, 1328, 1333, 1338, 1343, 1344, 1345, 1346,
+ 1347, 1348, 1350, 1368, 1381, 1386, 1390, 1392, 1394, 1396
} ;
/* The intent behind this definition is that it'll catch
#include <boost/lexical_cast.hpp>
#include <exceptions/exceptions.h>
-// Work around an incompatibility in flex (at least versions
-// 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
+/* Please avoid C++ style comments (// ... eol) as they break flex 2.6.2 */
+
+/* Work around an incompatibility in flex (at least versions
+ 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 yywrap
+# define yywrap() 1
namespace {
};
-// To avoid the call to exit... oops!
+/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::dhcp::Parser4Context::fatal(msg)
+#line 1406 "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. */
/* 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
-// currently matched token.
-#define YY_USER_ACTION driver.loc_.columns(parser4_leng);
-#line 1374 "dhcp4_lexer.cc"
+#line 88 "dhcp4_lexer.ll"
+/* This code run each time a pattern is matched. It updates the location
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
+ currently matched token. */
+#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1432 "dhcp4_lexer.cc"
+#line 1433 "dhcp4_lexer.cc"
#define INITIAL 0
#define COMMENT 1
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* 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 */
#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
/* %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 */
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; \
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) \
{ \
/* %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 */
YY_USER_ACTION
/* %not-for-header */
-
/** The main scanner function which does all the work.
*/
YY_DECL
{
/* %% [7.0] user's declarations go here */
-#line 92 "dhcp4_lexer.ll"
+#line 94 "dhcp4_lexer.ll"
- // This part of the code is copied over to the verbatim to the top
- // of the generated parser4_lex function. Explanation:
- // http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html
+#line 98 "dhcp4_lexer.ll"
+ /* This part of the code is copied over to the verbatim to the top
+ 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) {
}
-#line 1700 "dhcp4_lexer.cc"
+#line 1755 "dhcp4_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
{
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 );
case 1:
YY_RULE_SETUP
-#line 130 "dhcp4_lexer.ll"
+#line 133 "dhcp4_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 132 "dhcp4_lexer.ll"
+#line 135 "dhcp4_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 134 "dhcp4_lexer.ll"
+#line 137 "dhcp4_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 139 "dhcp4_lexer.ll"
+#line 142 "dhcp4_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 140 "dhcp4_lexer.ll"
+#line 143 "dhcp4_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 141 "dhcp4_lexer.ll"
+#line 144 "dhcp4_lexer.ll"
{
isc_throw(Dhcp4ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 145 "dhcp4_lexer.ll"
+#line 148 "dhcp4_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 146 "dhcp4_lexer.ll"
+#line 149 "dhcp4_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 147 "dhcp4_lexer.ll"
+#line 150 "dhcp4_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
- std::string tmp(parser4_text+1);
+ /* Extract the filename. */
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
driver.includeFile(tmp);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 156 "dhcp4_lexer.ll"
+#line 159 "dhcp4_lexer.ll"
{
isc_throw(Dhcp4ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 159 "dhcp4_lexer.ll"
+#line 162 "dhcp4_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 162 "dhcp4_lexer.ll"
+#line 165 "dhcp4_lexer.ll"
{
- // Ok, we found a with space. Let's ignore it and update loc variable.
+ /* Ok, we found a with space. Let's ignore it and update loc variable. */
driver.loc_.step();
}
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 167 "dhcp4_lexer.ll"
+#line 170 "dhcp4_lexer.ll"
{
- // Newline found. Let's update the location and continue.
- driver.loc_.lines(parser4_leng);
+ /* Newline found. Let's update the location and continue. */
+ driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 174 "dhcp4_lexer.ll"
+#line 177 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 183 "dhcp4_lexer.ll"
+#line 186 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 192 "dhcp4_lexer.ll"
+#line 195 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 201 "dhcp4_lexer.ll"
+#line 204 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 210 "dhcp4_lexer.ll"
+#line 213 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 220 "dhcp4_lexer.ll"
+#line 223 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 229 "dhcp4_lexer.ll"
+#line 232 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 238 "dhcp4_lexer.ll"
+#line 241 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 247 "dhcp4_lexer.ll"
+#line 250 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 256 "dhcp4_lexer.ll"
+#line 259 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 267 "dhcp4_lexer.ll"
+#line 270 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 276 "dhcp4_lexer.ll"
+#line 279 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 285 "dhcp4_lexer.ll"
+#line 288 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 294 "dhcp4_lexer.ll"
+#line 297 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 303 "dhcp4_lexer.ll"
+#line 306 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 313 "dhcp4_lexer.ll"
+#line 316 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 323 "dhcp4_lexer.ll"
+#line 326 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 333 "dhcp4_lexer.ll"
+#line 336 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 343 "dhcp4_lexer.ll"
+#line 346 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 353 "dhcp4_lexer.ll"
+#line 356 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 363 "dhcp4_lexer.ll"
+#line 366 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 373 "dhcp4_lexer.ll"
+#line 376 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 383 "dhcp4_lexer.ll"
+#line 386 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 393 "dhcp4_lexer.ll"
+#line 396 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 402 "dhcp4_lexer.ll"
+#line 405 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 411 "dhcp4_lexer.ll"
+#line 414 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 420 "dhcp4_lexer.ll"
+#line 423 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 434 "dhcp4_lexer.ll"
+#line 437 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 449 "dhcp4_lexer.ll"
+#line 452 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DATA:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 458 "dhcp4_lexer.ll"
+#line 461 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 467 "dhcp4_lexer.ll"
+#line 470 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::POOLS:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 476 "dhcp4_lexer.ll"
+#line 479 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::POOLS:
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 485 "dhcp4_lexer.ll"
+#line 488 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 494 "dhcp4_lexer.ll"
+#line 497 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 503 "dhcp4_lexer.ll"
+#line 506 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 512 "dhcp4_lexer.ll"
+#line 515 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 521 "dhcp4_lexer.ll"
+#line 524 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 530 "dhcp4_lexer.ll"
+#line 533 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 539 "dhcp4_lexer.ll"
+#line 542 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 549 "dhcp4_lexer.ll"
+#line 552 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 558 "dhcp4_lexer.ll"
+#line 561 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 567 "dhcp4_lexer.ll"
+#line 570 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGING:
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 576 "dhcp4_lexer.ll"
+#line 579 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 585 "dhcp4_lexer.ll"
+#line 588 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 594 "dhcp4_lexer.ll"
+#line 597 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 603 "dhcp4_lexer.ll"
+#line 606 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 612 "dhcp4_lexer.ll"
+#line 615 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 622 "dhcp4_lexer.ll"
+#line 625 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 632 "dhcp4_lexer.ll"
+#line 635 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CLIENT_CLASSES:
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 642 "dhcp4_lexer.ll"
+#line 645 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 651 "dhcp4_lexer.ll"
+#line 654 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 661 "dhcp4_lexer.ll"
+#line 664 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 671 "dhcp4_lexer.ll"
+#line 674 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 681 "dhcp4_lexer.ll"
+#line 684 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 691 "dhcp4_lexer.ll"
+#line 694 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RESERVATIONS:
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 700 "dhcp4_lexer.ll"
+#line 703 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 710 "dhcp4_lexer.ll"
+#line 713 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DATA:
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 719 "dhcp4_lexer.ll"
+#line 722 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 728 "dhcp4_lexer.ll"
+#line 731 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 737 "dhcp4_lexer.ll"
+#line 740 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 746 "dhcp4_lexer.ll"
+#line 749 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 755 "dhcp4_lexer.ll"
+#line 758 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RELAY:
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 765 "dhcp4_lexer.ll"
+#line 768 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 775 "dhcp4_lexer.ll"
+#line 778 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 784 "dhcp4_lexer.ll"
+#line 787 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 793 "dhcp4_lexer.ll"
+#line 796 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 802 "dhcp4_lexer.ll"
+#line 805 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 811 "dhcp4_lexer.ll"
+#line 814 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 820 "dhcp4_lexer.ll"
+#line 823 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 829 "dhcp4_lexer.ll"
+#line 832 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 838 "dhcp4_lexer.ll"
+#line 841 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 847 "dhcp4_lexer.ll"
+#line 850 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 856 "dhcp4_lexer.ll"
+#line 859 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 865 "dhcp4_lexer.ll"
+#line 868 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 874 "dhcp4_lexer.ll"
+#line 877 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONTROL_SOCKET:
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 883 "dhcp4_lexer.ll"
+#line 886 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONTROL_SOCKET:
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 892 "dhcp4_lexer.ll"
+#line 895 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 901 "dhcp4_lexer.ll"
+#line 904 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 910 "dhcp4_lexer.ll"
+#line 913 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 919 "dhcp4_lexer.ll"
+#line 922 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 928 "dhcp4_lexer.ll"
+#line 931 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 937 "dhcp4_lexer.ll"
+#line 940 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 946 "dhcp4_lexer.ll"
+#line 949 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 955 "dhcp4_lexer.ll"
+#line 958 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 964 "dhcp4_lexer.ll"
+#line 967 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 973 "dhcp4_lexer.ll"
+#line 976 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 982 "dhcp4_lexer.ll"
+#line 985 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 991 "dhcp4_lexer.ll"
+#line 994 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 1000 "dhcp4_lexer.ll"
+#line 1003 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 1009 "dhcp4_lexer.ll"
+#line 1012 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 1018 "dhcp4_lexer.ll"
+#line 1021 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 1027 "dhcp4_lexer.ll"
+#line 1030 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 1036 "dhcp4_lexer.ll"
+#line 1039 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 1046 "dhcp4_lexer.ll"
+#line 1049 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp4Parser::make_TCP(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 1056 "dhcp4_lexer.ll"
+#line 1059 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_FORMAT) {
return isc::dhcp::Dhcp4Parser::make_JSON(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 1066 "dhcp4_lexer.ll"
+#line 1069 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_WHEN_PRESENT(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 1076 "dhcp4_lexer.ll"
+#line 1079 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_WHEN_PRESENT(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 1086 "dhcp4_lexer.ll"
+#line 1089 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_NEVER(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 1096 "dhcp4_lexer.ll"
+#line 1099 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_NEVER(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 1106 "dhcp4_lexer.ll"
+#line 1109 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_ALWAYS(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 1116 "dhcp4_lexer.ll"
+#line 1119 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp4Parser::make_WHEN_NOT_PRESENT(driver.loc_);
}
- std::string tmp(parser4_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp4Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 1126 "dhcp4_lexer.ll"
+#line 1129 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 1135 "dhcp4_lexer.ll"
+#line 1138 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 1144 "dhcp4_lexer.ll"
+#line 1147 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 1153 "dhcp4_lexer.ll"
+#line 1156 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 1162 "dhcp4_lexer.ll"
+#line 1165 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 1171 "dhcp4_lexer.ll"
+#line 1174 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 1181 "dhcp4_lexer.ll"
+#line 1184 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 1191 "dhcp4_lexer.ll"
+#line 1194 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 1203 "dhcp4_lexer.ll"
+#line 1206 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 1214 "dhcp4_lexer.ll"
+#line 1217 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 1227 "dhcp4_lexer.ll"
+#line 1230 "dhcp4_lexer.ll"
{
- // A string has been matched. It contains the actual string and single quotes.
- // We need to get those quotes out of the way and just use its content, e.g.
- // for 'foo' we should get foo
- std::string raw(parser4_text+1);
+ /* A string has been matched. It contains the actual string and single quotes.
+ We need to get those quotes out of the way and just use its content, e.g.
+ for 'foo' we should get foo */
+ std::string raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
std::string decoded;
char c = raw[pos];
switch (c) {
case '"':
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Bad quote in \"" + raw + "\"");
case '\\':
++pos;
if (pos >= len) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Overflow escape in \"" + raw + "\"");
}
c = raw[pos];
decoded.push_back('\t');
break;
case 'u':
- // support only \u0000 to \u00ff
+ /* support only \u0000 to \u00ff */
++pos;
if (pos + 4 > len) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_,
"Overflow unicode escape in \"" + raw + "\"");
}
} else if ((c >= 'a') && (c <= 'f')) {
b = (c - 'a' + 10) << 4;
} else {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
}
pos++;
} else if ((c >= 'a') && (c <= 'f')) {
b |= c - 'a' + 10;
} else {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
}
decoded.push_back(static_cast<char>(b & 0xff));
break;
default:
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Bad escape in \"" + raw + "\"");
}
break;
default:
if ((c >= 0) && (c < 0x20)) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
}
decoded.push_back(c);
case 124:
/* rule 124 can match eol */
YY_RULE_SETUP
-#line 1325 "dhcp4_lexer.ll"
+#line 1328 "dhcp4_lexer.ll"
{
- // Bad string with a forbidden control character inside
- driver.error(driver.loc_, "Invalid control in " + std::string(parser4_text));
+ /* Bad string with a forbidden control character inside */
+ driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
-#line 1330 "dhcp4_lexer.ll"
+#line 1333 "dhcp4_lexer.ll"
{
- // Bad string with a bad escape inside
- driver.error(driver.loc_, "Bad escape in " + std::string(parser4_text));
+ /* Bad string with a bad escape inside */
+ driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 1335 "dhcp4_lexer.ll"
+#line 1338 "dhcp4_lexer.ll"
{
- // Bad string with an open escape at the end
- driver.error(driver.loc_, "Overflow escape in " + std::string(parser4_text));
+ /* Bad string with an open escape at the end */
+ driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 1340 "dhcp4_lexer.ll"
+#line 1343 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 1341 "dhcp4_lexer.ll"
+#line 1344 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 1342 "dhcp4_lexer.ll"
+#line 1345 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 1343 "dhcp4_lexer.ll"
+#line 1346 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 1344 "dhcp4_lexer.ll"
+#line 1347 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_COMMA(driver.loc_); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 1345 "dhcp4_lexer.ll"
+#line 1348 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_COLON(driver.loc_); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 1347 "dhcp4_lexer.ll"
+#line 1350 "dhcp4_lexer.ll"
{
- // An integer was found.
- std::string tmp(parser4_text);
+ /* An integer was found. */
+ std::string tmp(yytext);
int64_t integer = 0;
try {
- // In substring we want to use negative values (e.g. -1).
- // In enterprise-id we need to use values up to 0xffffffff.
- // To cover both of those use cases, we need at least
- // int64_t.
+ /* In substring we want to use negative values (e.g. -1).
+ In enterprise-id we need to use values up to 0xffffffff.
+ To cover both of those use cases, we need at least
+ int64_t. */
integer = boost::lexical_cast<int64_t>(tmp);
} catch (const boost::bad_lexical_cast &) {
driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
}
- // The parser needs the string form as double conversion is no lossless
+ /* The parser needs the string form as double conversion is no lossless */
return isc::dhcp::Dhcp4Parser::make_INTEGER(integer, driver.loc_);
}
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 1365 "dhcp4_lexer.ll"
+#line 1368 "dhcp4_lexer.ll"
{
- // A floating point was found.
- std::string tmp(parser4_text);
+ /* A floating point was found. */
+ std::string tmp(yytext);
double fp = 0.0;
try {
fp = boost::lexical_cast<double>(tmp);
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 1378 "dhcp4_lexer.ll"
+#line 1381 "dhcp4_lexer.ll"
{
- string tmp(parser4_text);
+ string tmp(yytext);
return isc::dhcp::Dhcp4Parser::make_BOOLEAN(tmp == "true", driver.loc_);
}
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 1383 "dhcp4_lexer.ll"
+#line 1386 "dhcp4_lexer.ll"
{
return isc::dhcp::Dhcp4Parser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 1387 "dhcp4_lexer.ll"
+#line 1390 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 1389 "dhcp4_lexer.ll"
+#line 1392 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 1391 "dhcp4_lexer.ll"
+#line 1394 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 1393 "dhcp4_lexer.ll"
-driver.error (driver.loc_, "Invalid character: " + std::string(parser4_text));
+#line 1396 "dhcp4_lexer.ll"
+driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 1395 "dhcp4_lexer.ll"
+#line 1398 "dhcp4_lexer.ll"
{
if (driver.states_.empty()) {
return isc::dhcp::Dhcp4Parser::make_END(driver.loc_);
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 1418 "dhcp4_lexer.ll"
+#line 1421 "dhcp4_lexer.ll"
ECHO;
YY_BREAK
-#line 3506 "dhcp4_lexer.cc"
+#line 3561 "dhcp4_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
- yy_size_t number_to_move, i;
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- parser4_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ parser4_realloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser4_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser4_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
{
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];
}
return yy_current_state;
{
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_is_jam = (yy_current_state == 1160);
return yy_is_jam ? 0 : yy_current_state;
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in parser4__create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = 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.
*/
- b->yy_ch_buf = (char *) parser4_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) parser4_alloc((yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in parser4__create_buffer()" );
/* %if-c++-only */
/* %endif */
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in parser4_ensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE parser4__scan_buffer (char * base, yy_size_t size )
{
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in parser4__scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (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 = NULL;
* @note If you want to scan bytes that may contain NUL values, then use
* parser4__scan_bytes() instead.
*/
-YY_BUFFER_STATE parser4__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE parser4__scan_string (const char * yystr )
{
return parser4__scan_bytes(yystr,(int) strlen(yystr) );
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE parser4__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE parser4__scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) _yybytes_len + 2;
+ n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) parser4_alloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in parser4__scan_bytes()" );
#endif
/* %if-c-only */
-static void yynoreturn yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
*/
int parser4_get_lineno (void)
{
-
+
return parser4_lineno;
}
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
int i;
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
/* %ok-for-header */
-#line 1418 "dhcp4_lexer.ll"
-
+#line 1421 "dhcp4_lexer.ll"
using namespace isc::dhcp;
file_ = "<string>";
sfile_ = 0;
loc_.initialize(&file_);
- parser4__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- buffer = parser4__scan_bytes(str.c_str(),str.size());
+ buffer = parser4__scan_bytes(str.c_str(), str.size());
if (!buffer) {
fatal("cannot scan string");
- // fatal() throws an exception so this can't be reached
+ /* fatal() throws an exception so this can't be reached */
}
}
file_ = filename;
sfile_ = f;
loc_.initialize(&file_);
- parser4__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- // See dhcp4_lexer.cc header for available definitions
+ /* See dhcp4_lexer.cc header for available definitions */
buffer = parser4__create_buffer(f, 65536 /*buffer size*/);
if (!buffer) {
fatal("cannot scan file " + filename);
fclose(sfile_);
sfile_ = 0;
static_cast<void>(parser4_lex_destroy());
- // Close files
+ /* Close files */
while (!sfiles_.empty()) {
FILE* f = sfiles_.back();
if (f) {
}
sfiles_.pop_back();
}
- // Delete states
+ /* Delete states */
while (!states_.empty()) {
parser4__delete_buffer(states_.back());
states_.pop_back();
}
namespace {
-/// To avoid unused function error
+/** To avoid unused function error */
class Dummy {
- // cppcheck-suppress unusedPrivateFunction
+ /* cppcheck-suppress unusedPrivateFunction */
void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
};
}
-#line 2 "dhcp6_lexer.cc"
+#line 1 "dhcp6_lexer.cc"
-#line 4 "dhcp6_lexer.cc"
+#line 3 "dhcp6_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 parser6__create_buffer
#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
/* %endif */
/* %if-c-only */
-
+ #define yy_create_buffer parser6__create_buffer
+
+ #define yy_delete_buffer parser6__delete_buffer
+
+ #define yy_scan_buffer parser6__scan_buffer
+
+ #define yy_scan_string parser6__scan_string
+
+ #define yy_scan_bytes parser6__scan_bytes
+
+ #define yy_init_buffer parser6__init_buffer
+
+ #define yy_flush_buffer parser6__flush_buffer
+
+ #define yy_load_buffer_state parser6__load_buffer_state
+
+ #define yy_switch_to_buffer parser6__switch_to_buffer
+
+ #define yypush_buffer_state parser6_push_buffer_state
+
+ #define yypop_buffer_state parser6_pop_buffer_state
+
+ #define yyensure_buffer_stack parser6_ensure_buffer_stack
+
+ #define yylex parser6_lex
+
+ #define yyrestart parser6_restart
+
+ #define yylex_init parser6_lex_init
+
+ #define yylex_init_extra parser6_lex_init_extra
+
+ #define yylex_destroy parser6_lex_destroy
+
+ #define yyget_debug parser6_get_debug
+
+ #define yyset_debug parser6_set_debug
+
+ #define yyget_extra parser6_get_extra
+
+ #define yyset_extra parser6_set_extra
+
+ #define yyget_in parser6_get_in
+
+ #define yyset_in parser6_set_in
+
+ #define yyget_out parser6_get_out
+
+ #define yyset_out parser6_set_out
+
+ #define yyget_leng parser6_get_leng
+
+ #define yyget_text parser6_get_text
+
+ #define yyget_lineno parser6_get_lineno
+
+ #define yyset_lineno parser6_set_lineno
+
+ #define yywrap parser6_wrap
+
/* %endif */
+ #define yyalloc parser6_alloc
+
+ #define yyrealloc parser6_realloc
+
+ #define yyfree parser6_free
+
/* %if-c-only */
+ #define yytext parser6_text
+
+ #define yyleng parser6_leng
+
+ #define yyin parser6_in
+
+ #define yyout parser6_out
+
+ #define yy_flex_debug parser6__flex_debug
+
+ #define yylineno parser6_lineno
+
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
#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 */
* 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 parser6_restart(parser6_in )
-
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#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)
YY_DO_BEFORE_ACTION; /* set up parser6_text again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_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.
*/
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
#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.
*/
/* %if-not-reentrant */
/* %not-for-header */
-
/* yy_hold_char holds the character lost when parser6_text is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
/* %endif */
-void parser6_restart (FILE *input_file );
-void parser6__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE parser6__create_buffer (FILE *file,int size );
-void parser6__delete_buffer (YY_BUFFER_STATE b );
-void parser6__flush_buffer (YY_BUFFER_STATE b );
-void parser6_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void parser6_pop_buffer_state (void );
-
-static void parser6_ensure_buffer_stack (void );
-static void parser6__load_buffer_state (void );
-static void parser6__init_buffer (YY_BUFFER_STATE b,FILE *file );
-
+void parser6_restart ( FILE *input_file );
+void parser6__switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE parser6__create_buffer ( FILE *file, int size );
+void parser6__delete_buffer ( YY_BUFFER_STATE b );
+void parser6__flush_buffer ( YY_BUFFER_STATE b );
+void parser6_push_buffer_state ( YY_BUFFER_STATE new_buffer );
+void parser6_pop_buffer_state ( void );
+
+static void parser6_ensure_buffer_stack ( void );
+static void parser6__load_buffer_state ( void );
+static void parser6__init_buffer ( YY_BUFFER_STATE b, FILE *file );
#define YY_FLUSH_BUFFER parser6__flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE parser6__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE parser6__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE parser6__scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE parser6__scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE parser6__scan_string ( const char *yy_str );
+YY_BUFFER_STATE parser6__scan_bytes ( const char *bytes, int len );
/* %endif */
-void *parser6_alloc (yy_size_t );
-void *parser6_realloc (void *,yy_size_t );
-void parser6_free (void * );
+void *parser6_alloc ( yy_size_t );
+void *parser6_realloc ( void *, yy_size_t );
+void parser6_free ( void * );
#define yy_new_buffer parser6__create_buffer
-
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* %% [1.0] parser6_text/parser6_in/parser6_out/yy_state_type/parser6_lineno etc. def's & init go here */
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
FILE *parser6_in = NULL, *parser6_out = NULL;
typedef int yy_state_type;
extern int parser6_lineno;
-
int parser6_lineno = 1;
extern char *parser6_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 */
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to parser6_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 147
#define YY_END_OF_BUFFER 148
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[1181] =
+static const flex_int16_t yy_accept[1181] =
{ 0,
140, 140, 0, 0, 0, 0, 0, 0, 0, 0,
148, 146, 10, 11, 146, 1, 140, 137, 140, 140,
0, 0, 0, 0, 0, 81, 0, 0, 117, 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,
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,
3
} ;
-static yyconst flex_uint16_t yy_base[1193] =
+static const flex_int16_t yy_base[1193] =
{ 0,
0, 70, 19, 29, 41, 49, 52, 58, 87, 95,
1544, 1545, 32, 1540, 141, 0, 201, 1545, 206, 88,
} ;
-static yyconst flex_int16_t yy_def[1193] =
+static const flex_int16_t yy_def[1193] =
{ 0,
1181, 1181, 1182, 1182, 1181, 1181, 1181, 1181, 1181, 1181,
1180, 1180, 1180, 1180, 1180, 1183, 1180, 1180, 1180, 1180,
} ;
-static yyconst flex_uint16_t yy_nxt[1617] =
+static const flex_int16_t yy_nxt[1617] =
{ 0,
1180, 13, 14, 13, 1180, 15, 16, 1180, 17, 18,
19, 20, 21, 22, 22, 22, 23, 24, 83, 1180,
1180, 1180, 1180, 1180, 1180, 1180
} ;
-static yyconst flex_int16_t yy_chk[1617] =
+static const flex_int16_t yy_chk[1617] =
{ 0,
0, 1, 1, 1, 0, 1, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 21, 0,
extern int parser6__flex_debug;
int parser6__flex_debug = 1;
-static yyconst flex_int16_t yy_rule_linenum[147] =
+static const flex_int16_t yy_rule_linenum[147] =
{ 0,
- 132, 134, 136, 141, 142, 147, 148, 149, 161, 164,
- 169, 176, 185, 194, 203, 212, 221, 230, 239, 248,
- 257, 266, 275, 284, 293, 302, 311, 321, 331, 341,
- 351, 361, 371, 381, 391, 401, 410, 419, 428, 437,
- 446, 455, 467, 476, 485, 494, 503, 513, 523, 533,
- 544, 554, 564, 574, 584, 594, 604, 613, 622, 631,
- 646, 661, 670, 679, 688, 697, 706, 715, 724, 733,
- 742, 752, 761, 770, 779, 788, 797, 806, 816, 825,
- 834, 843, 852, 861, 870, 879, 888, 897, 907, 917,
- 927, 936, 945, 954, 965, 975, 984, 994, 1003, 1012,
-
- 1021, 1030, 1039, 1048, 1058, 1067, 1076, 1085, 1094, 1103,
- 1112, 1121, 1130, 1139, 1148, 1157, 1166, 1175, 1184, 1193,
- 1202, 1211, 1220, 1229, 1238, 1247, 1256, 1265, 1274, 1372,
- 1377, 1382, 1387, 1388, 1389, 1390, 1391, 1392, 1394, 1412,
- 1425, 1430, 1434, 1436, 1438, 1440
+ 135, 137, 139, 144, 145, 150, 151, 152, 164, 167,
+ 172, 179, 188, 197, 206, 215, 224, 233, 242, 251,
+ 260, 269, 278, 287, 296, 305, 314, 324, 334, 344,
+ 354, 364, 374, 384, 394, 404, 413, 422, 431, 440,
+ 449, 458, 470, 479, 488, 497, 506, 516, 526, 536,
+ 547, 557, 567, 577, 587, 597, 607, 616, 625, 634,
+ 649, 664, 673, 682, 691, 700, 709, 718, 727, 736,
+ 745, 755, 764, 773, 782, 791, 800, 809, 819, 828,
+ 837, 846, 855, 864, 873, 882, 891, 900, 910, 920,
+ 930, 939, 948, 957, 968, 978, 987, 997, 1006, 1015,
+
+ 1024, 1033, 1042, 1051, 1061, 1070, 1079, 1088, 1097, 1106,
+ 1115, 1124, 1133, 1142, 1151, 1160, 1169, 1178, 1187, 1196,
+ 1205, 1214, 1223, 1232, 1241, 1250, 1259, 1268, 1277, 1375,
+ 1380, 1385, 1390, 1391, 1392, 1393, 1394, 1395, 1397, 1415,
+ 1428, 1433, 1437, 1439, 1441, 1443
} ;
/* The intent behind this definition is that it'll catch
#include <boost/lexical_cast.hpp>
#include <exceptions/exceptions.h>
-// Work around an incompatibility in flex (at least versions
-// 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 parser6_wrap
-# define parser6_wrap() 1
+/* Please avoid C++ style comments (// ... eol) as they break flex 2.6.2 */
+
+/* Work around an incompatibility in flex (at least versions
+ 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 yywrap
+# define yywrap() 1
namespace {
};
-// To avoid the call to exit... oops!
+/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::dhcp::Parser6Context::fatal(msg)
+#line 1419 "dhcp6_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 parser6_wrap requires linking with -lfl, which provides the default parser6_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. */
/* 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
- parser6__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 "dhcp6_lexer.ll"
-// This code run each time a pattern is matched. It updates the location
-// by moving it ahead by parser6_leng bytes. parser6_leng specifies the length of the
-// currently matched token.
-#define YY_USER_ACTION driver.loc_.columns(parser6_leng);
-#line 1387 "dhcp6_lexer.cc"
+#line 88 "dhcp6_lexer.ll"
+/* This code run each time a pattern is matched. It updates the location
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
+ currently matched token. */
+#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1445 "dhcp6_lexer.cc"
+#line 1446 "dhcp6_lexer.cc"
#define INITIAL 0
#define COMMENT 1
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int parser6_lex_destroy (void );
+int parser6_lex_destroy ( void );
-int parser6_get_debug (void );
+int parser6_get_debug ( void );
-void parser6_set_debug (int debug_flag );
+void parser6_set_debug ( int debug_flag );
-YY_EXTRA_TYPE parser6_get_extra (void );
+YY_EXTRA_TYPE parser6_get_extra ( void );
-void parser6_set_extra (YY_EXTRA_TYPE user_defined );
+void parser6_set_extra ( YY_EXTRA_TYPE user_defined );
-FILE *parser6_get_in (void );
+FILE *parser6_get_in ( void );
-void parser6_set_in (FILE * _in_str );
+void parser6_set_in ( FILE * _in_str );
-FILE *parser6_get_out (void );
+FILE *parser6_get_out ( void );
-void parser6_set_out (FILE * _out_str );
+void parser6_set_out ( FILE * _out_str );
- int parser6_get_leng (void );
+ int parser6_get_leng ( void );
-char *parser6_get_text (void );
+char *parser6_get_text ( void );
-int parser6_get_lineno (void );
+int parser6_get_lineno ( void );
-void parser6_set_lineno (int _line_number );
+void parser6_set_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int parser6_wrap (void );
+extern "C" int parser6_wrap ( void );
#else
-extern int parser6_wrap (void );
+extern int parser6_wrap ( void );
#endif
#endif
/* %not-for-header */
-
#ifndef YY_NO_UNPUT
#endif
/* %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 */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( parser6_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
else \
{ \
errno=0; \
- while ( (result = (int) fread(buf, 1, max_size, parser6_in))==0 && ferror(parser6_in)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, parser6_in)) == 0 && ferror(parser6_in)) \
{ \
if( errno != EINTR) \
{ \
/* %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 */
YY_USER_ACTION
/* %not-for-header */
-
/** The main scanner function which does all the work.
*/
YY_DECL
{
/* %% [7.0] user's declarations go here */
-#line 92 "dhcp6_lexer.ll"
+#line 94 "dhcp6_lexer.ll"
- // This part of the code is copied over to the verbatim to the top
- // of the generated parser6_lex function. Explanation:
- // http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html
+#line 98 "dhcp6_lexer.ll"
+ /* This part of the code is copied over to the verbatim to the top
+ of the generated yylex function. Explanation:
+ http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
- // Code run each time parser6_lex is called.
+ /* Code run each time yylex is called. */
driver.loc_.step();
if (start_token_flag) {
}
-#line 1715 "dhcp6_lexer.cc"
+#line 1770 "dhcp6_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1181 )
- 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 != 1180 );
case 1:
YY_RULE_SETUP
-#line 132 "dhcp6_lexer.ll"
+#line 135 "dhcp6_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 134 "dhcp6_lexer.ll"
+#line 137 "dhcp6_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 136 "dhcp6_lexer.ll"
+#line 139 "dhcp6_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 141 "dhcp6_lexer.ll"
+#line 144 "dhcp6_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 142 "dhcp6_lexer.ll"
+#line 145 "dhcp6_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 143 "dhcp6_lexer.ll"
+#line 146 "dhcp6_lexer.ll"
{
isc_throw(Dhcp6ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 147 "dhcp6_lexer.ll"
+#line 150 "dhcp6_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 148 "dhcp6_lexer.ll"
+#line 151 "dhcp6_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 149 "dhcp6_lexer.ll"
+#line 152 "dhcp6_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
- std::string tmp(parser6_text+1);
+ /* Extract the filename. */
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
driver.includeFile(tmp);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 158 "dhcp6_lexer.ll"
+#line 161 "dhcp6_lexer.ll"
{
isc_throw(Dhcp6ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 161 "dhcp6_lexer.ll"
+#line 164 "dhcp6_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 164 "dhcp6_lexer.ll"
+#line 167 "dhcp6_lexer.ll"
{
- // Ok, we found a with space. Let's ignore it and update loc variable.
+ /* Ok, we found a with space. Let's ignore it and update loc variable. */
driver.loc_.step();
}
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 169 "dhcp6_lexer.ll"
+#line 172 "dhcp6_lexer.ll"
{
- // Newline found. Let's update the location and continue.
- driver.loc_.lines(parser6_leng);
+ /* Newline found. Let's update the location and continue. */
+ driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 176 "dhcp6_lexer.ll"
+#line 179 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 185 "dhcp6_lexer.ll"
+#line 188 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 194 "dhcp6_lexer.ll"
+#line 197 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 203 "dhcp6_lexer.ll"
+#line 206 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 212 "dhcp6_lexer.ll"
+#line 215 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 221 "dhcp6_lexer.ll"
+#line 224 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 230 "dhcp6_lexer.ll"
+#line 233 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 239 "dhcp6_lexer.ll"
+#line 242 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 248 "dhcp6_lexer.ll"
+#line 251 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 257 "dhcp6_lexer.ll"
+#line 260 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 266 "dhcp6_lexer.ll"
+#line 269 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 275 "dhcp6_lexer.ll"
+#line 278 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 284 "dhcp6_lexer.ll"
+#line 287 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 293 "dhcp6_lexer.ll"
+#line 296 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 302 "dhcp6_lexer.ll"
+#line 305 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 311 "dhcp6_lexer.ll"
+#line 314 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp6Parser::make_UDP(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 321 "dhcp6_lexer.ll"
+#line 324 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp6Parser::make_TCP(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 331 "dhcp6_lexer.ll"
+#line 334 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_FORMAT) {
return isc::dhcp::Dhcp6Parser::make_JSON(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 341 "dhcp6_lexer.ll"
+#line 344 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_WHEN_PRESENT(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 351 "dhcp6_lexer.ll"
+#line 354 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_WHEN_PRESENT(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 361 "dhcp6_lexer.ll"
+#line 364 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_NEVER(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 371 "dhcp6_lexer.ll"
+#line 374 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_NEVER(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 381 "dhcp6_lexer.ll"
+#line 384 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_ALWAYS(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 391 "dhcp6_lexer.ll"
+#line 394 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
return isc::dhcp::Dhcp6Parser::make_WHEN_NOT_PRESENT(driver.loc_);
}
- std::string tmp(parser6_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 401 "dhcp6_lexer.ll"
+#line 404 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 410 "dhcp6_lexer.ll"
+#line 413 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 419 "dhcp6_lexer.ll"
+#line 422 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::INTERFACES_CONFIG:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 428 "dhcp6_lexer.ll"
+#line 431 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 437 "dhcp6_lexer.ll"
+#line 440 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 446 "dhcp6_lexer.ll"
+#line 449 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 455 "dhcp6_lexer.ll"
+#line 458 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 467 "dhcp6_lexer.ll"
+#line 470 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 476 "dhcp6_lexer.ll"
+#line 479 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 485 "dhcp6_lexer.ll"
+#line 488 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 494 "dhcp6_lexer.ll"
+#line 497 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 503 "dhcp6_lexer.ll"
+#line 506 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 513 "dhcp6_lexer.ll"
+#line 516 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 523 "dhcp6_lexer.ll"
+#line 526 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 533 "dhcp6_lexer.ll"
+#line 536 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 544 "dhcp6_lexer.ll"
+#line 547 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 554 "dhcp6_lexer.ll"
+#line 557 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 564 "dhcp6_lexer.ll"
+#line 567 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 574 "dhcp6_lexer.ll"
+#line 577 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 584 "dhcp6_lexer.ll"
+#line 587 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 594 "dhcp6_lexer.ll"
+#line 597 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 604 "dhcp6_lexer.ll"
+#line 607 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 613 "dhcp6_lexer.ll"
+#line 616 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 622 "dhcp6_lexer.ll"
+#line 625 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 631 "dhcp6_lexer.ll"
+#line 634 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 646 "dhcp6_lexer.ll"
+#line 649 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 661 "dhcp6_lexer.ll"
+#line 664 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DATA:
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 670 "dhcp6_lexer.ll"
+#line 673 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 679 "dhcp6_lexer.ll"
+#line 682 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 688 "dhcp6_lexer.ll"
+#line 691 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 697 "dhcp6_lexer.ll"
+#line 700 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 706 "dhcp6_lexer.ll"
+#line 709 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 715 "dhcp6_lexer.ll"
+#line 718 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 724 "dhcp6_lexer.ll"
+#line 727 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 733 "dhcp6_lexer.ll"
+#line 736 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::POOLS:
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 742 "dhcp6_lexer.ll"
+#line 745 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::POOLS:
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 752 "dhcp6_lexer.ll"
+#line 755 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 761 "dhcp6_lexer.ll"
+#line 764 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 770 "dhcp6_lexer.ll"
+#line 773 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 779 "dhcp6_lexer.ll"
+#line 782 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 788 "dhcp6_lexer.ll"
+#line 791 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 797 "dhcp6_lexer.ll"
+#line 800 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 806 "dhcp6_lexer.ll"
+#line 809 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 816 "dhcp6_lexer.ll"
+#line 819 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 825 "dhcp6_lexer.ll"
+#line 828 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 834 "dhcp6_lexer.ll"
+#line 837 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 843 "dhcp6_lexer.ll"
+#line 846 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 852 "dhcp6_lexer.ll"
+#line 855 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGING:
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 861 "dhcp6_lexer.ll"
+#line 864 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 870 "dhcp6_lexer.ll"
+#line 873 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 879 "dhcp6_lexer.ll"
+#line 882 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 888 "dhcp6_lexer.ll"
+#line 891 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 897 "dhcp6_lexer.ll"
+#line 900 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 907 "dhcp6_lexer.ll"
+#line 910 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 917 "dhcp6_lexer.ll"
+#line 920 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CLIENT_CLASSES:
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 927 "dhcp6_lexer.ll"
+#line 930 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 936 "dhcp6_lexer.ll"
+#line 939 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 945 "dhcp6_lexer.ll"
+#line 948 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 954 "dhcp6_lexer.ll"
+#line 957 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::MAC_SOURCES:
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 965 "dhcp6_lexer.ll"
+#line 968 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 975 "dhcp6_lexer.ll"
+#line 978 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 984 "dhcp6_lexer.ll"
+#line 987 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 994 "dhcp6_lexer.ll"
+#line 997 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DATA:
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 1003 "dhcp6_lexer.ll"
+#line 1006 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 1012 "dhcp6_lexer.ll"
+#line 1015 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 1021 "dhcp6_lexer.ll"
+#line 1024 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 1030 "dhcp6_lexer.ll"
+#line 1033 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 1039 "dhcp6_lexer.ll"
+#line 1042 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RELAY:
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 1048 "dhcp6_lexer.ll"
+#line 1051 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 1058 "dhcp6_lexer.ll"
+#line 1061 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 1067 "dhcp6_lexer.ll"
+#line 1070 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 1076 "dhcp6_lexer.ll"
+#line 1079 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 1085 "dhcp6_lexer.ll"
+#line 1088 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 1094 "dhcp6_lexer.ll"
+#line 1097 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 1103 "dhcp6_lexer.ll"
+#line 1106 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 1112 "dhcp6_lexer.ll"
+#line 1115 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 1121 "dhcp6_lexer.ll"
+#line 1124 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 1130 "dhcp6_lexer.ll"
+#line 1133 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 1139 "dhcp6_lexer.ll"
+#line 1142 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 1148 "dhcp6_lexer.ll"
+#line 1151 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 1157 "dhcp6_lexer.ll"
+#line 1160 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 1166 "dhcp6_lexer.ll"
+#line 1169 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 1175 "dhcp6_lexer.ll"
+#line 1178 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 1184 "dhcp6_lexer.ll"
+#line 1187 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 1193 "dhcp6_lexer.ll"
+#line 1196 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 1202 "dhcp6_lexer.ll"
+#line 1205 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 1211 "dhcp6_lexer.ll"
+#line 1214 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 1220 "dhcp6_lexer.ll"
+#line 1223 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 1229 "dhcp6_lexer.ll"
+#line 1232 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONTROL_SOCKET:
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 1238 "dhcp6_lexer.ll"
+#line 1241 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONTROL_SOCKET:
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 1247 "dhcp6_lexer.ll"
+#line 1250 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 1256 "dhcp6_lexer.ll"
+#line 1259 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 1265 "dhcp6_lexer.ll"
+#line 1268 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 1274 "dhcp6_lexer.ll"
+#line 1277 "dhcp6_lexer.ll"
{
- // A string has been matched. It contains the actual string and single quotes.
- // We need to get those quotes out of the way and just use its content, e.g.
- // for 'foo' we should get foo
- std::string raw(parser6_text+1);
+ /* A string has been matched. It contains the actual string and single quotes.
+ We need to get those quotes out of the way and just use its content, e.g.
+ for 'foo' we should get foo */
+ std::string raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
std::string decoded;
char c = raw[pos];
switch (c) {
case '"':
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Bad quote in \"" + raw + "\"");
case '\\':
++pos;
if (pos >= len) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Overflow escape in \"" + raw + "\"");
}
c = raw[pos];
decoded.push_back('\t');
break;
case 'u':
- // support only \u0000 to \u00ff
+ /* support only \u0000 to \u00ff */
++pos;
if (pos + 4 > len) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_,
"Overflow unicode escape in \"" + raw + "\"");
}
} else if ((c >= 'a') && (c <= 'f')) {
b = (c - 'a' + 10) << 4;
} else {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
}
pos++;
} else if ((c >= 'a') && (c <= 'f')) {
b |= c - 'a' + 10;
} else {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Not hexadecimal in unicode escape in \"" + raw + "\"");
}
decoded.push_back(static_cast<char>(b & 0xff));
break;
default:
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Bad escape in \"" + raw + "\"");
}
break;
default:
if ((c >= 0) && (c < 0x20)) {
- // impossible condition
+ /* impossible condition */
driver.error(driver.loc_, "Invalid control in \"" + raw + "\"");
}
decoded.push_back(c);
case 130:
/* rule 130 can match eol */
YY_RULE_SETUP
-#line 1372 "dhcp6_lexer.ll"
+#line 1375 "dhcp6_lexer.ll"
{
- // Bad string with a forbidden control character inside
- driver.error(driver.loc_, "Invalid control in " + std::string(parser6_text));
+ /* Bad string with a forbidden control character inside */
+ driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 131:
/* rule 131 can match eol */
YY_RULE_SETUP
-#line 1377 "dhcp6_lexer.ll"
+#line 1380 "dhcp6_lexer.ll"
{
- // Bad string with a bad escape inside
- driver.error(driver.loc_, "Bad escape in " + std::string(parser6_text));
+ /* Bad string with a bad escape inside */
+ driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 1382 "dhcp6_lexer.ll"
+#line 1385 "dhcp6_lexer.ll"
{
- // Bad string with an open escape at the end
- driver.error(driver.loc_, "Overflow escape in " + std::string(parser6_text));
+ /* Bad string with an open escape at the end */
+ driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 1387 "dhcp6_lexer.ll"
+#line 1390 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 1388 "dhcp6_lexer.ll"
+#line 1391 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 1389 "dhcp6_lexer.ll"
+#line 1392 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 1390 "dhcp6_lexer.ll"
+#line 1393 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 1391 "dhcp6_lexer.ll"
+#line 1394 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_COMMA(driver.loc_); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 1392 "dhcp6_lexer.ll"
+#line 1395 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_COLON(driver.loc_); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 1394 "dhcp6_lexer.ll"
+#line 1397 "dhcp6_lexer.ll"
{
- // An integer was found.
- std::string tmp(parser6_text);
+ /* An integer was found. */
+ std::string tmp(yytext);
int64_t integer = 0;
try {
- // In substring we want to use negative values (e.g. -1).
- // In enterprise-id we need to use values up to 0xffffffff.
- // To cover both of those use cases, we need at least
- // int64_t.
+ /* In substring we want to use negative values (e.g. -1).
+ In enterprise-id we need to use values up to 0xffffffff.
+ To cover both of those use cases, we need at least
+ int64_t. */
integer = boost::lexical_cast<int64_t>(tmp);
} catch (const boost::bad_lexical_cast &) {
driver.error(driver.loc_, "Failed to convert " + tmp + " to an integer.");
}
- // The parser needs the string form as double conversion is no lossless
+ /* The parser needs the string form as double conversion is no lossless */
return isc::dhcp::Dhcp6Parser::make_INTEGER(integer, driver.loc_);
}
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 1412 "dhcp6_lexer.ll"
+#line 1415 "dhcp6_lexer.ll"
{
- // A floating point was found.
- std::string tmp(parser6_text);
+ /* A floating point was found. */
+ std::string tmp(yytext);
double fp = 0.0;
try {
fp = boost::lexical_cast<double>(tmp);
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 1425 "dhcp6_lexer.ll"
+#line 1428 "dhcp6_lexer.ll"
{
- string tmp(parser6_text);
+ string tmp(yytext);
return isc::dhcp::Dhcp6Parser::make_BOOLEAN(tmp == "true", driver.loc_);
}
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 1430 "dhcp6_lexer.ll"
+#line 1433 "dhcp6_lexer.ll"
{
return isc::dhcp::Dhcp6Parser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 1434 "dhcp6_lexer.ll"
+#line 1437 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 1436 "dhcp6_lexer.ll"
+#line 1439 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 1438 "dhcp6_lexer.ll"
+#line 1441 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 1440 "dhcp6_lexer.ll"
-driver.error (driver.loc_, "Invalid character: " + std::string(parser6_text));
+#line 1443 "dhcp6_lexer.ll"
+driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 1442 "dhcp6_lexer.ll"
+#line 1445 "dhcp6_lexer.ll"
{
if (driver.states_.empty()) {
return isc::dhcp::Dhcp6Parser::make_END(driver.loc_);
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 1465 "dhcp6_lexer.ll"
+#line 1468 "dhcp6_lexer.ll"
ECHO;
YY_BREAK
-#line 3586 "dhcp6_lexer.cc"
+#line 3641 "dhcp6_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
- yy_size_t number_to_move, i;
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- parser6_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ parser6_realloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser6_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser6_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1181 )
- 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];
}
return yy_current_state;
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1181 )
- 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_is_jam = (yy_current_state == 1180);
return yy_is_jam ? 0 : yy_current_state;
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in parser6__create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = 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.
*/
- b->yy_ch_buf = (char *) parser6_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) parser6_alloc((yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in parser6__create_buffer()" );
/* %if-c++-only */
/* %endif */
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in parser6_ensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE parser6__scan_buffer (char * base, yy_size_t size )
{
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in parser6__scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (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 = NULL;
* @note If you want to scan bytes that may contain NUL values, then use
* parser6__scan_bytes() instead.
*/
-YY_BUFFER_STATE parser6__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE parser6__scan_string (const char * yystr )
{
return parser6__scan_bytes(yystr,(int) strlen(yystr) );
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE parser6__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE parser6__scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) _yybytes_len + 2;
+ n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) parser6_alloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in parser6__scan_bytes()" );
#endif
/* %if-c-only */
-static void yynoreturn yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
*/
int parser6_get_lineno (void)
{
-
+
return parser6_lineno;
}
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
int i;
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
/* %ok-for-header */
-#line 1465 "dhcp6_lexer.ll"
-
+#line 1468 "dhcp6_lexer.ll"
using namespace isc::dhcp;
file_ = "<string>";
sfile_ = 0;
loc_.initialize(&file_);
- parser6__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- buffer = parser6__scan_bytes(str.c_str(),str.size());
+ buffer = parser6__scan_bytes(str.c_str(), str.size());
if (!buffer) {
fatal("cannot scan string");
- // fatal() throws an exception so this can't be reached
+ /* fatal() throws an exception so this can't be reached */
}
}
file_ = filename;
sfile_ = f;
loc_.initialize(&file_);
- parser6__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- // See dhcp6_lexer.cc header for available definitions
+ /* See dhcp6_lexer.cc header for available definitions */
buffer = parser6__create_buffer(f, 65536 /*buffer size*/);
if (!buffer) {
fatal("cannot scan file " + filename);
fclose(sfile_);
sfile_ = 0;
static_cast<void>(parser6_lex_destroy());
- // Close files
+ /* Close files */
while (!sfiles_.empty()) {
FILE* f = sfiles_.back();
if (f) {
}
sfiles_.pop_back();
}
- // Delete states
+ /* Delete states */
while (!states_.empty()) {
parser6__delete_buffer(states_.back());
states_.pop_back();
}
namespace {
-/// To avoid unused function error
+/** To avoid unused function error */
class Dummy {
- // cppcheck-suppress unusedPrivateFunction
+ /* cppcheck-suppress unusedPrivateFunction */
void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
};
}
-#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
#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
/* %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. */
#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 */
* 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. */
#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.
YY_DO_BEFORE_ACTION; /* set up evaltext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_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.
*/
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
#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.
*/
/* %if-not-reentrant */
/* %not-for-header */
-
/* yy_hold_char holds the character lost when evaltext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
/* %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,int 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 ){ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
} \
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 */
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
FILE *evalin = NULL, *evalout = NULL;
typedef int yy_state_type;
extern int evallineno;
-
int evallineno = 1;
extern char *evaltext;
/* %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 */
*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
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,
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,
} ;
-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, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR 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,
1, 1, 1, 1
} ;
-static yyconst flex_uint16_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,
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,
197, 197
} ;
-static yyconst flex_uint16_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,
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,
} ;
/* 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,
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,
- 82, 87, 93, 103, 109, 127, 134, 148, 149, 150,
- 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
- 161, 162, 163, 164, 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
+ 85, 90, 96, 106, 112, 130, 137, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 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
} ;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
#include <asiolink/io_address.h>
#include <boost/lexical_cast.hpp>
-// Work around an incompatibility in flex (at least versions
-// 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
+/* Please avoid C++ style comments (// ... eol) as they break flex 2.6.2 */
+
+/* Work around an incompatibility in flex (at least versions
+ 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 yywrap
+# define yywrap() 1
-// The location of the current token. The lexer will keep updating it. This
-// variable will be useful for logging errors.
+/* The location of the current token. The lexer will keep updating it. This
+ variable will be useful for logging errors. */
static isc::eval::location loc;
-// To avoid the call to exit... oops!
+/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::eval::EvalContext::fatal(msg)
+#line 869 "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. */
/* 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. */
-#line 69 "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
-// currently matched token.
+#line 71 "lexer.ll"
+/* This code run each time a pattern is matched. It updates the location
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
+ currently matched token. */
#define YY_USER_ACTION loc.columns(evalleng);
-#line 835 "lexer.cc"
+#line 894 "lexer.cc"
+#line 895 "lexer.cc"
#define INITIAL 0
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* 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 );
- int 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 */
#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
/* %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 */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( evalin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
else \
{ \
errno=0; \
- while ( (result = (int) fread(buf, 1, max_size, evalin))==0 && ferror(evalin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, evalin)) == 0 && ferror(evalin)) \
{ \
if( errno != EINTR) \
{ \
/* %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 */
YY_USER_ACTION
/* %not-for-header */
-
/** The main scanner function which does all the work.
*/
YY_DECL
{
/* %% [7.0] user's declarations go here */
-#line 75 "lexer.ll"
+#line 77 "lexer.ll"
- // Code run each time evallex is called.
+#line 81 "lexer.ll"
+ /* Code run each time evallex is called. */
loc.step();
-#line 1132 "lexer.cc"
+#line 1188 "lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 198 )
- 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_state_ptr)++ = yy_current_state;
++yy_cp;
}
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- yy_size_t yyl;
+ int yyl;
for ( yyl = 0; yyl < evalleng; ++yyl )
if ( evaltext[yyl] == '\n' )
-
+
evallineno++;
;
}
/* %% [13.0] actions go here */
case 1:
YY_RULE_SETUP
-#line 82 "lexer.ll"
+#line 85 "lexer.ll"
{
- // Ok, we found a with space. Let's ignore it and update loc variable.
+ /* Ok, we found a with space. Let's ignore it and update loc variable. */
loc.step();
}
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 87 "lexer.ll"
+#line 90 "lexer.ll"
{
- // Newline found. Let's update the location and continue.
+ /* Newline found. Let's update the location and continue. */
loc.lines(evalleng);
loc.step();
}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 93 "lexer.ll"
+#line 96 "lexer.ll"
{
- // A string has been matched. It contains the actual string and single quotes.
- // We need to get those quotes out of the way and just use its content, e.g.
- // for 'foo' we should get foo
+ /* A string has been matched. It contains the actual string and single quotes.
+ We need to get those quotes out of the way and just use its content, e.g.
+ for 'foo' we should get foo */
std::string tmp(evaltext+1);
tmp.resize(tmp.size() - 1);
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 103 "lexer.ll"
+#line 106 "lexer.ll"
{
- // A hex string has been matched. It contains the '0x' or '0X' header
- // followed by at least one hexadecimal digit.
+ /* A hex string has been matched. It contains the '0x' or '0X' header
+ followed by at least one hexadecimal digit. */
return isc::eval::EvalParser::make_HEXSTRING(evaltext, loc);
}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 109 "lexer.ll"
+#line 112 "lexer.ll"
{
- // An integer was found.
+ /* An integer was found. */
std::string tmp(evaltext);
try {
- // In substring we want to use negative values (e.g. -1).
- // In enterprise-id we need to use values up to 0xffffffff.
- // To cover both of those use cases, we need at least
- // int64_t.
+ /* In substring we want to use negative values (e.g. -1).
+ In enterprise-id we need to use values up to 0xffffffff.
+ To cover both of those use cases, we need at least
+ int64_t. */
static_cast<void>(boost::lexical_cast<int64_t>(tmp));
} catch (const boost::bad_lexical_cast &) {
driver.error(loc, "Failed to convert " + tmp + " to an integer.");
}
- // The parser needs the string form as double conversion is no lossless
+ /* The parser needs the string form as double conversion is no lossless */
return isc::eval::EvalParser::make_INTEGER(tmp, loc);
}
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 127 "lexer.ll"
+#line 130 "lexer.ll"
{
- // This string specifies option name starting with a letter
- // and further containing letters, digits, hyphens and
- // underscores and finishing by letters or digits.
+ /* This string specifies option name starting with a letter
+ and further containing letters, digits, hyphens and
+ underscores and finishing by letters or digits. */
return isc::eval::EvalParser::make_OPTION_NAME(evaltext, loc);
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 134 "lexer.ll"
+#line 137 "lexer.ll"
{
- // IPv4 or IPv6 address
+ /* IPv4 or IPv6 address */
std::string tmp(evaltext);
- // Some incorrect addresses can match so we have to check.
+ /* Some incorrect addresses can match so we have to check. */
try {
isc::asiolink::IOAddress ip(tmp);
} catch (...) {
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 148 "lexer.ll"
+#line 151 "lexer.ll"
return isc::eval::EvalParser::make_EQUAL(loc);
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 149 "lexer.ll"
+#line 152 "lexer.ll"
return isc::eval::EvalParser::make_OPTION(loc);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 150 "lexer.ll"
+#line 153 "lexer.ll"
return isc::eval::EvalParser::make_RELAY4(loc);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 151 "lexer.ll"
+#line 154 "lexer.ll"
return isc::eval::EvalParser::make_RELAY6(loc);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 152 "lexer.ll"
+#line 155 "lexer.ll"
return isc::eval::EvalParser::make_PEERADDR(loc);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 153 "lexer.ll"
+#line 156 "lexer.ll"
return isc::eval::EvalParser::make_LINKADDR(loc);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 154 "lexer.ll"
+#line 157 "lexer.ll"
return isc::eval::EvalParser::make_TEXT(loc);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 155 "lexer.ll"
+#line 158 "lexer.ll"
return isc::eval::EvalParser::make_HEX(loc);
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 156 "lexer.ll"
+#line 159 "lexer.ll"
return isc::eval::EvalParser::make_EXISTS(loc);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 157 "lexer.ll"
+#line 160 "lexer.ll"
return isc::eval::EvalParser::make_PKT(loc);
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 158 "lexer.ll"
+#line 161 "lexer.ll"
return isc::eval::EvalParser::make_IFACE(loc);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 159 "lexer.ll"
+#line 162 "lexer.ll"
return isc::eval::EvalParser::make_SRC(loc);
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 160 "lexer.ll"
+#line 163 "lexer.ll"
return isc::eval::EvalParser::make_DST(loc);
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 161 "lexer.ll"
+#line 164 "lexer.ll"
return isc::eval::EvalParser::make_LEN(loc);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 162 "lexer.ll"
+#line 165 "lexer.ll"
return isc::eval::EvalParser::make_PKT4(loc);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 163 "lexer.ll"
+#line 166 "lexer.ll"
return isc::eval::EvalParser::make_CHADDR(loc);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 164 "lexer.ll"
+#line 167 "lexer.ll"
return isc::eval::EvalParser::make_HLEN(loc);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 165 "lexer.ll"
+#line 168 "lexer.ll"
return isc::eval::EvalParser::make_HTYPE(loc);
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 166 "lexer.ll"
+#line 169 "lexer.ll"
return isc::eval::EvalParser::make_CIADDR(loc);
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 167 "lexer.ll"
+#line 170 "lexer.ll"
return isc::eval::EvalParser::make_GIADDR(loc);
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 168 "lexer.ll"
+#line 171 "lexer.ll"
return isc::eval::EvalParser::make_YIADDR(loc);
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 169 "lexer.ll"
+#line 172 "lexer.ll"
return isc::eval::EvalParser::make_SIADDR(loc);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 170 "lexer.ll"
+#line 173 "lexer.ll"
return isc::eval::EvalParser::make_PKT6(loc);
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 171 "lexer.ll"
+#line 174 "lexer.ll"
return isc::eval::EvalParser::make_MSGTYPE(loc);
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 172 "lexer.ll"
+#line 175 "lexer.ll"
return isc::eval::EvalParser::make_TRANSID(loc);
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 173 "lexer.ll"
+#line 176 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR(loc);
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 174 "lexer.ll"
+#line 177 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR_CLASS(loc);
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 175 "lexer.ll"
+#line 178 "lexer.ll"
return isc::eval::EvalParser::make_DATA(loc);
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 176 "lexer.ll"
+#line 179 "lexer.ll"
return isc::eval::EvalParser::make_ENTERPRISE(loc);
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 177 "lexer.ll"
+#line 180 "lexer.ll"
return isc::eval::EvalParser::make_SUBSTRING(loc);
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 178 "lexer.ll"
+#line 181 "lexer.ll"
return isc::eval::EvalParser::make_ALL(loc);
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 179 "lexer.ll"
+#line 182 "lexer.ll"
return isc::eval::EvalParser::make_CONCAT(loc);
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 180 "lexer.ll"
+#line 183 "lexer.ll"
return isc::eval::EvalParser::make_NOT(loc);
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 181 "lexer.ll"
+#line 184 "lexer.ll"
return isc::eval::EvalParser::make_AND(loc);
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 182 "lexer.ll"
+#line 185 "lexer.ll"
return isc::eval::EvalParser::make_OR(loc);
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 183 "lexer.ll"
+#line 186 "lexer.ll"
return isc::eval::EvalParser::make_DOT(loc);
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 184 "lexer.ll"
+#line 187 "lexer.ll"
return isc::eval::EvalParser::make_LPAREN(loc);
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 185 "lexer.ll"
+#line 188 "lexer.ll"
return isc::eval::EvalParser::make_RPAREN(loc);
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 186 "lexer.ll"
+#line 189 "lexer.ll"
return isc::eval::EvalParser::make_LBRACKET(loc);
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 187 "lexer.ll"
+#line 190 "lexer.ll"
return isc::eval::EvalParser::make_RBRACKET(loc);
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 188 "lexer.ll"
+#line 191 "lexer.ll"
return isc::eval::EvalParser::make_COMA(loc);
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 189 "lexer.ll"
+#line 192 "lexer.ll"
return isc::eval::EvalParser::make_ANY(loc);
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 190 "lexer.ll"
+#line 193 "lexer.ll"
driver.error (loc, "Invalid character: " + std::string(evaltext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 191 "lexer.ll"
+#line 194 "lexer.ll"
return isc::eval::EvalParser::make_END(loc);
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 192 "lexer.ll"
+#line 195 "lexer.ll"
ECHO;
YY_BREAK
-#line 1558 "lexer.cc"
+#line 1614 "lexer.cc"
case YY_END_OF_BUFFER:
{
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
- yy_size_t number_to_move, i;
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) evalrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) evalrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 198 )
- 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_state_ptr)++ = yy_current_state;
}
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 198 )
- 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_is_jam = (yy_current_state == 197);
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
/* %% [19.0] update BOL and evallineno */
if ( c == '\n' )
-
+
evallineno++;
;
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in eval_create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = 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.
*/
- b->yy_ch_buf = (char *) evalalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) evalalloc((yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in eval_create_buffer()" );
/* %if-c++-only */
/* %endif */
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in evalensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE eval_scan_buffer (char * base, yy_size_t size )
{
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in eval_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (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 = NULL;
* @note If you want to scan bytes that may contain NUL values, then use
* eval_scan_bytes() instead.
*/
-YY_BUFFER_STATE eval_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE eval_scan_string (const char * yystr )
{
return eval_scan_bytes(yystr,(int) strlen(yystr) );
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE eval_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE eval_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) _yybytes_len + 2;
+ n = (yy_size_t) (_yybytes_len + 2);
buf = (char *) evalalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in eval_scan_bytes()" );
#endif
/* %if-c-only */
-static void yynoreturn yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
*/
int evalget_lineno (void)
{
-
+
return evallineno;
}
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
int i;
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
/* %ok-for-header */
-#line 192 "lexer.ll"
-
+#line 195 "lexer.ll"
using namespace isc::eval;
buffer = eval_scan_bytes(string_.c_str(), string_.size());
if (!buffer) {
fatal("cannot scan string");
- // fatal() throws an exception so this can't be reached
+ /* fatal() throws an exception so this can't be reached */
}
}
}
namespace {
-/// To avoid unused function error
+/** To avoid unused function error */
class Dummy {
- // cppcheck-suppress unusedPrivateFunction
+ /* cppcheck-suppress unusedPrivateFunction */
void dummy() { yy_fatal_error("Fix me: how to disable its definition?"); }
};
}
-// Generated 201611011345
+// Generated 201702010027
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201611011345
+// Generated 201702010027
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201611011345
+// Generated 201702010027
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++