dhcp6_parser.cc 173 KB
Newer Older
Francis Dupont's avatar
Francis Dupont committed
1
// A Bison parser, made by GNU Bison 3.4.1.
2
3
4

// Skeleton implementation for Bison LALR(1) parsers in C++

Francis Dupont's avatar
Francis Dupont committed
5
// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc.
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// As a special exception, you may create a larger work that contains
// part or all of the Bison parser skeleton and distribute that work
// under terms of your choice, so long as that work isn't itself a
// parser generator using the skeleton or a modified version thereof
// as a parser skeleton.  Alternatively, if you modify or redistribute
// the parser skeleton itself, you may (at your option) remove this
// special exception, which will cause the skeleton and the resulting
// Bison output files to be licensed under the GNU General Public
// License without this special exception.

// This special exception was added by the Free Software Foundation in
// version 2.2 of Bison.

Francis Dupont's avatar
Francis Dupont committed
33
34
35
36
// Undocumented macros, especially those whose name start with YY_,
// are private implementation details.  Do not rely on them.


37
38
39
// Take the name prefix into account.
#define yylex   parser6_lex

Razvan Becheriu's avatar
Razvan Becheriu committed
40

41
42
43
44
45

#include "dhcp6_parser.h"


// Unqualified %code blocks.
Francis Dupont's avatar
Francis Dupont committed
46
#line 34 "dhcp6_parser.yy"
47
48
49

#include <dhcp6/parser_context.h>

Francis Dupont's avatar
Francis Dupont committed
50
#line 51 "dhcp6_parser.cc"
51
52
53
54
55
56
57
58
59
60
61
62
63
64


#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> // FIXME: INFRINGES ON USER NAME SPACE.
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif

Francis Dupont's avatar
Francis Dupont committed
65
66
67
68
69
70
71
72
73
// Whether we are compiled with exception support.
#ifndef YY_EXCEPTIONS
# if defined __GNUC__ && !defined __EXCEPTIONS
#  define YY_EXCEPTIONS 0
# else
#  define YY_EXCEPTIONS 1
# endif
#endif

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

# ifndef YYLLOC_DEFAULT
#  define YYLLOC_DEFAULT(Current, Rhs, N)                               \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).begin  = YYRHSLOC (Rhs, 1).begin;                   \
          (Current).end    = YYRHSLOC (Rhs, N).end;                     \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;      \
        }                                                               \
Francis Dupont's avatar
Francis Dupont committed
91
    while (false)
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# endif


// Suppress unused-variable warnings by "using" E.
#define YYUSE(E) ((void) (E))

// Enable debugging if requested.
#if PARSER6_DEBUG

// A pseudo ostream that takes yydebug_ into account.
# define YYCDEBUG if (yydebug_) (*yycdebug_)

# define YY_SYMBOL_PRINT(Title, Symbol)         \
  do {                                          \
    if (yydebug_)                               \
    {                                           \
      *yycdebug_ << Title << ' ';               \
      yy_print_ (*yycdebug_, Symbol);           \
Francis Dupont's avatar
Francis Dupont committed
110
      *yycdebug_ << '\n';                       \
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
    }                                           \
  } while (false)

# define YY_REDUCE_PRINT(Rule)          \
  do {                                  \
    if (yydebug_)                       \
      yy_reduce_print_ (Rule);          \
  } while (false)

# define YY_STACK_PRINT()               \
  do {                                  \
    if (yydebug_)                       \
      yystack_print_ ();                \
  } while (false)

#else // !PARSER6_DEBUG

# define YYCDEBUG if (false) std::cerr
Francis Dupont's avatar
Francis Dupont committed
129
130
131
# define YY_SYMBOL_PRINT(Title, Symbol)  YYUSE (Symbol)
# define YY_REDUCE_PRINT(Rule)           static_cast<void> (0)
# define YY_STACK_PRINT()                static_cast<void> (0)
132
133
134
135
136
137
138
139
140
141
142

#endif // !PARSER6_DEBUG

#define yyerrok         (yyerrstatus_ = 0)
#define yyclearin       (yyla.clear ())

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYRECOVERING()  (!!yyerrstatus_)

Francis Dupont's avatar
Francis Dupont committed
143
#line 14 "dhcp6_parser.yy"
144
namespace isc { namespace dhcp {
Francis Dupont's avatar
Francis Dupont committed
145
146
#line 146 "dhcp6_parser.cc"

147
148
149
150
151
152
153
154
155
156
157

  /* Return YYSTR after stripping away unnecessary quotes and
     backslashes, so that it's suitable for yyerror.  The heuristic is
     that double-quoting is unnecessary unless the string contains an
     apostrophe, a comma, or backslash (other than backslash-backslash).
     YYSTR is taken from yytname.  */
  std::string
  Dhcp6Parser::yytnamerr_ (const char *yystr)
  {
    if (*yystr == '"')
      {
Francis Dupont's avatar
Francis Dupont committed
158
        std::string yyr;
159
160
161
162
163
164
165
166
167
168
169
170
        char const *yyp = yystr;

        for (;;)
          switch (*++yyp)
            {
            case '\'':
            case ',':
              goto do_not_strip_quotes;

            case '\\':
              if (*++yyp != '\\')
                goto do_not_strip_quotes;
Francis Dupont's avatar
Francis Dupont committed
171
172
173
174
              else
                goto append;

            append:
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
            default:
              yyr += *yyp;
              break;

            case '"':
              return yyr;
            }
      do_not_strip_quotes: ;
      }

    return yystr;
  }


