dhcp6_parser.cc 118 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
// A Bison parser, made by GNU Bison 3.0.4.

// Skeleton implementation for Bison LALR(1) parsers in C++

// Copyright (C) 2002-2015 Free Software Foundation, Inc.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// As a special exception, you may create a larger work that contains
// part or all of the Bison parser skeleton and distribute that work
// under terms of your choice, so long as that work isn't itself a
// parser generator using the skeleton or a modified version thereof
// as a parser skeleton.  Alternatively, if you modify or redistribute
// the parser skeleton itself, you may (at your option) remove this
// special exception, which will cause the skeleton and the resulting
// Bison output files to be licensed under the GNU General Public
// License without this special exception.

// This special exception was added by the Free Software Foundation in
// version 2.2 of Bison.

// Take the name prefix into account.
#define yylex   parser6_lex

// First part of user declarations.

#line 39 "dhcp6_parser.cc" // lalr1.cc:404

# ifndef YY_NULLPTR
#  if defined __cplusplus && 201103L <= __cplusplus
#   define YY_NULLPTR nullptr
#  else
#   define YY_NULLPTR 0
#  endif
# endif

#include "dhcp6_parser.h"

// User implementation prologue.

#line 53 "dhcp6_parser.cc" // lalr1.cc:412
// Unqualified %code blocks.
#line 34 "dhcp6_parser.yy" // lalr1.cc:413

#include <dhcp6/parser_context.h>

#line 59 "dhcp6_parser.cc" // lalr1.cc:413


#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> // FIXME: INFRINGES ON USER NAME SPACE.
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif

#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

# ifndef YYLLOC_DEFAULT
#  define YYLLOC_DEFAULT(Current, Rhs, N)                               \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).begin  = YYRHSLOC (Rhs, 1).begin;                   \
          (Current).end    = YYRHSLOC (Rhs, N).end;                     \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;      \
        }                                                               \
    while (/*CONSTCOND*/ false)
# endif


// Suppress unused-variable warnings by "using" E.
#define YYUSE(E) ((void) (E))

// Enable debugging if requested.
#if PARSER6_DEBUG

// A pseudo ostream that takes yydebug_ into account.
# define YYCDEBUG if (yydebug_) (*yycdebug_)

# define YY_SYMBOL_PRINT(Title, Symbol)         \
  do {                                          \
    if (yydebug_)                               \
    {                                           \
      *yycdebug_ << Title << ' ';               \
      yy_print_ (*yycdebug_, Symbol);           \
      *yycdebug_ << std::endl;                  \
    }                                           \
  } while (false)

# define YY_REDUCE_PRINT(Rule)          \
  do {                                  \
    if (yydebug_)                       \
      yy_reduce_print_ (Rule);          \
  } while (false)

# define YY_STACK_PRINT()               \
  do {                                  \
    if (yydebug_)                       \
      yystack_print_ ();                \
  } while (false)

#else // !PARSER6_DEBUG

# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol)  YYUSE(Symbol)
# define YY_REDUCE_PRINT(Rule)           static_cast<void>(0)
# define YY_STACK_PRINT()                static_cast<void>(0)

#endif // !PARSER6_DEBUG

#define yyerrok         (yyerrstatus_ = 0)
#define yyclearin       (yyla.clear ())

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYRECOVERING()  (!!yyerrstatus_)

#line 14 "dhcp6_parser.yy" // lalr1.cc:479
namespace isc { namespace dhcp {
#line 145 "dhcp6_parser.cc" // lalr1.cc:479

  /* Return YYSTR after stripping away unnecessary quotes and
     backslashes, so that it's suitable for yyerror.  The heuristic is
     that double-quoting is unnecessary unless the string contains an
     apostrophe, a comma, or backslash (other than backslash-backslash).
     YYSTR is taken from yytname.  */
  std::string
  Dhcp6Parser::yytnamerr_ (const char *yystr)
  {
    if (*yystr == '"')
      {
        std::string yyr = "";
        char const *yyp = yystr;

        for (;;)
          switch (*++yyp)
            {
            case '\'':
            case ',':
              goto do_not_strip_quotes;

            case '\\':
              if (*++yyp != '\\')
                goto do_not_strip_quotes;
              // Fall through.
            default:
              yyr += *yyp;
              break;

            case '"':
              return yyr;
            }
      do_not_strip_quotes: ;
      }

    return yystr;
  }


  /// Build a parser object.
  Dhcp6Parser::Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg)
    :
#if PARSER6_DEBUG
      yydebug_ (false),
      yycdebug_ (&std::cerr),
#endif
      ctx (ctx_yyarg)
  {}

