Kea 2.7.6
dhcp6_parser.cc
Go to the documentation of this file.
1// A Bison parser, made by GNU Bison 3.8.2.
2
3// Skeleton implementation for Bison LALR(1) parsers in C++
4
5// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
6
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <https://www.gnu.org/licenses/>.
19
20// As a special exception, you may create a larger work that contains
21// part or all of the Bison parser skeleton and distribute that work
22// under terms of your choice, so long as that work isn't itself a
23// parser generator using the skeleton or a modified version thereof
24// as a parser skeleton. Alternatively, if you modify or redistribute
25// the parser skeleton itself, you may (at your option) remove this
26// special exception, which will cause the skeleton and the resulting
27// Bison output files to be licensed under the GNU General Public
28// License without this special exception.
29
30// This special exception was added by the Free Software Foundation in
31// version 2.2 of Bison.
32
33// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
34// especially those whose name start with YY_ or yy_. They are
35// private implementation details that can be changed or removed.
36
37
38// Take the name prefix into account.
39#define yylex parser6_lex
40
41
42
43#include "dhcp6_parser.h"
44
45
46// Unqualified %code blocks.
47#line 34 "dhcp6_parser.yy"
48
50
51// Avoid warnings with the error counter.
52#if defined(__GNUC__) || defined(__clang__)
53#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
54#endif
55
56#line 57 "dhcp6_parser.cc"
57
58
59#ifndef YY_
60# if defined YYENABLE_NLS && YYENABLE_NLS
61# if ENABLE_NLS
62# include <libintl.h> // FIXME: INFRINGES ON USER NAME SPACE.
63# define YY_(msgid) dgettext ("bison-runtime", msgid)
64# endif
65# endif
66# ifndef YY_
67# define YY_(msgid) msgid
68# endif
69#endif
70
71
72// Whether we are compiled with exception support.
73#ifndef YY_EXCEPTIONS
74# if defined __GNUC__ && !defined __EXCEPTIONS
75# define YY_EXCEPTIONS 0
76# else
77# define YY_EXCEPTIONS 1
78# endif
79#endif
80
81#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
82/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
83 If N is 0, then set CURRENT to the empty location which ends
84 the previous symbol: RHS[0] (always defined). */
85
86# ifndef YYLLOC_DEFAULT
87# define YYLLOC_DEFAULT(Current, Rhs, N) \
88 do \
89 if (N) \
90 { \
91 (Current).begin = YYRHSLOC (Rhs, 1).begin; \
92 (Current).end = YYRHSLOC (Rhs, N).end; \
93 } \
94 else \
95 { \
96 (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
97 } \
98 while (false)
99# endif
100
101
102// Enable debugging if requested.
103#if PARSER6_DEBUG
104
105// A pseudo ostream that takes yydebug_ into account.
106# define YYCDEBUG if (yydebug_) (*yycdebug_)
107
108# define YY_SYMBOL_PRINT(Title, Symbol) \
109 do { \
110 if (yydebug_) \
111 { \
112 *yycdebug_ << Title << ' '; \
113 yy_print_ (*yycdebug_, Symbol); \
114 *yycdebug_ << '\n'; \
115 } \
116 } while (false)
117
118# define YY_REDUCE_PRINT(Rule) \
119 do { \
120 if (yydebug_) \
121 yy_reduce_print_ (Rule); \
122 } while (false)
123
124# define YY_STACK_PRINT() \
125 do { \
126 if (yydebug_) \
127 yy_stack_print_ (); \
128 } while (false)
129
130#else // !PARSER6_DEBUG
131
132# define YYCDEBUG if (false) std::cerr
133# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
134# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
135# define YY_STACK_PRINT() static_cast<void> (0)
136
137#endif // !PARSER6_DEBUG
138
139#define yyerrok (yyerrstatus_ = 0)
140#define yyclearin (yyla.clear ())
141
142#define YYACCEPT goto yyacceptlab
143#define YYABORT goto yyabortlab
144#define YYERROR goto yyerrorlab
145#define YYRECOVERING() (!!yyerrstatus_)
146
147#line 14 "dhcp6_parser.yy"
148namespace isc { namespace dhcp {
149#line 150 "dhcp6_parser.cc"
150
153#if PARSER6_DEBUG
154 : yydebug_ (false),
155 yycdebug_ (&std::cerr),
156#else
157 :
158#endif
159 ctx (ctx_yyarg)
160 {}
161
164
167
168 /*---------.
169 | symbol. |
170 `---------*/
171
172
173
174 // by_state.
175 Dhcp6Parser::by_state::by_state () YY_NOEXCEPT
176 : state (empty_state)
177 {}
178
179 Dhcp6Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT
180 : state (that.state)
181 {}
182
183 void
184 Dhcp6Parser::by_state::clear () YY_NOEXCEPT
185 {
186 state = empty_state;
187 }
188
189 void
190 Dhcp6Parser::by_state::move (by_state& that)
191 {
192 state = that.state;
193 that.clear ();
194 }
195
196 Dhcp6Parser::by_state::by_state (state_type s) YY_NOEXCEPT
197 : state (s)
198 {}
199
201 Dhcp6Parser::by_state::kind () const YY_NOEXCEPT
202 {
203 if (state == empty_state)
205 else
206 return YY_CAST (symbol_kind_type, yystos_[+state]);
207 }
208
209 Dhcp6Parser::stack_symbol_type::stack_symbol_type ()
210 {}
211
212 Dhcp6Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
213 : super_type (YY_MOVE (that.state), YY_MOVE (that.location))
214 {
215 switch (that.kind ())
216 {
217 case symbol_kind::S_value: // value
218 case symbol_kind::S_map_value: // map_value
219 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
220 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
221 case symbol_kind::S_on_fail_mode: // on_fail_mode
222 case symbol_kind::S_duid_type: // duid_type
223 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
224 case symbol_kind::S_auth_type_value: // auth_type_value
225 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
226 value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value));
227 break;
228
229 case symbol_kind::S_BOOLEAN: // "boolean"
230 value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value));
231 break;
232
233 case symbol_kind::S_FLOAT: // "floating point"
234 value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value));
235 break;
236
237 case symbol_kind::S_INTEGER: // "integer"
238 value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value));
239 break;
240
241 case symbol_kind::S_STRING: // "constant string"
242 value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
243 break;
244
245 default:
246 break;
247 }
248
249#if 201103L <= YY_CPLUSPLUS
250 // that is emptied.
251 that.state = empty_state;
252#endif
253 }
254
255 Dhcp6Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that)
256 : super_type (s, YY_MOVE (that.location))
257 {
258 switch (that.kind ())
259 {
260 case symbol_kind::S_value: // value
261 case symbol_kind::S_map_value: // map_value
262 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
263 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
264 case symbol_kind::S_on_fail_mode: // on_fail_mode
265 case symbol_kind::S_duid_type: // duid_type
266 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
267 case symbol_kind::S_auth_type_value: // auth_type_value
268 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
269 value.move< ElementPtr > (YY_MOVE (that.value));
270 break;
271
272 case symbol_kind::S_BOOLEAN: // "boolean"
273 value.move< bool > (YY_MOVE (that.value));
274 break;
275
276 case symbol_kind::S_FLOAT: // "floating point"
277 value.move< double > (YY_MOVE (that.value));
278 break;
279
280 case symbol_kind::S_INTEGER: // "integer"
281 value.move< int64_t > (YY_MOVE (that.value));
282 break;
283
284 case symbol_kind::S_STRING: // "constant string"
285 value.move< std::string > (YY_MOVE (that.value));
286 break;
287
288 default:
289 break;
290 }
291
292 // that is emptied.
293 that.kind_ = symbol_kind::S_YYEMPTY;
294 }
295
296#if YY_CPLUSPLUS < 201103L
297 Dhcp6Parser::stack_symbol_type&
298 Dhcp6Parser::stack_symbol_type::operator= (const stack_symbol_type& that)
299 {
300 state = that.state;
301 switch (that.kind ())
302 {
303 case symbol_kind::S_value: // value
304 case symbol_kind::S_map_value: // map_value
305 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
306 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
307 case symbol_kind::S_on_fail_mode: // on_fail_mode
308 case symbol_kind::S_duid_type: // duid_type
309 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
310 case symbol_kind::S_auth_type_value: // auth_type_value
311 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
312 value.copy< ElementPtr > (that.value);
313 break;
314
315 case symbol_kind::S_BOOLEAN: // "boolean"
316 value.copy< bool > (that.value);
317 break;
318
319 case symbol_kind::S_FLOAT: // "floating point"
320 value.copy< double > (that.value);
321 break;
322
323 case symbol_kind::S_INTEGER: // "integer"
324 value.copy< int64_t > (that.value);
325 break;
326
327 case symbol_kind::S_STRING: // "constant string"
328 value.copy< std::string > (that.value);
329 break;
330
331 default:
332 break;
333 }
334
335 location = that.location;
336 return *this;
337 }
338
339 Dhcp6Parser::stack_symbol_type&
340 Dhcp6Parser::stack_symbol_type::operator= (stack_symbol_type& that)
341 {
342 state = that.state;
343 switch (that.kind ())
344 {
345 case symbol_kind::S_value: // value
346 case symbol_kind::S_map_value: // map_value
347 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
348 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
349 case symbol_kind::S_on_fail_mode: // on_fail_mode
350 case symbol_kind::S_duid_type: // duid_type
351 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
352 case symbol_kind::S_auth_type_value: // auth_type_value
353 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
354 value.move< ElementPtr > (that.value);
355 break;
356
357 case symbol_kind::S_BOOLEAN: // "boolean"
358 value.move< bool > (that.value);
359 break;
360
361 case symbol_kind::S_FLOAT: // "floating point"
362 value.move< double > (that.value);
363 break;
364
365 case symbol_kind::S_INTEGER: // "integer"
366 value.move< int64_t > (that.value);
367 break;
368
369 case symbol_kind::S_STRING: // "constant string"
370 value.move< std::string > (that.value);
371 break;
372
373 default:
374 break;
375 }
376
377 location = that.location;
378 // that is emptied.
379 that.state = empty_state;
380 return *this;
381 }
382#endif
383
384 template <typename Base>
385 void
386 Dhcp6Parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
387 {
388 if (yymsg)
389 YY_SYMBOL_PRINT (yymsg, yysym);
390 }
391
392#if PARSER6_DEBUG
393 template <typename Base>
394 void
395 Dhcp6Parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
396 {
397 std::ostream& yyoutput = yyo;
398 YY_USE (yyoutput);
399 if (yysym.empty ())
400 yyo << "empty symbol";
401 else
402 {
403 symbol_kind_type yykind = yysym.kind ();
404 yyo << (yykind < YYNTOKENS ? "token" : "nterm")
405 << ' ' << yysym.name () << " ("
406 << yysym.location << ": ";
407 switch (yykind)
408 {
409 case symbol_kind::S_STRING: // "constant string"
410#line 323 "dhcp6_parser.yy"
411 { yyoutput << yysym.value.template as < std::string > (); }
412#line 413 "dhcp6_parser.cc"
413 break;
414
415 case symbol_kind::S_INTEGER: // "integer"
416#line 323 "dhcp6_parser.yy"
417 { yyoutput << yysym.value.template as < int64_t > (); }
418#line 419 "dhcp6_parser.cc"
419 break;
420
421 case symbol_kind::S_FLOAT: // "floating point"
422#line 323 "dhcp6_parser.yy"
423 { yyoutput << yysym.value.template as < double > (); }
424#line 425 "dhcp6_parser.cc"
425 break;
426
427 case symbol_kind::S_BOOLEAN: // "boolean"
428#line 323 "dhcp6_parser.yy"
429 { yyoutput << yysym.value.template as < bool > (); }
430#line 431 "dhcp6_parser.cc"
431 break;
432
433 case symbol_kind::S_value: // value
434#line 323 "dhcp6_parser.yy"
435 { yyoutput << yysym.value.template as < ElementPtr > (); }
436#line 437 "dhcp6_parser.cc"
437 break;
438
439 case symbol_kind::S_map_value: // map_value
440#line 323 "dhcp6_parser.yy"
441 { yyoutput << yysym.value.template as < ElementPtr > (); }
442#line 443 "dhcp6_parser.cc"
443 break;
444
445 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
446#line 323 "dhcp6_parser.yy"
447 { yyoutput << yysym.value.template as < ElementPtr > (); }
448#line 449 "dhcp6_parser.cc"
449 break;
450
451 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
452#line 323 "dhcp6_parser.yy"
453 { yyoutput << yysym.value.template as < ElementPtr > (); }
454#line 455 "dhcp6_parser.cc"
455 break;
456
457 case symbol_kind::S_on_fail_mode: // on_fail_mode
458#line 323 "dhcp6_parser.yy"
459 { yyoutput << yysym.value.template as < ElementPtr > (); }
460#line 461 "dhcp6_parser.cc"
461 break;
462
463 case symbol_kind::S_duid_type: // duid_type
464#line 323 "dhcp6_parser.yy"
465 { yyoutput << yysym.value.template as < ElementPtr > (); }
466#line 467 "dhcp6_parser.cc"
467 break;
468
469 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
470#line 323 "dhcp6_parser.yy"
471 { yyoutput << yysym.value.template as < ElementPtr > (); }
472#line 473 "dhcp6_parser.cc"
473 break;
474
475 case symbol_kind::S_auth_type_value: // auth_type_value
476#line 323 "dhcp6_parser.yy"
477 { yyoutput << yysym.value.template as < ElementPtr > (); }
478#line 479 "dhcp6_parser.cc"
479 break;
480
481 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
482#line 323 "dhcp6_parser.yy"
483 { yyoutput << yysym.value.template as < ElementPtr > (); }
484#line 485 "dhcp6_parser.cc"
485 break;
486
487 default:
488 break;
489 }
490 yyo << ')';
491 }
492 }
493#endif
494
495 void
496 Dhcp6Parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym)
497 {
498 if (m)
499 YY_SYMBOL_PRINT (m, sym);
500 yystack_.push (YY_MOVE (sym));
501 }
502
503 void
504 Dhcp6Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
505 {
506#if 201103L <= YY_CPLUSPLUS
507 yypush_ (m, stack_symbol_type (s, std::move (sym)));
508#else
509 stack_symbol_type ss (s, sym);
510 yypush_ (m, ss);
511#endif
512 }
513
514 void
515 Dhcp6Parser::yypop_ (int n) YY_NOEXCEPT
516 {
517 yystack_.pop (n);
518 }
519
520#if PARSER6_DEBUG
521 std::ostream&
522 Dhcp6Parser::debug_stream () const
523 {
524 return *yycdebug_;
525 }
526
527 void
528 Dhcp6Parser::set_debug_stream (std::ostream& o)
529 {
530 yycdebug_ = &o;
531 }
532
533
534 Dhcp6Parser::debug_level_type
535 Dhcp6Parser::debug_level () const
536 {
537 return yydebug_;
538 }
539
540 void
541 Dhcp6Parser::set_debug_level (debug_level_type l)
542 {
543 yydebug_ = l;
544 }
545#endif // PARSER6_DEBUG
546
547 Dhcp6Parser::state_type
548 Dhcp6Parser::yy_lr_goto_state_ (state_type yystate, int yysym)
549 {
550 int yyr = yypgoto_[yysym - YYNTOKENS] + yystate;
551 if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
552 return yytable_[yyr];
553 else
554 return yydefgoto_[yysym - YYNTOKENS];
555 }
556
557 bool
558 Dhcp6Parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT
559 {
560 return yyvalue == yypact_ninf_;
561 }
562
563 bool
564 Dhcp6Parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT
565 {
566 return yyvalue == yytable_ninf_;
567 }
568
569 int
571 {
572 return parse ();
573 }
574
575 int
577 {
578 int yyn;
580 int yylen = 0;
581
582 // Error handling.
583 int yynerrs_ = 0;
584 int yyerrstatus_ = 0;
585
587 symbol_type yyla;
588
590 stack_symbol_type yyerror_range[3];
591
593 int yyresult;
594
595#if YY_EXCEPTIONS
596 try
597#endif // YY_EXCEPTIONS
598 {
599 YYCDEBUG << "Starting parse\n";
600
601
602 /* Initialize the stack. The initial state will be set in
603 yynewstate, since the latter expects the semantical and the
604 location values to have been already stored, initialize these
605 stacks with a primary value. */
606 yystack_.clear ();
607 yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla));
608
609 /*-----------------------------------------------.
610 | yynewstate -- push a new symbol on the stack. |
611 `-----------------------------------------------*/
612 yynewstate:
613 YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n';
615
616 // Accept?
617 if (yystack_[0].state == yyfinal_)
618 YYACCEPT;
619
620 goto yybackup;
621
622
623 /*-----------.
624 | yybackup. |
625 `-----------*/
626 yybackup:
627 // Try to take a decision without lookahead.
628 yyn = yypact_[+yystack_[0].state];
629 if (yy_pact_value_is_default_ (yyn))
630 goto yydefault;
631
632 // Read a lookahead token.
633 if (yyla.empty ())
634 {
635 YYCDEBUG << "Reading a token\n";
636#if YY_EXCEPTIONS
637 try
638#endif // YY_EXCEPTIONS
639 {
640 symbol_type yylookahead (yylex (ctx));
641 yyla.move (yylookahead);
642 }
643#if YY_EXCEPTIONS
644 catch (const syntax_error& yyexc)
645 {
646 YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
647 error (yyexc);
648 goto yyerrlab1;
649 }
650#endif // YY_EXCEPTIONS
651 }
652 YY_SYMBOL_PRINT ("Next token is", yyla);
653
654 if (yyla.kind () == symbol_kind::S_YYerror)
655 {
656 // The scanner already issued an error message, process directly
657 // to error recovery. But do not keep the error token as
658 // lookahead, it is too special and may lead us to an endless
659 // loop in error recovery. */
661 goto yyerrlab1;
662 }
663
664 /* If the proper action on seeing token YYLA.TYPE is to reduce or
665 to detect an error, take that action. */
666 yyn += yyla.kind ();
667 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ())
668 {
669 goto yydefault;
670 }
671
672 // Reduce or error.
673 yyn = yytable_[yyn];
674 if (yyn <= 0)
675 {
676 if (yy_table_value_is_error_ (yyn))
677 goto yyerrlab;
678 yyn = -yyn;
679 goto yyreduce;
680 }
681
682 // Count tokens shifted since error; after three, turn off error status.
683 if (yyerrstatus_)
684 --yyerrstatus_;
685
686 // Shift the lookahead token.
687 yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla));
688 goto yynewstate;
689
690
691 /*-----------------------------------------------------------.
692 | yydefault -- do the default action for the current state. |
693 `-----------------------------------------------------------*/
694 yydefault:
695 yyn = yydefact_[+yystack_[0].state];
696 if (yyn == 0)
697 goto yyerrlab;
698 goto yyreduce;
699
700
701 /*-----------------------------.
702 | yyreduce -- do a reduction. |
703 `-----------------------------*/
704 yyreduce:
705 yylen = yyr2_[yyn];
706 {
707 stack_symbol_type yylhs;
708 yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
709 /* Variants are always initialized to an empty instance of the
710 correct type. The default '$$ = $1' action is NOT applied
711 when using variants. */
712 switch (yyr1_[yyn])
713 {
714 case symbol_kind::S_value: // value
715 case symbol_kind::S_map_value: // map_value
716 case symbol_kind::S_ddns_replace_client_name_value: // ddns_replace_client_name_value
717 case symbol_kind::S_ddns_conflict_resolution_mode_value: // ddns_conflict_resolution_mode_value
718 case symbol_kind::S_on_fail_mode: // on_fail_mode
719 case symbol_kind::S_duid_type: // duid_type
720 case symbol_kind::S_control_socket_type_value: // control_socket_type_value
721 case symbol_kind::S_auth_type_value: // auth_type_value
722 case symbol_kind::S_ncr_protocol_value: // ncr_protocol_value
723 yylhs.value.emplace< ElementPtr > ();
724 break;
725
726 case symbol_kind::S_BOOLEAN: // "boolean"
727 yylhs.value.emplace< bool > ();
728 break;
729
730 case symbol_kind::S_FLOAT: // "floating point"
731 yylhs.value.emplace< double > ();
732 break;
733
734 case symbol_kind::S_INTEGER: // "integer"
735 yylhs.value.emplace< int64_t > ();
736 break;
737
738 case symbol_kind::S_STRING: // "constant string"
739 yylhs.value.emplace< std::string > ();
740 break;
741
742 default:
743 break;
744 }
745
746
747 // Default location.
748 {
749 stack_type::slice range (yystack_, yylen);
750 YYLLOC_DEFAULT (yylhs.location, range, yylen);
751 yyerror_range[1].location = yylhs.location;
752 }
753
754 // Perform the reduction.
755 YY_REDUCE_PRINT (yyn);
756#if YY_EXCEPTIONS
757 try
758#endif // YY_EXCEPTIONS
759 {
760 switch (yyn)
761 {
762 case 2: // $@1: %empty
763#line 332 "dhcp6_parser.yy"
764 { ctx.ctx_ = ctx.NO_KEYWORD; }
765#line 766 "dhcp6_parser.cc"
766 break;
767
768 case 4: // $@2: %empty
769#line 333 "dhcp6_parser.yy"
770 { ctx.ctx_ = ctx.CONFIG; }
771#line 772 "dhcp6_parser.cc"
772 break;
773
774 case 6: // $@3: %empty
775#line 334 "dhcp6_parser.yy"
776 { ctx.ctx_ = ctx.DHCP6; }
777#line 778 "dhcp6_parser.cc"
778 break;
779
780 case 8: // $@4: %empty
781#line 335 "dhcp6_parser.yy"
782 { ctx.ctx_ = ctx.INTERFACES_CONFIG; }
783#line 784 "dhcp6_parser.cc"
784 break;
785
786 case 10: // $@5: %empty
787#line 336 "dhcp6_parser.yy"
788 { ctx.ctx_ = ctx.SUBNET6; }
789#line 790 "dhcp6_parser.cc"
790 break;
791
792 case 12: // $@6: %empty
793#line 337 "dhcp6_parser.yy"
794 { ctx.ctx_ = ctx.POOLS; }
795#line 796 "dhcp6_parser.cc"
796 break;
797
798 case 14: // $@7: %empty
799#line 338 "dhcp6_parser.yy"
800 { ctx.ctx_ = ctx.PD_POOLS; }
801#line 802 "dhcp6_parser.cc"
802 break;
803
804 case 16: // $@8: %empty
805#line 339 "dhcp6_parser.yy"
806 { ctx.ctx_ = ctx.RESERVATIONS; }
807#line 808 "dhcp6_parser.cc"
808 break;
809
810 case 18: // $@9: %empty
811#line 340 "dhcp6_parser.yy"
812 { ctx.ctx_ = ctx.DHCP6; }
813#line 814 "dhcp6_parser.cc"
814 break;
815
816 case 20: // $@10: %empty
817#line 341 "dhcp6_parser.yy"
818 { ctx.ctx_ = ctx.OPTION_DEF; }
819#line 820 "dhcp6_parser.cc"
820 break;
821
822 case 22: // $@11: %empty
823#line 342 "dhcp6_parser.yy"
824 { ctx.ctx_ = ctx.OPTION_DATA; }
825#line 826 "dhcp6_parser.cc"
826 break;
827
828 case 24: // $@12: %empty
829#line 343 "dhcp6_parser.yy"
830 { ctx.ctx_ = ctx.HOOKS_LIBRARIES; }
831#line 832 "dhcp6_parser.cc"
832 break;
833
834 case 26: // $@13: %empty
835#line 344 "dhcp6_parser.yy"
836 { ctx.ctx_ = ctx.DHCP_DDNS; }
837#line 838 "dhcp6_parser.cc"
838 break;
839
840 case 28: // $@14: %empty
841#line 345 "dhcp6_parser.yy"
842 { ctx.ctx_ = ctx.CONFIG_CONTROL; }
843#line 844 "dhcp6_parser.cc"
844 break;
845
846 case 30: // value: "integer"
847#line 353 "dhcp6_parser.yy"
848 { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); }
849#line 850 "dhcp6_parser.cc"
850 break;
851
852 case 31: // value: "floating point"
853#line 354 "dhcp6_parser.yy"
854 { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); }
855#line 856 "dhcp6_parser.cc"
856 break;
857
858 case 32: // value: "boolean"
859#line 355 "dhcp6_parser.yy"
860 { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); }
861#line 862 "dhcp6_parser.cc"
862 break;
863
864 case 33: // value: "constant string"
865#line 356 "dhcp6_parser.yy"
866 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
867#line 868 "dhcp6_parser.cc"
868 break;
869
870 case 34: // value: "null"
871#line 357 "dhcp6_parser.yy"
872 { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
873#line 874 "dhcp6_parser.cc"
874 break;
875
876 case 35: // value: map2
877#line 358 "dhcp6_parser.yy"
878 { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
879#line 880 "dhcp6_parser.cc"
880 break;
881
882 case 36: // value: list_generic
883#line 359 "dhcp6_parser.yy"
884 { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
885#line 886 "dhcp6_parser.cc"
886 break;
887
888 case 37: // sub_json: value
889#line 362 "dhcp6_parser.yy"
890 {
891 // Push back the JSON value on the stack
892 ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ());
893}
894#line 895 "dhcp6_parser.cc"
895 break;
896
897 case 38: // $@15: %empty
898#line 367 "dhcp6_parser.yy"
899 {
900 // This code is executed when we're about to start parsing
901 // the content of the map
902 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
903 ctx.stack_.push_back(m);
904}
905#line 906 "dhcp6_parser.cc"
906 break;
907
908 case 39: // map2: "{" $@15 map_content "}"
909#line 372 "dhcp6_parser.yy"
910 {
911 // map parsing completed. If we ever want to do any wrap up
912 // (maybe some sanity checking), this would be the best place
913 // for it.
914}
915#line 916 "dhcp6_parser.cc"
916 break;
917
918 case 40: // map_value: map2
919#line 378 "dhcp6_parser.yy"
920 { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
921#line 922 "dhcp6_parser.cc"
922 break;
923
924 case 43: // not_empty_map: "constant string" ":" value
925#line 385 "dhcp6_parser.yy"
926 {
927 // map containing a single entry
928 ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
929 ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
930 }
931#line 932 "dhcp6_parser.cc"
932 break;
933
934 case 44: // not_empty_map: not_empty_map "," "constant string" ":" value
935#line 390 "dhcp6_parser.yy"
936 {
937 // map consisting of a shorter map followed by
938 // comma and string:value
939 ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
940 ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
941 }
942#line 943 "dhcp6_parser.cc"
943 break;
944
945 case 45: // not_empty_map: not_empty_map ","
946#line 396 "dhcp6_parser.yy"
947 {
948 ctx.warnAboutExtraCommas(yystack_[0].location);
949 }
950#line 951 "dhcp6_parser.cc"
951 break;
952
953 case 46: // $@16: %empty
954#line 401 "dhcp6_parser.yy"
955 {
956 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
957 ctx.stack_.push_back(l);
958}
959#line 960 "dhcp6_parser.cc"
960 break;
961
962 case 47: // list_generic: "[" $@16 list_content "]"
963#line 404 "dhcp6_parser.yy"
964 {
965 // list parsing complete. Put any sanity checking here
966}
967#line 968 "dhcp6_parser.cc"
968 break;
969
970 case 50: // not_empty_list: value
971#line 412 "dhcp6_parser.yy"
972 {
973 // List consisting of a single element.
974 ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
975 }
976#line 977 "dhcp6_parser.cc"
977 break;
978
979 case 51: // not_empty_list: not_empty_list "," value
980#line 416 "dhcp6_parser.yy"
981 {
982 // List ending with , and a value.
983 ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
984 }
985#line 986 "dhcp6_parser.cc"
986 break;
987
988 case 52: // not_empty_list: not_empty_list ","
989#line 420 "dhcp6_parser.yy"
990 {
991 ctx.warnAboutExtraCommas(yystack_[0].location);
992 }
993#line 994 "dhcp6_parser.cc"
994 break;
995
996 case 53: // $@17: %empty
997#line 426 "dhcp6_parser.yy"
998 {
999 // List parsing about to start
1000}
1001#line 1002 "dhcp6_parser.cc"
1002 break;
1003
1004 case 54: // list_strings: "[" $@17 list_strings_content "]"
1005#line 428 "dhcp6_parser.yy"
1006 {
1007 // list parsing complete. Put any sanity checking here
1008 //ctx.stack_.pop_back();
1009}
1010#line 1011 "dhcp6_parser.cc"
1011 break;
1012
1013 case 57: // not_empty_list_strings: "constant string"
1014#line 437 "dhcp6_parser.yy"
1015 {
1016 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1017 ctx.stack_.back()->add(s);
1018 }
1019#line 1020 "dhcp6_parser.cc"
1020 break;
1021
1022 case 58: // not_empty_list_strings: not_empty_list_strings "," "constant string"
1023#line 441 "dhcp6_parser.yy"
1024 {
1025 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1026 ctx.stack_.back()->add(s);
1027 }
1028#line 1029 "dhcp6_parser.cc"
1029 break;
1030
1031 case 59: // not_empty_list_strings: not_empty_list_strings ","
1032#line 445 "dhcp6_parser.yy"
1033 {
1034 ctx.warnAboutExtraCommas(yystack_[0].location);
1035 }
1036#line 1037 "dhcp6_parser.cc"
1037 break;
1038
1039 case 60: // unknown_map_entry: "constant string" ":"
1040#line 455 "dhcp6_parser.yy"
1041 {
1042 const std::string& where = ctx.contextName();
1043 const std::string& keyword = yystack_[1].value.as < std::string > ();
1044 error(yystack_[1].location,
1045 "got unexpected keyword \"" + keyword + "\" in " + where + " map.");
1046}
1047#line 1048 "dhcp6_parser.cc"
1048 break;
1049
1050 case 61: // $@18: %empty
1051#line 464 "dhcp6_parser.yy"
1052 {
1053 // This code is executed when we're about to start parsing
1054 // the content of the map
1055 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
1056 ctx.stack_.push_back(m);
1057}
1058#line 1059 "dhcp6_parser.cc"
1059 break;
1060
1061 case 62: // syntax_map: "{" $@18 global_object "}"
1062#line 469 "dhcp6_parser.yy"
1063 {
1064 // map parsing completed. If we ever want to do any wrap up
1065 // (maybe some sanity checking), this would be the best place
1066 // for it.
1067
1068 // Dhcp6 is required
1069 ctx.require("Dhcp6", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
1070}
1071#line 1072 "dhcp6_parser.cc"
1072 break;
1073
1074 case 63: // $@19: %empty
1075#line 479 "dhcp6_parser.yy"
1076 {
1077 // This code is executed when we're about to start parsing
1078 // the content of the map
1079 // Prevent against duplicate.
1080 ctx.unique("Dhcp6", ctx.loc2pos(yystack_[0].location));
1081 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
1082 ctx.stack_.back()->set("Dhcp6", m);
1083 ctx.stack_.push_back(m);
1084 ctx.enter(ctx.DHCP6);
1085}
1086#line 1087 "dhcp6_parser.cc"
1087 break;
1088
1089 case 64: // global_object: "Dhcp6" $@19 ":" "{" global_params "}"
1090#line 488 "dhcp6_parser.yy"
1091 {
1092 // No global parameter is required
1093 ctx.stack_.pop_back();
1094 ctx.leave();
1095}
1096#line 1097 "dhcp6_parser.cc"
1097 break;
1098
1099 case 66: // global_object_comma: global_object ","
1100#line 496 "dhcp6_parser.yy"
1101 {
1102 ctx.warnAboutExtraCommas(yystack_[0].location);
1103}
1104#line 1105 "dhcp6_parser.cc"
1105 break;
1106
1107 case 67: // $@20: %empty
1108#line 502 "dhcp6_parser.yy"
1109 {
1110 // Parse the Dhcp6 map
1111 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
1112 ctx.stack_.push_back(m);
1113}
1114#line 1115 "dhcp6_parser.cc"
1115 break;
1116
1117 case 68: // sub_dhcp6: "{" $@20 global_params "}"
1118#line 506 "dhcp6_parser.yy"
1119 {
1120 // No global parameter is required
1121 // parsing completed
1122}
1123#line 1124 "dhcp6_parser.cc"
1124 break;
1125
1126 case 71: // global_params: global_params ","
1127#line 513 "dhcp6_parser.yy"
1128 {
1129 ctx.warnAboutExtraCommas(yystack_[0].location);
1130 }
1131#line 1132 "dhcp6_parser.cc"
1132 break;
1133
1134 case 144: // $@21: %empty
1135#line 594 "dhcp6_parser.yy"
1136 {
1137 ctx.unique("data-directory", ctx.loc2pos(yystack_[0].location));
1138 ctx.enter(ctx.NO_KEYWORD);
1139}
1140#line 1141 "dhcp6_parser.cc"
1141 break;
1142
1143 case 145: // data_directory: "data-directory" $@21 ":" "constant string"
1144#line 597 "dhcp6_parser.yy"
1145 {
1146 ElementPtr datadir(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1147 ctx.stack_.back()->set("data-directory", datadir);
1148 ctx.leave();
1149}
1150#line 1151 "dhcp6_parser.cc"
1151 break;
1152
1153 case 146: // preferred_lifetime: "preferred-lifetime" ":" "integer"
1154#line 603 "dhcp6_parser.yy"
1155 {
1156 ctx.unique("preferred-lifetime", ctx.loc2pos(yystack_[2].location));
1157 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1158 ctx.stack_.back()->set("preferred-lifetime", prf);
1159}
1160#line 1161 "dhcp6_parser.cc"
1161 break;
1162
1163 case 147: // min_preferred_lifetime: "min-preferred-lifetime" ":" "integer"
1164#line 609 "dhcp6_parser.yy"
1165 {
1166 ctx.unique("min-preferred-lifetime", ctx.loc2pos(yystack_[2].location));
1167 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1168 ctx.stack_.back()->set("min-preferred-lifetime", prf);
1169}
1170#line 1171 "dhcp6_parser.cc"
1171 break;
1172
1173 case 148: // max_preferred_lifetime: "max-preferred-lifetime" ":" "integer"
1174#line 615 "dhcp6_parser.yy"
1175 {
1176 ctx.unique("max-preferred-lifetime", ctx.loc2pos(yystack_[2].location));
1177 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1178 ctx.stack_.back()->set("max-preferred-lifetime", prf);
1179}
1180#line 1181 "dhcp6_parser.cc"
1181 break;
1182
1183 case 149: // valid_lifetime: "valid-lifetime" ":" "integer"
1184#line 621 "dhcp6_parser.yy"
1185 {
1186 ctx.unique("valid-lifetime", ctx.loc2pos(yystack_[2].location));
1187 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1188 ctx.stack_.back()->set("valid-lifetime", prf);
1189}
1190#line 1191 "dhcp6_parser.cc"
1191 break;
1192
1193 case 150: // min_valid_lifetime: "min-valid-lifetime" ":" "integer"
1194#line 627 "dhcp6_parser.yy"
1195 {
1196 ctx.unique("min-valid-lifetime", ctx.loc2pos(yystack_[2].location));
1197 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1198 ctx.stack_.back()->set("min-valid-lifetime", prf);
1199}
1200#line 1201 "dhcp6_parser.cc"
1201 break;
1202
1203 case 151: // max_valid_lifetime: "max-valid-lifetime" ":" "integer"
1204#line 633 "dhcp6_parser.yy"
1205 {
1206 ctx.unique("max-valid-lifetime", ctx.loc2pos(yystack_[2].location));
1207 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1208 ctx.stack_.back()->set("max-valid-lifetime", prf);
1209}
1210#line 1211 "dhcp6_parser.cc"
1211 break;
1212
1213 case 152: // renew_timer: "renew-timer" ":" "integer"
1214#line 639 "dhcp6_parser.yy"
1215 {
1216 ctx.unique("renew-timer", ctx.loc2pos(yystack_[2].location));
1217 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1218 ctx.stack_.back()->set("renew-timer", prf);
1219}
1220#line 1221 "dhcp6_parser.cc"
1221 break;
1222
1223 case 153: // rebind_timer: "rebind-timer" ":" "integer"
1224#line 645 "dhcp6_parser.yy"
1225 {
1226 ctx.unique("rebind-timer", ctx.loc2pos(yystack_[2].location));
1227 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1228 ctx.stack_.back()->set("rebind-timer", prf);
1229}
1230#line 1231 "dhcp6_parser.cc"
1231 break;
1232
1233 case 154: // calculate_tee_times: "calculate-tee-times" ":" "boolean"
1234#line 651 "dhcp6_parser.yy"
1235 {
1236 ctx.unique("calculate-tee-times", ctx.loc2pos(yystack_[2].location));
1237 ElementPtr ctt(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1238 ctx.stack_.back()->set("calculate-tee-times", ctt);
1239}
1240#line 1241 "dhcp6_parser.cc"
1241 break;
1242
1243 case 155: // t1_percent: "t1-percent" ":" "floating point"
1244#line 657 "dhcp6_parser.yy"
1245 {
1246 ctx.unique("t1-percent", ctx.loc2pos(yystack_[2].location));
1247 ElementPtr t1(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location)));
1248 ctx.stack_.back()->set("t1-percent", t1);
1249}
1250#line 1251 "dhcp6_parser.cc"
1251 break;
1252
1253 case 156: // t2_percent: "t2-percent" ":" "floating point"
1254#line 663 "dhcp6_parser.yy"
1255 {
1256 ctx.unique("t2-percent", ctx.loc2pos(yystack_[2].location));
1257 ElementPtr t2(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location)));
1258 ctx.stack_.back()->set("t2-percent", t2);
1259}
1260#line 1261 "dhcp6_parser.cc"
1261 break;
1262
1263 case 157: // cache_threshold: "cache-threshold" ":" "floating point"
1264#line 669 "dhcp6_parser.yy"
1265 {
1266 ctx.unique("cache-threshold", ctx.loc2pos(yystack_[2].location));
1267 ElementPtr ct(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location)));
1268 ctx.stack_.back()->set("cache-threshold", ct);
1269}
1270#line 1271 "dhcp6_parser.cc"
1271 break;
1272
1273 case 158: // cache_max_age: "cache-max-age" ":" "integer"
1274#line 675 "dhcp6_parser.yy"
1275 {
1276 ctx.unique("cache-max-age", ctx.loc2pos(yystack_[2].location));
1277 ElementPtr cm(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1278 ctx.stack_.back()->set("cache-max-age", cm);
1279}
1280#line 1281 "dhcp6_parser.cc"
1281 break;
1282
1283 case 159: // decline_probation_period: "decline-probation-period" ":" "integer"
1284#line 681 "dhcp6_parser.yy"
1285 {
1286 ctx.unique("decline-probation-period", ctx.loc2pos(yystack_[2].location));
1287 ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1288 ctx.stack_.back()->set("decline-probation-period", dpp);
1289}
1290#line 1291 "dhcp6_parser.cc"
1291 break;
1292
1293 case 160: // ddns_send_updates: "ddns-send-updates" ":" "boolean"
1294#line 687 "dhcp6_parser.yy"
1295 {
1296 ctx.unique("ddns-send-updates", ctx.loc2pos(yystack_[2].location));
1297 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1298 ctx.stack_.back()->set("ddns-send-updates", b);
1299}
1300#line 1301 "dhcp6_parser.cc"
1301 break;
1302
1303 case 161: // ddns_override_no_update: "ddns-override-no-update" ":" "boolean"
1304#line 693 "dhcp6_parser.yy"
1305 {
1306 ctx.unique("ddns-override-no-update", ctx.loc2pos(yystack_[2].location));
1307 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1308 ctx.stack_.back()->set("ddns-override-no-update", b);
1309}
1310#line 1311 "dhcp6_parser.cc"
1311 break;
1312
1313 case 162: // ddns_override_client_update: "ddns-override-client-update" ":" "boolean"
1314#line 699 "dhcp6_parser.yy"
1315 {
1316 ctx.unique("ddns-override-client-update", ctx.loc2pos(yystack_[2].location));
1317 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1318 ctx.stack_.back()->set("ddns-override-client-update", b);
1319}
1320#line 1321 "dhcp6_parser.cc"
1321 break;
1322
1323 case 163: // $@22: %empty
1324#line 705 "dhcp6_parser.yy"
1325 {
1326 ctx.enter(ctx.REPLACE_CLIENT_NAME);
1327 ctx.unique("ddns-replace-client-name", ctx.loc2pos(yystack_[0].location));
1328}
1329#line 1330 "dhcp6_parser.cc"
1330 break;
1331
1332 case 164: // ddns_replace_client_name: "ddns-replace-client-name" $@22 ":" ddns_replace_client_name_value
1333#line 708 "dhcp6_parser.yy"
1334 {
1335 ctx.stack_.back()->set("ddns-replace-client-name", yystack_[0].value.as < ElementPtr > ());
1336 ctx.leave();
1337}
1338#line 1339 "dhcp6_parser.cc"
1339 break;
1340
1341 case 165: // ddns_replace_client_name_value: "when-present"
1342#line 714 "dhcp6_parser.yy"
1343 {
1344 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location)));
1345 }
1346#line 1347 "dhcp6_parser.cc"
1347 break;
1348
1349 case 166: // ddns_replace_client_name_value: "never"
1350#line 717 "dhcp6_parser.yy"
1351 {
1352 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location)));
1353 }
1354#line 1355 "dhcp6_parser.cc"
1355 break;
1356
1357 case 167: // ddns_replace_client_name_value: "always"
1358#line 720 "dhcp6_parser.yy"
1359 {
1360 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location)));
1361 }
1362#line 1363 "dhcp6_parser.cc"
1363 break;
1364
1365 case 168: // ddns_replace_client_name_value: "when-not-present"
1366#line 723 "dhcp6_parser.yy"
1367 {
1368 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location)));
1369 }
1370#line 1371 "dhcp6_parser.cc"
1371 break;
1372
1373 case 169: // ddns_replace_client_name_value: "boolean"
1374#line 726 "dhcp6_parser.yy"
1375 {
1376 error(yystack_[0].location, "boolean values for the ddns-replace-client-name are "
1377 "no longer supported");
1378 }
1379#line 1380 "dhcp6_parser.cc"
1380 break;
1381
1382 case 170: // $@23: %empty
1383#line 732 "dhcp6_parser.yy"
1384 {
1385 ctx.unique("ddns-generated-prefix", ctx.loc2pos(yystack_[0].location));
1386 ctx.enter(ctx.NO_KEYWORD);
1387}
1388#line 1389 "dhcp6_parser.cc"
1389 break;
1390
1391 case 171: // ddns_generated_prefix: "ddns-generated-prefix" $@23 ":" "constant string"
1392#line 735 "dhcp6_parser.yy"
1393 {
1394 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1395 ctx.stack_.back()->set("ddns-generated-prefix", s);
1396 ctx.leave();
1397}
1398#line 1399 "dhcp6_parser.cc"
1399 break;
1400
1401 case 172: // $@24: %empty
1402#line 741 "dhcp6_parser.yy"
1403 {
1404 ctx.unique("ddns-qualifying-suffix", ctx.loc2pos(yystack_[0].location));
1405 ctx.enter(ctx.NO_KEYWORD);
1406}
1407#line 1408 "dhcp6_parser.cc"
1408 break;
1409
1410 case 173: // ddns_qualifying_suffix: "ddns-qualifying-suffix" $@24 ":" "constant string"
1411#line 744 "dhcp6_parser.yy"
1412 {
1413 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1414 ctx.stack_.back()->set("ddns-qualifying-suffix", s);
1415 ctx.leave();
1416}
1417#line 1418 "dhcp6_parser.cc"
1418 break;
1419
1420 case 174: // ddns_update_on_renew: "ddns-update-on-renew" ":" "boolean"
1421#line 750 "dhcp6_parser.yy"
1422 {
1423 ctx.unique("ddns-update-on-renew", ctx.loc2pos(yystack_[2].location));
1424 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1425 ctx.stack_.back()->set("ddns-update-on-renew", b);
1426}
1427#line 1428 "dhcp6_parser.cc"
1428 break;
1429
1430 case 175: // ddns_use_conflict_resolution: "ddns-use-conflict-resolution" ":" "boolean"
1431#line 759 "dhcp6_parser.yy"
1432 {
1433 ctx.unique("ddns-use-conflict-resolution", ctx.loc2pos(yystack_[2].location));
1434 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1435 ctx.warning(yystack_[1].location, "ddns-use-conflict-resolution is deprecated. "
1436 "Substituting ddns-conflict-resolution-mode");
1437 ElementPtr mode(new StringElement(b->boolValue() ? "check-with-dhcid"
1438 : "no-check-with-dhcid"));
1439 ctx.stack_.back()->set("ddns-conflict-resolution-mode", mode);
1440}
1441#line 1442 "dhcp6_parser.cc"
1442 break;
1443
1444 case 176: // $@25: %empty
1445#line 769 "dhcp6_parser.yy"
1446 {
1447 ctx.unique("ddns-conflict-resolution-mode", ctx.loc2pos(yystack_[0].location));
1449}
1450#line 1451 "dhcp6_parser.cc"
1451 break;
1452
1453 case 177: // ddns_conflict_resolution_mode: "ddns-conflict-resolution-mode" $@25 ":" ddns_conflict_resolution_mode_value
1454#line 772 "dhcp6_parser.yy"
1455 {
1456 ctx.stack_.back()->set("ddns-conflict-resolution-mode", yystack_[0].value.as < ElementPtr > ());
1457 ctx.leave();
1458}
1459#line 1460 "dhcp6_parser.cc"
1460 break;
1461
1462 case 178: // ddns_conflict_resolution_mode_value: "check-with-dhcid"
1463#line 778 "dhcp6_parser.yy"
1464 {
1465 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("check-with-dhcid", ctx.loc2pos(yystack_[0].location)));
1466 }
1467#line 1468 "dhcp6_parser.cc"
1468 break;
1469
1470 case 179: // ddns_conflict_resolution_mode_value: "no-check-with-dhcid"
1471#line 781 "dhcp6_parser.yy"
1472 {
1473 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("no-check-with-dhcid", ctx.loc2pos(yystack_[0].location)));
1474 }
1475#line 1476 "dhcp6_parser.cc"
1476 break;
1477
1478 case 180: // ddns_conflict_resolution_mode_value: "check-exists-with-dhcid"
1479#line 784 "dhcp6_parser.yy"
1480 {
1481 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("check-exists-with-dhcid", ctx.loc2pos(yystack_[0].location)));
1482 }
1483#line 1484 "dhcp6_parser.cc"
1484 break;
1485
1486 case 181: // ddns_conflict_resolution_mode_value: "no-check-without-dhcid"
1487#line 787 "dhcp6_parser.yy"
1488 {
1489 yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("no-check-without-dhcid", ctx.loc2pos(yystack_[0].location)));
1490 }
1491#line 1492 "dhcp6_parser.cc"
1492 break;
1493
1494 case 182: // ddns_ttl_percent: "ddns-ttl-percent" ":" "floating point"
1495#line 792 "dhcp6_parser.yy"
1496 {
1497 ctx.unique("ddns-ttl-percent", ctx.loc2pos(yystack_[2].location));
1498 ElementPtr ttl(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location)));
1499 ctx.stack_.back()->set("ddns-ttl-percent", ttl);
1500}
1501#line 1502 "dhcp6_parser.cc"
1502 break;
1503
1504 case 183: // ddns_ttl: "ddns-ttl" ":" "integer"
1505#line 798 "dhcp6_parser.yy"
1506 {
1507 ctx.unique("ddns-ttl", ctx.loc2pos(yystack_[2].location));
1508 ElementPtr ttl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1509 ctx.stack_.back()->set("ddns-ttl", ttl);
1510}
1511#line 1512 "dhcp6_parser.cc"
1512 break;
1513
1514 case 184: // ddns_ttl_min: "ddns-ttl-min" ":" "integer"
1515#line 804 "dhcp6_parser.yy"
1516 {
1517 ctx.unique("ddns-ttl-min", ctx.loc2pos(yystack_[2].location));
1518 ElementPtr ttl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1519 ctx.stack_.back()->set("ddns-ttl-min", ttl);
1520}
1521#line 1522 "dhcp6_parser.cc"
1522 break;
1523
1524 case 185: // ddns_ttl_max: "ddns-ttl-mix" ":" "integer"
1525#line 810 "dhcp6_parser.yy"
1526 {
1527 ctx.unique("ddns-ttl-max", ctx.loc2pos(yystack_[2].location));
1528 ElementPtr ttl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1529 ctx.stack_.back()->set("ddns-ttl-max", ttl);
1530}
1531#line 1532 "dhcp6_parser.cc"
1532 break;
1533
1534 case 186: // $@26: %empty
1535#line 816 "dhcp6_parser.yy"
1536 {
1537 ctx.unique("hostname-char-set", ctx.loc2pos(yystack_[0].location));
1538 ctx.enter(ctx.NO_KEYWORD);
1539}
1540#line 1541 "dhcp6_parser.cc"
1541 break;
1542
1543 case 187: // hostname_char_set: "hostname-char-set" $@26 ":" "constant string"
1544#line 819 "dhcp6_parser.yy"
1545 {
1546 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1547 ctx.stack_.back()->set("hostname-char-set", s);
1548 ctx.leave();
1549}
1550#line 1551 "dhcp6_parser.cc"
1551 break;
1552
1553 case 188: // $@27: %empty
1554#line 825 "dhcp6_parser.yy"
1555 {
1556 ctx.unique("hostname-char-replacement", ctx.loc2pos(yystack_[0].location));
1557 ctx.enter(ctx.NO_KEYWORD);
1558}
1559#line 1560 "dhcp6_parser.cc"
1560 break;
1561
1562 case 189: // hostname_char_replacement: "hostname-char-replacement" $@27 ":" "constant string"
1563#line 828 "dhcp6_parser.yy"
1564 {
1565 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1566 ctx.stack_.back()->set("hostname-char-replacement", s);
1567 ctx.leave();
1568}
1569#line 1570 "dhcp6_parser.cc"
1570 break;
1571
1572 case 190: // store_extended_info: "store-extended-info" ":" "boolean"
1573#line 834 "dhcp6_parser.yy"
1574 {
1575 ctx.unique("store-extended-info", ctx.loc2pos(yystack_[2].location));
1576 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1577 ctx.stack_.back()->set("store-extended-info", b);
1578}
1579#line 1580 "dhcp6_parser.cc"
1580 break;
1581
1582 case 191: // statistic_default_sample_count: "statistic-default-sample-count" ":" "integer"
1583#line 840 "dhcp6_parser.yy"
1584 {
1585 ctx.unique("statistic-default-sample-count", ctx.loc2pos(yystack_[2].location));
1586 ElementPtr count(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1587 ctx.stack_.back()->set("statistic-default-sample-count", count);
1588}
1589#line 1590 "dhcp6_parser.cc"
1590 break;
1591
1592 case 192: // statistic_default_sample_age: "statistic-default-sample-age" ":" "integer"
1593#line 846 "dhcp6_parser.yy"
1594 {
1595 ctx.unique("statistic-default-sample-age", ctx.loc2pos(yystack_[2].location));
1596 ElementPtr age(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1597 ctx.stack_.back()->set("statistic-default-sample-age", age);
1598}
1599#line 1600 "dhcp6_parser.cc"
1600 break;
1601
1602 case 193: // $@28: %empty
1603#line 852 "dhcp6_parser.yy"
1604 {
1605 ctx.unique("server-tag", ctx.loc2pos(yystack_[0].location));
1606 ctx.enter(ctx.NO_KEYWORD);
1607}
1608#line 1609 "dhcp6_parser.cc"
1609 break;
1610
1611 case 194: // server_tag: "server-tag" $@28 ":" "constant string"
1612#line 855 "dhcp6_parser.yy"
1613 {
1614 ElementPtr stag(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1615 ctx.stack_.back()->set("server-tag", stag);
1616 ctx.leave();
1617}
1618#line 1619 "dhcp6_parser.cc"
1619 break;
1620
1621 case 195: // parked_packet_limit: "parked-packet-limit" ":" "integer"
1622#line 861 "dhcp6_parser.yy"
1623 {
1624 ctx.unique("parked-packet-limit", ctx.loc2pos(yystack_[2].location));
1625 ElementPtr ppl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1626 ctx.stack_.back()->set("parked-packet-limit", ppl);
1627}
1628#line 1629 "dhcp6_parser.cc"
1629 break;
1630
1631 case 196: // $@29: %empty
1632#line 867 "dhcp6_parser.yy"
1633 {
1634 ctx.unique("allocator", ctx.loc2pos(yystack_[0].location));
1635 ctx.enter(ctx.NO_KEYWORD);
1636}
1637#line 1638 "dhcp6_parser.cc"
1638 break;
1639
1640 case 197: // allocator: "allocator" $@29 ":" "constant string"
1641#line 870 "dhcp6_parser.yy"
1642 {
1643 ElementPtr al(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1644 ctx.stack_.back()->set("allocator", al);
1645 ctx.leave();
1646}
1647#line 1648 "dhcp6_parser.cc"
1648 break;
1649
1650 case 198: // $@30: %empty
1651#line 876 "dhcp6_parser.yy"
1652 {
1653 ctx.unique("pd-allocator", ctx.loc2pos(yystack_[0].location));
1654 ctx.enter(ctx.NO_KEYWORD);
1655}
1656#line 1657 "dhcp6_parser.cc"
1657 break;
1658
1659 case 199: // pd_allocator: "pd-allocator" $@30 ":" "constant string"
1660#line 879 "dhcp6_parser.yy"
1661 {
1662 ElementPtr al(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1663 ctx.stack_.back()->set("pd-allocator", al);
1664 ctx.leave();
1665}
1666#line 1667 "dhcp6_parser.cc"
1667 break;
1668
1669 case 200: // early_global_reservations_lookup: "early-global-reservations-lookup" ":" "boolean"
1670#line 885 "dhcp6_parser.yy"
1671 {
1672 ctx.unique("early-global-reservations-lookup", ctx.loc2pos(yystack_[2].location));
1673 ElementPtr early(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1674 ctx.stack_.back()->set("early-global-reservations-lookup", early);
1675}
1676#line 1677 "dhcp6_parser.cc"
1677 break;
1678
1679 case 201: // ip_reservations_unique: "ip-reservations-unique" ":" "boolean"
1680#line 891 "dhcp6_parser.yy"
1681 {
1682 ctx.unique("ip-reservations-unique", ctx.loc2pos(yystack_[2].location));
1683 ElementPtr unique(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1684 ctx.stack_.back()->set("ip-reservations-unique", unique);
1685}
1686#line 1687 "dhcp6_parser.cc"
1687 break;
1688
1689 case 202: // reservations_lookup_first: "reservations-lookup-first" ":" "boolean"
1690#line 897 "dhcp6_parser.yy"
1691 {
1692 ctx.unique("reservations-lookup-first", ctx.loc2pos(yystack_[2].location));
1693 ElementPtr first(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1694 ctx.stack_.back()->set("reservations-lookup-first", first);
1695}
1696#line 1697 "dhcp6_parser.cc"
1697 break;
1698
1699 case 203: // $@31: %empty
1700#line 903 "dhcp6_parser.yy"
1701 {
1702 ctx.unique("interfaces-config", ctx.loc2pos(yystack_[0].location));
1703 ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
1704 ctx.stack_.back()->set("interfaces-config", i);
1705 ctx.stack_.push_back(i);
1706 ctx.enter(ctx.INTERFACES_CONFIG);
1707}
1708#line 1709 "dhcp6_parser.cc"
1709 break;
1710
1711 case 204: // interfaces_config: "interfaces-config" $@31 ":" "{" interfaces_config_params "}"
1712#line 909 "dhcp6_parser.yy"
1713 {
1714 // No interfaces config param is required
1715 ctx.stack_.pop_back();
1716 ctx.leave();
1717}
1718#line 1719 "dhcp6_parser.cc"
1719 break;
1720
1721 case 205: // $@32: %empty
1722#line 915 "dhcp6_parser.yy"
1723 {
1724 // Parse the interfaces-config map
1725 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
1726 ctx.stack_.push_back(m);
1727}
1728#line 1729 "dhcp6_parser.cc"
1729 break;
1730
1731 case 206: // sub_interfaces6: "{" $@32 interfaces_config_params "}"
1732#line 919 "dhcp6_parser.yy"
1733 {
1734 // No interfaces config param is required
1735 // parsing completed
1736}
1737#line 1738 "dhcp6_parser.cc"
1738 break;
1739
1740 case 209: // interfaces_config_params: interfaces_config_params ","
1741#line 926 "dhcp6_parser.yy"
1742 {
1743 ctx.warnAboutExtraCommas(yystack_[0].location);
1744 }
1745#line 1746 "dhcp6_parser.cc"
1746 break;
1747
1748 case 218: // $@33: %empty
1749#line 941 "dhcp6_parser.yy"
1750 {
1751 ctx.unique("interfaces", ctx.loc2pos(yystack_[0].location));
1752 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
1753 ctx.stack_.back()->set("interfaces", l);
1754 ctx.stack_.push_back(l);
1755 ctx.enter(ctx.NO_KEYWORD);
1756}
1757#line 1758 "dhcp6_parser.cc"
1758 break;
1759
1760 case 219: // interfaces_list: "interfaces" $@33 ":" list_strings
1761#line 947 "dhcp6_parser.yy"
1762 {
1763 ctx.stack_.pop_back();
1764 ctx.leave();
1765}
1766#line 1767 "dhcp6_parser.cc"
1767 break;
1768
1769 case 220: // re_detect: "re-detect" ":" "boolean"
1770#line 952 "dhcp6_parser.yy"
1771 {
1772 ctx.unique("re-detect", ctx.loc2pos(yystack_[2].location));
1773 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1774 ctx.stack_.back()->set("re-detect", b);
1775}
1776#line 1777 "dhcp6_parser.cc"
1777 break;
1778
1779 case 221: // service_sockets_require_all: "service-sockets-require-all" ":" "boolean"
1780#line 958 "dhcp6_parser.yy"
1781 {
1782 ctx.unique("service-sockets-require-all", ctx.loc2pos(yystack_[2].location));
1783 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
1784 ctx.stack_.back()->set("service-sockets-require-all", b);
1785}
1786#line 1787 "dhcp6_parser.cc"
1787 break;
1788
1789 case 222: // service_sockets_retry_wait_time: "service-sockets-retry-wait-time" ":" "integer"
1790#line 964 "dhcp6_parser.yy"
1791 {
1792 ctx.unique("service-sockets-retry-wait-time", ctx.loc2pos(yystack_[2].location));
1793 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1794 ctx.stack_.back()->set("service-sockets-retry-wait-time", n);
1795}
1796#line 1797 "dhcp6_parser.cc"
1797 break;
1798
1799 case 223: // service_sockets_max_retries: "service-sockets-max-retries" ":" "integer"
1800#line 970 "dhcp6_parser.yy"
1801 {
1802 ctx.unique("service-sockets-max-retries", ctx.loc2pos(yystack_[2].location));
1803 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1804 ctx.stack_.back()->set("service-sockets-max-retries", n);
1805}
1806#line 1807 "dhcp6_parser.cc"
1807 break;
1808
1809 case 224: // $@34: %empty
1810#line 976 "dhcp6_parser.yy"
1811 {
1812 ctx.unique("lease-database", ctx.loc2pos(yystack_[0].location));
1813 ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
1814 ctx.stack_.back()->set("lease-database", i);
1815 ctx.stack_.push_back(i);
1816 ctx.enter(ctx.LEASE_DATABASE);
1817}
1818#line 1819 "dhcp6_parser.cc"
1819 break;
1820
1821 case 225: // lease_database: "lease-database" $@34 ":" "{" database_map_params "}"
1822#line 982 "dhcp6_parser.yy"
1823 {
1824 // The type parameter is required
1825 ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
1826 ctx.stack_.pop_back();
1827 ctx.leave();
1828}
1829#line 1830 "dhcp6_parser.cc"
1830 break;
1831
1832 case 226: // $@35: %empty
1833#line 989 "dhcp6_parser.yy"
1834 {
1835 ctx.unique("hosts-database", ctx.loc2pos(yystack_[0].location));
1836 ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
1837 ctx.stack_.back()->set("hosts-database", i);
1838 ctx.stack_.push_back(i);
1839 ctx.enter(ctx.HOSTS_DATABASE);
1840}
1841#line 1842 "dhcp6_parser.cc"
1842 break;
1843
1844 case 227: // hosts_database: "hosts-database" $@35 ":" "{" database_map_params "}"
1845#line 995 "dhcp6_parser.yy"
1846 {
1847 // The type parameter is required
1848 ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
1849 ctx.stack_.pop_back();
1850 ctx.leave();
1851}
1852#line 1853 "dhcp6_parser.cc"
1853 break;
1854
1855 case 228: // $@36: %empty
1856#line 1002 "dhcp6_parser.yy"
1857 {
1858 ctx.unique("hosts-databases", ctx.loc2pos(yystack_[0].location));
1859 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
1860 ctx.stack_.back()->set("hosts-databases", l);
1861 ctx.stack_.push_back(l);
1862 ctx.enter(ctx.HOSTS_DATABASE);
1863}
1864#line 1865 "dhcp6_parser.cc"
1865 break;
1866
1867 case 229: // hosts_databases: "hosts-databases" $@36 ":" "[" database_list "]"
1868#line 1008 "dhcp6_parser.yy"
1869 {
1870 ctx.stack_.pop_back();
1871 ctx.leave();
1872}
1873#line 1874 "dhcp6_parser.cc"
1874 break;
1875
1876 case 234: // not_empty_database_list: not_empty_database_list ","
1877#line 1019 "dhcp6_parser.yy"
1878 {
1879 ctx.warnAboutExtraCommas(yystack_[0].location);
1880 }
1881#line 1882 "dhcp6_parser.cc"
1882 break;
1883
1884 case 235: // $@37: %empty
1885#line 1024 "dhcp6_parser.yy"
1886 {
1887 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
1888 ctx.stack_.back()->add(m);
1889 ctx.stack_.push_back(m);
1890}
1891#line 1892 "dhcp6_parser.cc"
1892 break;
1893
1894 case 236: // database: "{" $@37 database_map_params "}"
1895#line 1028 "dhcp6_parser.yy"
1896 {
1897 // The type parameter is required
1898 ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
1899 ctx.stack_.pop_back();
1900}
1901#line 1902 "dhcp6_parser.cc"
1902 break;
1903
1904 case 239: // database_map_params: database_map_params ","
1905#line 1036 "dhcp6_parser.yy"
1906 {
1907 ctx.warnAboutExtraCommas(yystack_[0].location);
1908 }
1909#line 1910 "dhcp6_parser.cc"
1910 break;
1911
1912 case 263: // $@38: %empty
1913#line 1066 "dhcp6_parser.yy"
1914 {
1915 ctx.unique("type", ctx.loc2pos(yystack_[0].location));
1916 ctx.enter(ctx.NO_KEYWORD);
1917}
1918#line 1919 "dhcp6_parser.cc"
1919 break;
1920
1921 case 264: // database_type: "type" $@38 ":" "constant string"
1922#line 1069 "dhcp6_parser.yy"
1923 {
1924 ElementPtr db_type(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1925 ctx.stack_.back()->set("type", db_type);
1926 ctx.leave();
1927}
1928#line 1929 "dhcp6_parser.cc"
1929 break;
1930
1931 case 265: // $@39: %empty
1932#line 1075 "dhcp6_parser.yy"
1933 {
1934 ctx.unique("user", ctx.loc2pos(yystack_[0].location));
1935 ctx.enter(ctx.NO_KEYWORD);
1936}
1937#line 1938 "dhcp6_parser.cc"
1938 break;
1939
1940 case 266: // user: "user" $@39 ":" "constant string"
1941#line 1078 "dhcp6_parser.yy"
1942 {
1943 ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1944 ctx.stack_.back()->set("user", user);
1945 ctx.leave();
1946}
1947#line 1948 "dhcp6_parser.cc"
1948 break;
1949
1950 case 267: // $@40: %empty
1951#line 1084 "dhcp6_parser.yy"
1952 {
1953 ctx.unique("password", ctx.loc2pos(yystack_[0].location));
1954 ctx.enter(ctx.NO_KEYWORD);
1955}
1956#line 1957 "dhcp6_parser.cc"
1957 break;
1958
1959 case 268: // password: "password" $@40 ":" "constant string"
1960#line 1087 "dhcp6_parser.yy"
1961 {
1962 ElementPtr pwd(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1963 ctx.stack_.back()->set("password", pwd);
1964 ctx.leave();
1965}
1966#line 1967 "dhcp6_parser.cc"
1967 break;
1968
1969 case 269: // $@41: %empty
1970#line 1093 "dhcp6_parser.yy"
1971 {
1972 ctx.unique("host", ctx.loc2pos(yystack_[0].location));
1973 ctx.enter(ctx.NO_KEYWORD);
1974}
1975#line 1976 "dhcp6_parser.cc"
1976 break;
1977
1978 case 270: // host: "host" $@41 ":" "constant string"
1979#line 1096 "dhcp6_parser.yy"
1980 {
1981 ElementPtr h(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
1982 ctx.stack_.back()->set("host", h);
1983 ctx.leave();
1984}
1985#line 1986 "dhcp6_parser.cc"
1986 break;
1987
1988 case 271: // port: "port" ":" "integer"
1989#line 1102 "dhcp6_parser.yy"
1990 {
1991 ctx.unique("port", ctx.loc2pos(yystack_[2].location));
1992 ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
1993 ctx.stack_.back()->set("port", p);
1994}
1995#line 1996 "dhcp6_parser.cc"
1996 break;
1997
1998 case 272: // $@42: %empty
1999#line 1108 "dhcp6_parser.yy"
2000 {
2001 ctx.unique("name", ctx.loc2pos(yystack_[0].location));
2002 ctx.enter(ctx.NO_KEYWORD);
2003}
2004#line 2005 "dhcp6_parser.cc"
2005 break;
2006
2007 case 273: // name: "name" $@42 ":" "constant string"
2008#line 1111 "dhcp6_parser.yy"
2009 {
2010 ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2011 ctx.stack_.back()->set("name", name);
2012 ctx.leave();
2013}
2014#line 2015 "dhcp6_parser.cc"
2015 break;
2016
2017 case 274: // persist: "persist" ":" "boolean"
2018#line 1117 "dhcp6_parser.yy"
2019 {
2020 ctx.unique("persist", ctx.loc2pos(yystack_[2].location));
2021 ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2022 ctx.stack_.back()->set("persist", n);
2023}
2024#line 2025 "dhcp6_parser.cc"
2025 break;
2026
2027 case 275: // lfc_interval: "lfc-interval" ":" "integer"
2028#line 1123 "dhcp6_parser.yy"
2029 {
2030 ctx.unique("lfc-interval", ctx.loc2pos(yystack_[2].location));
2031 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2032 ctx.stack_.back()->set("lfc-interval", n);
2033}
2034#line 2035 "dhcp6_parser.cc"
2035 break;
2036
2037 case 276: // readonly: "readonly" ":" "boolean"
2038#line 1129 "dhcp6_parser.yy"
2039 {
2040 ctx.unique("readonly", ctx.loc2pos(yystack_[2].location));
2041 ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2042 ctx.stack_.back()->set("readonly", n);
2043}
2044#line 2045 "dhcp6_parser.cc"
2045 break;
2046
2047 case 277: // connect_timeout: "connect-timeout" ":" "integer"
2048#line 1135 "dhcp6_parser.yy"
2049 {
2050 ctx.unique("connect-timeout", ctx.loc2pos(yystack_[2].location));
2051 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2052 ctx.stack_.back()->set("connect-timeout", n);
2053}
2054#line 2055 "dhcp6_parser.cc"
2055 break;
2056
2057 case 278: // read_timeout: "read-timeout" ":" "integer"
2058#line 1141 "dhcp6_parser.yy"
2059 {
2060 ctx.unique("read-timeout", ctx.loc2pos(yystack_[2].location));
2061 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2062 ctx.stack_.back()->set("read-timeout", n);
2063}
2064#line 2065 "dhcp6_parser.cc"
2065 break;
2066
2067 case 279: // write_timeout: "write-timeout" ":" "integer"
2068#line 1147 "dhcp6_parser.yy"
2069 {
2070 ctx.unique("write-timeout", ctx.loc2pos(yystack_[2].location));
2071 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2072 ctx.stack_.back()->set("write-timeout", n);
2073}
2074#line 2075 "dhcp6_parser.cc"
2075 break;
2076
2077 case 280: // tcp_user_timeout: "tcp-user-timeout" ":" "integer"
2078#line 1153 "dhcp6_parser.yy"
2079 {
2080 ctx.unique("tcp-user-timeout", ctx.loc2pos(yystack_[2].location));
2081 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2082 ctx.stack_.back()->set("tcp-user-timeout", n);
2083}
2084#line 2085 "dhcp6_parser.cc"
2085 break;
2086
2087 case 281: // reconnect_wait_time: "reconnect-wait-time" ":" "integer"
2088#line 1159 "dhcp6_parser.yy"
2089 {
2090 ctx.unique("reconnect-wait-time", ctx.loc2pos(yystack_[2].location));
2091 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2092 ctx.stack_.back()->set("reconnect-wait-time", n);
2093}
2094#line 2095 "dhcp6_parser.cc"
2095 break;
2096
2097 case 282: // $@43: %empty
2098#line 1165 "dhcp6_parser.yy"
2099 {
2100 ctx.unique("on-fail", ctx.loc2pos(yystack_[0].location));
2101 ctx.enter(ctx.DATABASE_ON_FAIL);
2102}
2103#line 2104 "dhcp6_parser.cc"
2104 break;
2105
2106 case 283: // on_fail: "on-fail" $@43 ":" on_fail_mode
2107#line 1168 "dhcp6_parser.yy"
2108 {
2109 ctx.stack_.back()->set("on-fail", yystack_[0].value.as < ElementPtr > ());
2110 ctx.leave();
2111}
2112#line 2113 "dhcp6_parser.cc"
2113 break;
2114
2115 case 284: // on_fail_mode: "stop-retry-exit"
2116#line 1173 "dhcp6_parser.yy"
2117 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stop-retry-exit", ctx.loc2pos(yystack_[0].location))); }
2118#line 2119 "dhcp6_parser.cc"
2119 break;
2120
2121 case 285: // on_fail_mode: "serve-retry-exit"
2122#line 1174 "dhcp6_parser.yy"
2123 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-exit", ctx.loc2pos(yystack_[0].location))); }
2124#line 2125 "dhcp6_parser.cc"
2125 break;
2126
2127 case 286: // on_fail_mode: "serve-retry-continue"
2128#line 1175 "dhcp6_parser.yy"
2129 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("serve-retry-continue", ctx.loc2pos(yystack_[0].location))); }
2130#line 2131 "dhcp6_parser.cc"
2131 break;
2132
2133 case 287: // retry_on_startup: "retry-on-startup" ":" "boolean"
2134#line 1178 "dhcp6_parser.yy"
2135 {
2136 ctx.unique("retry-on-startup", ctx.loc2pos(yystack_[2].location));
2137 ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2138 ctx.stack_.back()->set("retry-on-startup", n);
2139}
2140#line 2141 "dhcp6_parser.cc"
2141 break;
2142
2143 case 288: // max_row_errors: "max-row-errors" ":" "integer"
2144#line 1184 "dhcp6_parser.yy"
2145 {
2146 ctx.unique("max-row-errors", ctx.loc2pos(yystack_[2].location));
2147 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2148 ctx.stack_.back()->set("max-row-errors", n);
2149}
2150#line 2151 "dhcp6_parser.cc"
2151 break;
2152
2153 case 289: // max_reconnect_tries: "max-reconnect-tries" ":" "integer"
2154#line 1190 "dhcp6_parser.yy"
2155 {
2156 ctx.unique("max-reconnect-tries", ctx.loc2pos(yystack_[2].location));
2157 ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2158 ctx.stack_.back()->set("max-reconnect-tries", n);
2159}
2160#line 2161 "dhcp6_parser.cc"
2161 break;
2162
2163 case 290: // $@44: %empty
2164#line 1196 "dhcp6_parser.yy"
2165 {
2166 ctx.unique("trust-anchor", ctx.loc2pos(yystack_[0].location));
2167 ctx.enter(ctx.NO_KEYWORD);
2168}
2169#line 2170 "dhcp6_parser.cc"
2170 break;
2171
2172 case 291: // trust_anchor: "trust-anchor" $@44 ":" "constant string"
2173#line 1199 "dhcp6_parser.yy"
2174 {
2175 ElementPtr ca(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2176 ctx.stack_.back()->set("trust-anchor", ca);
2177 ctx.leave();
2178}
2179#line 2180 "dhcp6_parser.cc"
2180 break;
2181
2182 case 292: // $@45: %empty
2183#line 1205 "dhcp6_parser.yy"
2184 {
2185 ctx.unique("cert-file", ctx.loc2pos(yystack_[0].location));
2186 ctx.enter(ctx.NO_KEYWORD);
2187}
2188#line 2189 "dhcp6_parser.cc"
2189 break;
2190
2191 case 293: // cert_file: "cert-file" $@45 ":" "constant string"
2192#line 1208 "dhcp6_parser.yy"
2193 {
2194 ElementPtr cert(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2195 ctx.stack_.back()->set("cert-file", cert);
2196 ctx.leave();
2197}
2198#line 2199 "dhcp6_parser.cc"
2199 break;
2200
2201 case 294: // $@46: %empty
2202#line 1214 "dhcp6_parser.yy"
2203 {
2204 ctx.unique("key-file", ctx.loc2pos(yystack_[0].location));
2205 ctx.enter(ctx.NO_KEYWORD);
2206}
2207#line 2208 "dhcp6_parser.cc"
2208 break;
2209
2210 case 295: // key_file: "key-file" $@46 ":" "constant string"
2211#line 1217 "dhcp6_parser.yy"
2212 {
2213 ElementPtr key(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2214 ctx.stack_.back()->set("key-file", key);
2215 ctx.leave();
2216}
2217#line 2218 "dhcp6_parser.cc"
2218 break;
2219
2220 case 296: // $@47: %empty
2221#line 1223 "dhcp6_parser.yy"
2222 {
2223 ctx.unique("cipher-list", ctx.loc2pos(yystack_[0].location));
2224 ctx.enter(ctx.NO_KEYWORD);
2225}
2226#line 2227 "dhcp6_parser.cc"
2227 break;
2228
2229 case 297: // cipher_list: "cipher-list" $@47 ":" "constant string"
2230#line 1226 "dhcp6_parser.yy"
2231 {
2232 ElementPtr cl(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2233 ctx.stack_.back()->set("cipher-list", cl);
2234 ctx.leave();
2235}
2236#line 2237 "dhcp6_parser.cc"
2237 break;
2238
2239 case 298: // $@48: %empty
2240#line 1232 "dhcp6_parser.yy"
2241 {
2242 ctx.unique("sanity-checks", ctx.loc2pos(yystack_[0].location));
2243 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2244 ctx.stack_.back()->set("sanity-checks", m);
2245 ctx.stack_.push_back(m);
2246 ctx.enter(ctx.SANITY_CHECKS);
2247}
2248#line 2249 "dhcp6_parser.cc"
2249 break;
2250
2251 case 299: // sanity_checks: "sanity-checks" $@48 ":" "{" sanity_checks_params "}"
2252#line 1238 "dhcp6_parser.yy"
2253 {
2254 ctx.stack_.pop_back();
2255 ctx.leave();
2256}
2257#line 2258 "dhcp6_parser.cc"
2258 break;
2259
2260 case 302: // sanity_checks_params: sanity_checks_params ","
2261#line 1245 "dhcp6_parser.yy"
2262 {
2263 ctx.warnAboutExtraCommas(yystack_[0].location);
2264 }
2265#line 2266 "dhcp6_parser.cc"
2266 break;
2267
2268 case 305: // $@49: %empty
2269#line 1254 "dhcp6_parser.yy"
2270 {
2271 ctx.unique("lease-checks", ctx.loc2pos(yystack_[0].location));
2272 ctx.enter(ctx.NO_KEYWORD);
2273}
2274#line 2275 "dhcp6_parser.cc"
2275 break;
2276
2277 case 306: // lease_checks: "lease-checks" $@49 ":" "constant string"
2278#line 1257 "dhcp6_parser.yy"
2279 {
2280
2281 if ( (string(yystack_[0].value.as < std::string > ()) == "none") ||
2282 (string(yystack_[0].value.as < std::string > ()) == "warn") ||
2283 (string(yystack_[0].value.as < std::string > ()) == "fix") ||
2284 (string(yystack_[0].value.as < std::string > ()) == "fix-del") ||
2285 (string(yystack_[0].value.as < std::string > ()) == "del")) {
2286 ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2287 ctx.stack_.back()->set("lease-checks", user);
2288 ctx.leave();
2289 } else {
2290 error(yystack_[0].location, "Unsupported 'lease-checks value: " + string(yystack_[0].value.as < std::string > ()) +
2291 ", supported values are: none, warn, fix, fix-del, del");
2292 }
2293}
2294#line 2295 "dhcp6_parser.cc"
2295 break;
2296
2297 case 307: // $@50: %empty
2298#line 1273 "dhcp6_parser.yy"
2299 {
2300 ctx.unique("extended-info-checks", ctx.loc2pos(yystack_[0].location));
2301 ctx.enter(ctx.NO_KEYWORD);
2302}
2303#line 2304 "dhcp6_parser.cc"
2304 break;
2305
2306 case 308: // extended_info_checks: "extended-info-checks" $@50 ":" "constant string"
2307#line 1276 "dhcp6_parser.yy"
2308 {
2309
2310 if ( (string(yystack_[0].value.as < std::string > ()) == "none") ||
2311 (string(yystack_[0].value.as < std::string > ()) == "fix") ||
2312 (string(yystack_[0].value.as < std::string > ()) == "strict") ||
2313 (string(yystack_[0].value.as < std::string > ()) == "pedantic")) {
2314 ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2315 ctx.stack_.back()->set("extended-info-checks", user);
2316 ctx.leave();
2317 } else {
2318 error(yystack_[0].location, "Unsupported 'extended-info-checks value: " + string(yystack_[0].value.as < std::string > ()) +
2319 ", supported values are: none, fix, strict, pedantic");
2320 }
2321}
2322#line 2323 "dhcp6_parser.cc"
2323 break;
2324
2325 case 309: // $@51: %empty
2326#line 1291 "dhcp6_parser.yy"
2327 {
2328 ctx.unique("mac-sources", ctx.loc2pos(yystack_[0].location));
2329 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2330 ctx.stack_.back()->set("mac-sources", l);
2331 ctx.stack_.push_back(l);
2332 ctx.enter(ctx.MAC_SOURCES);
2333}
2334#line 2335 "dhcp6_parser.cc"
2335 break;
2336
2337 case 310: // mac_sources: "mac-sources" $@51 ":" "[" mac_sources_list "]"
2338#line 1297 "dhcp6_parser.yy"
2339 {
2340 ctx.stack_.pop_back();
2341 ctx.leave();
2342}
2343#line 2344 "dhcp6_parser.cc"
2344 break;
2345
2346 case 313: // mac_sources_list: mac_sources_list ","
2347#line 1304 "dhcp6_parser.yy"
2348 {
2349 ctx.warnAboutExtraCommas(yystack_[0].location);
2350 }
2351#line 2352 "dhcp6_parser.cc"
2352 break;
2353
2354 case 316: // duid_id: "duid"
2355#line 1313 "dhcp6_parser.yy"
2356 {
2357 ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location)));
2358 ctx.stack_.back()->add(duid);
2359}
2360#line 2361 "dhcp6_parser.cc"
2361 break;
2362
2363 case 317: // string_id: "constant string"
2364#line 1318 "dhcp6_parser.yy"
2365 {
2366 ElementPtr duid(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2367 ctx.stack_.back()->add(duid);
2368}
2369#line 2370 "dhcp6_parser.cc"
2370 break;
2371
2372 case 318: // $@52: %empty
2373#line 1323 "dhcp6_parser.yy"
2374 {
2375 ctx.unique("host-reservation-identifiers", ctx.loc2pos(yystack_[0].location));
2376 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2377 ctx.stack_.back()->set("host-reservation-identifiers", l);
2378 ctx.stack_.push_back(l);
2380}
2381#line 2382 "dhcp6_parser.cc"
2382 break;
2383
2384 case 319: // host_reservation_identifiers: "host-reservation-identifiers" $@52 ":" "[" host_reservation_identifiers_list "]"
2385#line 1329 "dhcp6_parser.yy"
2386 {
2387 ctx.stack_.pop_back();
2388 ctx.leave();
2389}
2390#line 2391 "dhcp6_parser.cc"
2391 break;
2392
2393 case 322: // host_reservation_identifiers_list: host_reservation_identifiers_list ","
2394#line 1336 "dhcp6_parser.yy"
2395 {
2396 ctx.warnAboutExtraCommas(yystack_[0].location);
2397 }
2398#line 2399 "dhcp6_parser.cc"
2399 break;
2400
2401 case 326: // hw_address_id: "hw-address"
2402#line 1346 "dhcp6_parser.yy"
2403 {
2404 ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location)));
2405 ctx.stack_.back()->add(hwaddr);
2406}
2407#line 2408 "dhcp6_parser.cc"
2408 break;
2409
2410 case 327: // flex_id: "flex-id"
2411#line 1351 "dhcp6_parser.yy"
2412 {
2413 ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location)));
2414 ctx.stack_.back()->add(flex_id);
2415}
2416#line 2417 "dhcp6_parser.cc"
2417 break;
2418
2419 case 328: // $@53: %empty
2420#line 1358 "dhcp6_parser.yy"
2421 {
2422 ctx.unique("relay-supplied-options", ctx.loc2pos(yystack_[0].location));
2423 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2424 ctx.stack_.back()->set("relay-supplied-options", l);
2425 ctx.stack_.push_back(l);
2426 ctx.enter(ctx.NO_KEYWORD);
2427}
2428#line 2429 "dhcp6_parser.cc"
2429 break;
2430
2431 case 329: // relay_supplied_options: "relay-supplied-options" $@53 ":" "[" list_content "]"
2432#line 1364 "dhcp6_parser.yy"
2433 {
2434 ctx.stack_.pop_back();
2435 ctx.leave();
2436}
2437#line 2438 "dhcp6_parser.cc"
2438 break;
2439
2440 case 330: // $@54: %empty
2441#line 1371 "dhcp6_parser.yy"
2442 {
2443 ctx.unique("multi-threading", ctx.loc2pos(yystack_[0].location));
2444 ElementPtr mt(new MapElement(ctx.loc2pos(yystack_[0].location)));
2445 ctx.stack_.back()->set("multi-threading", mt);
2446 ctx.stack_.push_back(mt);
2447 ctx.enter(ctx.DHCP_MULTI_THREADING);
2448}
2449#line 2450 "dhcp6_parser.cc"
2450 break;
2451
2452 case 331: // dhcp_multi_threading: "multi-threading" $@54 ":" "{" multi_threading_params "}"
2453#line 1377 "dhcp6_parser.yy"
2454 {
2455 // The enable parameter is required.
2456 ctx.require("enable-multi-threading", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
2457 ctx.stack_.pop_back();
2458 ctx.leave();
2459}
2460#line 2461 "dhcp6_parser.cc"
2461 break;
2462
2463 case 334: // multi_threading_params: multi_threading_params ","
2464#line 1386 "dhcp6_parser.yy"
2465 {
2466 ctx.warnAboutExtraCommas(yystack_[0].location);
2467 }
2468#line 2469 "dhcp6_parser.cc"
2469 break;
2470
2471 case 341: // enable_multi_threading: "enable-multi-threading" ":" "boolean"
2472#line 1399 "dhcp6_parser.yy"
2473 {
2474 ctx.unique("enable-multi-threading", ctx.loc2pos(yystack_[2].location));
2475 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2476 ctx.stack_.back()->set("enable-multi-threading", b);
2477}
2478#line 2479 "dhcp6_parser.cc"
2479 break;
2480
2481 case 342: // thread_pool_size: "thread-pool-size" ":" "integer"
2482#line 1405 "dhcp6_parser.yy"
2483 {
2484 ctx.unique("thread-pool-size", ctx.loc2pos(yystack_[2].location));
2485 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2486 ctx.stack_.back()->set("thread-pool-size", prf);
2487}
2488#line 2489 "dhcp6_parser.cc"
2489 break;
2490
2491 case 343: // packet_queue_size: "packet-queue-size" ":" "integer"
2492#line 1411 "dhcp6_parser.yy"
2493 {
2494 ctx.unique("packet-queue-size", ctx.loc2pos(yystack_[2].location));
2495 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2496 ctx.stack_.back()->set("packet-queue-size", prf);
2497}
2498#line 2499 "dhcp6_parser.cc"
2499 break;
2500
2501 case 344: // $@55: %empty
2502#line 1417 "dhcp6_parser.yy"
2503 {
2504 ctx.unique("hooks-libraries", ctx.loc2pos(yystack_[0].location));
2505 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2506 ctx.stack_.back()->set("hooks-libraries", l);
2507 ctx.stack_.push_back(l);
2508 ctx.enter(ctx.HOOKS_LIBRARIES);
2509}
2510#line 2511 "dhcp6_parser.cc"
2511 break;
2512
2513 case 345: // hooks_libraries: "hooks-libraries" $@55 ":" "[" hooks_libraries_list "]"
2514#line 1423 "dhcp6_parser.yy"
2515 {
2516 ctx.stack_.pop_back();
2517 ctx.leave();
2518}
2519#line 2520 "dhcp6_parser.cc"
2520 break;
2521
2522 case 350: // not_empty_hooks_libraries_list: not_empty_hooks_libraries_list ","
2523#line 1434 "dhcp6_parser.yy"
2524 {
2525 ctx.warnAboutExtraCommas(yystack_[0].location);
2526 }
2527#line 2528 "dhcp6_parser.cc"
2528 break;
2529
2530 case 351: // $@56: %empty
2531#line 1439 "dhcp6_parser.yy"
2532 {
2533 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2534 ctx.stack_.back()->add(m);
2535 ctx.stack_.push_back(m);
2536}
2537#line 2538 "dhcp6_parser.cc"
2538 break;
2539
2540 case 352: // hooks_library: "{" $@56 hooks_params "}"
2541#line 1443 "dhcp6_parser.yy"
2542 {
2543 // The library hooks parameter is required
2544 ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2545 ctx.stack_.pop_back();
2546}
2547#line 2548 "dhcp6_parser.cc"
2548 break;
2549
2550 case 353: // $@57: %empty
2551#line 1449 "dhcp6_parser.yy"
2552 {
2553 // Parse the hooks-libraries list entry map
2554 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2555 ctx.stack_.push_back(m);
2556}
2557#line 2558 "dhcp6_parser.cc"
2558 break;
2559
2560 case 354: // sub_hooks_library: "{" $@57 hooks_params "}"
2561#line 1453 "dhcp6_parser.yy"
2562 {
2563 // The library hooks parameter is required
2564 ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2565 // parsing completed
2566}
2567#line 2568 "dhcp6_parser.cc"
2568 break;
2569
2570 case 357: // hooks_params: hooks_params ","
2571#line 1461 "dhcp6_parser.yy"
2572 {
2573 ctx.warnAboutExtraCommas(yystack_[0].location);
2574 }
2575#line 2576 "dhcp6_parser.cc"
2576 break;
2577
2578 case 361: // $@58: %empty
2579#line 1471 "dhcp6_parser.yy"
2580 {
2581 ctx.unique("library", ctx.loc2pos(yystack_[0].location));
2582 ctx.enter(ctx.NO_KEYWORD);
2583}
2584#line 2585 "dhcp6_parser.cc"
2585 break;
2586
2587 case 362: // library: "library" $@58 ":" "constant string"
2588#line 1474 "dhcp6_parser.yy"
2589 {
2590 ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2591 ctx.stack_.back()->set("library", lib);
2592 ctx.leave();
2593}
2594#line 2595 "dhcp6_parser.cc"
2595 break;
2596
2597 case 363: // $@59: %empty
2598#line 1480 "dhcp6_parser.yy"
2599 {
2600 ctx.unique("parameters", ctx.loc2pos(yystack_[0].location));
2601 ctx.enter(ctx.NO_KEYWORD);
2602}
2603#line 2604 "dhcp6_parser.cc"
2604 break;
2605
2606 case 364: // parameters: "parameters" $@59 ":" map_value
2607#line 1483 "dhcp6_parser.yy"
2608 {
2609 ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ());
2610 ctx.leave();
2611}
2612#line 2613 "dhcp6_parser.cc"
2613 break;
2614
2615 case 365: // $@60: %empty
2616#line 1489 "dhcp6_parser.yy"
2617 {
2618 ctx.unique("expired-leases-processing", ctx.loc2pos(yystack_[0].location));
2619 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2620 ctx.stack_.back()->set("expired-leases-processing", m);
2621 ctx.stack_.push_back(m);
2623}
2624#line 2625 "dhcp6_parser.cc"
2625 break;
2626
2627 case 366: // expired_leases_processing: "expired-leases-processing" $@60 ":" "{" expired_leases_params "}"
2628#line 1495 "dhcp6_parser.yy"
2629 {
2630 // No expired lease parameter is required
2631 ctx.stack_.pop_back();
2632 ctx.leave();
2633}
2634#line 2635 "dhcp6_parser.cc"
2635 break;
2636
2637 case 369: // expired_leases_params: expired_leases_params ","
2638#line 1503 "dhcp6_parser.yy"
2639 {
2640 ctx.warnAboutExtraCommas(yystack_[0].location);
2641 }
2642#line 2643 "dhcp6_parser.cc"
2643 break;
2644
2645 case 376: // reclaim_timer_wait_time: "reclaim-timer-wait-time" ":" "integer"
2646#line 1516 "dhcp6_parser.yy"
2647 {
2648 ctx.unique("reclaim-timer-wait-time", ctx.loc2pos(yystack_[2].location));
2649 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2650 ctx.stack_.back()->set("reclaim-timer-wait-time", value);
2651}
2652#line 2653 "dhcp6_parser.cc"
2653 break;
2654
2655 case 377: // flush_reclaimed_timer_wait_time: "flush-reclaimed-timer-wait-time" ":" "integer"
2656#line 1522 "dhcp6_parser.yy"
2657 {
2658 ctx.unique("flush-reclaimed-timer-wait-time", ctx.loc2pos(yystack_[2].location));
2659 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2660 ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value);
2661}
2662#line 2663 "dhcp6_parser.cc"
2663 break;
2664
2665 case 378: // hold_reclaimed_time: "hold-reclaimed-time" ":" "integer"
2666#line 1528 "dhcp6_parser.yy"
2667 {
2668 ctx.unique("hold-reclaimed-time", ctx.loc2pos(yystack_[2].location));
2669 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2670 ctx.stack_.back()->set("hold-reclaimed-time", value);
2671}
2672#line 2673 "dhcp6_parser.cc"
2673 break;
2674
2675 case 379: // max_reclaim_leases: "max-reclaim-leases" ":" "integer"
2676#line 1534 "dhcp6_parser.yy"
2677 {
2678 ctx.unique("max-reclaim-leases", ctx.loc2pos(yystack_[2].location));
2679 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2680 ctx.stack_.back()->set("max-reclaim-leases", value);
2681}
2682#line 2683 "dhcp6_parser.cc"
2683 break;
2684
2685 case 380: // max_reclaim_time: "max-reclaim-time" ":" "integer"
2686#line 1540 "dhcp6_parser.yy"
2687 {
2688 ctx.unique("max-reclaim-time", ctx.loc2pos(yystack_[2].location));
2689 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2690 ctx.stack_.back()->set("max-reclaim-time", value);
2691}
2692#line 2693 "dhcp6_parser.cc"
2693 break;
2694
2695 case 381: // unwarned_reclaim_cycles: "unwarned-reclaim-cycles" ":" "integer"
2696#line 1546 "dhcp6_parser.yy"
2697 {
2698 ctx.unique("unwarned-reclaim-cycles", ctx.loc2pos(yystack_[2].location));
2699 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2700 ctx.stack_.back()->set("unwarned-reclaim-cycles", value);
2701}
2702#line 2703 "dhcp6_parser.cc"
2703 break;
2704
2705 case 382: // $@61: %empty
2706#line 1555 "dhcp6_parser.yy"
2707 {
2708 ctx.unique("subnet6", ctx.loc2pos(yystack_[0].location));
2709 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2710 ctx.stack_.back()->set("subnet6", l);
2711 ctx.stack_.push_back(l);
2712 ctx.enter(ctx.SUBNET6);
2713}
2714#line 2715 "dhcp6_parser.cc"
2715 break;
2716
2717 case 383: // subnet6_list: "subnet6" $@61 ":" "[" subnet6_list_content "]"
2718#line 1561 "dhcp6_parser.yy"
2719 {
2720 ctx.stack_.pop_back();
2721 ctx.leave();
2722}
2723#line 2724 "dhcp6_parser.cc"
2724 break;
2725
2726 case 388: // not_empty_subnet6_list: not_empty_subnet6_list ","
2727#line 1575 "dhcp6_parser.yy"
2728 {
2729 ctx.warnAboutExtraCommas(yystack_[0].location);
2730 }
2731#line 2732 "dhcp6_parser.cc"
2732 break;
2733
2734 case 389: // $@62: %empty
2735#line 1584 "dhcp6_parser.yy"
2736 {
2737 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2738 ctx.stack_.back()->add(m);
2739 ctx.stack_.push_back(m);
2740}
2741#line 2742 "dhcp6_parser.cc"
2742 break;
2743
2744 case 390: // subnet6: "{" $@62 subnet6_params "}"
2745#line 1588 "dhcp6_parser.yy"
2746 {
2747 // Once we reached this place, the subnet parsing is now complete.
2748 // If we want to, we can implement default values here.
2749 // In particular we can do things like this:
2750 // if (!ctx.stack_.back()->get("interface")) {
2751 // ctx.stack_.back()->set("interface", StringElement("loopback"));
2752 // }
2753 //
2754 // We can also stack up one level (Dhcp6) and copy over whatever
2755 // global parameters we want to:
2756 // if (!ctx.stack_.back()->get("renew-timer")) {
2757 // ElementPtr renew = ctx_stack_[...].get("renew-timer");
2758 // if (renew) {
2759 // ctx.stack_.back()->set("renew-timer", renew);
2760 // }
2761 // }
2762
2763 // The subnet subnet6 parameter is required
2764 ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2765 ctx.stack_.pop_back();
2766}
2767#line 2768 "dhcp6_parser.cc"
2768 break;
2769
2770 case 391: // $@63: %empty
2771#line 1610 "dhcp6_parser.yy"
2772 {
2773 // Parse the subnet6 list entry map
2774 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
2775 ctx.stack_.push_back(m);
2776}
2777#line 2778 "dhcp6_parser.cc"
2778 break;
2779
2780 case 392: // sub_subnet6: "{" $@63 subnet6_params "}"
2781#line 1614 "dhcp6_parser.yy"
2782 {
2783 // The subnet subnet6 parameter is required
2784 ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
2785 // parsing completed
2786}
2787#line 2788 "dhcp6_parser.cc"
2788 break;
2789
2790 case 395: // subnet6_params: subnet6_params ","
2791#line 1623 "dhcp6_parser.yy"
2792 {
2793 ctx.warnAboutExtraCommas(yystack_[0].location);
2794 }
2795#line 2796 "dhcp6_parser.cc"
2796 break;
2797
2798 case 447: // $@64: %empty
2799#line 1682 "dhcp6_parser.yy"
2800 {
2801 ctx.unique("subnet", ctx.loc2pos(yystack_[0].location));
2802 ctx.enter(ctx.NO_KEYWORD);
2803}
2804#line 2805 "dhcp6_parser.cc"
2805 break;
2806
2807 case 448: // subnet: "subnet" $@64 ":" "constant string"
2808#line 1685 "dhcp6_parser.yy"
2809 {
2810 ElementPtr subnet(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2811 ctx.stack_.back()->set("subnet", subnet);
2812 ctx.leave();
2813}
2814#line 2815 "dhcp6_parser.cc"
2815 break;
2816
2817 case 449: // $@65: %empty
2818#line 1691 "dhcp6_parser.yy"
2819 {
2820 ctx.unique("interface", ctx.loc2pos(yystack_[0].location));
2821 ctx.enter(ctx.NO_KEYWORD);
2822}
2823#line 2824 "dhcp6_parser.cc"
2824 break;
2825
2826 case 450: // interface: "interface" $@65 ":" "constant string"
2827#line 1694 "dhcp6_parser.yy"
2828 {
2829 ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2830 ctx.stack_.back()->set("interface", iface);
2831 ctx.leave();
2832}
2833#line 2834 "dhcp6_parser.cc"
2834 break;
2835
2836 case 451: // $@66: %empty
2837#line 1700 "dhcp6_parser.yy"
2838 {
2839 ctx.unique("interface-id", ctx.loc2pos(yystack_[0].location));
2840 ctx.enter(ctx.NO_KEYWORD);
2841}
2842#line 2843 "dhcp6_parser.cc"
2843 break;
2844
2845 case 452: // interface_id: "interface-id" $@66 ":" "constant string"
2846#line 1703 "dhcp6_parser.yy"
2847 {
2848 ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2849 ctx.stack_.back()->set("interface-id", iface);
2850 ctx.leave();
2851}
2852#line 2853 "dhcp6_parser.cc"
2853 break;
2854
2855 case 453: // $@67: %empty
2856#line 1709 "dhcp6_parser.yy"
2857 {
2858 ctx.unique("client-class", ctx.loc2pos(yystack_[0].location));
2859 ctx.enter(ctx.NO_KEYWORD);
2860}
2861#line 2862 "dhcp6_parser.cc"
2862 break;
2863
2864 case 454: // client_class: "client-class" $@67 ":" "constant string"
2865#line 1712 "dhcp6_parser.yy"
2866 {
2867 ElementPtr cls(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
2868 ctx.stack_.back()->set("client-class", cls);
2869 ctx.leave();
2870}
2871#line 2872 "dhcp6_parser.cc"
2872 break;
2873
2874 case 455: // $@68: %empty
2875#line 1719 "dhcp6_parser.yy"
2876 {
2877 ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location));
2878 ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
2879 ctx.stack_.back()->set("client-classes", c);
2880 ctx.stack_.push_back(c);
2881 ctx.enter(ctx.NO_KEYWORD);
2882}
2883#line 2884 "dhcp6_parser.cc"
2884 break;
2885
2886 case 456: // network_client_classes: "client-classes" $@68 ":" list_strings
2887#line 1725 "dhcp6_parser.yy"
2888 {
2889 ctx.stack_.pop_back();
2890 ctx.leave();
2891}
2892#line 2893 "dhcp6_parser.cc"
2893 break;
2894
2895 case 457: // $@69: %empty
2896#line 1731 "dhcp6_parser.yy"
2897 {
2898 ctx.unique("require-client-classes", ctx.loc2pos(yystack_[0].location));
2899 ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
2900 ctx.stack_.back()->set("require-client-classes", c);
2901 ctx.stack_.push_back(c);
2902 ctx.enter(ctx.NO_KEYWORD);
2903}
2904#line 2905 "dhcp6_parser.cc"
2905 break;
2906
2907 case 458: // require_client_classes: "require-client-classes" $@69 ":" list_strings
2908#line 1737 "dhcp6_parser.yy"
2909 {
2910 ctx.stack_.pop_back();
2911 ctx.leave();
2912}
2913#line 2914 "dhcp6_parser.cc"
2914 break;
2915
2916 case 459: // $@70: %empty
2917#line 1742 "dhcp6_parser.yy"
2918 {
2919 ctx.unique("evaluate-additional-classes", ctx.loc2pos(yystack_[0].location));
2920 ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
2921 ctx.stack_.back()->set("evaluate-additional-classes", c);
2922 ctx.stack_.push_back(c);
2923 ctx.enter(ctx.NO_KEYWORD);
2924}
2925#line 2926 "dhcp6_parser.cc"
2926 break;
2927
2928 case 460: // evaluate_additional_classes: "evaluate-additional-classes" $@70 ":" list_strings
2929#line 1748 "dhcp6_parser.yy"
2930 {
2931 ctx.stack_.pop_back();
2932 ctx.leave();
2933}
2934#line 2935 "dhcp6_parser.cc"
2935 break;
2936
2937 case 461: // reservations_global: "reservations-global" ":" "boolean"
2938#line 1753 "dhcp6_parser.yy"
2939 {
2940 ctx.unique("reservations-global", ctx.loc2pos(yystack_[2].location));
2941 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2942 ctx.stack_.back()->set("reservations-global", b);
2943}
2944#line 2945 "dhcp6_parser.cc"
2945 break;
2946
2947 case 462: // reservations_in_subnet: "reservations-in-subnet" ":" "boolean"
2948#line 1759 "dhcp6_parser.yy"
2949 {
2950 ctx.unique("reservations-in-subnet", ctx.loc2pos(yystack_[2].location));
2951 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2952 ctx.stack_.back()->set("reservations-in-subnet", b);
2953}
2954#line 2955 "dhcp6_parser.cc"
2955 break;
2956
2957 case 463: // reservations_out_of_pool: "reservations-out-of-pool" ":" "boolean"
2958#line 1765 "dhcp6_parser.yy"
2959 {
2960 ctx.unique("reservations-out-of-pool", ctx.loc2pos(yystack_[2].location));
2961 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2962 ctx.stack_.back()->set("reservations-out-of-pool", b);
2963}
2964#line 2965 "dhcp6_parser.cc"
2965 break;
2966
2967 case 464: // id: "id" ":" "integer"
2968#line 1771 "dhcp6_parser.yy"
2969 {
2970 ctx.unique("id", ctx.loc2pos(yystack_[2].location));
2971 ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
2972 ctx.stack_.back()->set("id", id);
2973}
2974#line 2975 "dhcp6_parser.cc"
2975 break;
2976
2977 case 465: // rapid_commit: "rapid-commit" ":" "boolean"
2978#line 1777 "dhcp6_parser.yy"
2979 {
2980 ctx.unique("rapid-commit", ctx.loc2pos(yystack_[2].location));
2981 ElementPtr rc(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
2982 ctx.stack_.back()->set("rapid-commit", rc);
2983}
2984#line 2985 "dhcp6_parser.cc"
2985 break;
2986
2987 case 466: // $@71: %empty
2988#line 1785 "dhcp6_parser.yy"
2989 {
2990 ctx.unique("shared-networks", ctx.loc2pos(yystack_[0].location));
2991 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
2992 ctx.stack_.back()->set("shared-networks", l);
2993 ctx.stack_.push_back(l);
2994 ctx.enter(ctx.SHARED_NETWORK);
2995}
2996#line 2997 "dhcp6_parser.cc"
2997 break;
2998
2999 case 467: // shared_networks: "shared-networks" $@71 ":" "[" shared_networks_content "]"
3000#line 1791 "dhcp6_parser.yy"
3001 {
3002 ctx.stack_.pop_back();
3003 ctx.leave();
3004}
3005#line 3006 "dhcp6_parser.cc"
3006 break;
3007
3008 case 472: // shared_networks_list: shared_networks_list ","
3009#line 1804 "dhcp6_parser.yy"
3010 {
3011 ctx.warnAboutExtraCommas(yystack_[0].location);
3012 }
3013#line 3014 "dhcp6_parser.cc"
3014 break;
3015
3016 case 473: // $@72: %empty
3017#line 1809 "dhcp6_parser.yy"
3018 {
3019 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3020 ctx.stack_.back()->add(m);
3021 ctx.stack_.push_back(m);
3022}
3023#line 3024 "dhcp6_parser.cc"
3024 break;
3025
3026 case 474: // shared_network: "{" $@72 shared_network_params "}"
3027#line 1813 "dhcp6_parser.yy"
3028 {
3029 ctx.stack_.pop_back();
3030}
3031#line 3032 "dhcp6_parser.cc"
3032 break;
3033
3034 case 477: // shared_network_params: shared_network_params ","
3035#line 1819 "dhcp6_parser.yy"
3036 {
3037 ctx.warnAboutExtraCommas(yystack_[0].location);
3038 }
3039#line 3040 "dhcp6_parser.cc"
3040 break;
3041
3042 case 526: // $@73: %empty
3043#line 1878 "dhcp6_parser.yy"
3044 {
3045 ctx.unique("option-def", ctx.loc2pos(yystack_[0].location));
3046 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3047 ctx.stack_.back()->set("option-def", l);
3048 ctx.stack_.push_back(l);
3049 ctx.enter(ctx.OPTION_DEF);
3050}
3051#line 3052 "dhcp6_parser.cc"
3052 break;
3053
3054 case 527: // option_def_list: "option-def" $@73 ":" "[" option_def_list_content "]"
3055#line 1884 "dhcp6_parser.yy"
3056 {
3057 ctx.stack_.pop_back();
3058 ctx.leave();
3059}
3060#line 3061 "dhcp6_parser.cc"
3061 break;
3062
3063 case 528: // $@74: %empty
3064#line 1892 "dhcp6_parser.yy"
3065 {
3066 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3067 ctx.stack_.push_back(m);
3068}
3069#line 3070 "dhcp6_parser.cc"
3070 break;
3071
3072 case 529: // sub_option_def_list: "{" $@74 option_def_list "}"
3073#line 1895 "dhcp6_parser.yy"
3074 {
3075 // parsing completed
3076}
3077#line 3078 "dhcp6_parser.cc"
3078 break;
3079
3080 case 534: // not_empty_option_def_list: not_empty_option_def_list ","
3081#line 1907 "dhcp6_parser.yy"
3082 {
3083 ctx.warnAboutExtraCommas(yystack_[0].location);
3084 }
3085#line 3086 "dhcp6_parser.cc"
3086 break;
3087
3088 case 535: // $@75: %empty
3089#line 1914 "dhcp6_parser.yy"
3090 {
3091 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3092 ctx.stack_.back()->add(m);
3093 ctx.stack_.push_back(m);
3094}
3095#line 3096 "dhcp6_parser.cc"
3096 break;
3097
3098 case 536: // option_def_entry: "{" $@75 option_def_params "}"
3099#line 1918 "dhcp6_parser.yy"
3100 {
3101 // The name, code and type option def parameters are required.
3102 ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3103 ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3104 ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3105 ctx.stack_.pop_back();
3106}
3107#line 3108 "dhcp6_parser.cc"
3108 break;
3109
3110 case 537: // $@76: %empty
3111#line 1929 "dhcp6_parser.yy"
3112 {
3113 // Parse the option-def list entry map
3114 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3115 ctx.stack_.push_back(m);
3116}
3117#line 3118 "dhcp6_parser.cc"
3118 break;
3119
3120 case 538: // sub_option_def: "{" $@76 option_def_params "}"
3121#line 1933 "dhcp6_parser.yy"
3122 {
3123 // The name, code and type option def parameters are required.
3124 ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3125 ctx.require("code", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3126 ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3127 // parsing completed
3128}
3129#line 3130 "dhcp6_parser.cc"
3130 break;
3131
3132 case 543: // not_empty_option_def_params: not_empty_option_def_params ","
3133#line 1949 "dhcp6_parser.yy"
3134 {
3135 ctx.warnAboutExtraCommas(yystack_[0].location);
3136 }
3137#line 3138 "dhcp6_parser.cc"
3138 break;
3139
3140 case 555: // code: "code" ":" "integer"
3141#line 1968 "dhcp6_parser.yy"
3142 {
3143 ctx.unique("code", ctx.loc2pos(yystack_[2].location));
3144 ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
3145 ctx.stack_.back()->set("code", code);
3146}
3147#line 3148 "dhcp6_parser.cc"
3148 break;
3149
3150 case 557: // $@77: %empty
3151#line 1976 "dhcp6_parser.yy"
3152 {
3153 ctx.unique("type", ctx.loc2pos(yystack_[0].location));
3154 ctx.enter(ctx.NO_KEYWORD);
3155}
3156#line 3157 "dhcp6_parser.cc"
3157 break;
3158
3159 case 558: // option_def_type: "type" $@77 ":" "constant string"
3160#line 1979 "dhcp6_parser.yy"
3161 {
3162 ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3163 ctx.stack_.back()->set("type", prf);
3164 ctx.leave();
3165}
3166#line 3167 "dhcp6_parser.cc"
3167 break;
3168
3169 case 559: // $@78: %empty
3170#line 1985 "dhcp6_parser.yy"
3171 {
3172 ctx.unique("record-types", ctx.loc2pos(yystack_[0].location));
3173 ctx.enter(ctx.NO_KEYWORD);
3174}
3175#line 3176 "dhcp6_parser.cc"
3176 break;
3177
3178 case 560: // option_def_record_types: "record-types" $@78 ":" "constant string"
3179#line 1988 "dhcp6_parser.yy"
3180 {
3181 ElementPtr rtypes(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3182 ctx.stack_.back()->set("record-types", rtypes);
3183 ctx.leave();
3184}
3185#line 3186 "dhcp6_parser.cc"
3186 break;
3187
3188 case 561: // $@79: %empty
3189#line 1994 "dhcp6_parser.yy"
3190 {
3191 ctx.unique("space", ctx.loc2pos(yystack_[0].location));
3192 ctx.enter(ctx.NO_KEYWORD);
3193}
3194#line 3195 "dhcp6_parser.cc"
3195 break;
3196
3197 case 562: // space: "space" $@79 ":" "constant string"
3198#line 1997 "dhcp6_parser.yy"
3199 {
3200 ElementPtr space(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3201 ctx.stack_.back()->set("space", space);
3202 ctx.leave();
3203}
3204#line 3205 "dhcp6_parser.cc"
3205 break;
3206
3207 case 564: // $@80: %empty
3208#line 2005 "dhcp6_parser.yy"
3209 {
3210 ctx.unique("encapsulate", ctx.loc2pos(yystack_[0].location));
3211 ctx.enter(ctx.NO_KEYWORD);
3212}
3213#line 3214 "dhcp6_parser.cc"
3214 break;
3215
3216 case 565: // option_def_encapsulate: "encapsulate" $@80 ":" "constant string"
3217#line 2008 "dhcp6_parser.yy"
3218 {
3219 ElementPtr encap(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3220 ctx.stack_.back()->set("encapsulate", encap);
3221 ctx.leave();
3222}
3223#line 3224 "dhcp6_parser.cc"
3224 break;
3225
3226 case 566: // option_def_array: "array" ":" "boolean"
3227#line 2014 "dhcp6_parser.yy"
3228 {
3229 ctx.unique("array", ctx.loc2pos(yystack_[2].location));
3230 ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
3231 ctx.stack_.back()->set("array", array);
3232}
3233#line 3234 "dhcp6_parser.cc"
3234 break;
3235
3236 case 567: // $@81: %empty
3237#line 2024 "dhcp6_parser.yy"
3238 {
3239 ctx.unique("option-data", ctx.loc2pos(yystack_[0].location));
3240 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3241 ctx.stack_.back()->set("option-data", l);
3242 ctx.stack_.push_back(l);
3243 ctx.enter(ctx.OPTION_DATA);
3244}
3245#line 3246 "dhcp6_parser.cc"
3246 break;
3247
3248 case 568: // option_data_list: "option-data" $@81 ":" "[" option_data_list_content "]"
3249#line 2030 "dhcp6_parser.yy"
3250 {
3251 ctx.stack_.pop_back();
3252 ctx.leave();
3253}
3254#line 3255 "dhcp6_parser.cc"
3255 break;
3256
3257 case 573: // not_empty_option_data_list: not_empty_option_data_list ","
3258#line 2045 "dhcp6_parser.yy"
3259 {
3260 ctx.warnAboutExtraCommas(yystack_[0].location);
3261 }
3262#line 3263 "dhcp6_parser.cc"
3263 break;
3264
3265 case 574: // $@82: %empty
3266#line 2052 "dhcp6_parser.yy"
3267 {
3268 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3269 ctx.stack_.back()->add(m);
3270 ctx.stack_.push_back(m);
3271}
3272#line 3273 "dhcp6_parser.cc"
3273 break;
3274
3275 case 575: // option_data_entry: "{" $@82 option_data_params "}"
3276#line 2056 "dhcp6_parser.yy"
3277 {
3279 ctx.stack_.pop_back();
3280}
3281#line 3282 "dhcp6_parser.cc"
3282 break;
3283
3284 case 576: // $@83: %empty
3285#line 2064 "dhcp6_parser.yy"
3286 {
3287 // Parse the option-data list entry map
3288 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3289 ctx.stack_.push_back(m);
3290}
3291#line 3292 "dhcp6_parser.cc"
3292 break;
3293
3294 case 577: // sub_option_data: "{" $@83 option_data_params "}"
3295#line 2068 "dhcp6_parser.yy"
3296 {
3298 // parsing completed
3299}
3300#line 3301 "dhcp6_parser.cc"
3301 break;
3302
3303 case 582: // not_empty_option_data_params: not_empty_option_data_params ","
3304#line 2084 "dhcp6_parser.yy"
3305 {
3306 ctx.warnAboutExtraCommas(yystack_[0].location);
3307 }
3308#line 3309 "dhcp6_parser.cc"
3309 break;
3310
3311 case 595: // $@84: %empty
3312#line 2106 "dhcp6_parser.yy"
3313 {
3314 ctx.unique("data", ctx.loc2pos(yystack_[0].location));
3315 ctx.enter(ctx.NO_KEYWORD);
3316}
3317#line 3318 "dhcp6_parser.cc"
3318 break;
3319
3320 case 596: // option_data_data: "data" $@84 ":" "constant string"
3321#line 2109 "dhcp6_parser.yy"
3322 {
3323 ElementPtr data(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3324 ctx.stack_.back()->set("data", data);
3325 ctx.leave();
3326}
3327#line 3328 "dhcp6_parser.cc"
3328 break;
3329
3330 case 599: // option_data_csv_format: "csv-format" ":" "boolean"
3331#line 2119 "dhcp6_parser.yy"
3332 {
3333 ctx.unique("csv-format", ctx.loc2pos(yystack_[2].location));
3334 ElementPtr csv(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
3335 ctx.stack_.back()->set("csv-format", csv);
3336}
3337#line 3338 "dhcp6_parser.cc"
3338 break;
3339
3340 case 600: // option_data_always_send: "always-send" ":" "boolean"
3341#line 2125 "dhcp6_parser.yy"
3342 {
3343 ctx.unique("always-send", ctx.loc2pos(yystack_[2].location));
3344 ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
3345 ctx.stack_.back()->set("always-send", persist);
3346}
3347#line 3348 "dhcp6_parser.cc"
3348 break;
3349
3350 case 601: // option_data_never_send: "never-send" ":" "boolean"
3351#line 2131 "dhcp6_parser.yy"
3352 {
3353 ctx.unique("never-send", ctx.loc2pos(yystack_[2].location));
3354 ElementPtr cancel(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
3355 ctx.stack_.back()->set("never-send", cancel);
3356}
3357#line 3358 "dhcp6_parser.cc"
3358 break;
3359
3360 case 602: // $@85: %empty
3361#line 2137 "dhcp6_parser.yy"
3362 {
3363 ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location));
3364 ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
3365 ctx.stack_.back()->set("client-classes", c);
3366 ctx.stack_.push_back(c);
3367 ctx.enter(ctx.NO_KEYWORD);
3368}
3369#line 3370 "dhcp6_parser.cc"
3370 break;
3371
3372 case 603: // option_data_client_classes: "client-classes" $@85 ":" list_strings
3373#line 2143 "dhcp6_parser.yy"
3374 {
3375 ctx.stack_.pop_back();
3376 ctx.leave();
3377}
3378#line 3379 "dhcp6_parser.cc"
3379 break;
3380
3381 case 604: // $@86: %empty
3382#line 2151 "dhcp6_parser.yy"
3383 {
3384 ctx.unique("pools", ctx.loc2pos(yystack_[0].location));
3385 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3386 ctx.stack_.back()->set("pools", l);
3387 ctx.stack_.push_back(l);
3388 ctx.enter(ctx.POOLS);
3389}
3390#line 3391 "dhcp6_parser.cc"
3391 break;
3392
3393 case 605: // pools_list: "pools" $@86 ":" "[" pools_list_content "]"
3394#line 2157 "dhcp6_parser.yy"
3395 {
3396 ctx.stack_.pop_back();
3397 ctx.leave();
3398}
3399#line 3400 "dhcp6_parser.cc"
3400 break;
3401
3402 case 610: // not_empty_pools_list: not_empty_pools_list ","
3403#line 2170 "dhcp6_parser.yy"
3404 {
3405 ctx.warnAboutExtraCommas(yystack_[0].location);
3406 }
3407#line 3408 "dhcp6_parser.cc"
3408 break;
3409
3410 case 611: // $@87: %empty
3411#line 2175 "dhcp6_parser.yy"
3412 {
3413 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3414 ctx.stack_.back()->add(m);
3415 ctx.stack_.push_back(m);
3416}
3417#line 3418 "dhcp6_parser.cc"
3418 break;
3419
3420 case 612: // pool_list_entry: "{" $@87 pool_params "}"
3421#line 2179 "dhcp6_parser.yy"
3422 {
3423 // The pool parameter is required.
3424 ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3425 ctx.stack_.pop_back();
3426}
3427#line 3428 "dhcp6_parser.cc"
3428 break;
3429
3430 case 613: // $@88: %empty
3431#line 2185 "dhcp6_parser.yy"
3432 {
3433 // Parse the pool list entry map
3434 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3435 ctx.stack_.push_back(m);
3436}
3437#line 3438 "dhcp6_parser.cc"
3438 break;
3439
3440 case 614: // sub_pool6: "{" $@88 pool_params "}"
3441#line 2189 "dhcp6_parser.yy"
3442 {
3443 // The pool parameter is required.
3444 ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3445 // parsing completed
3446}
3447#line 3448 "dhcp6_parser.cc"
3448 break;
3449
3450 case 617: // pool_params: pool_params ","
3451#line 2197 "dhcp6_parser.yy"
3452 {
3453 ctx.warnAboutExtraCommas(yystack_[0].location);
3454 }
3455#line 3456 "dhcp6_parser.cc"
3456 break;
3457
3458 case 628: // $@89: %empty
3459#line 2214 "dhcp6_parser.yy"
3460 {
3461 ctx.unique("pool", ctx.loc2pos(yystack_[0].location));
3462 ctx.enter(ctx.NO_KEYWORD);
3463}
3464#line 3465 "dhcp6_parser.cc"
3465 break;
3466
3467 case 629: // pool_entry: "pool" $@89 ":" "constant string"
3468#line 2217 "dhcp6_parser.yy"
3469 {
3470 ElementPtr pool(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3471 ctx.stack_.back()->set("pool", pool);
3472 ctx.leave();
3473}
3474#line 3475 "dhcp6_parser.cc"
3475 break;
3476
3477 case 630: // pool_id: "pool-id" ":" "integer"
3478#line 2223 "dhcp6_parser.yy"
3479 {
3480 ctx.unique("pool-id", ctx.loc2pos(yystack_[2].location));
3481 ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
3482 ctx.stack_.back()->set("pool-id", id);
3483}
3484#line 3485 "dhcp6_parser.cc"
3485 break;
3486
3487 case 631: // $@90: %empty
3488#line 2229 "dhcp6_parser.yy"
3489 {
3490 ctx.enter(ctx.NO_KEYWORD);
3491}
3492#line 3493 "dhcp6_parser.cc"
3493 break;
3494
3495 case 632: // user_context: "user-context" $@90 ":" map_value
3496#line 2231 "dhcp6_parser.yy"
3497 {
3498 ElementPtr parent = ctx.stack_.back();
3499 ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
3500 ConstElementPtr old = parent->get("user-context");
3501
3502 // Handle already existing user context
3503 if (old) {
3504 // Check if it was a comment or a duplicate
3505 if ((old->size() != 1) || !old->contains("comment")) {
3506 std::stringstream msg;
3507 msg << "duplicate user-context entries (previous at "
3508 << old->getPosition().str() << ")";
3509 error(yystack_[3].location, msg.str());
3510 }
3511 // Merge the comment
3512 user_context->set("comment", old->get("comment"));
3513 }
3514
3515 // Set the user context
3516 parent->set("user-context", user_context);
3517 ctx.leave();
3518}
3519#line 3520 "dhcp6_parser.cc"
3520 break;
3521
3522 case 633: // $@91: %empty
3523#line 2254 "dhcp6_parser.yy"
3524 {
3525 ctx.enter(ctx.NO_KEYWORD);
3526}
3527#line 3528 "dhcp6_parser.cc"
3528 break;
3529
3530 case 634: // comment: "comment" $@91 ":" "constant string"
3531#line 2256 "dhcp6_parser.yy"
3532 {
3533 ElementPtr parent = ctx.stack_.back();
3534 ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
3535 ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3536 user_context->set("comment", comment);
3537
3538 // Handle already existing user context
3539 ConstElementPtr old = parent->get("user-context");
3540 if (old) {
3541 // Check for duplicate comment
3542 if (old->contains("comment")) {
3543 std::stringstream msg;
3544 msg << "duplicate user-context/comment entries (previous at "
3545 << old->getPosition().str() << ")";
3546 error(yystack_[3].location, msg.str());
3547 }
3548 // Merge the user context in the comment
3549 merge(user_context, old);
3550 }
3551
3552 // Set the user context
3553 parent->set("user-context", user_context);
3554 ctx.leave();
3555}
3556#line 3557 "dhcp6_parser.cc"
3557 break;
3558
3559 case 635: // $@92: %empty
3560#line 2284 "dhcp6_parser.yy"
3561 {
3562 ctx.unique("pd-pools", ctx.loc2pos(yystack_[0].location));
3563 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3564 ctx.stack_.back()->set("pd-pools", l);
3565 ctx.stack_.push_back(l);
3566 ctx.enter(ctx.PD_POOLS);
3567}
3568#line 3569 "dhcp6_parser.cc"
3569 break;
3570
3571 case 636: // pd_pools_list: "pd-pools" $@92 ":" "[" pd_pools_list_content "]"
3572#line 2290 "dhcp6_parser.yy"
3573 {
3574 ctx.stack_.pop_back();
3575 ctx.leave();
3576}
3577#line 3578 "dhcp6_parser.cc"
3578 break;
3579
3580 case 641: // not_empty_pd_pools_list: not_empty_pd_pools_list ","
3581#line 2303 "dhcp6_parser.yy"
3582 {
3583 ctx.warnAboutExtraCommas(yystack_[0].location);
3584 }
3585#line 3586 "dhcp6_parser.cc"
3586 break;
3587
3588 case 642: // $@93: %empty
3589#line 2308 "dhcp6_parser.yy"
3590 {
3591 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3592 ctx.stack_.back()->add(m);
3593 ctx.stack_.push_back(m);
3594}
3595#line 3596 "dhcp6_parser.cc"
3596 break;
3597
3598 case 643: // pd_pool_entry: "{" $@93 pd_pool_params "}"
3599#line 2312 "dhcp6_parser.yy"
3600 {
3601 // The prefix, prefix len and delegated len parameters are required.
3602 ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3603 ctx.require("prefix-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3604 ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3605 ctx.stack_.pop_back();
3606}
3607#line 3608 "dhcp6_parser.cc"
3608 break;
3609
3610 case 644: // $@94: %empty
3611#line 2320 "dhcp6_parser.yy"
3612 {
3613 // Parse the pd-pool list entry map
3614 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3615 ctx.stack_.push_back(m);
3616}
3617#line 3618 "dhcp6_parser.cc"
3618 break;
3619
3620 case 645: // sub_pd_pool: "{" $@94 pd_pool_params "}"
3621#line 2324 "dhcp6_parser.yy"
3622 {
3623 // The prefix, prefix len and delegated len parameters are required.
3624 ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3625 ctx.require("prefix-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3626 ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
3627 // parsing completed
3628}
3629#line 3630 "dhcp6_parser.cc"
3630 break;
3631
3632 case 648: // pd_pool_params: pd_pool_params ","
3633#line 2334 "dhcp6_parser.yy"
3634 {
3635 ctx.warnAboutExtraCommas(yystack_[0].location);
3636 }
3637#line 3638 "dhcp6_parser.cc"
3638 break;
3639
3640 case 663: // $@95: %empty
3641#line 2355 "dhcp6_parser.yy"
3642 {
3643 ctx.unique("prefix", ctx.loc2pos(yystack_[0].location));
3644 ctx.enter(ctx.NO_KEYWORD);
3645}
3646#line 3647 "dhcp6_parser.cc"
3647 break;
3648
3649 case 664: // pd_prefix: "prefix" $@95 ":" "constant string"
3650#line 2358 "dhcp6_parser.yy"
3651 {
3652 ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3653 ctx.stack_.back()->set("prefix", prf);
3654 ctx.leave();
3655}
3656#line 3657 "dhcp6_parser.cc"
3657 break;
3658
3659 case 665: // pd_prefix_len: "prefix-len" ":" "integer"
3660#line 2364 "dhcp6_parser.yy"
3661 {
3662 ctx.unique("prefix-len", ctx.loc2pos(yystack_[2].location));
3663 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
3664 ctx.stack_.back()->set("prefix-len", prf);
3665}
3666#line 3667 "dhcp6_parser.cc"
3667 break;
3668
3669 case 666: // $@96: %empty
3670#line 2370 "dhcp6_parser.yy"
3671 {
3672 ctx.unique("excluded-prefix", ctx.loc2pos(yystack_[0].location));
3673 ctx.enter(ctx.NO_KEYWORD);
3674}
3675#line 3676 "dhcp6_parser.cc"
3676 break;
3677
3678 case 667: // excluded_prefix: "excluded-prefix" $@96 ":" "constant string"
3679#line 2373 "dhcp6_parser.yy"
3680 {
3681 ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3682 ctx.stack_.back()->set("excluded-prefix", prf);
3683 ctx.leave();
3684}
3685#line 3686 "dhcp6_parser.cc"
3686 break;
3687
3688 case 668: // excluded_prefix_len: "excluded-prefix-len" ":" "integer"
3689#line 2379 "dhcp6_parser.yy"
3690 {
3691 ctx.unique("excluded-prefix-len", ctx.loc2pos(yystack_[2].location));
3692 ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
3693 ctx.stack_.back()->set("excluded-prefix-len", prf);
3694}
3695#line 3696 "dhcp6_parser.cc"
3696 break;
3697
3698 case 669: // pd_delegated_len: "delegated-len" ":" "integer"
3699#line 2385 "dhcp6_parser.yy"
3700 {
3701 ctx.unique("delegated-len", ctx.loc2pos(yystack_[2].location));
3702 ElementPtr deleg(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
3703 ctx.stack_.back()->set("delegated-len", deleg);
3704}
3705#line 3706 "dhcp6_parser.cc"
3706 break;
3707
3708 case 670: // $@97: %empty
3709#line 2394 "dhcp6_parser.yy"
3710 {
3711 ctx.unique("reservations", ctx.loc2pos(yystack_[0].location));
3712 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3713 ctx.stack_.back()->set("reservations", l);
3714 ctx.stack_.push_back(l);
3715 ctx.enter(ctx.RESERVATIONS);
3716}
3717#line 3718 "dhcp6_parser.cc"
3718 break;
3719
3720 case 671: // reservations: "reservations" $@97 ":" "[" reservations_list "]"
3721#line 2400 "dhcp6_parser.yy"
3722 {
3723 ctx.stack_.pop_back();
3724 ctx.leave();
3725}
3726#line 3727 "dhcp6_parser.cc"
3727 break;
3728
3729 case 676: // not_empty_reservations_list: not_empty_reservations_list ","
3730#line 2411 "dhcp6_parser.yy"
3731 {
3732 ctx.warnAboutExtraCommas(yystack_[0].location);
3733 }
3734#line 3735 "dhcp6_parser.cc"
3735 break;
3736
3737 case 677: // $@98: %empty
3738#line 2416 "dhcp6_parser.yy"
3739 {
3740 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3741 ctx.stack_.back()->add(m);
3742 ctx.stack_.push_back(m);
3743}
3744#line 3745 "dhcp6_parser.cc"
3745 break;
3746
3747 case 678: // reservation: "{" $@98 reservation_params "}"
3748#line 2420 "dhcp6_parser.yy"
3749 {
3751 ctx.stack_.pop_back();
3752}
3753#line 3754 "dhcp6_parser.cc"
3754 break;
3755
3756 case 679: // $@99: %empty
3757#line 2425 "dhcp6_parser.yy"
3758 {
3759 // Parse the reservations list entry map
3760 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3761 ctx.stack_.push_back(m);
3762}
3763#line 3764 "dhcp6_parser.cc"
3764 break;
3765
3766 case 680: // sub_reservation: "{" $@99 reservation_params "}"
3767#line 2429 "dhcp6_parser.yy"
3768 {
3770 // parsing completed
3771}
3772#line 3773 "dhcp6_parser.cc"
3773 break;
3774
3775 case 685: // not_empty_reservation_params: not_empty_reservation_params ","
3776#line 2440 "dhcp6_parser.yy"
3777 {
3778 ctx.warnAboutExtraCommas(yystack_[0].location);
3779 }
3780#line 3781 "dhcp6_parser.cc"
3781 break;
3782
3783 case 698: // $@100: %empty
3784#line 2460 "dhcp6_parser.yy"
3785 {
3786 ctx.unique("ip-addresses", ctx.loc2pos(yystack_[0].location));
3787 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3788 ctx.stack_.back()->set("ip-addresses", l);
3789 ctx.stack_.push_back(l);
3790 ctx.enter(ctx.NO_KEYWORD);
3791}
3792#line 3793 "dhcp6_parser.cc"
3793 break;
3794
3795 case 699: // ip_addresses: "ip-addresses" $@100 ":" list_strings
3796#line 2466 "dhcp6_parser.yy"
3797 {
3798 ctx.stack_.pop_back();
3799 ctx.leave();
3800}
3801#line 3802 "dhcp6_parser.cc"
3802 break;
3803
3804 case 700: // $@101: %empty
3805#line 2471 "dhcp6_parser.yy"
3806 {
3807 ctx.unique("prefixes", ctx.loc2pos(yystack_[0].location));
3808 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3809 ctx.stack_.back()->set("prefixes", l);
3810 ctx.stack_.push_back(l);
3811 ctx.enter(ctx.NO_KEYWORD);
3812}
3813#line 3814 "dhcp6_parser.cc"
3814 break;
3815
3816 case 701: // prefixes: "prefixes" $@101 ":" list_strings
3817#line 2477 "dhcp6_parser.yy"
3818 {
3819 ctx.stack_.pop_back();
3820 ctx.leave();
3821}
3822#line 3823 "dhcp6_parser.cc"
3823 break;
3824
3825 case 702: // $@102: %empty
3826#line 2482 "dhcp6_parser.yy"
3827 {
3828 ctx.unique("excluded-prefixes", ctx.loc2pos(yystack_[0].location));
3829 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3830 ctx.stack_.back()->set("excluded-prefixes", l);
3831 ctx.stack_.push_back(l);
3832 ctx.enter(ctx.NO_KEYWORD);
3833}
3834#line 3835 "dhcp6_parser.cc"
3835 break;
3836
3837 case 703: // excluded_prefixes: "excluded-prefixes" $@102 ":" list_strings
3838#line 2488 "dhcp6_parser.yy"
3839 {
3840 ctx.stack_.pop_back();
3841 ctx.leave();
3842}
3843#line 3844 "dhcp6_parser.cc"
3844 break;
3845
3846 case 704: // $@103: %empty
3847#line 2493 "dhcp6_parser.yy"
3848 {
3849 ctx.unique("duid", ctx.loc2pos(yystack_[0].location));
3850 ctx.enter(ctx.NO_KEYWORD);
3851}
3852#line 3853 "dhcp6_parser.cc"
3853 break;
3854
3855 case 705: // duid: "duid" $@103 ":" "constant string"
3856#line 2496 "dhcp6_parser.yy"
3857 {
3858 ElementPtr d(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3859 ctx.stack_.back()->set("duid", d);
3860 ctx.leave();
3861}
3862#line 3863 "dhcp6_parser.cc"
3863 break;
3864
3865 case 706: // $@104: %empty
3866#line 2502 "dhcp6_parser.yy"
3867 {
3868 ctx.unique("hw-address", ctx.loc2pos(yystack_[0].location));
3869 ctx.enter(ctx.NO_KEYWORD);
3870}
3871#line 3872 "dhcp6_parser.cc"
3872 break;
3873
3874 case 707: // hw_address: "hw-address" $@104 ":" "constant string"
3875#line 2505 "dhcp6_parser.yy"
3876 {
3877 ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3878 ctx.stack_.back()->set("hw-address", hw);
3879 ctx.leave();
3880}
3881#line 3882 "dhcp6_parser.cc"
3882 break;
3883
3884 case 708: // $@105: %empty
3885#line 2511 "dhcp6_parser.yy"
3886 {
3887 ctx.unique("hostname", ctx.loc2pos(yystack_[0].location));
3888 ctx.enter(ctx.NO_KEYWORD);
3889}
3890#line 3891 "dhcp6_parser.cc"
3891 break;
3892
3893 case 709: // hostname: "hostname" $@105 ":" "constant string"
3894#line 2514 "dhcp6_parser.yy"
3895 {
3896 ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3897 ctx.stack_.back()->set("hostname", host);
3898 ctx.leave();
3899}
3900#line 3901 "dhcp6_parser.cc"
3901 break;
3902
3903 case 710: // $@106: %empty
3904#line 2520 "dhcp6_parser.yy"
3905 {
3906 ctx.unique("flex-id", ctx.loc2pos(yystack_[0].location));
3907 ctx.enter(ctx.NO_KEYWORD);
3908}
3909#line 3910 "dhcp6_parser.cc"
3910 break;
3911
3912 case 711: // flex_id_value: "flex-id" $@106 ":" "constant string"
3913#line 2523 "dhcp6_parser.yy"
3914 {
3915 ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
3916 ctx.stack_.back()->set("flex-id", hw);
3917 ctx.leave();
3918}
3919#line 3920 "dhcp6_parser.cc"
3920 break;
3921
3922 case 712: // $@107: %empty
3923#line 2529 "dhcp6_parser.yy"
3924 {
3925 ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location));
3926 ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location)));
3927 ctx.stack_.back()->set("client-classes", c);
3928 ctx.stack_.push_back(c);
3929 ctx.enter(ctx.NO_KEYWORD);
3930}
3931#line 3932 "dhcp6_parser.cc"
3932 break;
3933
3934 case 713: // reservation_client_classes: "client-classes" $@107 ":" list_strings
3935#line 2535 "dhcp6_parser.yy"
3936 {
3937 ctx.stack_.pop_back();
3938 ctx.leave();
3939}
3940#line 3941 "dhcp6_parser.cc"
3941 break;
3942
3943 case 714: // $@108: %empty
3944#line 2543 "dhcp6_parser.yy"
3945 {
3946 ctx.unique("relay", ctx.loc2pos(yystack_[0].location));
3947 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3948 ctx.stack_.back()->set("relay", m);
3949 ctx.stack_.push_back(m);
3950 ctx.enter(ctx.RELAY);
3951}
3952#line 3953 "dhcp6_parser.cc"
3953 break;
3954
3955 case 715: // relay: "relay" $@108 ":" "{" relay_map "}"
3956#line 2549 "dhcp6_parser.yy"
3957 {
3958 ctx.stack_.pop_back();
3959 ctx.leave();
3960}
3961#line 3962 "dhcp6_parser.cc"
3962 break;
3963
3964 case 717: // $@109: %empty
3965#line 2560 "dhcp6_parser.yy"
3966 {
3967 ctx.unique("client-classes", ctx.loc2pos(yystack_[0].location));
3968 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
3969 ctx.stack_.back()->set("client-classes", l);
3970 ctx.stack_.push_back(l);
3971 ctx.enter(ctx.CLIENT_CLASSES);
3972}
3973#line 3974 "dhcp6_parser.cc"
3974 break;
3975
3976 case 718: // client_classes: "client-classes" $@109 ":" "[" client_classes_list "]"
3977#line 2566 "dhcp6_parser.yy"
3978 {
3979 ctx.stack_.pop_back();
3980 ctx.leave();
3981}
3982#line 3983 "dhcp6_parser.cc"
3983 break;
3984
3985 case 721: // client_classes_list: client_classes_list ","
3986#line 2573 "dhcp6_parser.yy"
3987 {
3988 ctx.warnAboutExtraCommas(yystack_[0].location);
3989 }
3990#line 3991 "dhcp6_parser.cc"
3991 break;
3992
3993 case 722: // $@110: %empty
3994#line 2578 "dhcp6_parser.yy"
3995 {
3996 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
3997 ctx.stack_.back()->add(m);
3998 ctx.stack_.push_back(m);
3999}
4000#line 4001 "dhcp6_parser.cc"
4001 break;
4002
4003 case 723: // client_class_entry: "{" $@110 client_class_params "}"
4004#line 2582 "dhcp6_parser.yy"
4005 {
4006 // The name client class parameter is required.
4007 ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
4008 ctx.stack_.pop_back();
4009}
4010#line 4011 "dhcp6_parser.cc"
4011 break;
4012
4013 case 728: // not_empty_client_class_params: not_empty_client_class_params ","
4014#line 2594 "dhcp6_parser.yy"
4015 {
4016 ctx.warnAboutExtraCommas(yystack_[0].location);
4017 }
4018#line 4019 "dhcp6_parser.cc"
4019 break;
4020
4021 case 745: // $@111: %empty
4022#line 2618 "dhcp6_parser.yy"
4023 {
4024 ctx.unique("test", ctx.loc2pos(yystack_[0].location));
4025 ctx.enter(ctx.NO_KEYWORD);
4026}
4027#line 4028 "dhcp6_parser.cc"
4028 break;
4029
4030 case 746: // client_class_test: "test" $@111 ":" "constant string"
4031#line 2621 "dhcp6_parser.yy"
4032 {
4033 ElementPtr test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4034 ctx.stack_.back()->set("test", test);
4035 ctx.leave();
4036}
4037#line 4038 "dhcp6_parser.cc"
4038 break;
4039
4040 case 747: // $@112: %empty
4041#line 2627 "dhcp6_parser.yy"
4042 {
4043 ctx.unique("template-test", ctx.loc2pos(yystack_[0].location));
4044 ctx.enter(ctx.NO_KEYWORD);
4045}
4046#line 4047 "dhcp6_parser.cc"
4047 break;
4048
4049 case 748: // client_class_template_test: "template-test" $@112 ":" "constant string"
4050#line 2630 "dhcp6_parser.yy"
4051 {
4052 ElementPtr template_test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4053 ctx.stack_.back()->set("template-test", template_test);
4054 ctx.leave();
4055}
4056#line 4057 "dhcp6_parser.cc"
4057 break;
4058
4059 case 749: // only_if_required: "only-if-required" ":" "boolean"
4060#line 2637 "dhcp6_parser.yy"
4061 {
4062 ctx.unique("only-if-required", ctx.loc2pos(yystack_[2].location));
4063 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
4064 ctx.stack_.back()->set("only-if-required", b);
4065}
4066#line 4067 "dhcp6_parser.cc"
4067 break;
4068
4069 case 750: // only_in_additional_list: "only-in-additional-list" ":" "boolean"
4070#line 2643 "dhcp6_parser.yy"
4071 {
4072 ctx.unique("only-in-additional-list", ctx.loc2pos(yystack_[2].location));
4073 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
4074 ctx.stack_.back()->set("only-in-additional-list", b);
4075}
4076#line 4077 "dhcp6_parser.cc"
4077 break;
4078
4079 case 751: // $@113: %empty
4080#line 2652 "dhcp6_parser.yy"
4081 {
4082 ctx.unique("server-id", ctx.loc2pos(yystack_[0].location));
4083 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4084 ctx.stack_.back()->set("server-id", m);
4085 ctx.stack_.push_back(m);
4086 ctx.enter(ctx.SERVER_ID);
4087}
4088#line 4089 "dhcp6_parser.cc"
4089 break;
4090
4091 case 752: // server_id: "server-id" $@113 ":" "{" server_id_params "}"
4092#line 2658 "dhcp6_parser.yy"
4093 {
4094 // The type parameter is required.
4095 ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
4096 ctx.stack_.pop_back();
4097 ctx.leave();
4098}
4099#line 4100 "dhcp6_parser.cc"
4100 break;
4101
4102 case 755: // server_id_params: server_id_params ","
4103#line 2667 "dhcp6_parser.yy"
4104 {
4105 ctx.warnAboutExtraCommas(yystack_[0].location);
4106 }
4107#line 4108 "dhcp6_parser.cc"
4108 break;
4109
4110 case 765: // $@114: %empty
4111#line 2683 "dhcp6_parser.yy"
4112 {
4113 ctx.unique("type", ctx.loc2pos(yystack_[0].location));
4114 ctx.enter(ctx.DUID_TYPE);
4115}
4116#line 4117 "dhcp6_parser.cc"
4117 break;
4118
4119 case 766: // server_id_type: "type" $@114 ":" duid_type
4120#line 2686 "dhcp6_parser.yy"
4121 {
4122 ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ());
4123 ctx.leave();
4124}
4125#line 4126 "dhcp6_parser.cc"
4126 break;
4127
4128 case 767: // duid_type: "LLT"
4129#line 2691 "dhcp6_parser.yy"
4130 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); }
4131#line 4132 "dhcp6_parser.cc"
4132 break;
4133
4134 case 768: // duid_type: "EN"
4135#line 2692 "dhcp6_parser.yy"
4136 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); }
4137#line 4138 "dhcp6_parser.cc"
4138 break;
4139
4140 case 769: // duid_type: "LL"
4141#line 2693 "dhcp6_parser.yy"
4142 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); }
4143#line 4144 "dhcp6_parser.cc"
4144 break;
4145
4146 case 770: // htype: "htype" ":" "integer"
4147#line 2696 "dhcp6_parser.yy"
4148 {
4149 ctx.unique("htype", ctx.loc2pos(yystack_[2].location));
4150 ElementPtr htype(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4151 ctx.stack_.back()->set("htype", htype);
4152}
4153#line 4154 "dhcp6_parser.cc"
4154 break;
4155
4156 case 771: // $@115: %empty
4157#line 2702 "dhcp6_parser.yy"
4158 {
4159 ctx.unique("identifier", ctx.loc2pos(yystack_[0].location));
4160 ctx.enter(ctx.NO_KEYWORD);
4161}
4162#line 4163 "dhcp6_parser.cc"
4163 break;
4164
4165 case 772: // identifier: "identifier" $@115 ":" "constant string"
4166#line 2705 "dhcp6_parser.yy"
4167 {
4168 ElementPtr id(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4169 ctx.stack_.back()->set("identifier", id);
4170 ctx.leave();
4171}
4172#line 4173 "dhcp6_parser.cc"
4173 break;
4174
4175 case 773: // time: "time" ":" "integer"
4176#line 2711 "dhcp6_parser.yy"
4177 {
4178 ctx.unique("time", ctx.loc2pos(yystack_[2].location));
4179 ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4180 ctx.stack_.back()->set("time", time);
4181}
4182#line 4183 "dhcp6_parser.cc"
4183 break;
4184
4185 case 774: // enterprise_id: "enterprise-id" ":" "integer"
4186#line 2717 "dhcp6_parser.yy"
4187 {
4188 ctx.unique("enterprise-id", ctx.loc2pos(yystack_[2].location));
4189 ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4190 ctx.stack_.back()->set("enterprise-id", time);
4191}
4192#line 4193 "dhcp6_parser.cc"
4193 break;
4194
4195 case 775: // dhcp4o6_port: "dhcp4o6-port" ":" "integer"
4196#line 2725 "dhcp6_parser.yy"
4197 {
4198 ctx.unique("dhcp4o6-port", ctx.loc2pos(yystack_[2].location));
4199 ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4200 ctx.stack_.back()->set("dhcp4o6-port", time);
4201}
4202#line 4203 "dhcp6_parser.cc"
4203 break;
4204
4205 case 776: // $@116: %empty
4206#line 2733 "dhcp6_parser.yy"
4207 {
4208 ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location));
4209 ctx.unique("control-sockets", ctx.loc2pos(yystack_[0].location));
4210 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4211 ctx.stack_.back()->set("control-socket", m);
4212 ctx.stack_.push_back(m);
4213 ctx.enter(ctx.CONTROL_SOCKET);
4214}
4215#line 4216 "dhcp6_parser.cc"
4216 break;
4217
4218 case 777: // control_socket: "control-socket" $@116 ":" "{" control_socket_params "}"
4219#line 2740 "dhcp6_parser.yy"
4220 {
4221 ctx.stack_.pop_back();
4222 ctx.leave();
4223}
4224#line 4225 "dhcp6_parser.cc"
4225 break;
4226
4227 case 778: // $@117: %empty
4228#line 2745 "dhcp6_parser.yy"
4229 {
4230 ctx.unique("control-sockets", ctx.loc2pos(yystack_[0].location));
4231 ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location));
4232 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
4233 ctx.stack_.back()->set("control-sockets", l);
4234 ctx.stack_.push_back(l);
4235 ctx.enter(ctx.CONTROL_SOCKET);
4236}
4237#line 4238 "dhcp6_parser.cc"
4238 break;
4239
4240 case 779: // control_sockets: "control-sockets" $@117 ":" "[" control_socket_list "]"
4241#line 2752 "dhcp6_parser.yy"
4242 {
4243 ctx.stack_.pop_back();
4244 ctx.leave();
4245}
4246#line 4247 "dhcp6_parser.cc"
4247 break;
4248
4249 case 784: // not_empty_control_socket_list: not_empty_control_socket_list ","
4250#line 2763 "dhcp6_parser.yy"
4251 {
4252 ctx.warnAboutExtraCommas(yystack_[0].location);
4253 }
4254#line 4255 "dhcp6_parser.cc"
4255 break;
4256
4257 case 785: // $@118: %empty
4258#line 2768 "dhcp6_parser.yy"
4259 {
4260 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4261 ctx.stack_.back()->add(m);
4262 ctx.stack_.push_back(m);
4263}
4264#line 4265 "dhcp6_parser.cc"
4265 break;
4266
4267 case 786: // control_socket_entry: "{" $@118 control_socket_params "}"
4268#line 2772 "dhcp6_parser.yy"
4269 {
4270 ctx.stack_.pop_back();
4271}
4272#line 4273 "dhcp6_parser.cc"
4273 break;
4274
4275 case 789: // control_socket_params: control_socket_params ","
4276#line 2778 "dhcp6_parser.yy"
4277 {
4278 ctx.warnAboutExtraCommas(yystack_[0].location);
4279 }
4280#line 4281 "dhcp6_parser.cc"
4281 break;
4282
4283 case 803: // $@119: %empty
4284#line 2798 "dhcp6_parser.yy"
4285 {
4286 ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location));
4287 ctx.enter(ctx.CONTROL_SOCKET_TYPE);
4288}
4289#line 4290 "dhcp6_parser.cc"
4290 break;
4291
4292 case 804: // control_socket_type: "socket-type" $@119 ":" control_socket_type_value
4293#line 2801 "dhcp6_parser.yy"
4294 {
4295 ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ());
4296 ctx.leave();
4297}
4298#line 4299 "dhcp6_parser.cc"
4299 break;
4300
4301 case 805: // control_socket_type_value: "unix"
4302#line 2807 "dhcp6_parser.yy"
4303 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
4304#line 4305 "dhcp6_parser.cc"
4305 break;
4306
4307 case 806: // control_socket_type_value: "http"
4308#line 2808 "dhcp6_parser.yy"
4309 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); }
4310#line 4311 "dhcp6_parser.cc"
4311 break;
4312
4313 case 807: // control_socket_type_value: "https"
4314#line 2809 "dhcp6_parser.yy"
4315 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("https", ctx.loc2pos(yystack_[0].location))); }
4316#line 4317 "dhcp6_parser.cc"
4317 break;
4318
4319 case 808: // $@120: %empty
4320#line 2812 "dhcp6_parser.yy"
4321 {
4322 ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location));
4323 ctx.unique("socket-address", ctx.loc2pos(yystack_[0].location));
4324 ctx.enter(ctx.NO_KEYWORD);
4325}
4326#line 4327 "dhcp6_parser.cc"
4327 break;
4328
4329 case 809: // control_socket_name: "socket-name" $@120 ":" "constant string"
4330#line 2816 "dhcp6_parser.yy"
4331 {
4332 ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4333 ctx.stack_.back()->set("socket-name", name);
4334 ctx.leave();
4335}
4336#line 4337 "dhcp6_parser.cc"
4337 break;
4338
4339 case 810: // $@121: %empty
4340#line 2822 "dhcp6_parser.yy"
4341 {
4342 ctx.unique("socket-address", ctx.loc2pos(yystack_[0].location));
4343 ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location));
4344 ctx.enter(ctx.NO_KEYWORD);
4345}
4346#line 4347 "dhcp6_parser.cc"
4347 break;
4348
4349 case 811: // control_socket_address: "socket-address" $@121 ":" "constant string"
4350#line 2826 "dhcp6_parser.yy"
4351 {
4352 ElementPtr address(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4353 ctx.stack_.back()->set("socket-address", address);
4354 ctx.leave();
4355}
4356#line 4357 "dhcp6_parser.cc"
4357 break;
4358
4359 case 812: // control_socket_port: "socket-port" ":" "integer"
4360#line 2832 "dhcp6_parser.yy"
4361 {
4362 ctx.unique("socket-port", ctx.loc2pos(yystack_[2].location));
4363 ElementPtr port(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4364 ctx.stack_.back()->set("socket-port", port);
4365}
4366#line 4367 "dhcp6_parser.cc"
4367 break;
4368
4369 case 813: // cert_required: "cert-required" ":" "boolean"
4370#line 2838 "dhcp6_parser.yy"
4371 {
4372 ctx.unique("cert-required", ctx.loc2pos(yystack_[2].location));
4373 ElementPtr req(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
4374 ctx.stack_.back()->set("cert-required", req);
4375}
4376#line 4377 "dhcp6_parser.cc"
4377 break;
4378
4379 case 814: // $@122: %empty
4380#line 2844 "dhcp6_parser.yy"
4381 {
4382 ctx.unique("http-headers", ctx.loc2pos(yystack_[0].location));
4383 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
4384 ctx.stack_.back()->set("http-headers", l);
4385 ctx.stack_.push_back(l);
4386 ctx.enter(ctx.HTTP_HEADERS);
4387}
4388#line 4389 "dhcp6_parser.cc"
4389 break;
4390
4391 case 815: // http_headers: "http-headers" $@122 ":" "[" http_header_list "]"
4392#line 2850 "dhcp6_parser.yy"
4393 {
4394 ctx.stack_.pop_back();
4395 ctx.leave();
4396}
4397#line 4398 "dhcp6_parser.cc"
4398 break;
4399
4400 case 820: // not_empty_http_header_list: not_empty_http_header_list ","
4401#line 2861 "dhcp6_parser.yy"
4402 {
4403 ctx.warnAboutExtraCommas(yystack_[0].location);
4404 }
4405#line 4406 "dhcp6_parser.cc"
4406 break;
4407
4408 case 821: // $@123: %empty
4409#line 2866 "dhcp6_parser.yy"
4410 {
4411 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4412 ctx.stack_.back()->add(m);
4413 ctx.stack_.push_back(m);
4414}
4415#line 4416 "dhcp6_parser.cc"
4416 break;
4417
4418 case 822: // http_header: "{" $@123 http_header_params "}"
4419#line 2870 "dhcp6_parser.yy"
4420 {
4421 ctx.stack_.pop_back();
4422}
4423#line 4424 "dhcp6_parser.cc"
4424 break;
4425
4426 case 825: // http_header_params: http_header_params ","
4427#line 2876 "dhcp6_parser.yy"
4428 {
4429 ctx.warnAboutExtraCommas(yystack_[0].location);
4430 }
4431#line 4432 "dhcp6_parser.cc"
4432 break;
4433
4434 case 831: // $@124: %empty
4435#line 2888 "dhcp6_parser.yy"
4436 {
4437 ctx.unique("value", ctx.loc2pos(yystack_[0].location));
4438 ctx.enter(ctx.NO_KEYWORD);
4439}
4440#line 4441 "dhcp6_parser.cc"
4441 break;
4442
4443 case 832: // header_value: "value" $@124 ":" "constant string"
4444#line 2891 "dhcp6_parser.yy"
4445 {
4446 ElementPtr value(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4447 ctx.stack_.back()->set("value", value);
4448 ctx.leave();
4449}
4450#line 4451 "dhcp6_parser.cc"
4451 break;
4452
4453 case 833: // $@125: %empty
4454#line 2899 "dhcp6_parser.yy"
4455 {
4456 ctx.unique("authentication", ctx.loc2pos(yystack_[0].location));
4457 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4458 ctx.stack_.back()->set("authentication", m);
4459 ctx.stack_.push_back(m);
4460 ctx.enter(ctx.AUTHENTICATION);
4461}
4462#line 4463 "dhcp6_parser.cc"
4463 break;
4464
4465 case 834: // authentication: "authentication" $@125 ":" "{" auth_params "}"
4466#line 2905 "dhcp6_parser.yy"
4467 {
4468 // The type parameter is required
4469 ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
4470 ctx.stack_.pop_back();
4471 ctx.leave();
4472}
4473#line 4474 "dhcp6_parser.cc"
4474 break;
4475
4476 case 837: // auth_params: auth_params ","
4477#line 2914 "dhcp6_parser.yy"
4478 {
4479 ctx.warnAboutExtraCommas(yystack_[0].location);
4480 }
4481#line 4482 "dhcp6_parser.cc"
4482 break;
4483
4484 case 845: // $@126: %empty
4485#line 2928 "dhcp6_parser.yy"
4486 {
4487 ctx.unique("type", ctx.loc2pos(yystack_[0].location));
4488 ctx.enter(ctx.AUTH_TYPE);
4489}
4490#line 4491 "dhcp6_parser.cc"
4491 break;
4492
4493 case 846: // auth_type: "type" $@126 ":" auth_type_value
4494#line 2931 "dhcp6_parser.yy"
4495 {
4496 ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ());
4497 ctx.leave();
4498}
4499#line 4500 "dhcp6_parser.cc"
4500 break;
4501
4502 case 847: // auth_type_value: "basic"
4503#line 2936 "dhcp6_parser.yy"
4504 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("basic", ctx.loc2pos(yystack_[0].location))); }
4505#line 4506 "dhcp6_parser.cc"
4506 break;
4507
4508 case 848: // $@127: %empty
4509#line 2939 "dhcp6_parser.yy"
4510 {
4511 ctx.unique("realm", ctx.loc2pos(yystack_[0].location));
4512 ctx.enter(ctx.NO_KEYWORD);
4513}
4514#line 4515 "dhcp6_parser.cc"
4515 break;
4516
4517 case 849: // realm: "realm" $@127 ":" "constant string"
4518#line 2942 "dhcp6_parser.yy"
4519 {
4520 ElementPtr realm(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4521 ctx.stack_.back()->set("realm", realm);
4522 ctx.leave();
4523}
4524#line 4525 "dhcp6_parser.cc"
4525 break;
4526
4527 case 850: // $@128: %empty
4528#line 2948 "dhcp6_parser.yy"
4529 {
4530 ctx.unique("directory", ctx.loc2pos(yystack_[0].location));
4531 ctx.enter(ctx.NO_KEYWORD);
4532}
4533#line 4534 "dhcp6_parser.cc"
4534 break;
4535
4536 case 851: // directory: "directory" $@128 ":" "constant string"
4537#line 2951 "dhcp6_parser.yy"
4538 {
4539 ElementPtr directory(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4540 ctx.stack_.back()->set("directory", directory);
4541 ctx.leave();
4542}
4543#line 4544 "dhcp6_parser.cc"
4544 break;
4545
4546 case 852: // $@129: %empty
4547#line 2957 "dhcp6_parser.yy"
4548 {
4549 ctx.unique("clients", ctx.loc2pos(yystack_[0].location));
4550 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
4551 ctx.stack_.back()->set("clients", l);
4552 ctx.stack_.push_back(l);
4553 ctx.enter(ctx.CLIENTS);
4554}
4555#line 4556 "dhcp6_parser.cc"
4556 break;
4557
4558 case 853: // clients: "clients" $@129 ":" "[" clients_list "]"
4559#line 2963 "dhcp6_parser.yy"
4560 {
4561 ctx.stack_.pop_back();
4562 ctx.leave();
4563}
4564#line 4565 "dhcp6_parser.cc"
4565 break;
4566
4567 case 858: // not_empty_clients_list: not_empty_clients_list ","
4568#line 2974 "dhcp6_parser.yy"
4569 {
4570 ctx.warnAboutExtraCommas(yystack_[0].location);
4571 }
4572#line 4573 "dhcp6_parser.cc"
4573 break;
4574
4575 case 859: // $@130: %empty
4576#line 2979 "dhcp6_parser.yy"
4577 {
4578 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4579 ctx.stack_.back()->add(m);
4580 ctx.stack_.push_back(m);
4581}
4582#line 4583 "dhcp6_parser.cc"
4583 break;
4584
4585 case 860: // basic_auth: "{" $@130 clients_params "}"
4586#line 2983 "dhcp6_parser.yy"
4587 {
4588 ctx.stack_.pop_back();
4589}
4590#line 4591 "dhcp6_parser.cc"
4591 break;
4592
4593 case 863: // clients_params: clients_params ","
4594#line 2989 "dhcp6_parser.yy"
4595 {
4596 ctx.warnAboutExtraCommas(yystack_[0].location);
4597 }
4598#line 4599 "dhcp6_parser.cc"
4599 break;
4600
4601 case 871: // $@131: %empty
4602#line 3003 "dhcp6_parser.yy"
4603 {
4604 ctx.unique("user-file", ctx.loc2pos(yystack_[0].location));
4605 ctx.enter(ctx.NO_KEYWORD);
4606}
4607#line 4608 "dhcp6_parser.cc"
4608 break;
4609
4610 case 872: // user_file: "user-file" $@131 ":" "constant string"
4611#line 3006 "dhcp6_parser.yy"
4612 {
4613 ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4614 ctx.stack_.back()->set("user-file", user);
4615 ctx.leave();
4616}
4617#line 4618 "dhcp6_parser.cc"
4618 break;
4619
4620 case 873: // $@132: %empty
4621#line 3012 "dhcp6_parser.yy"
4622 {
4623 ctx.unique("password-file", ctx.loc2pos(yystack_[0].location));
4624 ctx.enter(ctx.NO_KEYWORD);
4625}
4626#line 4627 "dhcp6_parser.cc"
4627 break;
4628
4629 case 874: // password_file: "password-file" $@132 ":" "constant string"
4630#line 3015 "dhcp6_parser.yy"
4631 {
4632 ElementPtr password(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4633 ctx.stack_.back()->set("password-file", password);
4634 ctx.leave();
4635}
4636#line 4637 "dhcp6_parser.cc"
4637 break;
4638
4639 case 875: // $@133: %empty
4640#line 3023 "dhcp6_parser.yy"
4641 {
4642 ctx.unique("dhcp-queue-control", ctx.loc2pos(yystack_[0].location));
4643 ElementPtr qc(new MapElement(ctx.loc2pos(yystack_[0].location)));
4644 ctx.stack_.back()->set("dhcp-queue-control", qc);
4645 ctx.stack_.push_back(qc);
4646 ctx.enter(ctx.DHCP_QUEUE_CONTROL);
4647}
4648#line 4649 "dhcp6_parser.cc"
4649 break;
4650
4651 case 876: // dhcp_queue_control: "dhcp-queue-control" $@133 ":" "{" queue_control_params "}"
4652#line 3029 "dhcp6_parser.yy"
4653 {
4654 // The enable queue parameter is required.
4655 ctx.require("enable-queue", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
4656 ctx.stack_.pop_back();
4657 ctx.leave();
4658}
4659#line 4660 "dhcp6_parser.cc"
4660 break;
4661
4662 case 879: // queue_control_params: queue_control_params ","
4663#line 3038 "dhcp6_parser.yy"
4664 {
4665 ctx.warnAboutExtraCommas(yystack_[0].location);
4666 }
4667#line 4668 "dhcp6_parser.cc"
4668 break;
4669
4670 case 886: // enable_queue: "enable-queue" ":" "boolean"
4671#line 3051 "dhcp6_parser.yy"
4672 {
4673 ctx.unique("enable-queue", ctx.loc2pos(yystack_[2].location));
4674 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
4675 ctx.stack_.back()->set("enable-queue", b);
4676}
4677#line 4678 "dhcp6_parser.cc"
4678 break;
4679
4680 case 887: // $@134: %empty
4681#line 3057 "dhcp6_parser.yy"
4682 {
4683 ctx.unique("queue-type", ctx.loc2pos(yystack_[0].location));
4684 ctx.enter(ctx.NO_KEYWORD);
4685}
4686#line 4687 "dhcp6_parser.cc"
4687 break;
4688
4689 case 888: // queue_type: "queue-type" $@134 ":" "constant string"
4690#line 3060 "dhcp6_parser.yy"
4691 {
4692 ElementPtr qt(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4693 ctx.stack_.back()->set("queue-type", qt);
4694 ctx.leave();
4695}
4696#line 4697 "dhcp6_parser.cc"
4697 break;
4698
4699 case 889: // capacity: "capacity" ":" "integer"
4700#line 3066 "dhcp6_parser.yy"
4701 {
4702 ctx.unique("capacity", ctx.loc2pos(yystack_[2].location));
4703 ElementPtr c(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4704 ctx.stack_.back()->set("capacity", c);
4705}
4706#line 4707 "dhcp6_parser.cc"
4707 break;
4708
4709 case 890: // $@135: %empty
4710#line 3072 "dhcp6_parser.yy"
4711 {
4712 ctx.unique(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location));
4713 ctx.enter(ctx.NO_KEYWORD);
4714}
4715#line 4716 "dhcp6_parser.cc"
4716 break;
4717
4718 case 891: // arbitrary_map_entry: "constant string" $@135 ":" value
4719#line 3075 "dhcp6_parser.yy"
4720 {
4721 ctx.stack_.back()->set(yystack_[3].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
4722 ctx.leave();
4723}
4724#line 4725 "dhcp6_parser.cc"
4725 break;
4726
4727 case 892: // $@136: %empty
4728#line 3082 "dhcp6_parser.yy"
4729 {
4730 ctx.unique("dhcp-ddns", ctx.loc2pos(yystack_[0].location));
4731 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4732 ctx.stack_.back()->set("dhcp-ddns", m);
4733 ctx.stack_.push_back(m);
4734 ctx.enter(ctx.DHCP_DDNS);
4735}
4736#line 4737 "dhcp6_parser.cc"
4737 break;
4738
4739 case 893: // dhcp_ddns: "dhcp-ddns" $@136 ":" "{" dhcp_ddns_params "}"
4740#line 3088 "dhcp6_parser.yy"
4741 {
4742 // The enable updates DHCP DDNS parameter is required.
4743 ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location));
4744 ctx.stack_.pop_back();
4745 ctx.leave();
4746}
4747#line 4748 "dhcp6_parser.cc"
4748 break;
4749
4750 case 894: // $@137: %empty
4751#line 3095 "dhcp6_parser.yy"
4752 {
4753 // Parse the dhcp-ddns map
4754 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4755 ctx.stack_.push_back(m);
4756}
4757#line 4758 "dhcp6_parser.cc"
4758 break;
4759
4760 case 895: // sub_dhcp_ddns: "{" $@137 dhcp_ddns_params "}"
4761#line 3099 "dhcp6_parser.yy"
4762 {
4763 // The enable updates DHCP DDNS parameter is required.
4764 ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
4765 // parsing completed
4766}
4767#line 4768 "dhcp6_parser.cc"
4768 break;
4769
4770 case 898: // dhcp_ddns_params: dhcp_ddns_params ","
4771#line 3107 "dhcp6_parser.yy"
4772 {
4773 ctx.warnAboutExtraCommas(yystack_[0].location);
4774 }
4775#line 4776 "dhcp6_parser.cc"
4776 break;
4777
4778 case 910: // enable_updates: "enable-updates" ":" "boolean"
4779#line 3125 "dhcp6_parser.yy"
4780 {
4781 ctx.unique("enable-updates", ctx.loc2pos(yystack_[2].location));
4782 ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
4783 ctx.stack_.back()->set("enable-updates", b);
4784}
4785#line 4786 "dhcp6_parser.cc"
4786 break;
4787
4788 case 911: // $@138: %empty
4789#line 3131 "dhcp6_parser.yy"
4790 {
4791 ctx.unique("server-ip", ctx.loc2pos(yystack_[0].location));
4792 ctx.enter(ctx.NO_KEYWORD);
4793}
4794#line 4795 "dhcp6_parser.cc"
4795 break;
4796
4797 case 912: // server_ip: "server-ip" $@138 ":" "constant string"
4798#line 3134 "dhcp6_parser.yy"
4799 {
4800 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4801 ctx.stack_.back()->set("server-ip", s);
4802 ctx.leave();
4803}
4804#line 4805 "dhcp6_parser.cc"
4805 break;
4806
4807 case 913: // server_port: "server-port" ":" "integer"
4808#line 3140 "dhcp6_parser.yy"
4809 {
4810 ctx.unique("server-port", ctx.loc2pos(yystack_[2].location));
4811 ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4812 ctx.stack_.back()->set("server-port", i);
4813}
4814#line 4815 "dhcp6_parser.cc"
4815 break;
4816
4817 case 914: // $@139: %empty
4818#line 3146 "dhcp6_parser.yy"
4819 {
4820 ctx.unique("sender-ip", ctx.loc2pos(yystack_[0].location));
4821 ctx.enter(ctx.NO_KEYWORD);
4822}
4823#line 4824 "dhcp6_parser.cc"
4824 break;
4825
4826 case 915: // sender_ip: "sender-ip" $@139 ":" "constant string"
4827#line 3149 "dhcp6_parser.yy"
4828 {
4829 ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
4830 ctx.stack_.back()->set("sender-ip", s);
4831 ctx.leave();
4832}
4833#line 4834 "dhcp6_parser.cc"
4834 break;
4835
4836 case 916: // sender_port: "sender-port" ":" "integer"
4837#line 3155 "dhcp6_parser.yy"
4838 {
4839 ctx.unique("sender-port", ctx.loc2pos(yystack_[2].location));
4840 ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4841 ctx.stack_.back()->set("sender-port", i);
4842}
4843#line 4844 "dhcp6_parser.cc"
4844 break;
4845
4846 case 917: // max_queue_size: "max-queue-size" ":" "integer"
4847#line 3161 "dhcp6_parser.yy"
4848 {
4849 ctx.unique("max-queue-size", ctx.loc2pos(yystack_[2].location));
4850 ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4851 ctx.stack_.back()->set("max-queue-size", i);
4852}
4853#line 4854 "dhcp6_parser.cc"
4854 break;
4855
4856 case 918: // $@140: %empty
4857#line 3167 "dhcp6_parser.yy"
4858 {
4859 ctx.unique("ncr-protocol", ctx.loc2pos(yystack_[0].location));
4860 ctx.enter(ctx.NCR_PROTOCOL);
4861}
4862#line 4863 "dhcp6_parser.cc"
4863 break;
4864
4865 case 919: // ncr_protocol: "ncr-protocol" $@140 ":" ncr_protocol_value
4866#line 3170 "dhcp6_parser.yy"
4867 {
4868 ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ());
4869 ctx.leave();
4870}
4871#line 4872 "dhcp6_parser.cc"
4872 break;
4873
4874 case 920: // ncr_protocol_value: "UDP"
4875#line 3176 "dhcp6_parser.yy"
4876 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); }
4877#line 4878 "dhcp6_parser.cc"
4878 break;
4879
4880 case 921: // ncr_protocol_value: "TCP"
4881#line 3177 "dhcp6_parser.yy"
4882 { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); }
4883#line 4884 "dhcp6_parser.cc"
4884 break;
4885
4886 case 922: // $@141: %empty
4887#line 3180 "dhcp6_parser.yy"
4888 {
4889 ctx.unique("ncr-format", ctx.loc2pos(yystack_[0].location));
4890 ctx.enter(ctx.NCR_FORMAT);
4891}
4892#line 4893 "dhcp6_parser.cc"
4893 break;
4894
4895 case 923: // ncr_format: "ncr-format" $@141 ":" "JSON"
4896#line 3183 "dhcp6_parser.yy"
4897 {
4898 ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location)));
4899 ctx.stack_.back()->set("ncr-format", json);
4900 ctx.leave();
4901}
4902#line 4903 "dhcp6_parser.cc"
4903 break;
4904
4905 case 924: // $@142: %empty
4906#line 3191 "dhcp6_parser.yy"
4907 {
4908 ctx.unique("config-control", ctx.loc2pos(yystack_[0].location));
4909 ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
4910 ctx.stack_.back()->set("config-control", i);
4911 ctx.stack_.push_back(i);
4912 ctx.enter(ctx.CONFIG_CONTROL);
4913}
4914#line 4915 "dhcp6_parser.cc"
4915 break;
4916
4917 case 925: // config_control: "config-control" $@142 ":" "{" config_control_params "}"
4918#line 3197 "dhcp6_parser.yy"
4919 {
4920 // No config control params are required
4921 ctx.stack_.pop_back();
4922 ctx.leave();
4923}
4924#line 4925 "dhcp6_parser.cc"
4925 break;
4926
4927 case 926: // $@143: %empty
4928#line 3203 "dhcp6_parser.yy"
4929 {
4930 // Parse the config-control map
4931 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
4932 ctx.stack_.push_back(m);
4933}
4934#line 4935 "dhcp6_parser.cc"
4935 break;
4936
4937 case 927: // sub_config_control: "{" $@143 config_control_params "}"
4938#line 3207 "dhcp6_parser.yy"
4939 {
4940 // No config_control params are required
4941 // parsing completed
4942}
4943#line 4944 "dhcp6_parser.cc"
4944 break;
4945
4946 case 930: // config_control_params: config_control_params ","
4947#line 3215 "dhcp6_parser.yy"
4948 {
4949 ctx.warnAboutExtraCommas(yystack_[0].location);
4950 }
4951#line 4952 "dhcp6_parser.cc"
4952 break;
4953
4954 case 933: // $@144: %empty
4955#line 3225 "dhcp6_parser.yy"
4956 {
4957 ctx.unique("config-databases", ctx.loc2pos(yystack_[0].location));
4958 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
4959 ctx.stack_.back()->set("config-databases", l);
4960 ctx.stack_.push_back(l);
4961 ctx.enter(ctx.CONFIG_DATABASE);
4962}
4963#line 4964 "dhcp6_parser.cc"
4964 break;
4965
4966 case 934: // config_databases: "config-databases" $@144 ":" "[" database_list "]"
4967#line 3231 "dhcp6_parser.yy"
4968 {
4969 ctx.stack_.pop_back();
4970 ctx.leave();
4971}
4972#line 4973 "dhcp6_parser.cc"
4973 break;
4974
4975 case 935: // config_fetch_wait_time: "config-fetch-wait-time" ":" "integer"
4976#line 3236 "dhcp6_parser.yy"
4977 {
4978 ctx.unique("config-fetch-wait-time", ctx.loc2pos(yystack_[2].location));
4979 ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
4980 ctx.stack_.back()->set("config-fetch-wait-time", value);
4981}
4982#line 4983 "dhcp6_parser.cc"
4983 break;
4984
4985 case 936: // $@145: %empty
4986#line 3244 "dhcp6_parser.yy"
4987 {
4988 ctx.unique("loggers", ctx.loc2pos(yystack_[0].location));
4989 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
4990 ctx.stack_.back()->set("loggers", l);
4991 ctx.stack_.push_back(l);
4992 ctx.enter(ctx.LOGGERS);
4993}
4994#line 4995 "dhcp6_parser.cc"
4995 break;
4996
4997 case 937: // loggers: "loggers" $@145 ":" "[" loggers_entries "]"
4998#line 3250 "dhcp6_parser.yy"
4999 {
5000 ctx.stack_.pop_back();
5001 ctx.leave();
5002}
5003#line 5004 "dhcp6_parser.cc"
5004 break;
5005
5006 case 940: // loggers_entries: loggers_entries ","
5007#line 3259 "dhcp6_parser.yy"
5008 {
5009 ctx.warnAboutExtraCommas(yystack_[0].location);
5010 }
5011#line 5012 "dhcp6_parser.cc"
5012 break;
5013
5014 case 941: // $@146: %empty
5015#line 3265 "dhcp6_parser.yy"
5016 {
5017 ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
5018 ctx.stack_.back()->add(l);
5019 ctx.stack_.push_back(l);
5020}
5021#line 5022 "dhcp6_parser.cc"
5022 break;
5023
5024 case 942: // logger_entry: "{" $@146 logger_params "}"
5025#line 3269 "dhcp6_parser.yy"
5026 {
5027 ctx.stack_.pop_back();
5028}
5029#line 5030 "dhcp6_parser.cc"
5030 break;
5031
5032 case 945: // logger_params: logger_params ","
5033#line 3275 "dhcp6_parser.yy"
5034 {
5035 ctx.warnAboutExtraCommas(yystack_[0].location);
5036 }
5037#line 5038 "dhcp6_parser.cc"
5038 break;
5039
5040 case 953: // debuglevel: "debuglevel" ":" "integer"
5041#line 3289 "dhcp6_parser.yy"
5042 {
5043 ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location));
5044 ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
5045 ctx.stack_.back()->set("debuglevel", dl);
5046}
5047#line 5048 "dhcp6_parser.cc"
5048 break;
5049
5050 case 954: // $@147: %empty
5051#line 3295 "dhcp6_parser.yy"
5052 {
5053 ctx.unique("severity", ctx.loc2pos(yystack_[0].location));
5054 ctx.enter(ctx.NO_KEYWORD);
5055}
5056#line 5057 "dhcp6_parser.cc"
5057 break;
5058
5059 case 955: // severity: "severity" $@147 ":" "constant string"
5060#line 3298 "dhcp6_parser.yy"
5061 {
5062 ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
5063 ctx.stack_.back()->set("severity", sev);
5064 ctx.leave();
5065}
5066#line 5067 "dhcp6_parser.cc"
5067 break;
5068
5069 case 956: // $@148: %empty
5070#line 3304 "dhcp6_parser.yy"
5071 {
5072 ctx.unique("output-options", ctx.loc2pos(yystack_[0].location));
5073 ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
5074 ctx.stack_.back()->set("output-options", l);
5075 ctx.stack_.push_back(l);
5076 ctx.enter(ctx.OUTPUT_OPTIONS);
5077}
5078#line 5079 "dhcp6_parser.cc"
5079 break;
5080
5081 case 957: // output_options_list: "output-options" $@148 ":" "[" output_options_list_content "]"
5082#line 3310 "dhcp6_parser.yy"
5083 {
5084 ctx.stack_.pop_back();
5085 ctx.leave();
5086}
5087#line 5088 "dhcp6_parser.cc"
5088 break;
5089
5090 case 960: // output_options_list_content: output_options_list_content ","
5091#line 3317 "dhcp6_parser.yy"
5092 {
5093 ctx.warnAboutExtraCommas(yystack_[0].location);
5094 }
5095#line 5096 "dhcp6_parser.cc"
5096 break;
5097
5098 case 961: // $@149: %empty
5099#line 3322 "dhcp6_parser.yy"
5100 {
5101 ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
5102 ctx.stack_.back()->add(m);
5103 ctx.stack_.push_back(m);
5104}
5105#line 5106 "dhcp6_parser.cc"
5106 break;
5107
5108 case 962: // output_entry: "{" $@149 output_params_list "}"
5109#line 3326 "dhcp6_parser.yy"
5110 {
5111 ctx.stack_.pop_back();
5112}
5113#line 5114 "dhcp6_parser.cc"
5114 break;
5115
5116 case 965: // output_params_list: output_params_list ","
5117#line 3332 "dhcp6_parser.yy"
5118 {
5119 ctx.warnAboutExtraCommas(yystack_[0].location);
5120 }
5121#line 5122 "dhcp6_parser.cc"
5122 break;
5123
5124 case 971: // $@150: %empty
5125#line 3344 "dhcp6_parser.yy"
5126 {
5127 ctx.unique("output", ctx.loc2pos(yystack_[0].location));
5128 ctx.enter(ctx.NO_KEYWORD);
5129}
5130#line 5131 "dhcp6_parser.cc"
5131 break;
5132
5133 case 972: // output: "output" $@150 ":" "constant string"
5134#line 3347 "dhcp6_parser.yy"
5135 {
5136 ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
5137 ctx.stack_.back()->set("output", sev);
5138 ctx.leave();
5139}
5140#line 5141 "dhcp6_parser.cc"
5141 break;
5142
5143 case 973: // flush: "flush" ":" "boolean"
5144#line 3353 "dhcp6_parser.yy"
5145 {
5146 ctx.unique("flush", ctx.loc2pos(yystack_[