  /// Build a parser object.
  Dhcp6Parser::Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg)
    :
#if PARSER6_DEBUG
      yydebug_ (false),
      yycdebug_ (&std::cerr),
#endif
      ctx (ctx_yyarg)
  {}

  Dhcp6Parser::~Dhcp6Parser ()
  {}

Francis Dupont's avatar
Francis Dupont committed
202
203
  Dhcp6Parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
  {}
204
205
206
207
208
209
210
211

  /*---------------.
  | Symbol types.  |
  `---------------*/



  // by_state.
Francis Dupont's avatar
Francis Dupont committed
212
  Dhcp6Parser::by_state::by_state () YY_NOEXCEPT
213
214
215
    : state (empty_state)
  {}

Francis Dupont's avatar
Francis Dupont committed
216
217
  Dhcp6Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT
    : state (that.state)
218
219
220
  {}

  void
Francis Dupont's avatar
Francis Dupont committed
221
  Dhcp6Parser::by_state::clear () YY_NOEXCEPT
222
223
224
225
226
227
228
229
230
231
232
  {
    state = empty_state;
  }

  void
  Dhcp6Parser::by_state::move (by_state& that)
  {
    state = that.state;
    that.clear ();
  }

Francis Dupont's avatar
Francis Dupont committed
233
  Dhcp6Parser::by_state::by_state (state_type s) YY_NOEXCEPT
234
235
236
237
    : state (s)
  {}

  Dhcp6Parser::symbol_number_type
Francis Dupont's avatar
Francis Dupont committed
238
  Dhcp6Parser::by_state::type_get () const YY_NOEXCEPT
239
240
241
242
243
244
245
246
247
248
  {
    if (state == empty_state)
      return empty_symbol;
    else
      return yystos_[state];
  }

  Dhcp6Parser::stack_symbol_type::stack_symbol_type ()
  {}

Francis Dupont's avatar
Francis Dupont committed
249
250
251
252
253
  Dhcp6Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
    : super_type (YY_MOVE (that.state), YY_MOVE (that.location))
  {
    switch (that.type_get ())
    {
Francis Dupont's avatar
Francis Dupont committed
254
255
256
257
258
259
260
      case 202: // value
      case 206: // map_value
      case 267: // db_type
      case 360: // hr_mode
      case 496: // duid_type
      case 531: // ncr_protocol_value
      case 538: // replace_client_name_value
Francis Dupont's avatar
Francis Dupont committed
261
262
        value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value));
        break;
Francis Dupont's avatar
Francis Dupont committed
263

Francis Dupont's avatar
Francis Dupont committed
264
      case 184: // "boolean"
Francis Dupont's avatar
Francis Dupont committed
265
266
267
        value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value));
        break;

Francis Dupont's avatar
Francis Dupont committed
268
      case 183: // "floating point"
Francis Dupont's avatar
Francis Dupont committed
269
270
271
        value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value));
        break;

Francis Dupont's avatar
Francis Dupont committed
272
      case 182: // "integer"
Francis Dupont's avatar
Francis Dupont committed
273
274
275
        value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value));
        break;

Francis Dupont's avatar
Francis Dupont committed
276
      case 181: // "constant string"
Francis Dupont's avatar
Francis Dupont committed
277
278
279
280
281
282
283
        value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
        break;

      default:
        break;
    }

Francis Dupont's avatar
Francis Dupont committed
284
#if 201103L <= YY_CPLUSPLUS
Francis Dupont's avatar
Francis Dupont committed
285
286
287
288
289
290
291
    // that is emptied.
    that.state = empty_state;
#endif
  }

  Dhcp6Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that)
    : super_type (s, YY_MOVE (that.location))
292
  {
Francis Dupont's avatar
Francis Dupont committed
293
    switch (that.type_get ())
Razvan Becheriu's avatar
Razvan Becheriu committed
294
    {
Francis Dupont's avatar
Francis Dupont committed
295
296
297
298
299
300
301
      case 202: // value
      case 206: // map_value
      case 267: // db_type
      case 360: // hr_mode
      case 496: // duid_type
      case 531: // ncr_protocol_value
      case 538: // replace_client_name_value
Francis Dupont's avatar
Francis Dupont committed
302
        value.move< ElementPtr > (YY_MOVE (that.value));
303
304
        break;

Francis Dupont's avatar
Francis Dupont committed
305
      case 184: // "boolean"
Francis Dupont's avatar
Francis Dupont committed
306
        value.move< bool > (YY_MOVE (that.value));
307
308
        break;

Francis Dupont's avatar
Francis Dupont committed
309
      case 183: // "floating point"
Francis Dupont's avatar
Francis Dupont committed
310
        value.move< double > (YY_MOVE (that.value));
311
312
        break;

Francis Dupont's avatar
Francis Dupont committed
313
      case 182: // "integer"
Francis Dupont's avatar
Francis Dupont committed
314
        value.move< int64_t > (YY_MOVE (that.value));
315
316
        break;

Francis Dupont's avatar
Francis Dupont committed
317
      case 181: // "constant string"
Francis Dupont's avatar
Francis Dupont committed
318
        value.move< std::string > (YY_MOVE (that.value));
319
320
321
322
323
324
325
326
327
328
        break;

      default:
        break;
    }

    // that is emptied.
    that.type = empty_symbol;
  }

