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