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