Francis Dupont's avatar
Francis Dupont committed
329
#if YY_CPLUSPLUS < 201103L
330
  Dhcp6Parser::stack_symbol_type&
Francis Dupont's avatar
Francis Dupont committed
331
  Dhcp6Parser::stack_symbol_type::operator= (stack_symbol_type& that)
332
333
  {
    state = that.state;
Francis Dupont's avatar
Francis Dupont committed
334
    switch (that.type_get ())
Razvan Becheriu's avatar
Razvan Becheriu committed
335
    {
Francis Dupont's avatar
Francis Dupont committed
336
337
338
339
340
341
342
      case 202: // value
      case 206: // map_value
      case 267: // db_type
      case 360: // hr_mode
      case 496: // duid_type
      case 531: // ncr_protocol_value
      case 538: // replace_client_name_value
Francis Dupont's avatar
Francis Dupont committed
343
        value.move< ElementPtr > (that.value);
344
345
        break;

Francis Dupont's avatar
Francis Dupont committed
346
      case 184: // "boolean"
Francis Dupont's avatar
Francis Dupont committed
347
        value.move< bool > (that.value);
348
349
        break;

Francis Dupont's avatar
Francis Dupont committed
350
      case 183: // "floating point"
Francis Dupont's avatar
Francis Dupont committed
351
        value.move< double > (that.value);
352
353
        break;

Francis Dupont's avatar
Francis Dupont committed
354
      case 182: // "integer"
Francis Dupont's avatar
Francis Dupont committed
355
        value.move< int64_t > (that.value);
356
357
        break;

Francis Dupont's avatar
Francis Dupont committed
358
      case 181: // "constant string"
Francis Dupont's avatar
Francis Dupont committed
359
        value.move< std::string > (that.value);
360
361
362
363
364
365
366
        break;

      default:
        break;
    }

    location = that.location;
Francis Dupont's avatar
Francis Dupont committed
367
368
    // that is emptied.
    that.state = empty_state;
369
370
    return *this;
  }
Francis Dupont's avatar
Francis Dupont committed
371
#endif
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389

  template <typename Base>
  void
  Dhcp6Parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
  {
    if (yymsg)
      YY_SYMBOL_PRINT (yymsg, yysym);
  }

#if PARSER6_DEBUG
  template <typename Base>
  void
  Dhcp6Parser::yy_print_ (std::ostream& yyo,
                                     const basic_symbol<Base>& yysym) const
  {
    std::ostream& yyoutput = yyo;
    YYUSE (yyoutput);
    symbol_number_type yytype = yysym.type_get ();
Francis Dupont's avatar
Francis Dupont committed
390
#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408
391
392
393
394
    // Avoid a (spurious) G++ 4.8 warning about "array subscript is
    // below array bounds".
    if (yysym.empty ())
      std::abort ();
Francis Dupont's avatar
Francis Dupont committed
395
#endif
396
397
398
399
400
    yyo << (yytype < yyntokens_ ? "token" : "nterm")
        << ' ' << yytname_[yytype] << " ("
        << yysym.location << ": ";
    switch (yytype)
    {
Francis Dupont's avatar
Francis Dupont committed
401
402
      case 181: // "constant string"
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
403
        { yyoutput << yysym.value.template as < std::string > (); }
Francis Dupont's avatar
Francis Dupont committed
404
#line 405 "dhcp6_parser.cc"
405
406
        break;

Francis Dupont's avatar
Francis Dupont committed
407
408
      case 182: // "integer"
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
409
        { yyoutput << yysym.value.template as < int64_t > (); }
Francis Dupont's avatar
Francis Dupont committed
410
#line 411 "dhcp6_parser.cc"
411
412
        break;

Francis Dupont's avatar
Francis Dupont committed
413
414
      case 183: // "floating point"
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
415
        { yyoutput << yysym.value.template as < double > (); }
Francis Dupont's avatar
Francis Dupont committed
416
#line 417 "dhcp6_parser.cc"
417
418
        break;

Francis Dupont's avatar
Francis Dupont committed
419
420
      case 184: // "boolean"
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
421
        { yyoutput << yysym.value.template as < bool > (); }
Francis Dupont's avatar
Francis Dupont committed
422
#line 423 "dhcp6_parser.cc"
423
424
        break;

Francis Dupont's avatar
Francis Dupont committed
425
426
      case 202: // value
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
427
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
428
#line 429 "dhcp6_parser.cc"
429
430
        break;

Francis Dupont's avatar
Francis Dupont committed
431
432
      case 206: // map_value
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
433
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
434
#line 435 "dhcp6_parser.cc"
435
436
        break;

Francis Dupont's avatar
Francis Dupont committed
437
438
      case 267: // db_type
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
439
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
440
#line 441 "dhcp6_parser.cc"
441
442
        break;

Francis Dupont's avatar
Francis Dupont committed
443
444
      case 360: // hr_mode
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
445
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
446
#line 447 "dhcp6_parser.cc"
447
448
        break;

Francis Dupont's avatar
Francis Dupont committed
449
450
      case 496: // duid_type
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
451
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
452
#line 453 "dhcp6_parser.cc"
453
454
        break;

Francis Dupont's avatar
Francis Dupont committed
455
456
      case 531: // ncr_protocol_value
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
457
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
458
#line 459 "dhcp6_parser.cc"
459
460
        break;

Francis Dupont's avatar
Francis Dupont committed
461
462
      case 538: // replace_client_name_value
#line 260 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
463
        { yyoutput << yysym.value.template as < ElementPtr > (); }
Francis Dupont's avatar
Francis Dupont committed
464
#line 465 "dhcp6_parser.cc"
465
466
467
468
469
470
471
472
473
474
        break;

      default:
        break;
    }
    yyo << ')';
  }