  Dhcp6Parser::~Dhcp6Parser ()
  {}


  /*---------------.
  | Symbol types.  |
  `---------------*/



  // by_state.
  inline
  Dhcp6Parser::by_state::by_state ()
    : state (empty_state)
  {}

  inline
  Dhcp6Parser::by_state::by_state (const by_state& other)
    : state (other.state)
  {}

  inline
  void
  Dhcp6Parser::by_state::clear ()
  {
    state = empty_state;
  }

  inline
  void
  Dhcp6Parser::by_state::move (by_state& that)
  {
    state = that.state;
    that.clear ();
  }

  inline
  Dhcp6Parser::by_state::by_state (state_type s)
    : state (s)
  {}

  inline
  Dhcp6Parser::symbol_number_type
  Dhcp6Parser::by_state::type_get () const
  {
    if (state == empty_state)
      return empty_symbol;
    else
      return yystos_[state];
  }

  inline
  Dhcp6Parser::stack_symbol_type::stack_symbol_type ()
  {}


  inline
  Dhcp6Parser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
    : super_type (s, that.location)
  {
      switch (that.type_get ())
    {
      case 117: // value
      case 341: // version_value
        value.move< ElementPtr > (that.value);
        break;

      case 103: // "boolean"
        value.move< bool > (that.value);
        break;

      case 102: // "floating point"
        value.move< double > (that.value);
        break;

      case 101: // "integer"
        value.move< int64_t > (that.value);
        break;

      case 100: // "constant string"
        value.move< std::string > (that.value);
        break;

      default:
        break;
    }

    // that is emptied.
    that.type = empty_symbol;
  }

  inline
  Dhcp6Parser::stack_symbol_type&
  Dhcp6Parser::stack_symbol_type::operator= (const stack_symbol_type& that)
  {
    state = that.state;
      switch (that.type_get ())
    {
      case 117: // value
      case 341: // version_value
        value.copy< ElementPtr > (that.value);
        break;

      case 103: // "boolean"
        value.copy< bool > (that.value);
        break;

      case 102: // "floating point"
        value.copy< double > (that.value);
        break;

      case 101: // "integer"
        value.copy< int64_t > (that.value);
        break;

      case 100: // "constant string"
        value.copy< std::string > (that.value);
        break;

      default:
        break;
    }

    location = that.location;
    return *this;
  }


  template <typename Base>
  inline
  void
  Dhcp6Parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
  {
    if (yymsg)
      YY_SYMBOL_PRINT (yymsg, yysym);
  }

#if PARSER6_DEBUG
  template <typename Base>
  void
  Dhcp6Parser::yy_print_ (std::ostream& yyo,
                                     const basic_symbol<Base>& yysym) const
  {
    std::ostream& yyoutput = yyo;
    YYUSE (yyoutput);
    symbol_number_type yytype = yysym.type_get ();
    // Avoid a (spurious) G++ 4.8 warning about "array subscript is
    // below array bounds".
    if (yysym.empty ())
      std::abort ();
    yyo << (yytype < yyntokens_ ? "token" : "nterm")
        << ' ' << yytname_[yytype] << " ("
        << yysym.location << ": ";
    switch (yytype)
    {
            case 100: // "constant string"

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< std::string > (); }
#line 354 "dhcp6_parser.cc" // lalr1.cc:636
        break;

      case 101: // "integer"

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< int64_t > (); }
#line 361 "dhcp6_parser.cc" // lalr1.cc:636
        break;

      case 102: // "floating point"

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< double > (); }
#line 368 "dhcp6_parser.cc" // lalr1.cc:636
        break;

      case 103: // "boolean"

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< bool > (); }
#line 375 "dhcp6_parser.cc" // lalr1.cc:636
        break;

      case 117: // value

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< ElementPtr > (); }
#line 382 "dhcp6_parser.cc" // lalr1.cc:636
        break;

      case 341: // version_value

#line 191 "dhcp6_parser.yy" // lalr1.cc:636
        { yyoutput << yysym.value.template as< ElementPtr > (); }
#line 389 "dhcp6_parser.cc" // lalr1.cc:636
        break;


      default:
        break;
    }
    yyo << ')';
  }
#endif

  inline
  void
  Dhcp6Parser::yypush_ (const char* m, state_type s, symbol_type& sym)
  {
    stack_symbol_type t (s, sym);
    yypush_ (m, t);
  }

  inline
  void
  Dhcp6Parser::yypush_ (const char* m, stack_symbol_type& s)
  {
    if (m)
      YY_SYMBOL_PRINT (m, s);
    yystack_.push (s);
  }

  inline
  void
  Dhcp6Parser::yypop_ (unsigned int n)
  {
    yystack_.pop (n);
  }

