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