#endif

  void
Francis Dupont's avatar
Francis Dupont committed
475
  Dhcp6Parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym)
476
  {
Francis Dupont's avatar
Francis Dupont committed
477
478
479
    if (m)
      YY_SYMBOL_PRINT (m, sym);
    yystack_.push (YY_MOVE (sym));
480
481
482
  }

  void
Francis Dupont's avatar
Francis Dupont committed
483
  Dhcp6Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
484
  {
Francis Dupont's avatar
Francis Dupont committed
485
#if 201103L <= YY_CPLUSPLUS
Francis Dupont's avatar
Francis Dupont committed
486
487
488
489
490
    yypush_ (m, stack_symbol_type (s, std::move (sym)));
#else
    stack_symbol_type ss (s, sym);
    yypush_ (m, ss);
#endif
491
492
493
  }

  void
Francis Dupont's avatar
Francis Dupont committed
494
  Dhcp6Parser::yypop_ (int n)
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
  {
    yystack_.pop (n);
  }

#if PARSER6_DEBUG
  std::ostream&
  Dhcp6Parser::debug_stream () const
  {
    return *yycdebug_;
  }

  void
  Dhcp6Parser::set_debug_stream (std::ostream& o)
  {
    yycdebug_ = &o;
  }


  Dhcp6Parser::debug_level_type
  Dhcp6Parser::debug_level () const
  {
    return yydebug_;
  }

  void
  Dhcp6Parser::set_debug_level (debug_level_type l)
  {
    yydebug_ = l;
  }
#endif // PARSER6_DEBUG

Francis Dupont's avatar
Francis Dupont committed
526
  Dhcp6Parser::state_type
527
528
529
530
531
532
533
534
535
  Dhcp6Parser::yy_lr_goto_state_ (state_type yystate, int yysym)
  {
    int yyr = yypgoto_[yysym - yyntokens_] + yystate;
    if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
      return yytable_[yyr];
    else
      return yydefgoto_[yysym - yyntokens_];
  }

Francis Dupont's avatar
Francis Dupont committed
536
  bool
537
538
539
540
541
  Dhcp6Parser::yy_pact_value_is_default_ (int yyvalue)
  {
    return yyvalue == yypact_ninf_;
  }

Francis Dupont's avatar
Francis Dupont committed
542
  bool
543
544
545
546
547
  Dhcp6Parser::yy_table_value_is_error_ (int yyvalue)
  {
    return yyvalue == yytable_ninf_;
  }

Francis Dupont's avatar
Francis Dupont committed
548
549
550
551
552
553
  int
  Dhcp6Parser::operator() ()
  {
    return parse ();
  }

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
  int
  Dhcp6Parser::parse ()
  {
    // State.
    int yyn;
    /// Length of the RHS of the rule being reduced.
    int yylen = 0;

    // Error handling.
    int yynerrs_ = 0;
    int yyerrstatus_ = 0;

    /// The lookahead symbol.
    symbol_type yyla;

    /// The locations where the error started and ended.
    stack_symbol_type yyerror_range[3];

    /// The return value of parse ().
    int yyresult;

Francis Dupont's avatar
Francis Dupont committed
575
#if YY_EXCEPTIONS
576
    try
Francis Dupont's avatar
Francis Dupont committed
577
#endif // YY_EXCEPTIONS
578
      {
Francis Dupont's avatar
Francis Dupont committed
579
    YYCDEBUG << "Starting parse\n";
580
581
582
583
584
585
586


    /* Initialize the stack.  The initial state will be set in
       yynewstate, since the latter expects the semantical and the
       location values to have been already stored, initialize these
       stacks with a primary value.  */
    yystack_.clear ();
Francis Dupont's avatar
Francis Dupont committed
587
    yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla));
588

Francis Dupont's avatar
Francis Dupont committed
589
590
591
  /*-----------------------------------------------.
  | yynewstate -- push a new symbol on the stack.  |
  `-----------------------------------------------*/
592
  yynewstate:
Francis Dupont's avatar
Francis Dupont committed
593
    YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
594
595
596

    // Accept?
    if (yystack_[0].state == yyfinal_)
Francis Dupont's avatar
Francis Dupont committed
597
      YYACCEPT;
598
599
600

    goto yybackup;

Francis Dupont's avatar
Francis Dupont committed
601
602
603
604

  /*-----------.
  | yybackup.  |
  `-----------*/
Francis Dupont's avatar
Francis Dupont committed
605
  yybackup:
