static const flex_int16_t yy_rule_linenum[56] =
{ 0,
- 127, 129, 131, 136, 137, 142, 143, 144, 156, 159,
- 164, 171, 180, 189, 198, 207, 216, 225, 234, 243,
- 252, 261, 270, 279, 288, 297, 306, 315, 324, 333,
- 342, 351, 360, 369, 378, 387, 396, 405, 503, 508,
- 513, 518, 519, 520, 521, 522, 523, 525, 543, 556,
- 561, 565, 567, 569, 571
+ 129, 131, 133, 138, 139, 144, 145, 146, 158, 161,
+ 166, 173, 182, 191, 200, 209, 218, 227, 236, 245,
+ 254, 263, 272, 281, 290, 299, 308, 317, 326, 335,
+ 344, 353, 362, 371, 380, 389, 398, 407, 505, 510,
+ 515, 520, 521, 522, 523, 524, 525, 527, 545, 558,
+ 563, 567, 569, 571, 573
} ;
/* The intent behind this definition is that it'll catch
#include <exceptions/exceptions.h>
#include <cc/dhcp_config_error.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>.
+/* 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
};
-// To avoid the call to exit... oops!
+/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::agent::ParserContext::fatal(msg)
-#line 1251 "agent_lexer.cc"
+#line 1253 "agent_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 yywrap requires linking with -lfl, which provides the default yywrap
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
/* for errors */
-#line 90 "agent_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.
+#line 92 "agent_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 1277 "agent_lexer.cc"
-#line 1278 "agent_lexer.cc"
+#line 1279 "agent_lexer.cc"
+#line 1280 "agent_lexer.cc"
#define INITIAL 0
#define COMMENT 1
{
/* %% [7.0] user's declarations go here */
-#line 96 "agent_lexer.ll"
+#line 98 "agent_lexer.ll"
-#line 100 "agent_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
+#line 102 "agent_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 yylex is called.
+ /* Code run each time yylex is called. */
driver.loc_.step();
- // We currently have 3 points of entries defined:
- // START_JSON - which expects any valid JSON
- // START_AGENT - which expects full configuration (with outer map and Control-agent
- // object in it.
- // START_SUB_AGENT - which expects only content of the Control-agent, this is
- // primarily useful for testing.
+ /* We currently have 3 points of entries defined:
+ START_JSON - which expects any valid JSON
+ START_AGENT - which expects full configuration (with outer map and Control-agent
+ object in it.
+ START_SUB_AGENT - which expects only content of the Control-agent, this is
+ primarily useful for testing. */
if (start_token_flag) {
start_token_flag = false;
switch (start_token_value) {
}
-#line 1592 "agent_lexer.cc"
+#line 1594 "agent_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
case 1:
YY_RULE_SETUP
-#line 127 "agent_lexer.ll"
+#line 129 "agent_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 129 "agent_lexer.ll"
+#line 131 "agent_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 131 "agent_lexer.ll"
+#line 133 "agent_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 136 "agent_lexer.ll"
+#line 138 "agent_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 137 "agent_lexer.ll"
+#line 139 "agent_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 138 "agent_lexer.ll"
+#line 140 "agent_lexer.ll"
{
isc_throw(ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 142 "agent_lexer.ll"
+#line 144 "agent_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 143 "agent_lexer.ll"
+#line 145 "agent_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 144 "agent_lexer.ll"
+#line 146 "agent_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
+ /* Extract the filename. */
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 153 "agent_lexer.ll"
+#line 155 "agent_lexer.ll"
{
isc_throw(ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 156 "agent_lexer.ll"
+#line 158 "agent_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 159 "agent_lexer.ll"
+#line 161 "agent_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 164 "agent_lexer.ll"
+#line 166 "agent_lexer.ll"
{
- // Newline found. Let's update the location and continue.
+ /* Newline found. Let's update the location and continue. */
driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 171 "agent_lexer.ll"
+#line 173 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 180 "agent_lexer.ll"
+#line 182 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 189 "agent_lexer.ll"
+#line 191 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 198 "agent_lexer.ll"
+#line 200 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 207 "agent_lexer.ll"
+#line 209 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 216 "agent_lexer.ll"
+#line 218 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 225 "agent_lexer.ll"
+#line 227 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 234 "agent_lexer.ll"
+#line 236 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 243 "agent_lexer.ll"
+#line 245 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 252 "agent_lexer.ll"
+#line 254 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 261 "agent_lexer.ll"
+#line 263 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 270 "agent_lexer.ll"
+#line 272 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 279 "agent_lexer.ll"
+#line 281 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 288 "agent_lexer.ll"
+#line 290 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 297 "agent_lexer.ll"
+#line 299 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGING:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 306 "agent_lexer.ll"
+#line 308 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 315 "agent_lexer.ll"
+#line 317 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 324 "agent_lexer.ll"
+#line 326 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 333 "agent_lexer.ll"
+#line 335 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 342 "agent_lexer.ll"
+#line 344 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 351 "agent_lexer.ll"
+#line 353 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 360 "agent_lexer.ll"
+#line 362 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 369 "agent_lexer.ll"
+#line 371 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 378 "agent_lexer.ll"
+#line 380 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 387 "agent_lexer.ll"
+#line 389 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 396 "agent_lexer.ll"
+#line 398 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 405 "agent_lexer.ll"
+#line 407 "agent_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 raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
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 39:
/* rule 39 can match eol */
YY_RULE_SETUP
-#line 503 "agent_lexer.ll"
+#line 505 "agent_lexer.ll"
{
- // Bad string with a forbidden control character inside
+ /* Bad string with a forbidden control character inside */
driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
-#line 508 "agent_lexer.ll"
+#line 510 "agent_lexer.ll"
{
- // Bad string with a bad escape inside
+ /* Bad string with a bad escape inside */
driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 513 "agent_lexer.ll"
+#line 515 "agent_lexer.ll"
{
- // Bad string with an open escape at the end
+ /* Bad string with an open escape at the end */
driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 518 "agent_lexer.ll"
+#line 520 "agent_lexer.ll"
{ return AgentParser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 519 "agent_lexer.ll"
+#line 521 "agent_lexer.ll"
{ return AgentParser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 520 "agent_lexer.ll"
+#line 522 "agent_lexer.ll"
{ return AgentParser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 521 "agent_lexer.ll"
+#line 523 "agent_lexer.ll"
{ return AgentParser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 522 "agent_lexer.ll"
+#line 524 "agent_lexer.ll"
{ return AgentParser::make_COMMA(driver.loc_); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 523 "agent_lexer.ll"
+#line 525 "agent_lexer.ll"
{ return AgentParser::make_COLON(driver.loc_); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 525 "agent_lexer.ll"
+#line 527 "agent_lexer.ll"
{
- // An integer was found.
+ /* 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 AgentParser::make_INTEGER(integer, driver.loc_);
}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 543 "agent_lexer.ll"
+#line 545 "agent_lexer.ll"
{
- // A floating point was found.
+ /* A floating point was found. */
std::string tmp(yytext);
double fp = 0.0;
try {
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 556 "agent_lexer.ll"
+#line 558 "agent_lexer.ll"
{
string tmp(yytext);
return AgentParser::make_BOOLEAN(tmp == "true", driver.loc_);
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 561 "agent_lexer.ll"
+#line 563 "agent_lexer.ll"
{
return AgentParser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 565 "agent_lexer.ll"
+#line 567 "agent_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 567 "agent_lexer.ll"
+#line 569 "agent_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 569 "agent_lexer.ll"
+#line 571 "agent_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 571 "agent_lexer.ll"
+#line 573 "agent_lexer.ll"
driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 573 "agent_lexer.ll"
+#line 575 "agent_lexer.ll"
{
if (driver.states_.empty()) {
return AgentParser::make_END(driver.loc_);
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 596 "agent_lexer.ll"
+#line 598 "agent_lexer.ll"
ECHO;
YY_BREAK
-#line 2327 "agent_lexer.cc"
+#line 2329 "agent_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %ok-for-header */
-#line 596 "agent_lexer.ll"
+#line 598 "agent_lexer.ll"
using namespace isc::dhcp;
buffer = agent__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 */
}
}
yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- // See dhcp6_lexer.cc header for available definitions
+ /* See agent_lexer.cc header for available definitions */
buffer = agent__create_buffer(f, 65536 /*buffer size*/);
if (!buffer) {
fatal("cannot scan file " + filename);
fclose(sfile_);
sfile_ = 0;
static_cast<void>(agent_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()) {
agent__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?"); }
};
}
-// Generated 201704181958
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201704181958
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201704181958
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++
static const flex_int16_t yy_rule_linenum[61] =
{ 0,
- 127, 129, 131, 136, 137, 142, 143, 144, 156, 159,
- 164, 170, 179, 190, 201, 210, 219, 228, 238, 248,
- 258, 267, 276, 286, 296, 306, 317, 326, 336, 346,
- 357, 366, 375, 384, 393, 402, 411, 420, 433, 442,
- 451, 460, 470, 568, 573, 578, 583, 584, 585, 586,
- 587, 588, 590, 608, 621, 626, 630, 632, 634, 636
+ 129, 131, 133, 138, 139, 144, 145, 146, 158, 161,
+ 166, 172, 181, 192, 203, 212, 221, 230, 240, 250,
+ 260, 269, 278, 288, 298, 308, 319, 328, 338, 348,
+ 359, 368, 377, 386, 395, 404, 413, 422, 435, 444,
+ 453, 462, 472, 570, 575, 580, 585, 586, 587, 588,
+ 589, 590, 592, 610, 623, 628, 632, 634, 636, 638
} ;
/* 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>.
+/* 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
};
-// To avoid the call to exit... oops!
+/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
-#line 1318 "d2_lexer.cc"
+#line 1320 "d2_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 yywrap requires linking with -lfl, which provides the default yywrap
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 "d2_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.
+#line 88 "d2_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 1344 "d2_lexer.cc"
-#line 1345 "d2_lexer.cc"
+#line 1346 "d2_lexer.cc"
+#line 1347 "d2_lexer.cc"
#define INITIAL 0
#define COMMENT 1
{
/* %% [7.0] user's declarations go here */
-#line 92 "d2_lexer.ll"
+#line 94 "d2_lexer.ll"
-#line 96 "d2_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
+#line 98 "d2_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 yylex is called.
+ /* Code run each time yylex is called. */
driver.loc_.step();
if (start_token_flag) {
}
-#line 1663 "d2_lexer.cc"
+#line 1665 "d2_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
case 1:
YY_RULE_SETUP
-#line 127 "d2_lexer.ll"
+#line 129 "d2_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 129 "d2_lexer.ll"
+#line 131 "d2_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 131 "d2_lexer.ll"
+#line 133 "d2_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 136 "d2_lexer.ll"
+#line 138 "d2_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 137 "d2_lexer.ll"
+#line 139 "d2_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 138 "d2_lexer.ll"
+#line 140 "d2_lexer.ll"
{
isc_throw(D2ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 142 "d2_lexer.ll"
+#line 144 "d2_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 143 "d2_lexer.ll"
+#line 145 "d2_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 144 "d2_lexer.ll"
+#line 146 "d2_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
+ /* Extract the filename. */
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 153 "d2_lexer.ll"
+#line 155 "d2_lexer.ll"
{
isc_throw(D2ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 156 "d2_lexer.ll"
+#line 158 "d2_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 159 "d2_lexer.ll"
+#line 161 "d2_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 164 "d2_lexer.ll"
+#line 166 "d2_lexer.ll"
{
- // Newline found. Let's update the location and continue.
+ /* Newline found. Let's update the location and continue. */
driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 170 "d2_lexer.ll"
+#line 172 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 179 "d2_lexer.ll"
+#line 181 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 190 "d2_lexer.ll"
+#line 192 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 201 "d2_lexer.ll"
+#line 203 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 210 "d2_lexer.ll"
+#line 212 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 219 "d2_lexer.ll"
+#line 221 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 228 "d2_lexer.ll"
+#line 230 "d2_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 238 "d2_lexer.ll"
+#line 240 "d2_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::d2::D2ParserContext::NCR_PROTOCOL) {
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 248 "d2_lexer.ll"
+#line 250 "d2_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::d2::D2ParserContext::NCR_FORMAT) {
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 258 "d2_lexer.ll"
+#line 260 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 267 "d2_lexer.ll"
+#line 269 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 276 "d2_lexer.ll"
+#line 278 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::FORWARD_DDNS:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 286 "d2_lexer.ll"
+#line 288 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DDNS_DOMAIN:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 296 "d2_lexer.ll"
+#line 298 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DDNS_DOMAIN:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 306 "d2_lexer.ll"
+#line 308 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DNS_SERVER:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 317 "d2_lexer.ll"
+#line 319 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 326 "d2_lexer.ll"
+#line 328 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::TSIG_KEY:
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 336 "d2_lexer.ll"
+#line 338 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::TSIG_KEY:
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 346 "d2_lexer.ll"
+#line 348 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::TSIG_KEY:
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 357 "d2_lexer.ll"
+#line 359 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::CONFIG:
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 366 "d2_lexer.ll"
+#line 368 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGING:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 375 "d2_lexer.ll"
+#line 377 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGERS:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 384 "d2_lexer.ll"
+#line 386 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 393 "d2_lexer.ll"
+#line 395 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 402 "d2_lexer.ll"
+#line 404 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 411 "d2_lexer.ll"
+#line 413 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 420 "d2_lexer.ll"
+#line 422 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGERS:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 433 "d2_lexer.ll"
+#line 435 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGERS:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 442 "d2_lexer.ll"
+#line 444 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGERS:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 451 "d2_lexer.ll"
+#line 453 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::CONFIG:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 460 "d2_lexer.ll"
+#line 462 "d2_lexer.ll"
{
switch(driver.ctx_) {
case isc::d2::D2ParserContext::CONFIG:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 470 "d2_lexer.ll"
+#line 472 "d2_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 raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
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 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 568 "d2_lexer.ll"
+#line 570 "d2_lexer.ll"
{
- // Bad string with a forbidden control character inside
+ /* Bad string with a forbidden control character inside */
driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
-#line 573 "d2_lexer.ll"
+#line 575 "d2_lexer.ll"
{
- // Bad string with a bad escape inside
+ /* Bad string with a bad escape inside */
driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 578 "d2_lexer.ll"
+#line 580 "d2_lexer.ll"
{
- // Bad string with an open escape at the end
+ /* Bad string with an open escape at the end */
driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 583 "d2_lexer.ll"
+#line 585 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 584 "d2_lexer.ll"
+#line 586 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 585 "d2_lexer.ll"
+#line 587 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 586 "d2_lexer.ll"
+#line 588 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 587 "d2_lexer.ll"
+#line 589 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_COMMA(driver.loc_); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 588 "d2_lexer.ll"
+#line 590 "d2_lexer.ll"
{ return isc::d2::D2Parser::make_COLON(driver.loc_); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 590 "d2_lexer.ll"
+#line 592 "d2_lexer.ll"
{
- // An integer was found.
+ /* 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::d2::D2Parser::make_INTEGER(integer, driver.loc_);
}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 608 "d2_lexer.ll"
+#line 610 "d2_lexer.ll"
{
- // A floating point was found.
+ /* A floating point was found. */
std::string tmp(yytext);
double fp = 0.0;
try {
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 621 "d2_lexer.ll"
+#line 623 "d2_lexer.ll"
{
string tmp(yytext);
return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 626 "d2_lexer.ll"
+#line 628 "d2_lexer.ll"
{
return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 630 "d2_lexer.ll"
+#line 632 "d2_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 632 "d2_lexer.ll"
+#line 634 "d2_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 634 "d2_lexer.ll"
+#line 636 "d2_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 636 "d2_lexer.ll"
+#line 638 "d2_lexer.ll"
driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 638 "d2_lexer.ll"
+#line 640 "d2_lexer.ll"
{
if (driver.states_.empty()) {
return isc::d2::D2Parser::make_END(driver.loc_);
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 661 "d2_lexer.ll"
+#line 663 "d2_lexer.ll"
ECHO;
YY_BREAK
-#line 2476 "d2_lexer.cc"
+#line 2478 "d2_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %ok-for-header */
-#line 661 "d2_lexer.ll"
+#line 663 "d2_lexer.ll"
using namespace isc::dhcp;
buffer = d2_parser__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 */
}
}
yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
- // See d2_lexer.cc header for available definitions
+ /* See d2_lexer.cc header for available definitions */
buffer = d2_parser__create_buffer(f, 65536 /*buffer size*/);
if (!buffer) {
fatal("cannot scan file " + filename);
fclose(sfile_);
sfile_ = 0;
static_cast<void>(d2_parser_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()) {
d2_parser__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?"); }
};
}
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++
static const flex_int16_t yy_rule_linenum[147] =
{ 0,
- 131, 133, 135, 140, 141, 146, 147, 148, 160, 163,
- 168, 175, 184, 193, 202, 211, 221, 230, 239, 248,
- 257, 268, 277, 286, 295, 304, 314, 324, 334, 344,
- 354, 364, 374, 384, 394, 404, 414, 424, 433, 442,
- 451, 465, 480, 489, 498, 507, 516, 525, 534, 543,
- 552, 561, 570, 580, 589, 598, 607, 616, 625, 634,
- 643, 652, 661, 670, 680, 690, 700, 709, 719, 729,
- 739, 749, 759, 768, 778, 787, 796, 805, 814, 823,
- 833, 843, 852, 861, 870, 879, 888, 897, 906, 915,
- 924, 933, 942, 951, 960, 969, 978, 987, 996, 1005,
-
- 1014, 1023, 1032, 1041, 1050, 1059, 1068, 1077, 1086, 1095,
- 1105, 1115, 1125, 1135, 1145, 1155, 1165, 1175, 1185, 1194,
- 1203, 1212, 1221, 1230, 1240, 1250, 1262, 1273, 1286, 1384,
- 1389, 1394, 1399, 1400, 1401, 1402, 1403, 1404, 1406, 1424,
- 1437, 1442, 1446, 1448, 1450, 1452
+ 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, 406, 416, 426, 435, 444,
+ 453, 467, 482, 491, 500, 509, 518, 527, 536, 545,
+ 554, 563, 572, 582, 591, 600, 609, 618, 627, 636,
+ 645, 654, 663, 672, 682, 692, 702, 711, 721, 731,
+ 741, 751, 761, 770, 780, 789, 798, 807, 816, 825,
+ 835, 845, 854, 863, 872, 881, 890, 899, 908, 917,
+ 926, 935, 944, 953, 962, 971, 980, 989, 998, 1007,
+
+ 1016, 1025, 1034, 1043, 1052, 1061, 1070, 1079, 1088, 1097,
+ 1107, 1117, 1127, 1137, 1147, 1157, 1167, 1177, 1187, 1196,
+ 1205, 1214, 1223, 1232, 1242, 1252, 1264, 1275, 1288, 1386,
+ 1391, 1396, 1401, 1402, 1403, 1404, 1405, 1406, 1408, 1426,
+ 1439, 1444, 1448, 1450, 1452, 1454
} ;
/* 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>.
+/* 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
};
-// 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 1418 "dhcp4_lexer.cc"
+#line 1420 "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 yywrap requires linking with -lfl, which provides the default yywrap
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 yyleng bytes. yyleng specifies the length of the
-// currently matched token.
+#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 1444 "dhcp4_lexer.cc"
-#line 1445 "dhcp4_lexer.cc"
+#line 1446 "dhcp4_lexer.cc"
+#line 1447 "dhcp4_lexer.cc"
#define INITIAL 0
#define COMMENT 1
{
/* %% [7.0] user's declarations go here */
-#line 92 "dhcp4_lexer.ll"
+#line 94 "dhcp4_lexer.ll"
-#line 96 "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
+#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 yylex is called.
+ /* Code run each time yylex is called. */
driver.loc_.step();
if (start_token_flag) {
}
-#line 1767 "dhcp4_lexer.cc"
+#line 1769 "dhcp4_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
case 1:
YY_RULE_SETUP
-#line 131 "dhcp4_lexer.ll"
+#line 133 "dhcp4_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 133 "dhcp4_lexer.ll"
+#line 135 "dhcp4_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 135 "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 140 "dhcp4_lexer.ll"
+#line 142 "dhcp4_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 141 "dhcp4_lexer.ll"
+#line 143 "dhcp4_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 142 "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 146 "dhcp4_lexer.ll"
+#line 148 "dhcp4_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 147 "dhcp4_lexer.ll"
+#line 149 "dhcp4_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 148 "dhcp4_lexer.ll"
+#line 150 "dhcp4_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
+ /* Extract the filename. */
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 157 "dhcp4_lexer.ll"
+#line 159 "dhcp4_lexer.ll"
{
isc_throw(Dhcp4ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 160 "dhcp4_lexer.ll"
+#line 162 "dhcp4_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 163 "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 168 "dhcp4_lexer.ll"
+#line 170 "dhcp4_lexer.ll"
{
- // Newline found. Let's update the location and continue.
+ /* Newline found. Let's update the location and continue. */
driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 175 "dhcp4_lexer.ll"
+#line 177 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 184 "dhcp4_lexer.ll"
+#line 186 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 193 "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 202 "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 211 "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 221 "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 230 "dhcp4_lexer.ll"
+#line 232 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 239 "dhcp4_lexer.ll"
+#line 241 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 248 "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 257 "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 268 "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 277 "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 286 "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 295 "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 304 "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 314 "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 324 "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 334 "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 344 "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 354 "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 364 "dhcp4_lexer.ll"
+#line 366 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 374 "dhcp4_lexer.ll"
+#line 376 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 384 "dhcp4_lexer.ll"
+#line 386 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 394 "dhcp4_lexer.ll"
+#line 396 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 404 "dhcp4_lexer.ll"
+#line 406 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 414 "dhcp4_lexer.ll"
+#line 416 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 424 "dhcp4_lexer.ll"
+#line 426 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 433 "dhcp4_lexer.ll"
+#line 435 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 442 "dhcp4_lexer.ll"
+#line 444 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 451 "dhcp4_lexer.ll"
+#line 453 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 465 "dhcp4_lexer.ll"
+#line 467 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 480 "dhcp4_lexer.ll"
+#line 482 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DATA:
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 489 "dhcp4_lexer.ll"
+#line 491 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 498 "dhcp4_lexer.ll"
+#line 500 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::POOLS:
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 507 "dhcp4_lexer.ll"
+#line 509 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::POOLS:
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 516 "dhcp4_lexer.ll"
+#line 518 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 525 "dhcp4_lexer.ll"
+#line 527 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 534 "dhcp4_lexer.ll"
+#line 536 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 543 "dhcp4_lexer.ll"
+#line 545 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 552 "dhcp4_lexer.ll"
+#line 554 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 561 "dhcp4_lexer.ll"
+#line 563 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 570 "dhcp4_lexer.ll"
+#line 572 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 580 "dhcp4_lexer.ll"
+#line 582 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 589 "dhcp4_lexer.ll"
+#line 591 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 598 "dhcp4_lexer.ll"
+#line 600 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGING:
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 607 "dhcp4_lexer.ll"
+#line 609 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 616 "dhcp4_lexer.ll"
+#line 618 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 625 "dhcp4_lexer.ll"
+#line 627 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 634 "dhcp4_lexer.ll"
+#line 636 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 643 "dhcp4_lexer.ll"
+#line 645 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 652 "dhcp4_lexer.ll"
+#line 654 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 661 "dhcp4_lexer.ll"
+#line 663 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 670 "dhcp4_lexer.ll"
+#line 672 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 680 "dhcp4_lexer.ll"
+#line 682 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 690 "dhcp4_lexer.ll"
+#line 692 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CLIENT_CLASSES:
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 700 "dhcp4_lexer.ll"
+#line 702 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 709 "dhcp4_lexer.ll"
+#line 711 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 719 "dhcp4_lexer.ll"
+#line 721 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 729 "dhcp4_lexer.ll"
+#line 731 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 739 "dhcp4_lexer.ll"
+#line 741 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 749 "dhcp4_lexer.ll"
+#line 751 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 759 "dhcp4_lexer.ll"
+#line 761 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RESERVATIONS:
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 768 "dhcp4_lexer.ll"
+#line 770 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 778 "dhcp4_lexer.ll"
+#line 780 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DATA:
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 787 "dhcp4_lexer.ll"
+#line 789 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 796 "dhcp4_lexer.ll"
+#line 798 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 805 "dhcp4_lexer.ll"
+#line 807 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 814 "dhcp4_lexer.ll"
+#line 816 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 823 "dhcp4_lexer.ll"
+#line 825 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RELAY:
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 833 "dhcp4_lexer.ll"
+#line 835 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 843 "dhcp4_lexer.ll"
+#line 845 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 852 "dhcp4_lexer.ll"
+#line 854 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 861 "dhcp4_lexer.ll"
+#line 863 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 870 "dhcp4_lexer.ll"
+#line 872 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 879 "dhcp4_lexer.ll"
+#line 881 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 888 "dhcp4_lexer.ll"
+#line 890 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 897 "dhcp4_lexer.ll"
+#line 899 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 906 "dhcp4_lexer.ll"
+#line 908 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 915 "dhcp4_lexer.ll"
+#line 917 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 924 "dhcp4_lexer.ll"
+#line 926 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 933 "dhcp4_lexer.ll"
+#line 935 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 942 "dhcp4_lexer.ll"
+#line 944 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONTROL_SOCKET:
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 951 "dhcp4_lexer.ll"
+#line 953 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONTROL_SOCKET:
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 960 "dhcp4_lexer.ll"
+#line 962 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 969 "dhcp4_lexer.ll"
+#line 971 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 978 "dhcp4_lexer.ll"
+#line 980 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 987 "dhcp4_lexer.ll"
+#line 989 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 996 "dhcp4_lexer.ll"
+#line 998 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 1005 "dhcp4_lexer.ll"
+#line 1007 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 1014 "dhcp4_lexer.ll"
+#line 1016 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 1023 "dhcp4_lexer.ll"
+#line 1025 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 1032 "dhcp4_lexer.ll"
+#line 1034 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 1041 "dhcp4_lexer.ll"
+#line 1043 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 1050 "dhcp4_lexer.ll"
+#line 1052 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 1059 "dhcp4_lexer.ll"
+#line 1061 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 1068 "dhcp4_lexer.ll"
+#line 1070 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 1077 "dhcp4_lexer.ll"
+#line 1079 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 1086 "dhcp4_lexer.ll"
+#line 1088 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 1095 "dhcp4_lexer.ll"
+#line 1097 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 1105 "dhcp4_lexer.ll"
+#line 1107 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 1115 "dhcp4_lexer.ll"
+#line 1117 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_FORMAT) {
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 1125 "dhcp4_lexer.ll"
+#line 1127 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 1135 "dhcp4_lexer.ll"
+#line 1137 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 1145 "dhcp4_lexer.ll"
+#line 1147 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 1155 "dhcp4_lexer.ll"
+#line 1157 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 1165 "dhcp4_lexer.ll"
+#line 1167 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 1175 "dhcp4_lexer.ll"
+#line 1177 "dhcp4_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser4Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 1185 "dhcp4_lexer.ll"
+#line 1187 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 1194 "dhcp4_lexer.ll"
+#line 1196 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::CONFIG:
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 1203 "dhcp4_lexer.ll"
+#line 1205 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 1212 "dhcp4_lexer.ll"
+#line 1214 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 1221 "dhcp4_lexer.ll"
+#line 1223 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 1230 "dhcp4_lexer.ll"
+#line 1232 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 1240 "dhcp4_lexer.ll"
+#line 1242 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 1250 "dhcp4_lexer.ll"
+#line 1252 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 1262 "dhcp4_lexer.ll"
+#line 1264 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 1273 "dhcp4_lexer.ll"
+#line 1275 "dhcp4_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SUBNET4:
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 1286 "dhcp4_lexer.ll"
+#line 1288 "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
+ /* 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);
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 1384 "dhcp4_lexer.ll"
+#line 1386 "dhcp4_lexer.ll"
{
- // Bad string with a forbidden control character inside
+ /* 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 1389 "dhcp4_lexer.ll"
+#line 1391 "dhcp4_lexer.ll"
{
- // Bad string with a bad escape inside
+ /* 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 1394 "dhcp4_lexer.ll"
+#line 1396 "dhcp4_lexer.ll"
{
- // Bad string with an open escape at the end
+ /* 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 1399 "dhcp4_lexer.ll"
+#line 1401 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 1400 "dhcp4_lexer.ll"
+#line 1402 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 1401 "dhcp4_lexer.ll"
+#line 1403 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 1402 "dhcp4_lexer.ll"
+#line 1404 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 1403 "dhcp4_lexer.ll"
+#line 1405 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_COMMA(driver.loc_); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 1404 "dhcp4_lexer.ll"
+#line 1406 "dhcp4_lexer.ll"
{ return isc::dhcp::Dhcp4Parser::make_COLON(driver.loc_); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 1406 "dhcp4_lexer.ll"
+#line 1408 "dhcp4_lexer.ll"
{
- // An integer was found.
+ /* 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 140:
YY_RULE_SETUP
-#line 1424 "dhcp4_lexer.ll"
+#line 1426 "dhcp4_lexer.ll"
{
- // A floating point was found.
+ /* A floating point was found. */
std::string tmp(yytext);
double fp = 0.0;
try {
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 1437 "dhcp4_lexer.ll"
+#line 1439 "dhcp4_lexer.ll"
{
string tmp(yytext);
return isc::dhcp::Dhcp4Parser::make_BOOLEAN(tmp == "true", driver.loc_);
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 1442 "dhcp4_lexer.ll"
+#line 1444 "dhcp4_lexer.ll"
{
return isc::dhcp::Dhcp4Parser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 1446 "dhcp4_lexer.ll"
+#line 1448 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 1448 "dhcp4_lexer.ll"
+#line 1450 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 1450 "dhcp4_lexer.ll"
+#line 1452 "dhcp4_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 1452 "dhcp4_lexer.ll"
+#line 1454 "dhcp4_lexer.ll"
driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 1454 "dhcp4_lexer.ll"
+#line 1456 "dhcp4_lexer.ll"
{
if (driver.states_.empty()) {
return isc::dhcp::Dhcp4Parser::make_END(driver.loc_);
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 1477 "dhcp4_lexer.ll"
+#line 1479 "dhcp4_lexer.ll"
ECHO;
YY_BREAK
-#line 3649 "dhcp4_lexer.cc"
+#line 3651 "dhcp4_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %ok-for-header */
-#line 1477 "dhcp4_lexer.ll"
+#line 1479 "dhcp4_lexer.ll"
using namespace isc::dhcp;
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 */
}
}
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?"); }
};
}
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++
static const flex_int16_t yy_rule_linenum[153] =
{ 0,
- 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
- 170, 177, 186, 195, 204, 213, 222, 231, 240, 249,
- 258, 267, 276, 285, 294, 303, 313, 323, 333, 343,
- 353, 363, 373, 383, 393, 402, 411, 420, 429, 438,
- 447, 459, 468, 477, 486, 495, 505, 515, 525, 535,
- 546, 556, 566, 576, 586, 596, 606, 616, 626, 635,
- 644, 653, 668, 683, 692, 701, 710, 719, 728, 737,
- 746, 755, 764, 774, 783, 792, 801, 810, 819, 828,
- 838, 847, 856, 865, 874, 883, 892, 901, 910, 919,
- 929, 938, 947, 957, 967, 977, 986, 995, 1004, 1015,
-
- 1025, 1034, 1044, 1054, 1063, 1072, 1081, 1090, 1099, 1108,
- 1118, 1127, 1136, 1145, 1154, 1163, 1172, 1181, 1190, 1199,
- 1208, 1217, 1226, 1235, 1244, 1253, 1262, 1271, 1280, 1289,
- 1298, 1307, 1316, 1325, 1334, 1432, 1437, 1442, 1447, 1448,
- 1449, 1450, 1451, 1452, 1454, 1472, 1485, 1490, 1494, 1496,
- 1498, 1500
+ 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, 315, 325, 335, 345,
+ 355, 365, 375, 385, 395, 404, 413, 422, 431, 440,
+ 449, 461, 470, 479, 488, 497, 507, 517, 527, 537,
+ 548, 558, 568, 578, 588, 598, 608, 618, 628, 637,
+ 646, 655, 670, 685, 694, 703, 712, 721, 730, 739,
+ 748, 757, 766, 776, 785, 794, 803, 812, 821, 830,
+ 840, 849, 858, 867, 876, 885, 894, 903, 912, 921,
+ 931, 940, 949, 959, 969, 979, 988, 997, 1006, 1017,
+
+ 1027, 1036, 1046, 1056, 1065, 1074, 1083, 1092, 1101, 1110,
+ 1120, 1129, 1138, 1147, 1156, 1165, 1174, 1183, 1192, 1201,
+ 1210, 1219, 1228, 1237, 1246, 1255, 1264, 1273, 1282, 1291,
+ 1300, 1309, 1318, 1327, 1336, 1434, 1439, 1444, 1449, 1450,
+ 1451, 1452, 1453, 1454, 1456, 1474, 1487, 1492, 1496, 1498,
+ 1500, 1502
} ;
/* 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>.
+/* 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
};
-// 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 1430 "dhcp6_lexer.cc"
+#line 1432 "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 yywrap requires linking with -lfl, which provides the default yywrap
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 yyleng bytes. yyleng specifies the length of the
-// currently matched token.
+#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 1456 "dhcp6_lexer.cc"
-#line 1457 "dhcp6_lexer.cc"
+#line 1458 "dhcp6_lexer.cc"
+#line 1459 "dhcp6_lexer.cc"
#define INITIAL 0
#define COMMENT 1
{
/* %% [7.0] user's declarations go here */
-#line 92 "dhcp6_lexer.ll"
+#line 94 "dhcp6_lexer.ll"
-#line 96 "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
+#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 yylex is called.
+ /* Code run each time yylex is called. */
driver.loc_.step();
if (start_token_flag) {
}
-#line 1781 "dhcp6_lexer.cc"
+#line 1783 "dhcp6_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
case 1:
YY_RULE_SETUP
-#line 133 "dhcp6_lexer.ll"
+#line 135 "dhcp6_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 135 "dhcp6_lexer.ll"
+#line 137 "dhcp6_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 137 "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 142 "dhcp6_lexer.ll"
+#line 144 "dhcp6_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 143 "dhcp6_lexer.ll"
+#line 145 "dhcp6_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 144 "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 148 "dhcp6_lexer.ll"
+#line 150 "dhcp6_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 149 "dhcp6_lexer.ll"
+#line 151 "dhcp6_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 150 "dhcp6_lexer.ll"
+#line 152 "dhcp6_lexer.ll"
{
- // Include directive.
+ /* Include directive. */
- // Extract the filename.
+ /* Extract the filename. */
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 159 "dhcp6_lexer.ll"
+#line 161 "dhcp6_lexer.ll"
{
isc_throw(Dhcp6ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 162 "dhcp6_lexer.ll"
+#line 164 "dhcp6_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 165 "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 170 "dhcp6_lexer.ll"
+#line 172 "dhcp6_lexer.ll"
{
- // Newline found. Let's update the location and continue.
+ /* Newline found. Let's update the location and continue. */
driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 177 "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 186 "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 195 "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 204 "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 213 "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 222 "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 231 "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 240 "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 249 "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 258 "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 267 "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 276 "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 285 "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 294 "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 303 "dhcp6_lexer.ll"
+#line 305 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_PROTOCOL) {
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 313 "dhcp6_lexer.ll"
+#line 315 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_PROTOCOL) {
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 323 "dhcp6_lexer.ll"
+#line 325 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::NCR_FORMAT) {
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 333 "dhcp6_lexer.ll"
+#line 335 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 343 "dhcp6_lexer.ll"
+#line 345 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 353 "dhcp6_lexer.ll"
+#line 355 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 363 "dhcp6_lexer.ll"
+#line 365 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 373 "dhcp6_lexer.ll"
+#line 375 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 383 "dhcp6_lexer.ll"
+#line 385 "dhcp6_lexer.ll"
{
/* dhcp-ddns value keywords are case insensitive */
if (driver.ctx_ == isc::dhcp::Parser6Context::REPLACE_CLIENT_NAME) {
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 393 "dhcp6_lexer.ll"
+#line 395 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 402 "dhcp6_lexer.ll"
+#line 404 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 411 "dhcp6_lexer.ll"
+#line 413 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::INTERFACES_CONFIG:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 420 "dhcp6_lexer.ll"
+#line 422 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 429 "dhcp6_lexer.ll"
+#line 431 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 438 "dhcp6_lexer.ll"
+#line 440 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 447 "dhcp6_lexer.ll"
+#line 449 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 459 "dhcp6_lexer.ll"
+#line 461 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 468 "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 477 "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 486 "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 495 "dhcp6_lexer.ll"
+#line 497 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 505 "dhcp6_lexer.ll"
+#line 507 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 515 "dhcp6_lexer.ll"
+#line 517 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 525 "dhcp6_lexer.ll"
+#line 527 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 535 "dhcp6_lexer.ll"
+#line 537 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 546 "dhcp6_lexer.ll"
+#line 548 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 556 "dhcp6_lexer.ll"
+#line 558 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 566 "dhcp6_lexer.ll"
+#line 568 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 576 "dhcp6_lexer.ll"
+#line 578 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 586 "dhcp6_lexer.ll"
+#line 588 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 596 "dhcp6_lexer.ll"
+#line 598 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 606 "dhcp6_lexer.ll"
+#line 608 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 616 "dhcp6_lexer.ll"
+#line 618 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 626 "dhcp6_lexer.ll"
+#line 628 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 635 "dhcp6_lexer.ll"
+#line 637 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 644 "dhcp6_lexer.ll"
+#line 646 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 653 "dhcp6_lexer.ll"
+#line 655 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 668 "dhcp6_lexer.ll"
+#line 670 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 683 "dhcp6_lexer.ll"
+#line 685 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DATA:
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 692 "dhcp6_lexer.ll"
+#line 694 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 701 "dhcp6_lexer.ll"
+#line 703 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 710 "dhcp6_lexer.ll"
+#line 712 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 719 "dhcp6_lexer.ll"
+#line 721 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 728 "dhcp6_lexer.ll"
+#line 730 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 737 "dhcp6_lexer.ll"
+#line 739 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 746 "dhcp6_lexer.ll"
+#line 748 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::PD_POOLS:
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 755 "dhcp6_lexer.ll"
+#line 757 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::POOLS:
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 764 "dhcp6_lexer.ll"
+#line 766 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::POOLS:
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 774 "dhcp6_lexer.ll"
+#line 776 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 783 "dhcp6_lexer.ll"
+#line 785 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 792 "dhcp6_lexer.ll"
+#line 794 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 801 "dhcp6_lexer.ll"
+#line 803 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 810 "dhcp6_lexer.ll"
+#line 812 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 819 "dhcp6_lexer.ll"
+#line 821 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 828 "dhcp6_lexer.ll"
+#line 830 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 838 "dhcp6_lexer.ll"
+#line 840 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 847 "dhcp6_lexer.ll"
+#line 849 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 856 "dhcp6_lexer.ll"
+#line 858 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 865 "dhcp6_lexer.ll"
+#line 867 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 874 "dhcp6_lexer.ll"
+#line 876 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGING:
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 883 "dhcp6_lexer.ll"
+#line 885 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 892 "dhcp6_lexer.ll"
+#line 894 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 901 "dhcp6_lexer.ll"
+#line 903 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 910 "dhcp6_lexer.ll"
+#line 912 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 919 "dhcp6_lexer.ll"
+#line 921 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 929 "dhcp6_lexer.ll"
+#line 931 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 938 "dhcp6_lexer.ll"
+#line 940 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 947 "dhcp6_lexer.ll"
+#line 949 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 957 "dhcp6_lexer.ll"
+#line 959 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 967 "dhcp6_lexer.ll"
+#line 969 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CLIENT_CLASSES:
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 977 "dhcp6_lexer.ll"
+#line 979 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 986 "dhcp6_lexer.ll"
+#line 988 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 995 "dhcp6_lexer.ll"
+#line 997 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 1004 "dhcp6_lexer.ll"
+#line 1006 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::MAC_SOURCES:
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 1015 "dhcp6_lexer.ll"
+#line 1017 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 1025 "dhcp6_lexer.ll"
+#line 1027 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATIONS:
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 1034 "dhcp6_lexer.ll"
+#line 1036 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOST_RESERVATION_IDENTIFIERS:
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 1044 "dhcp6_lexer.ll"
+#line 1046 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 1054 "dhcp6_lexer.ll"
+#line 1056 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DATA:
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 1063 "dhcp6_lexer.ll"
+#line 1065 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 1072 "dhcp6_lexer.ll"
+#line 1074 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 1081 "dhcp6_lexer.ll"
+#line 1083 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 1090 "dhcp6_lexer.ll"
+#line 1092 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SUBNET6:
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 1099 "dhcp6_lexer.ll"
+#line 1101 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RELAY:
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 1108 "dhcp6_lexer.ll"
+#line 1110 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 1118 "dhcp6_lexer.ll"
+#line 1120 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 1127 "dhcp6_lexer.ll"
+#line 1129 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 1136 "dhcp6_lexer.ll"
+#line 1138 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 1145 "dhcp6_lexer.ll"
+#line 1147 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 1154 "dhcp6_lexer.ll"
+#line 1156 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 1163 "dhcp6_lexer.ll"
+#line 1165 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DUID_TYPE:
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 1172 "dhcp6_lexer.ll"
+#line 1174 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 1181 "dhcp6_lexer.ll"
+#line 1183 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 1190 "dhcp6_lexer.ll"
+#line 1192 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 1199 "dhcp6_lexer.ll"
+#line 1201 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::SERVER_ID:
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 1208 "dhcp6_lexer.ll"
+#line 1210 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 1217 "dhcp6_lexer.ll"
+#line 1219 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 1226 "dhcp6_lexer.ll"
+#line 1228 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 1235 "dhcp6_lexer.ll"
+#line 1237 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 1244 "dhcp6_lexer.ll"
+#line 1246 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 1253 "dhcp6_lexer.ll"
+#line 1255 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 1262 "dhcp6_lexer.ll"
+#line 1264 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::EXPIRED_LEASES_PROCESSING:
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 1271 "dhcp6_lexer.ll"
+#line 1273 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 1280 "dhcp6_lexer.ll"
+#line 1282 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 1289 "dhcp6_lexer.ll"
+#line 1291 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONTROL_SOCKET:
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 1298 "dhcp6_lexer.ll"
+#line 1300 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONTROL_SOCKET:
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 1307 "dhcp6_lexer.ll"
+#line 1309 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 1316 "dhcp6_lexer.ll"
+#line 1318 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 1325 "dhcp6_lexer.ll"
+#line 1327 "dhcp6_lexer.ll"
{
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 1334 "dhcp6_lexer.ll"
+#line 1336 "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
+ /* 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);
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 136:
/* rule 136 can match eol */
YY_RULE_SETUP
-#line 1432 "dhcp6_lexer.ll"
+#line 1434 "dhcp6_lexer.ll"
{
- // Bad string with a forbidden control character inside
+ /* Bad string with a forbidden control character inside */
driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 137:
/* rule 137 can match eol */
YY_RULE_SETUP
-#line 1437 "dhcp6_lexer.ll"
+#line 1439 "dhcp6_lexer.ll"
{
- // Bad string with a bad escape inside
+ /* Bad string with a bad escape inside */
driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 1442 "dhcp6_lexer.ll"
+#line 1444 "dhcp6_lexer.ll"
{
- // Bad string with an open escape at the end
+ /* Bad string with an open escape at the end */
driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 1447 "dhcp6_lexer.ll"
+#line 1449 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 1448 "dhcp6_lexer.ll"
+#line 1450 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 1449 "dhcp6_lexer.ll"
+#line 1451 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 1450 "dhcp6_lexer.ll"
+#line 1452 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 1451 "dhcp6_lexer.ll"
+#line 1453 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_COMMA(driver.loc_); }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 1452 "dhcp6_lexer.ll"
+#line 1454 "dhcp6_lexer.ll"
{ return isc::dhcp::Dhcp6Parser::make_COLON(driver.loc_); }
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 1454 "dhcp6_lexer.ll"
+#line 1456 "dhcp6_lexer.ll"
{
- // An integer was found.
+ /* 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 146:
YY_RULE_SETUP
-#line 1472 "dhcp6_lexer.ll"
+#line 1474 "dhcp6_lexer.ll"
{
- // A floating point was found.
+ /* A floating point was found. */
std::string tmp(yytext);
double fp = 0.0;
try {
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 1485 "dhcp6_lexer.ll"
+#line 1487 "dhcp6_lexer.ll"
{
string tmp(yytext);
return isc::dhcp::Dhcp6Parser::make_BOOLEAN(tmp == "true", driver.loc_);
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 1490 "dhcp6_lexer.ll"
+#line 1492 "dhcp6_lexer.ll"
{
return isc::dhcp::Dhcp6Parser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 1494 "dhcp6_lexer.ll"
+#line 1496 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 1496 "dhcp6_lexer.ll"
+#line 1498 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 1498 "dhcp6_lexer.ll"
+#line 1500 "dhcp6_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 1500 "dhcp6_lexer.ll"
+#line 1502 "dhcp6_lexer.ll"
driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 1502 "dhcp6_lexer.ll"
+#line 1504 "dhcp6_lexer.ll"
{
if (driver.states_.empty()) {
return isc::dhcp::Dhcp6Parser::make_END(driver.loc_);
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 1525 "dhcp6_lexer.ll"
+#line 1527 "dhcp6_lexer.ll"
ECHO;
YY_BREAK
-#line 3728 "dhcp6_lexer.cc"
+#line 3730 "dhcp6_lexer.cc"
case YY_END_OF_BUFFER:
{
/* %ok-for-header */
-#line 1525 "dhcp6_lexer.ll"
+#line 1527 "dhcp6_lexer.ll"
using namespace isc::dhcp;
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 */
}
}
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?"); }
};
}
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201704181957
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++
static const flex_int16_t yy_rule_linenum[51] =
{ 0,
- 100, 105, 111, 121, 127, 145, 152, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
- 199, 200, 201, 202, 203, 204, 205, 206, 207, 208
+ 102, 107, 113, 123, 129, 147, 154, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210
} ;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
#define YY_RESTORE_YY_MORE_OFFSET
char *evaltext;
#line 1 "lexer.ll"
-/* Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
#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>.
+/* 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;
namespace {
isc::eval::EvalContext::ParserType start_token_value;
};
-// 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 872 "lexer.cc"
+#line 874 "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 yywrap requires linking with -lfl, which provides the default yywrap
/* 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 74 "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.
+#line 76 "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 897 "lexer.cc"
-#line 898 "lexer.cc"
+#line 899 "lexer.cc"
+#line 900 "lexer.cc"
#define INITIAL 0
{
/* %% [7.0] user's declarations go here */
-#line 80 "lexer.ll"
+#line 82 "lexer.ll"
-#line 84 "lexer.ll"
- // Code run each time evallex is called.
+#line 86 "lexer.ll"
+ /* Code run each time evallex is called. */
loc.step();
if (start_token_flag) {
-#line 1203 "lexer.cc"
+#line 1205 "lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
/* %% [13.0] actions go here */
case 1:
YY_RULE_SETUP
-#line 100 "lexer.ll"
+#line 102 "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 105 "lexer.ll"
+#line 107 "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 111 "lexer.ll"
+#line 113 "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 121 "lexer.ll"
+#line 123 "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 127 "lexer.ll"
+#line 129 "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 145 "lexer.ll"
+#line 147 "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 152 "lexer.ll"
+#line 154 "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 166 "lexer.ll"
+#line 168 "lexer.ll"
return isc::eval::EvalParser::make_EQUAL(loc);
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 167 "lexer.ll"
+#line 169 "lexer.ll"
return isc::eval::EvalParser::make_OPTION(loc);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 168 "lexer.ll"
+#line 170 "lexer.ll"
return isc::eval::EvalParser::make_RELAY4(loc);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 169 "lexer.ll"
+#line 171 "lexer.ll"
return isc::eval::EvalParser::make_RELAY6(loc);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 170 "lexer.ll"
+#line 172 "lexer.ll"
return isc::eval::EvalParser::make_PEERADDR(loc);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 171 "lexer.ll"
+#line 173 "lexer.ll"
return isc::eval::EvalParser::make_LINKADDR(loc);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 172 "lexer.ll"
+#line 174 "lexer.ll"
return isc::eval::EvalParser::make_TEXT(loc);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 173 "lexer.ll"
+#line 175 "lexer.ll"
return isc::eval::EvalParser::make_HEX(loc);
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 174 "lexer.ll"
+#line 176 "lexer.ll"
return isc::eval::EvalParser::make_EXISTS(loc);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 175 "lexer.ll"
+#line 177 "lexer.ll"
return isc::eval::EvalParser::make_PKT(loc);
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 176 "lexer.ll"
+#line 178 "lexer.ll"
return isc::eval::EvalParser::make_IFACE(loc);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 177 "lexer.ll"
+#line 179 "lexer.ll"
return isc::eval::EvalParser::make_SRC(loc);
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 178 "lexer.ll"
+#line 180 "lexer.ll"
return isc::eval::EvalParser::make_DST(loc);
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 179 "lexer.ll"
+#line 181 "lexer.ll"
return isc::eval::EvalParser::make_LEN(loc);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 180 "lexer.ll"
+#line 182 "lexer.ll"
return isc::eval::EvalParser::make_PKT4(loc);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 181 "lexer.ll"
+#line 183 "lexer.ll"
return isc::eval::EvalParser::make_CHADDR(loc);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 182 "lexer.ll"
+#line 184 "lexer.ll"
return isc::eval::EvalParser::make_HLEN(loc);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 183 "lexer.ll"
+#line 185 "lexer.ll"
return isc::eval::EvalParser::make_HTYPE(loc);
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 184 "lexer.ll"
+#line 186 "lexer.ll"
return isc::eval::EvalParser::make_CIADDR(loc);
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 185 "lexer.ll"
+#line 187 "lexer.ll"
return isc::eval::EvalParser::make_GIADDR(loc);
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 186 "lexer.ll"
+#line 188 "lexer.ll"
return isc::eval::EvalParser::make_YIADDR(loc);
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 187 "lexer.ll"
+#line 189 "lexer.ll"
return isc::eval::EvalParser::make_SIADDR(loc);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 188 "lexer.ll"
+#line 190 "lexer.ll"
return isc::eval::EvalParser::make_PKT6(loc);
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 189 "lexer.ll"
+#line 191 "lexer.ll"
return isc::eval::EvalParser::make_MSGTYPE(loc);
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 190 "lexer.ll"
+#line 192 "lexer.ll"
return isc::eval::EvalParser::make_TRANSID(loc);
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 191 "lexer.ll"
+#line 193 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR(loc);
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 192 "lexer.ll"
+#line 194 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR_CLASS(loc);
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 193 "lexer.ll"
+#line 195 "lexer.ll"
return isc::eval::EvalParser::make_DATA(loc);
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 194 "lexer.ll"
+#line 196 "lexer.ll"
return isc::eval::EvalParser::make_ENTERPRISE(loc);
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 195 "lexer.ll"
+#line 197 "lexer.ll"
return isc::eval::EvalParser::make_SUBSTRING(loc);
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 196 "lexer.ll"
+#line 198 "lexer.ll"
return isc::eval::EvalParser::make_ALL(loc);
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 197 "lexer.ll"
+#line 199 "lexer.ll"
return isc::eval::EvalParser::make_CONCAT(loc);
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 198 "lexer.ll"
+#line 200 "lexer.ll"
return isc::eval::EvalParser::make_NOT(loc);
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 199 "lexer.ll"
+#line 201 "lexer.ll"
return isc::eval::EvalParser::make_AND(loc);
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 200 "lexer.ll"
+#line 202 "lexer.ll"
return isc::eval::EvalParser::make_OR(loc);
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 201 "lexer.ll"
+#line 203 "lexer.ll"
return isc::eval::EvalParser::make_DOT(loc);
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 202 "lexer.ll"
+#line 204 "lexer.ll"
return isc::eval::EvalParser::make_LPAREN(loc);
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 203 "lexer.ll"
+#line 205 "lexer.ll"
return isc::eval::EvalParser::make_RPAREN(loc);
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 204 "lexer.ll"
+#line 206 "lexer.ll"
return isc::eval::EvalParser::make_LBRACKET(loc);
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 205 "lexer.ll"
+#line 207 "lexer.ll"
return isc::eval::EvalParser::make_RBRACKET(loc);
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 206 "lexer.ll"
+#line 208 "lexer.ll"
return isc::eval::EvalParser::make_COMA(loc);
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 207 "lexer.ll"
+#line 209 "lexer.ll"
return isc::eval::EvalParser::make_ANY(loc);
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 208 "lexer.ll"
+#line 210 "lexer.ll"
driver.error (loc, "Invalid character: " + std::string(evaltext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 209 "lexer.ll"
+#line 211 "lexer.ll"
return isc::eval::EvalParser::make_END(loc);
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 210 "lexer.ll"
+#line 212 "lexer.ll"
ECHO;
YY_BREAK
-#line 1629 "lexer.cc"
+#line 1631 "lexer.cc"
case YY_END_OF_BUFFER:
{
/* %ok-for-header */
-#line 210 "lexer.ll"
+#line 212 "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 201704031753
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Generated 201704031753
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
-// Generated 201704031753
+// Generated 201705171457
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++