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