606
607
608
609
610
611
612
613
614
    // Try to take a decision without lookahead.
    yyn = yypact_[yystack_[0].state];
    if (yy_pact_value_is_default_ (yyn))
      goto yydefault;

    // Read a lookahead token.
    if (yyla.empty ())
      {
        YYCDEBUG << "Reading a token: ";
Francis Dupont's avatar
Francis Dupont committed
615
#if YY_EXCEPTIONS
616
        try
Francis Dupont's avatar
Francis Dupont committed
617
#endif // YY_EXCEPTIONS
618
619
620
621
          {
            symbol_type yylookahead (yylex (ctx));
            yyla.move (yylookahead);
          }
Francis Dupont's avatar
Francis Dupont committed
622
#if YY_EXCEPTIONS
623
624
        catch (const syntax_error& yyexc)
          {
Francis Dupont's avatar
Francis Dupont committed
625
            YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
626
627
628
            error (yyexc);
            goto yyerrlab1;
          }
Francis Dupont's avatar
Francis Dupont committed
629
#endif // YY_EXCEPTIONS
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
      }
    YY_SYMBOL_PRINT ("Next token is", yyla);

    /* If the proper action on seeing token YYLA.TYPE is to reduce or
       to detect an error, take that action.  */
    yyn += yyla.type_get ();
    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.type_get ())
      goto yydefault;

    // Reduce or error.
    yyn = yytable_[yyn];
    if (yyn <= 0)
      {
        if (yy_table_value_is_error_ (yyn))
          goto yyerrlab;
        yyn = -yyn;
        goto yyreduce;
      }

    // Count tokens shifted since error; after three, turn off error status.
    if (yyerrstatus_)
      --yyerrstatus_;

    // Shift the lookahead token.
Francis Dupont's avatar
Francis Dupont committed
654
    yypush_ ("Shifting", yyn, YY_MOVE (yyla));
655
656
    goto yynewstate;

Francis Dupont's avatar
Francis Dupont committed
657

658
659
660
661
662
663
664
665
666
  /*-----------------------------------------------------------.
  | yydefault -- do the default action for the current state.  |
  `-----------------------------------------------------------*/
  yydefault:
    yyn = yydefact_[yystack_[0].state];
    if (yyn == 0)
      goto yyerrlab;
    goto yyreduce;

Francis Dupont's avatar
Francis Dupont committed
667

