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