#if PARSER6_DEBUG
  std::ostream&
  Dhcp6Parser::debug_stream () const
  {
    return *yycdebug_;
  }

  void
  Dhcp6Parser::set_debug_stream (std::ostream& o)
  {
    yycdebug_ = &o;
  }


  Dhcp6Parser::debug_level_type
  Dhcp6Parser::debug_level () const
  {
    return yydebug_;
  }

  void
  Dhcp6Parser::set_debug_level (debug_level_type l)
  {
    yydebug_ = l;
  }
#endif // PARSER6_DEBUG

  inline Dhcp6Parser::state_type
  Dhcp6Parser::yy_lr_goto_state_ (state_type yystate, int yysym)
  {
    int yyr = yypgoto_[yysym - yyntokens_] + yystate;
    if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
      return yytable_[yyr];
    else
      return yydefgoto_[yysym - yyntokens_];
  }

  inline bool
  Dhcp6Parser::yy_pact_value_is_default_ (int yyvalue)
  {
    return yyvalue == yypact_ninf_;
  }

  inline bool
  Dhcp6Parser::yy_table_value_is_error_ (int yyvalue)
  {
    return yyvalue == yytable_ninf_;
  }

  int
  Dhcp6Parser::parse ()
  {
    // State.
    int yyn;
    /// Length of the RHS of the rule being reduced.
    int yylen = 0;

    // Error handling.
    int yynerrs_ = 0;
    int yyerrstatus_ = 0;

    /// The lookahead symbol.
    symbol_type yyla;

    /// The locations where the error started and ended.
    stack_symbol_type yyerror_range[3];

    /// The return value of parse ().
    int yyresult;

    // FIXME: This shoud be completely indented.  It is not yet to
    // avoid gratuitous conflicts when merging into the master branch.
    try
      {
    YYCDEBUG << "Starting parse" << std::endl;


    /* Initialize the stack.  The initial state will be set in
       yynewstate, since the latter expects the semantical and the
       location values to have been already stored, initialize these
       stacks with a primary value.  */
    yystack_.clear ();
    yypush_ (YY_NULLPTR, 0, yyla);

    // A new symbol was pushed on the stack.
  yynewstate:
    YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;

    // Accept?
    if (yystack_[0].state == yyfinal_)
      goto yyacceptlab;

    goto yybackup;

    // Backup.
  yybackup:

    // Try to take a decision without lookahead.
    yyn = yypact_[yystack_[0].state];
    if (yy_pact_value_is_default_ (yyn))
      goto yydefault;

    // Read a lookahead token.
    if (yyla.empty ())
      {
        YYCDEBUG << "Reading a token: ";
        try
          {
            symbol_type yylookahead (yylex (ctx));
            yyla.move (yylookahead);
          }
        catch (const syntax_error& yyexc)
          {
            error (yyexc);
            goto yyerrlab1;
          }
      }
    YY_SYMBOL_PRINT ("Next token is", yyla);

    /* If the proper action on seeing token YYLA.TYPE is to reduce or
       to detect an error, take that action.  */
    yyn += yyla.type_get ();
    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ())
      goto yydefault;

    // Reduce or error.
    yyn = yytable_[yyn];
    if (yyn <= 0)
      {
        if (yy_table_value_is_error_ (yyn))
          goto yyerrlab;
        yyn = -yyn;
        goto yyreduce;
      }

    // Count tokens shifted since error; after three, turn off error status.
    if (yyerrstatus_)
      --yyerrstatus_;

    // Shift the lookahead token.
    yypush_ ("Shifting", yyn, yyla);
    goto yynewstate;

  /*-----------------------------------------------------------.
  | yydefault -- do the default action for the current state.  |
  `-----------------------------------------------------------*/
  yydefault:
    yyn = yydefact_[yystack_[0].state];
    if (yyn == 0)
      goto yyerrlab;
    goto yyreduce;

  /*-----------------------------.
  | yyreduce -- Do a reduction.  |
  `-----------------------------*/
  yyreduce:
    yylen = yyr2_[yyn];
    {
      stack_symbol_type yylhs;
      yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);
      /* Variants are always initialized to an empty instance of the
         correct type. The default '$$ = $1' action is NOT applied
         when using variants.  */
        switch (yyr1_[yyn])
    {
      case 117: // value
      case 341: // version_value
        yylhs.value.build< ElementPtr > ();
        break;

      case 103: // "boolean"
        yylhs.value.build< bool > ();
        break;

      case 102: // "floating point"
        yylhs.value.build< double > ();
        break;

      case 101: // "integer"
        yylhs.value.build< int64_t > ();
        break;

      case 100: // "constant string"
        yylhs.value.build< std::string > ();
        break;

      default:
        break;
    }


      // Compute the default @$.
      {
        slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
        YYLLOC_DEFAULT (yylhs.location, slice, yylen);
      }

      // Perform the reduction.
      YY_REDUCE_PRINT (yyn);
      try
        {
          switch (yyn)
            {
  case 2:
#line 200 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.NO_KEYWORD; }
#line 630 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 4:
#line 201 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.CONFIG; }
#line 636 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 6:
#line 202 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.DHCP6; }
#line 642 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 8:
#line 203 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.INTERFACES_CONFIG; }
#line 648 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 10:
#line 204 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.SUBNET6; }
#line 654 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 12:
#line 205 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.POOLS; }
#line 660 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 14:
#line 206 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.PD_POOLS; }
#line 666 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 16:
#line 207 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.RESERVATIONS; }
#line 672 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 18:
#line 208 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.OPTION_DEF; }
#line 678 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 20:
#line 209 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.OPTION_DATA; }
#line 684 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 22:
#line 210 "dhcp6_parser.yy" // lalr1.cc:859
    { ctx.ctx_ = ctx.HOOKS_LIBRARIES; }
#line 690 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 24:
#line 218 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
#line 696 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 25:
#line 219 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
#line 702 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 26:
#line 220 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
#line 708 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 27:
#line 221 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
#line 714 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 28:
#line 222 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
#line 720 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 29:
#line 223 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
#line 726 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 30:
#line 224 "dhcp6_parser.yy" // lalr1.cc:859
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
#line 732 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 31:
#line 227 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // Push back the JSON value on the stack
    ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
}
#line 741 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 32:
#line 232 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 752 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 33:
#line 237 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
#line 762 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 36:
#line 248 "dhcp6_parser.yy" // lalr1.cc:859
    {
                  // map containing a single entry
                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                  }
#line 771 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 37:
#line 252 "dhcp6_parser.yy" // lalr1.cc:859
    {
                  // map consisting of a shorter map followed by
                  // comma and string:value
                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                  }
#line 781 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 38:
#line 259 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(l);
}
#line 790 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 39:
#line 262 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // list parsing complete. Put any sanity checking here
}
#line 798 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 40:
#line 267 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // List parsing about to start
}
#line 806 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 41:
#line 269 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // list parsing complete. Put any sanity checking here
    //ctx.stack_.pop_back();
}
#line 815 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 44:
#line 278 "dhcp6_parser.yy" // lalr1.cc:859
    {
                  // List consisting of a single element.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
#line 824 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 45:
#line 282 "dhcp6_parser.yy" // lalr1.cc:859
    {
                  // List ending with , and a value.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
#line 833 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 46:
#line 293 "dhcp6_parser.yy" // lalr1.cc:859
    {
    const std::string& where = ctx.contextName();
    const std::string& keyword = yystack_[1].value.as< std::string > ();
    error(yystack_[1].location,
          "got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
#line 844 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 47:
#line 303 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 855 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 48:
#line 308 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
#line 865 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 56:
#line 327 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("Dhcp6", m);
    ctx.stack_.push_back(m);
    ctx.enter(ctx.DHCP6);
}
#line 878 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 57:
#line 334 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 890 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 58:
#line 344 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // Parse the Dhcp6 map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 900 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 59:
#line 348 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // parsing completed
}
#line 908 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 85:
#line 383 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("preferred-lifetime", prf);
}
#line 917 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 86:
#line 388 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("valid-lifetime", prf);
}
#line 926 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 87:
#line 393 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("renew-timer", prf);
}
#line 935 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 88:
#line 398 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("rebind-timer", prf);
}
#line 944 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 89:
#line 403 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr dpp(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("decline-probation-period", dpp);
}
#line 953 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 90:
#line 408 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interfaces-config", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.INTERFACES_CONFIG);
}
#line 964 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 91:
#line 413 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 973 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 92:
#line 418 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // Parse the interfaces-config map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 983 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 93:
#line 422 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // parsing completed
}
#line 991 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 94:
#line 426 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interfaces", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1002 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 95:
#line 431 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1011 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 96:
#line 436 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("lease-database", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.LEASE_DATABASE);
}
#line 1022 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 97:
#line 441 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1031 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 98:
#line 446 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("hosts-database", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.HOSTS_DATABASE);
}
#line 1042 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 99:
#line 451 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1051 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 111:
#line 471 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1059 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 112:
#line 473 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("type", prf);
    ctx.leave();
}
#line 1069 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 113:
#line 479 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1077 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 114:
#line 481 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr user(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("user", user);
    ctx.leave();
}
#line 1087 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 115:
#line 487 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1095 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 116:
#line 489 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr pwd(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("password", pwd);
    ctx.leave();
}
#line 1105 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 117:
#line 495 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1113 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 118:
#line 497 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr h(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("host", h);
    ctx.leave();
}
#line 1123 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 119:
#line 503 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1131 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 120:
#line 505 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("name", name);
    ctx.leave();
}
#line 1141 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 121:
#line 511 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("persist", n);
}
#line 1150 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 122:
#line 516 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("lfc-interval", n);
}
#line 1159 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 123:
#line 521 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("readonly", n);
}
#line 1168 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 124:
#line 526 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("mac-sources", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.MAC_SOURCES);
}
#line 1179 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 125:
#line 531 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1188 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 130:
#line 544 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(duid);
}
#line 1197 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 131:
#line 549 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr duid(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(duid);
}
#line 1206 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 132:
#line 554 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("host-reservation-identifiers", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS);
}
#line 1217 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 133:
#line 559 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1226 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 138:
#line 572 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(hwaddr);
}
#line 1235 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 139:
#line 577 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("relay-supplied-options", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1246 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 140:
#line 582 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1255 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 141:
#line 587 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("hooks-libraries", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.HOOKS_LIBRARIES);
}
#line 1266 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 142:
#line 592 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1275 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 147:
#line 605 "dhcp6_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 1285 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 148:
#line 609 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.stack_.pop_back();
}
#line 1293 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 149:
#line 613 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // Parse the hooks-libraries list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1303 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 150:
#line 617 "dhcp6_parser.yy" // lalr1.cc:859
    {
    // parsing completed
}
#line 1311 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1313 1314
  case 156:
#line 630 "dhcp6_parser.yy" // lalr1.cc:859
1315 1316 1317 1318 1319 1320
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1319 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1321 1322
  case 157:
#line 632 "dhcp6_parser.yy" // lalr1.cc:859
1323 1324 1325 1326 1327 1328 1329 1330
    {
    ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("library", lib);
    ctx.leave();
}
#line 1329 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1331 1332
  case 158:
#line 638 "dhcp6_parser.yy" // lalr1.cc:859
1333 1334 1335 1336 1337 1338
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1337 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1339 1340
  case 159:
#line 640 "dhcp6_parser.yy" // lalr1.cc:859
1341 1342 1343 1344 1345 1346 1347
    {
    ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ());
    ctx.leave();
}
#line 1346 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1348 1349
  case 160:
#line 646 "dhcp6_parser.yy" // lalr1.cc:859
1350 1351 1352 1353 1354 1355 1356 1357 1358
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("expired-leases-processing", m);
    ctx.stack_.push_back(m);
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1357 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1359 1360
  case 161:
#line 651 "dhcp6_parser.yy" // lalr1.cc:859
1361 1362 1363 1364 1365 1366 1367
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1366 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1368 1369
  case 164:
#line 663 "dhcp6_parser.yy" // lalr1.cc:859
1370 1371 1372 1373 1374 1375 1376
    {
    ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), value);
}
#line 1375 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1377 1378
  case 165:
#line 671 "dhcp6_parser.yy" // lalr1.cc:859
1379 1380 1381 1382 1383 1384 1385 1386 1387
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("subnet6", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.SUBNET6);
}
#line 1386 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1388 1389
  case 166:
#line 676 "dhcp6_parser.yy" // lalr1.cc:859
1390 1391 1392 1393 1394 1395 1396
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1395 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1397 1398
  case 171:
#line 696 "dhcp6_parser.yy" // lalr1.cc:859
1399 1400 1401 1402 1403 1404 1405 1406
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1405 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1407 1408
  case 172:
#line 700 "dhcp6_parser.yy" // lalr1.cc:859
1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
    {
    // Once we reached this place, the subnet parsing is now complete.
    // If we want to, we can implement default values here.
    // In particular we can do things like this:
    // if (!ctx.stack_.back()->get("interface")) {
    //     ctx.stack_.back()->set("interface", StringElement("loopback"));
    // }
    //
    // We can also stack up one level (Dhcp6) and copy over whatever
    // global parameters we want to:
    // if (!ctx.stack_.back()->get("renew-timer")) {
    //     ElementPtr renew = ctx_stack_[...].get("renew-timer");
    //     if (renew) {
    //         ctx.stack_.back()->set("renew-timer", renew);
    //     }
    // }
    ctx.stack_.pop_back();
}
#line 1428 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1430 1431
  case 173:
#line 719 "dhcp6_parser.yy" // lalr1.cc:859
1432 1433 1434 1435 1436 1437 1438 1439
    {
    // Parse the subnet6 list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1438 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1440 1441
  case 174:
#line 723 "dhcp6_parser.yy" // lalr1.cc:859
1442 1443 1444 1445 1446 1447
    {
    // parsing completed
}
#line 1446 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1448 1449
  case 194:
#line 752 "dhcp6_parser.yy" // lalr1.cc:859
1450 1451 1452 1453 1454 1455
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1454 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1456 1457
  case 195:
#line 754 "dhcp6_parser.yy" // lalr1.cc:859
1458 1459 1460 1461 1462 1463 1464 1465
    {
    ElementPtr subnet(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("subnet", subnet);
    ctx.leave();
}
#line 1464 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1466 1467
  case 196:
#line 760 "dhcp6_parser.yy" // lalr1.cc:859
1468 1469 1470 1471 1472 1473
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1472 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1474 1475
  case 197:
#line 762 "dhcp6_parser.yy" // lalr1.cc:859
1476 1477 1478 1479 1480 1481 1482 1483
    {
    ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interface", iface);
    ctx.leave();
}
#line 1482 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1484 1485
  case 198:
#line 768 "dhcp6_parser.yy" // lalr1.cc:859
1486 1487 1488 1489 1490 1491
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1490 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1492 1493
  case 199:
#line 770 "dhcp6_parser.yy" // lalr1.cc:859
1494 1495 1496 1497 1498 1499 1500 1501
    {
    ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interface-id", iface);
    ctx.leave();
}
#line 1500 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1502 1503
  case 200:
#line 776 "dhcp6_parser.yy" // lalr1.cc:859
1504 1505 1506 1507 1508 1509
    {
    ctx.enter(ctx.CLIENT_CLASS);
}
#line 1508 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1510 1511
  case 201:
#line 778 "dhcp6_parser.yy" // lalr1.cc:859
1512 1513 1514 1515 1516 1517 1518 1519
    {
    ElementPtr cls(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("client-class", cls);
    ctx.leave();
}
#line 1518 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1520 1521
  case 202:
#line 784 "dhcp6_parser.yy" // lalr1.cc:859
1522 1523 1524 1525 1526 1527
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1526 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1528 1529
  case 203:
#line 786 "dhcp6_parser.yy" // lalr1.cc:859
1530 1531 1532 1533 1534 1535 1536 1537
    {
    ElementPtr rm(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("reservation-mode", rm);
    ctx.leave();
}
#line 1536 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1538 1539
  case 204:
#line 792 "dhcp6_parser.yy" // lalr1.cc:859
1540 1541 1542 1543 1544 1545 1546
    {
    ElementPtr id(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("id", id);
}
#line 1545 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1547 1548
  case 205:
#line 797 "dhcp6_parser.yy" // lalr1.cc:859
1549 1550 1551 1552 1553 1554 1555
    {
    ElementPtr rc(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("rapid-commit", rc);
}
#line 1554 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1556 1557
  case 206:
#line 806 "dhcp6_parser.yy" // lalr1.cc:859
1558 1559 1560 1561 1562 1563 1564 1565 1566
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("option-def", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.OPTION_DEF);
}
#line 1565 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1567 1568
  case 207:
#line 811 "dhcp6_parser.yy" // lalr1.cc:859
1569 1570 1571 1572 1573 1574 1575
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1574 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1576 1577
  case 212:
#line 828 "dhcp6_parser.yy" // lalr1.cc:859
1578 1579 1580 1581 1582 1583 1584 1585
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1584 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1586 1587
  case 213:
#line 832 "dhcp6_parser.yy" // lalr1.cc:859
1588 1589 1590 1591 1592 1593
    {
    ctx.stack_.pop_back();
}
#line 1592 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1594 1595
  case 214:
#line 839 "dhcp6_parser.yy" // lalr1.cc:859
1596 1597 1598 1599 1600 1601 1602 1603
    {
    // Parse the option-def list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1602 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1604 1605
  case 215:
#line 843 "dhcp6_parser.yy" // lalr1.cc:859
1606 1607 1608 1609 1610 1611
    {
    // parsing completed
}
#line 1610 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1612 1613
  case 229:
#line 869 "dhcp6_parser.yy" // lalr1.cc:859
1614 1615 1616 1617 1618 1619 1620
    {
    ElementPtr code(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("code", code);
}
#line 1619 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1621 1622
  case 232:
#line 878 "dhcp6_parser.yy" // lalr1.cc:859
1623 1624 1625 1626 1627 1628
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1627 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1629 1630
  case 233:
#line 880 "dhcp6_parser.yy" // lalr1.cc:859
1631 1632 1633 1634 1635 1636 1637 1638
    {
    ElementPtr rtypes(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("record-types", rtypes);
    ctx.leave();
}
#line 1637 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1639 1640
  case 234:
#line 886 "dhcp6_parser.yy" // lalr1.cc:859
1641 1642 1643 1644 1645 1646
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1645 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1647 1648
  case 235:
#line 888 "dhcp6_parser.yy" // lalr1.cc:859
1649 1650 1651 1652 1653 1654 1655 1656
    {
    ElementPtr space(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("space", space);
    ctx.leave();
}
#line 1655 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1657 1658
  case 237:
#line 896 "dhcp6_parser.yy" // lalr1.cc:859
1659 1660 1661 1662 1663 1664
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1663 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1665 1666
  case 238:
#line 898 "dhcp6_parser.yy" // lalr1.cc:859
1667 1668 1669 1670 1671 1672 1673 1674
    {
    ElementPtr encap(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("encapsulate", encap);
    ctx.leave();
}
#line 1673 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1675 1676
  case 239:
#line 904 "dhcp6_parser.yy" // lalr1.cc:859
1677 1678 1679 1680 1681 1682 1683
    {
    ElementPtr array(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("array", array);
}
#line 1682 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1684 1685
  case 240:
#line 913 "dhcp6_parser.yy" // lalr1.cc:859
1686 1687 1688 1689 1690 1691 1692 1693 1694
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("option-data", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.OPTION_DATA);
}
#line 1693 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1695 1696
  case 241:
#line 918 "dhcp6_parser.yy" // lalr1.cc:859
1697 1698 1699 1700 1701 1702 1703
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1702 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1704 1705
  case 246:
#line 937 "dhcp6_parser.yy" // lalr1.cc:859
1706 1707 1708 1709 1710 1711 1712 1713
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1712 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1714 1715
  case 247:
#line 941 "dhcp6_parser.yy" // lalr1.cc:859
1716 1717 1718 1719 1720 1721
    {
    ctx.stack_.pop_back();
}
#line 1720 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1722 1723
  case 248:
#line 948 "dhcp6_parser.yy" // lalr1.cc:859
1724 1725 1726 1727 1728 1729 1730 1731
    {
    // Parse the option-data list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1730 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1732 1733
  case 249:
#line 952 "dhcp6_parser.yy" // lalr1.cc:859
1734 1735 1736 1737 1738 1739
    {
    // parsing completed
}
#line 1738 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1740 1741
  case 261:
#line 981 "dhcp6_parser.yy" // lalr1.cc:859
1742 1743 1744 1745 1746 1747
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1746 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1748 1749
  case 262:
#line 983 "dhcp6_parser.yy" // lalr1.cc:859
1750 1751 1752 1753 1754 1755 1756 1757
    {
    ElementPtr data(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("data", data);
    ctx.leave();
}
#line 1756 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1758 1759
  case 265:
#line 993 "dhcp6_parser.yy" // lalr1.cc:859
1760 1761 1762 1763 1764 1765 1766
    {
    ElementPtr space(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("csv-format", space);
}
#line 1765 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1767 1768
  case 266:
#line 1001 "dhcp6_parser.yy" // lalr1.cc:859
1769 1770 1771 1772 1773 1774 1775 1776 1777
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("pools", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.POOLS);
}
#line 1776 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1778 1779
  case 267:
#line 1006 "dhcp6_parser.yy" // lalr1.cc:859
1780 1781 1782 1783 1784 1785 1786
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1785 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1787 1788
  case 272:
#line 1021 "dhcp6_parser.yy" // lalr1.cc:859
1789 1790 1791 1792 1793 1794 1795 1796
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1795 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1797 1798
  case 273:
#line 1025 "dhcp6_parser.yy" // lalr1.cc:859
1799 1800 1801 1802 1803 1804
    {
    ctx.stack_.pop_back();
}
#line 1803 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1805 1806
  case 274:
#line 1029 "dhcp6_parser.yy" // lalr1.cc:859
1807 1808 1809 1810 1811 1812 1813 1814
    {
    // Parse the pool list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1813 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1815 1816
  case 275:
#line 1033 "dhcp6_parser.yy" // lalr1.cc:859
1817 1818 1819 1820 1821 1822
    {
    // parsing completed
}
#line 1821 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1823 1824
  case 281:
#line 1046 "dhcp6_parser.yy" // lalr1.cc:859
1825 1826 1827 1828 1829 1830
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1829 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1831 1832
  case 282:
#line 1048 "dhcp6_parser.yy" // lalr1.cc:859
1833 1834 1835 1836 1837 1838 1839 1840
    {
    ElementPtr pool(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("pool", pool);
    ctx.leave();
}
#line 1839 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1841 1842
  case 283:
#line 1057 "dhcp6_parser.yy" // lalr1.cc:859
1843 1844 1845 1846 1847 1848 1849 1850 1851
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("pd-pools", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.PD_POOLS);
}
#line 1850 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1852 1853
  case 284:
#line 1062 "dhcp6_parser.yy" // lalr1.cc:859
1854 1855 1856 1857 1858 1859 1860
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1859 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1861 1862
  case 289:
#line 1077 "dhcp6_parser.yy" // lalr1.cc:859
1863 1864 1865 1866 1867 1868 1869 1870
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1869 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1871 1872
  case 290:
#line 1081 "dhcp6_parser.yy" // lalr1.cc:859
1873 1874 1875 1876 1877 1878
    {
    ctx.stack_.pop_back();
}
#line 1877 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1879 1880
  case 291:
#line 1085 "dhcp6_parser.yy" // lalr1.cc:859
1881 1882 1883 1884 1885 1886 1887 1888
    {
    // Parse the pd-pool list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 1887 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1889 1890
  case 292:
#line 1089 "dhcp6_parser.yy" // lalr1.cc:859
1891 1892 1893 1894 1895 1896
    {
    // parsing completed
}
#line 1895 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1897 1898
  case 302:
#line 1106 "dhcp6_parser.yy" // lalr1.cc:859
1899 1900 1901 1902 1903 1904
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1903 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1905 1906
  case 303:
#line 1108 "dhcp6_parser.yy" // lalr1.cc:859
1907 1908 1909 1910 1911 1912 1913 1914
    {
    ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("prefix", prf);
    ctx.leave();
}
#line 1913 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1915 1916
  case 304:
#line 1114 "dhcp6_parser.yy" // lalr1.cc:859
1917 1918 1919 1920 1921 1922 1923
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("prefix-len", prf);
}
#line 1922 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1924 1925
  case 305:
#line 1119 "dhcp6_parser.yy" // lalr1.cc:859
1926 1927 1928 1929 1930 1931
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1930 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1932 1933
  case 306:
#line 1121 "dhcp6_parser.yy" // lalr1.cc:859
1934 1935 1936 1937 1938 1939 1940 1941
    {
    ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("excluded-prefix", prf);
    ctx.leave();
}
#line 1940 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1942 1943
  case 307:
#line 1127 "dhcp6_parser.yy" // lalr1.cc:859
1944 1945 1946 1947 1948 1949 1950
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("excluded-prefix-len", prf);
}
#line 1949 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1951 1952
  case 308:
#line 1132 "dhcp6_parser.yy" // lalr1.cc:859
1953 1954 1955 1956 1957 1958 1959
    {
    ElementPtr deleg(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("delegated-len", deleg);
}
#line 1958 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1960 1961
  case 309:
#line 1140 "dhcp6_parser.yy" // lalr1.cc:859
1962 1963 1964 1965 1966 1967 1968 1969 1970
    {
    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 1969 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1971 1972
  case 310:
#line 1145 "dhcp6_parser.yy" // lalr1.cc:859
1973 1974 1975 1976 1977 1978 1979
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
#line 1978 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1980 1981
  case 315:
#line 1158 "dhcp6_parser.yy" // lalr1.cc:859
1982 1983 1984 1985 1986 1987 1988 1989
    {
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->add(m);
    ctx.stack_.push_back(m);
}
#line 1988 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1990 1991
  case 316:
#line 1162 "dhcp6_parser.yy" // lalr1.cc:859
1992 1993 1994 1995 1996 1997
    {
    ctx.stack_.pop_back();
}
#line 1996 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1998 1999
  case 317:
#line 1166 "dhcp6_parser.yy" // lalr1.cc:859
2000 2001 2002 2003 2004 2005 2006 2007
    {
    // Parse the reservations list entry map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
#line 2006 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
2008 2009
  case 318:
#line 1170 "dhcp6_parser.yy" // lalr1.cc:859
2010 2011