668
  /*-----------------------------.
Francis Dupont's avatar
Francis Dupont committed
669
  | yyreduce -- do a reduction.  |
670
671
672
673
674
  `-----------------------------*/
  yyreduce:
    yylen = yyr2_[yyn];
    {
      stack_symbol_type yylhs;
Francis Dupont's avatar
Francis Dupont committed
675
      yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
676
677
678
      /* Variants are always initialized to an empty instance of the
         correct type. The default '$$ = $1' action is NOT applied
         when using variants.  */
Francis Dupont's avatar
Francis Dupont committed
679
      switch (yyr1_[yyn])
Razvan Becheriu's avatar
Razvan Becheriu committed
680
    {
Francis Dupont's avatar
Francis Dupont committed
681
682
683
684
685
686
687
      case 202: // value
      case 206: // map_value
      case 267: // db_type
      case 360: // hr_mode
      case 496: // duid_type
      case 531: // ncr_protocol_value
      case 538: // replace_client_name_value
Francis Dupont's avatar
Francis Dupont committed
688
        yylhs.value.emplace< ElementPtr > ();
689
690
        break;

Francis Dupont's avatar
Francis Dupont committed
691
      case 184: // "boolean"
Francis Dupont's avatar
Francis Dupont committed
692
        yylhs.value.emplace< bool > ();
693
694
        break;

Francis Dupont's avatar
Francis Dupont committed
695
      case 183: // "floating point"
Francis Dupont's avatar
Francis Dupont committed
696
        yylhs.value.emplace< double > ();
697
698
        break;

Francis Dupont's avatar
Francis Dupont committed
699
      case 182: // "integer"
Francis Dupont's avatar
Francis Dupont committed
700
        yylhs.value.emplace< int64_t > ();
701
702
        break;

Francis Dupont's avatar
Francis Dupont committed
703
      case 181: // "constant string"
Francis Dupont's avatar
Francis Dupont committed
704
        yylhs.value.emplace< std::string > ();
705
706
707
708
709
710
711
        break;

      default:
        break;
    }


Francis Dupont's avatar
Francis Dupont committed
712
      // Default location.
713
      {
Francis Dupont's avatar
Francis Dupont committed
714
715
        stack_type::slice range (yystack_, yylen);
        YYLLOC_DEFAULT (yylhs.location, range, yylen);
Francis Dupont's avatar
Francis Dupont committed
716
        yyerror_range[1].location = yylhs.location;
717
718
719
720
      }

      // Perform the reduction.
      YY_REDUCE_PRINT (yyn);
Francis Dupont's avatar
Francis Dupont committed
721
#if YY_EXCEPTIONS
722
      try
Francis Dupont's avatar
Francis Dupont committed
723
#endif // YY_EXCEPTIONS
724
725
726
727
        {
          switch (yyn)
            {
  case 2:
Francis Dupont's avatar
Francis Dupont committed
728
#line 269 "dhcp6_parser.yy"
729
    { ctx.ctx_ = ctx.NO_KEYWORD; }
Francis Dupont's avatar
Francis Dupont committed
730
#line 731 "dhcp6_parser.cc"
731
732
733
    break;

  case 4:
Francis Dupont's avatar
Francis Dupont committed
734
#line 270 "dhcp6_parser.yy"
735
    { ctx.ctx_ = ctx.CONFIG; }
Francis Dupont's avatar
Francis Dupont committed
736
#line 737 "dhcp6_parser.cc"
737
738
739
    break;

  case 6:
Francis Dupont's avatar
Francis Dupont committed
740
#line 271 "dhcp6_parser.yy"
741
    { ctx.ctx_ = ctx.DHCP6; }
Francis Dupont's avatar
Francis Dupont committed
742
#line 743 "dhcp6_parser.cc"
743
744
745
    break;

  case 8:
Francis Dupont's avatar
Francis Dupont committed
746
#line 272 "dhcp6_parser.yy"
747
    { ctx.ctx_ = ctx.INTERFACES_CONFIG; }
Francis Dupont's avatar
Francis Dupont committed
748
#line 749 "dhcp6_parser.cc"
749
750
751
    break;

  case 10:
Francis Dupont's avatar
Francis Dupont committed
752
#line 273 "dhcp6_parser.yy"
753
    { ctx.ctx_ = ctx.SUBNET6; }
Francis Dupont's avatar
Francis Dupont committed
754
#line 755 "dhcp6_parser.cc"
755
756
757
    break;

  case 12:
Francis Dupont's avatar
Francis Dupont committed
758
#line 274 "dhcp6_parser.yy"
759
    { ctx.ctx_ = ctx.POOLS; }
Francis Dupont's avatar
Francis Dupont committed
760
#line 761 "dhcp6_parser.cc"
761
762
763
    break;

  case 14:
Francis Dupont's avatar
Francis Dupont committed
764
#line 275 "dhcp6_parser.yy"
765
    { ctx.ctx_ = ctx.PD_POOLS; }
Francis Dupont's avatar
Francis Dupont committed
766
#line 767 "dhcp6_parser.cc"
767
768
769
    break;

  case 16:
Francis Dupont's avatar
Francis Dupont committed
770
#line 276 "dhcp6_parser.yy"
771
    { ctx.ctx_ = ctx.RESERVATIONS; }
Francis Dupont's avatar
Francis Dupont committed
772
#line 773 "dhcp6_parser.cc"
773
774
775
    break;

  case 18:
Francis Dupont's avatar
Francis Dupont committed
776
#line 277 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
777
    { ctx.ctx_ = ctx.DHCP6; }
Francis Dupont's avatar
Francis Dupont committed
778
#line 779 "dhcp6_parser.cc"
779
780
781
    break;

  case 20:
Francis Dupont's avatar
Francis Dupont committed
782
#line 278 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
783
    { ctx.ctx_ = ctx.OPTION_DEF; }
Francis Dupont's avatar
Francis Dupont committed
784
#line 785 "dhcp6_parser.cc"
785
786
787
    break;

  case 22:
Francis Dupont's avatar
Francis Dupont committed
788
#line 279 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
789
    { ctx.ctx_ = ctx.OPTION_DATA; }
Francis Dupont's avatar
Francis Dupont committed
790
#line 791 "dhcp6_parser.cc"
791
792
793
    break;

  case 24:
Francis Dupont's avatar
Francis Dupont committed
794
#line 280 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
795
    { ctx.ctx_ = ctx.HOOKS_LIBRARIES; }
Francis Dupont's avatar
Francis Dupont committed
796
#line 797 "dhcp6_parser.cc"
797
798
799
    break;

  case 26:
Francis Dupont's avatar
Francis Dupont committed
800
#line 281 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
801
    { ctx.ctx_ = ctx.DHCP_DDNS; }
Francis Dupont's avatar
Francis Dupont committed
802
#line 803 "dhcp6_parser.cc"
803
804
    break;

805
  case 28:
Francis Dupont's avatar
Francis Dupont committed
806
#line 282 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
807
    { ctx.ctx_ = ctx.LOGGING; }
Francis Dupont's avatar
Francis Dupont committed
808
#line 809 "dhcp6_parser.cc"
809
810
    break;

811
  case 30:
Francis Dupont's avatar
Francis Dupont committed
812
#line 283 "dhcp6_parser.yy"
813
    { ctx.ctx_ = ctx.CONFIG_CONTROL; }
Francis Dupont's avatar
Francis Dupont committed
814
#line 815 "dhcp6_parser.cc"
815
816
    break;

817
  case 32:
Francis Dupont's avatar
Francis Dupont committed
818
#line 291 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
819
    { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); }
Francis Dupont's avatar
Francis Dupont committed
820
#line 821 "dhcp6_parser.cc"
821
822
    break;

823
  case 33:
Francis Dupont's avatar
Francis Dupont committed
824
#line 292 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
825
    { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); }
Francis Dupont's avatar
Francis Dupont committed
826
#line 827 "dhcp6_parser.cc"
827
828
    break;

829
  case 34:
Francis Dupont's avatar
Francis Dupont committed
830
#line 293 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
831
    { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); }
