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

[trac5351] regen bison

parent 998f40eb
......@@ -2326,987 +2326,991 @@ namespace isc { namespace dhcp {
// Merge the comment
user_context->set("comment", old->get("comment"));
}
// Set the user context
parent->set("user-context", user_context);
ctx.leave();
}
#line 2333 "dhcp4_parser.cc" // lalr1.cc:859
#line 2335 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 393:
#line 1383 "dhcp4_parser.yy" // lalr1.cc:859
#line 1385 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2341 "dhcp4_parser.cc" // lalr1.cc:859
#line 2343 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 394:
#line 1385 "dhcp4_parser.yy" // lalr1.cc:859
#line 1387 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr parent = ctx.stack_.back();
ElementPtr e(new MapElement(ctx.loc2pos(yystack_[3].location)));
ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
e->set("comment", s);
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
user_context->set("comment", comment);
// Handle already existing user context
ConstElementPtr old = parent->get("user-context");
if (old) {
// Check for duplicate comment
if (old->contains("comment")) {
if (old->contains("comment")) {
std::stringstream msg;
msg << "duplicate user-context/comment entries (previous at "
<< old->getPosition().str() << ")";
error(yystack_[3].location, msg.str());
}
// Merge the user context in the comment
merge(e, old);
merge(user_context, old);
}
parent->set("user-context", e);
// Set the user context
parent->set("user-context", user_context);
ctx.leave();
}
#line 2367 "dhcp4_parser.cc" // lalr1.cc:859
#line 2372 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 395:
#line 1410 "dhcp4_parser.yy" // lalr1.cc:859
#line 1415 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("reservations", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.RESERVATIONS);
}
#line 2378 "dhcp4_parser.cc" // lalr1.cc:859
#line 2383 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 396:
#line 1415 "dhcp4_parser.yy" // lalr1.cc:859
#line 1420 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
#line 2387 "dhcp4_parser.cc" // lalr1.cc:859
#line 2392 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 401:
#line 1428 "dhcp4_parser.yy" // lalr1.cc:859
#line 1433 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
#line 2397 "dhcp4_parser.cc" // lalr1.cc:859
#line 2402 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 402:
#line 1432 "dhcp4_parser.yy" // lalr1.cc:859
#line 1437 "dhcp4_parser.yy" // lalr1.cc:859
{
/// @todo: an identifier parameter is required.
ctx.stack_.pop_back();
}
#line 2406 "dhcp4_parser.cc" // lalr1.cc:859
#line 2411 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 403:
#line 1437 "dhcp4_parser.yy" // lalr1.cc:859
#line 1442 "dhcp4_parser.yy" // lalr1.cc:859
{
// Parse the reservations list entry map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
#line 2416 "dhcp4_parser.cc" // lalr1.cc:859
#line 2421 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 404:
#line 1441 "dhcp4_parser.yy" // lalr1.cc:859
#line 1446 "dhcp4_parser.yy" // lalr1.cc:859
{
/// @todo: an identifier parameter is required.
// parsing completed
}
#line 2425 "dhcp4_parser.cc" // lalr1.cc:859
#line 2430 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 424:
#line 1472 "dhcp4_parser.yy" // lalr1.cc:859
#line 1477 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2433 "dhcp4_parser.cc" // lalr1.cc:859
#line 2438 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 425:
#line 1474 "dhcp4_parser.yy" // lalr1.cc:859
#line 1479 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr next_server(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("next-server", next_server);
ctx.leave();
}
#line 2443 "dhcp4_parser.cc" // lalr1.cc:859
#line 2448 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 426:
#line 1480 "dhcp4_parser.yy" // lalr1.cc:859
#line 1485 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2451 "dhcp4_parser.cc" // lalr1.cc:859
#line 2456 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 427:
#line 1482 "dhcp4_parser.yy" // lalr1.cc:859
#line 1487 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr srv(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("server-hostname", srv);
ctx.leave();
}
#line 2461 "dhcp4_parser.cc" // lalr1.cc:859
#line 2466 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 428:
#line 1488 "dhcp4_parser.yy" // lalr1.cc:859
#line 1493 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2469 "dhcp4_parser.cc" // lalr1.cc:859
#line 2474 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 429:
#line 1490 "dhcp4_parser.yy" // lalr1.cc:859
#line 1495 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr bootfile(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("boot-file-name", bootfile);
ctx.leave();
}
#line 2479 "dhcp4_parser.cc" // lalr1.cc:859
#line 2484 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 430:
#line 1496 "dhcp4_parser.yy" // lalr1.cc:859
#line 1501 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2487 "dhcp4_parser.cc" // lalr1.cc:859
#line 2492 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 431:
#line 1498 "dhcp4_parser.yy" // lalr1.cc:859
#line 1503 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr addr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ip-address", addr);
ctx.leave();
}
#line 2497 "dhcp4_parser.cc" // lalr1.cc:859
#line 2502 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 432:
#line 1504 "dhcp4_parser.yy" // lalr1.cc:859
#line 1509 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2505 "dhcp4_parser.cc" // lalr1.cc:859
#line 2510 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 433:
#line 1506 "dhcp4_parser.yy" // lalr1.cc:859
#line 1511 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr d(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("duid", d);
ctx.leave();
}
#line 2515 "dhcp4_parser.cc" // lalr1.cc:859
#line 2520 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 434:
#line 1512 "dhcp4_parser.yy" // lalr1.cc:859
#line 1517 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2523 "dhcp4_parser.cc" // lalr1.cc:859
#line 2528 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 435:
#line 1514 "dhcp4_parser.yy" // lalr1.cc:859
#line 1519 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("hw-address", hw);
ctx.leave();
}
#line 2533 "dhcp4_parser.cc" // lalr1.cc:859
#line 2538 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 436:
#line 1520 "dhcp4_parser.yy" // lalr1.cc:859
#line 1525 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2541 "dhcp4_parser.cc" // lalr1.cc:859
#line 2546 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 437:
#line 1522 "dhcp4_parser.yy" // lalr1.cc:859
#line 1527 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("client-id", hw);
ctx.leave();
}
#line 2551 "dhcp4_parser.cc" // lalr1.cc:859
#line 2556 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 438:
#line 1528 "dhcp4_parser.yy" // lalr1.cc:859
#line 1533 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2559 "dhcp4_parser.cc" // lalr1.cc:859
#line 2564 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 439:
#line 1530 "dhcp4_parser.yy" // lalr1.cc:859
#line 1535 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("circuit-id", hw);
ctx.leave();
}
#line 2569 "dhcp4_parser.cc" // lalr1.cc:859
#line 2574 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 440:
#line 1536 "dhcp4_parser.yy" // lalr1.cc:859
#line 1541 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2577 "dhcp4_parser.cc" // lalr1.cc:859
#line 2582 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 441:
#line 1538 "dhcp4_parser.yy" // lalr1.cc:859
#line 1543 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("flex-id", hw);
ctx.leave();
}
#line 2587 "dhcp4_parser.cc" // lalr1.cc:859
#line 2592 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 442:
#line 1544 "dhcp4_parser.yy" // lalr1.cc:859
#line 1549 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2595 "dhcp4_parser.cc" // lalr1.cc:859
#line 2600 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 443:
#line 1546 "dhcp4_parser.yy" // lalr1.cc:859
#line 1551 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr host(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("hostname", host);
ctx.leave();
}
#line 2605 "dhcp4_parser.cc" // lalr1.cc:859
#line 2610 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 444:
#line 1552 "dhcp4_parser.yy" // lalr1.cc:859
#line 1557 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("client-classes", c);
ctx.stack_.push_back(c);
ctx.enter(ctx.NO_KEYWORD);
}
#line 2616 "dhcp4_parser.cc" // lalr1.cc:859
#line 2621 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 445:
#line 1557 "dhcp4_parser.yy" // lalr1.cc:859
#line 1562 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
#line 2625 "dhcp4_parser.cc" // lalr1.cc:859
#line 2630 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 446:
#line 1565 "dhcp4_parser.yy" // lalr1.cc:859
#line 1570 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("relay", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.RELAY);
}
#line 2636 "dhcp4_parser.cc" // lalr1.cc:859
#line 2641 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 447:
#line 1570 "dhcp4_parser.yy" // lalr1.cc:859
#line 1575 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
#line 2645 "dhcp4_parser.cc" // lalr1.cc:859
#line 2650 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 448:
#line 1575 "dhcp4_parser.yy" // lalr1.cc:859
#line 1580 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2653 "dhcp4_parser.cc" // lalr1.cc:859
#line 2658 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 449:
#line 1577 "dhcp4_parser.yy" // lalr1.cc:859
#line 1582 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr ip(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ip-address", ip);
ctx.leave();
}
#line 2663 "dhcp4_parser.cc" // lalr1.cc:859
#line 2668 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 450:
#line 1586 "dhcp4_parser.yy" // lalr1.cc:859
#line 1591 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("client-classes", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.CLIENT_CLASSES);
}
#line 2674 "dhcp4_parser.cc" // lalr1.cc:859
#line 2679 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 451:
#line 1591 "dhcp4_parser.yy" // lalr1.cc:859
#line 1596 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
#line 2683 "dhcp4_parser.cc" // lalr1.cc:859
#line 2688 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 454:
#line 1600 "dhcp4_parser.yy" // lalr1.cc:859
#line 1605 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
#line 2693 "dhcp4_parser.cc" // lalr1.cc:859
#line 2698 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 455:
#line 1604 "dhcp4_parser.yy" // lalr1.cc:859
#line 1609 "dhcp4_parser.yy" // lalr1.cc:859
{
// The name client class parameter is required.
ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
ctx.stack_.pop_back();
}
#line 2703 "dhcp4_parser.cc" // lalr1.cc:859
#line 2708 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 471:
#line 1632 "dhcp4_parser.yy" // lalr1.cc:859
#line 1637 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2711 "dhcp4_parser.cc" // lalr1.cc:859
#line 2716 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 472:
#line 1634 "dhcp4_parser.yy" // lalr1.cc:859
#line 1639 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr test(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("test", test);
ctx.leave();
}
#line 2721 "dhcp4_parser.cc" // lalr1.cc:859
#line 2726 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 473:
#line 1644 "dhcp4_parser.yy" // lalr1.cc:859
#line 1649 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr time(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp4o6-port", time);
}
#line 2730 "dhcp4_parser.cc" // lalr1.cc:859
#line 2735 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 474:
#line 1651 "dhcp4_parser.yy" // lalr1.cc:859
#line 1656 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("control-socket", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.CONTROL_SOCKET);
}
#line 2741 "dhcp4_parser.cc" // lalr1.cc:859
#line 2746 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 475:
#line 1656 "dhcp4_parser.yy" // lalr1.cc:859
#line 1661 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.stack_.pop_back();
ctx.leave();
}
#line 2750 "dhcp4_parser.cc" // lalr1.cc:859
#line 2755 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 483:
#line 1672 "dhcp4_parser.yy" // lalr1.cc:859
#line 1677 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2758 "dhcp4_parser.cc" // lalr1.cc:859
#line 2763 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 484:
#line 1674 "dhcp4_parser.yy" // lalr1.cc:859
#line 1679 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr stype(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-type", stype);
ctx.leave();
}
#line 2768 "dhcp4_parser.cc" // lalr1.cc:859
#line 2773 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 485:
#line 1680 "dhcp4_parser.yy" // lalr1.cc:859
#line 1685 "dhcp4_parser.yy" // lalr1.cc:859
{
ctx.enter(ctx.NO_KEYWORD);
}
#line 2776 "dhcp4_parser.cc" // lalr1.cc:859
#line 2781 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 486:
#line 1682 "dhcp4_parser.yy" // lalr1.cc:859
#line 1687 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-name", name);
ctx.leave();
}
#line 2786 "dhcp4_parser.cc" // lalr1.cc:859
#line 2791 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 487:
#line 1690 "dhcp4_parser.yy" // lalr1.cc:859
#line 1695 "dhcp4_parser.yy" // lalr1.cc:859
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp-ddns", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.DHCP_DDNS);
}
#line 2797 "dhcp4_parser.cc" // lalr1.cc:859
#line 2802 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 488:
#line 1695 "dhcp4_parser.yy" // lalr1.cc:859
#line 1700 "dhcp4_parser.yy" // lalr1.cc:859
{
// The enable updates DHCP DDNS parameter is required.
ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
ctx.stack_.pop_back();
ctx.leave();
}
#line 2808 "dhcp4_parser.cc" // lalr1.cc:859
#line 2813 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 489:
#line 1702 "dhcp4_parser.yy" // lalr1.cc:859
#line 1707 "dhcp4_parser.yy" // lalr1.cc:859
{
// Parse the dhcp-ddns map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
#line 2818 "dhcp4_parser.cc" // lalr1.cc:859
#line 2823 "dhcp4_parser.cc" // lalr1.cc:859
break;
case 490:
#line 1706 "dhcp4_parser.yy" // lalr1.cc:859
#line 1711 "dhcp4_parser.yy" // lalr1.cc:859
{
// The enable updates DHCP DDNS parameter is required.
ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
// parsing completed
}
#line 2828 "dhcp4_parser.cc" // lalr1.cc:859