Francis Dupont's avatar
Francis Dupont committed
832
#line 833 "dhcp6_parser.cc"
Francis Dupont's avatar
Francis Dupont committed
833
834
    break;

835
  case 35:
Francis Dupont's avatar
Francis Dupont committed
836
#line 294 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
837
    { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
Francis Dupont's avatar
Francis Dupont committed
838
#line 839 "dhcp6_parser.cc"
839
840
    break;

841
  case 36:
Francis Dupont's avatar
Francis Dupont committed
842
#line 295 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
843
    { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
Francis Dupont's avatar
Francis Dupont committed
844
#line 845 "dhcp6_parser.cc"
Francis Dupont's avatar
Francis Dupont committed
845
846
    break;

847
  case 37:
Francis Dupont's avatar
Francis Dupont committed
848
#line 296 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
849
    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
Francis Dupont's avatar
Francis Dupont committed
850
#line 851 "dhcp6_parser.cc"
Francis Dupont's avatar
Francis Dupont committed
851
852
    break;

853
  case 38:
Francis Dupont's avatar
Francis Dupont committed
854
#line 297 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
855
    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
Francis Dupont's avatar
Francis Dupont committed
856
#line 857 "dhcp6_parser.cc"
857
858
859
    break;

  case 39:
Francis Dupont's avatar
Francis Dupont committed
860
#line 300 "dhcp6_parser.yy"
861
862
    {
    // Push back the JSON value on the stack
Francis Dupont's avatar
Francis Dupont committed
863
    ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ());
864
}
Francis Dupont's avatar
Francis Dupont committed
865
#line 866 "dhcp6_parser.cc"
866
867
    break;

868
  case 40:
Francis Dupont's avatar
Francis Dupont committed
869
#line 305 "dhcp6_parser.yy"
870
871
872
873
874
875
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
Francis Dupont's avatar
Francis Dupont committed
876
#line 877 "dhcp6_parser.cc"
877
878
    break;

879
  case 41:
Francis Dupont's avatar
Francis Dupont committed
880
#line 310 "dhcp6_parser.yy"
881
882
883
884
885
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
Francis Dupont's avatar
Francis Dupont committed
886
#line 887 "dhcp6_parser.cc"
887
888
    break;

889
  case 42:
Francis Dupont's avatar
Francis Dupont committed
890
#line 316 "dhcp6_parser.yy"
Francis Dupont's avatar
Francis Dupont committed
891
    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
Francis Dupont's avatar
Francis Dupont committed
892
#line 893 "dhcp6_parser.cc"
893
894
    break;

895
  case 45:
Francis Dupont's avatar
Francis Dupont committed
896
#line 323 "dhcp6_parser.yy"
897
898
    {
                  // map containing a single entry
Francis Dupont's avatar
Francis Dupont committed
899
                  ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
900
                  }
Francis Dupont's avatar
Francis Dupont committed
901
#line 902 "dhcp6_parser.cc"
902
903
    break;

904
  case 46:
Francis Dupont's avatar
Francis Dupont committed
905
#line 327 "dhcp6_parser.yy"
906
907
908
    {
                  // map consisting of a shorter map followed by
                  // comma and string:value
Francis Dupont's avatar
Francis Dupont committed
909
                  ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
910
                  }
Francis Dupont's avatar
Francis Dupont committed
911
#line 912 "dhcp6_parser.cc"
912
913
    break;

914
  case 47:
Francis Dupont's avatar
Francis Dupont committed
915
#line 334 "dhcp6_parser.yy"
916
917
918
919
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(l);
}
Francis Dupont's avatar
Francis Dupont committed
920
#line 921 "dhcp6_parser.cc"
921
922
    break;

923
  case 48:
Francis Dupont's avatar
Francis Dupont committed
924
#line 337 "dhcp6_parser.yy"
925
926
927
    {
    // list parsing complete. Put any sanity checking here
}
Francis Dupont's avatar
Francis Dupont committed
928
#line 929 "dhcp6_parser.cc"
929
930
    break;

931
  case 51:
Francis Dupont's avatar
Francis Dupont committed
932
#line 345 "dhcp6_parser.yy"
933
934
    {
                  // List consisting of a single element.
Francis Dupont's avatar
Francis Dupont committed
935
                  ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
936
                  }
Francis Dupont's avatar
Francis Dupont committed
937
#line 938 "dhcp6_parser.cc"
938
939
    break;

940
  case 52:
Francis Dupont's avatar
Francis Dupont committed
941
#line 349 "dhcp6_parser.yy"
942
943
    {
                  // List ending with , and a value.
Francis Dupont's avatar
Francis Dupont committed
944
                  ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
945
                  }
Francis Dupont's avatar
Francis Dupont committed
946
#line 947 "dhcp6_parser.cc"
947
948
    break;

949
  case 53:
Francis Dupont's avatar
Francis Dupont committed
950
#line 356 "dhcp6_parser.yy"
951
952
953
    {
    // List parsing about to start
}
Francis Dupont's avatar
Francis Dupont committed
954
#line 955 "dhcp6_parser.cc"
955
956
    break;

957
  case 54:
Francis Dupont's avatar
Francis Dupont committed
958
#line 358 "dhcp6_parser.yy"
959
960
961
962
    {
    // list parsing complete. Put any sanity checking here
    //ctx.stack_.pop_back();
}
Francis Dupont's avatar
Francis Dupont committed
963
#line 964 "dhcp6_parser.cc"
964
965
    break;

966
  case 57:
Francis Dupont's avatar
Francis Dupont committed
967
#line 367 "dhcp6_parser.yy"
968
    {
Francis Dupont's avatar
Francis Dupont committed
969
                          ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
970
971
                          ctx.stack_.back()->add(s);
                          }
Francis Dupont's avatar
Francis Dupont committed
972
#line 973 "dhcp6_parser.cc"
973
974
    break;

975
  case 58:
Francis Dupont's avatar
Francis Dupont committed
976
#line 371 "dhcp6_parser.yy"
977
    {
Francis Dupont's avatar
Francis Dupont committed
978
                          ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
979
980
                          ctx.stack_.back()->add(s);
                          }
Francis Dupont's avatar
Francis Dupont committed
981
#line 982 "dhcp6_parser.cc"
982
983
    break;

984
  case 59:
Francis Dupont's avatar
Francis Dupont committed
985
#line 382 "dhcp6_parser.yy"
986
987
    {
    const std::string& where = ctx.contextName();
Francis Dupont's avatar
Francis Dupont committed
988
    const std::string& keyword = yystack_[1].value.as < std::string > ();
989
990
991
    error(yystack_[1].location,
          "got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
Francis Dupont's avatar
Francis Dupont committed
992
#line 993 "dhcp6_parser.cc"
993
994
    break;

995
  case 60:
Francis Dupont's avatar
Francis Dupont committed
996
#line 392 "dhcp6_parser.yy"
997
998
999
1000
1001
1002
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
Francis Dupont's avatar
Francis Dupont committed
1003
#line 1004 "dhcp6_parser.cc"
1004
1005
    break;

1006
  case 61:
Francis Dupont's avatar
Francis Dupont committed
1007
#line 397 "dhcp6_parser.yy"
1008
1009
1010
1011
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
Francis Dupont's avatar
Francis Dupont committed
1012
1013
1014

    // Dhcp6 is required
    ctx.require("Dhcp6", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location));
1015
}
Francis Dupont's avatar
Francis Dupont committed
1016
#line 1017 "dhcp6_parser.cc"
1017
1018
    break;

1019
  case 70:
Francis Dupont's avatar
Francis Dupont committed
1020
#line 420 "dhcp6_parser.yy"
1021
1022
1023
1024
1025
1026
1027
1028
    {
    // This code is executed when we're about to start parsing
    // the content of the map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("Dhcp6", m);
    ctx.stack_.push_back(m);
    ctx.enter(ctx.DHCP6);
}
Francis Dupont's avatar
Francis Dupont committed
1029
#line 1030 "dhcp6_parser.cc"
1030
1031
    break;

1032
  case 71:
Francis Dupont's avatar
Francis Dupont committed
1033
#line 427 "dhcp6_parser.yy"
1034
    {
Francis Dupont's avatar
Francis Dupont committed
1035
    // No global parameter is required
1036
1037
1038
    ctx.stack_.pop_back();
    ctx.leave();
}
Francis Dupont's avatar
Francis Dupont committed
1039
#line 1040 "dhcp6_parser.cc"
1040
1041
    break;

1042
  case 72:
Francis Dupont's avatar
Francis Dupont committed
1043
#line 435 "dhcp6_parser.yy"
1044
1045
1046
1047
1048
    {
    // Parse the Dhcp6 map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
Francis Dupont's avatar
Francis Dupont committed
1049
#line 1050 "dhcp6_parser.cc"
1050
1051
    break;

1052
  case 73:
Francis Dupont's avatar
Francis Dupont committed
1053
#line 439 "dhcp6_parser.yy"
1054
    {
Francis Dupont's avatar
Francis Dupont committed
1055
    // No global parameter is required
1056
1057
    // parsing completed
}
Francis Dupont's avatar
Francis Dupont committed
1058
#line 1059 "dhcp6_parser.cc"
1059
1060
    break;

Francis Dupont's avatar
Francis Dupont committed
1061
1062
  case 117:
#line 493 "dhcp6_parser.yy"
1063
    {
Francis Dupont's avatar
Francis Dupont committed
1064
    ctx.enter(ctx.NO_KEYWORD);
1065
}
Francis Dupont's avatar
Francis Dupont committed
1066
#line 1067 "dhcp6_parser.cc"
1067
1068
    break;

Francis Dupont's avatar
Francis Dupont committed
1069
1070
  case 118:
#line 495 "dhcp6_parser.yy"
1071
    {
Francis Dupont's avatar
Francis Dupont committed
1072
    ElementPtr datadir(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
Francis Dupont's avatar
Francis Dupont committed
1073
1074
    ctx.stack_.back()->set("data-directory", datadir);
    ctx.leave();
1075
}
Francis Dupont's avatar
Francis Dupont committed
1076
#line 1077 "dhcp6_parser.cc"
1077
1078
    break;

Francis Dupont's avatar
Francis Dupont committed
1079
1080
  case 119:
#line 501 "dhcp6_parser.yy"
1081
    {
Francis Dupont's avatar
Francis Dupont committed
1082
    ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));