dhcp6_parser.cc 141 KB
Newer Older
1
2
3
4
5
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// A Bison parser, made by GNU Bison 3.0.4.

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

// Copyright (C) 2002-2015 Free Software Foundation, Inc.

// 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.

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

// First part of user declarations.

#line 39 "dhcp6_parser.cc" // lalr1.cc:404

# ifndef YY_NULLPTR
#  if defined __cplusplus && 201103L <= __cplusplus
#   define YY_NULLPTR nullptr
#  else
#   define YY_NULLPTR 0
#  endif
# endif

#include "dhcp6_parser.h"

// User implementation prologue.

#line 53 "dhcp6_parser.cc" // lalr1.cc:412
// Unqualified %code blocks.
#line 34 "dhcp6_parser.yy" // lalr1.cc:413

#include <dhcp6/parser_context.h>

#line 59 "dhcp6_parser.cc" // lalr1.cc:413


#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

#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;      \
        }                                                               \
    while (/*CONSTCOND*/ false)
# 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);           \
      *yycdebug_ << std::endl;                  \
    }                                           \
  } 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
# 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)

#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_)

#line 14 "dhcp6_parser.yy" // lalr1.cc:479
namespace isc { namespace dhcp {
#line 145 "dhcp6_parser.cc" // lalr1.cc:479

  /* 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 == '"')
      {
        std::string yyr = "";
        char const *yyp = yystr;

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

            case '\\':
              if (*++yyp != '\\')
                goto do_not_strip_quotes;
              // Fall through.
            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 ()
  {}


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



  // by_state.
  inline
  Dhcp6Parser::by_state::by_state ()
    : state (empty_state)
  {}

  inline
  Dhcp6Parser::by_state::by_state (const by_state& other)
    : state (other.state)
  {}

  inline
  void
  Dhcp6Parser::by_state::clear ()
  {
    state = empty_state;
  }

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

  inline
  Dhcp6Parser::by_state::by_state (state_type s)
    : state (s)
  {}

  inline
  Dhcp6Parser::symbol_number_type
  Dhcp6Parser::by_state::type_get () const
  {
    if (state == empty_state)
      return empty_symbol;
    else
      return yystos_[state];
  }

  inline
  Dhcp6Parser::stack_symbol_type::stack_symbol_type ()
  {}


  inline
  Dhcp6Parser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
    : super_type (s, that.location)
  {
      switch (that.type_get ())
    {
Francis Dupont's avatar
Francis Dupont committed
256
257
258
259
260
261
      case 158: // value
      case 162: // map_value
      case 203: // db_type
      case 395: // duid_type
      case 428: // ncr_protocol_value
      case 437: // replace_client_name_value
262
263
264
        value.move< ElementPtr > (that.value);
        break;

Francis Dupont's avatar
Francis Dupont committed
265
      case 143: // "boolean"
266
267
268
        value.move< bool > (that.value);
        break;

Francis Dupont's avatar
Francis Dupont committed
269
      case 142: // "floating point"
270
271
272
        value.move< double > (that.value);
        break;

Francis Dupont's avatar
Francis Dupont committed
273
      case 141: // "integer"
274
275
276
        value.move< int64_t > (that.value);
        break;

Francis Dupont's avatar
Francis Dupont committed
277
      case 140: // "constant string"
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
        value.move< std::string > (that.value);
        break;

      default:
        break;
    }

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

  inline
  Dhcp6Parser::stack_symbol_type&
  Dhcp6Parser::stack_symbol_type::operator= (const stack_symbol_type& that)
  {
    state = that.state;
      switch (that.type_get ())
    {
Francis Dupont's avatar
Francis Dupont committed
296
297
298
299
300
301
      case 158: // value
      case 162: // map_value
      case 203: // db_type
      case 395: // duid_type
      case 428: // ncr_protocol_value
      case 437: // replace_client_name_value
302
303
304
        value.copy< ElementPtr > (that.value);
        break;

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

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

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

Francis Dupont's avatar
Francis Dupont committed
317
      case 140: // "constant string"
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
        value.copy< std::string > (that.value);
        break;

      default:
        break;
    }

    location = that.location;
    return *this;
  }


  template <typename Base>
  inline
  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 ();
    // Avoid a (spurious) G++ 4.8 warning about "array subscript is
    // below array bounds".
    if (yysym.empty ())
      std::abort ();
    yyo << (yytype < yyntokens_ ? "token" : "nterm")
        << ' ' << yytname_[yytype] << " ("
        << yysym.location << ": ";
    switch (yytype)
    {
Francis Dupont's avatar
Francis Dupont committed
357
            case 140: // "constant string"
358

Francis Dupont's avatar
Francis Dupont committed
359
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
360
        { yyoutput << yysym.value.template as< std::string > (); }
361
#line 362 "dhcp6_parser.cc" // lalr1.cc:636
362
363
        break;

Francis Dupont's avatar
Francis Dupont committed
364
      case 141: // "integer"
365

Francis Dupont's avatar
Francis Dupont committed
366
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
367
        { yyoutput << yysym.value.template as< int64_t > (); }
368
#line 369 "dhcp6_parser.cc" // lalr1.cc:636
369
370
        break;

Francis Dupont's avatar
Francis Dupont committed
371
      case 142: // "floating point"
372

Francis Dupont's avatar
Francis Dupont committed
373
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
374
        { yyoutput << yysym.value.template as< double > (); }
375
#line 376 "dhcp6_parser.cc" // lalr1.cc:636
376
377
        break;

Francis Dupont's avatar
Francis Dupont committed
378
      case 143: // "boolean"
379

Francis Dupont's avatar
Francis Dupont committed
380
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
381
        { yyoutput << yysym.value.template as< bool > (); }
382
#line 383 "dhcp6_parser.cc" // lalr1.cc:636
383
384
        break;

Francis Dupont's avatar
Francis Dupont committed
385
      case 158: // value
386

Francis Dupont's avatar
Francis Dupont committed
387
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
388
        { yyoutput << yysym.value.template as< ElementPtr > (); }
389
#line 390 "dhcp6_parser.cc" // lalr1.cc:636
390
391
        break;

Francis Dupont's avatar
Francis Dupont committed
392
      case 162: // map_value
393

Francis Dupont's avatar
Francis Dupont committed
394
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
395
        { yyoutput << yysym.value.template as< ElementPtr > (); }
396
#line 397 "dhcp6_parser.cc" // lalr1.cc:636
397
398
        break;

Francis Dupont's avatar
Francis Dupont committed
399
      case 203: // db_type
400

Francis Dupont's avatar
Francis Dupont committed
401
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
402
        { yyoutput << yysym.value.template as< ElementPtr > (); }
403
#line 404 "dhcp6_parser.cc" // lalr1.cc:636
404
405
        break;

Francis Dupont's avatar
Francis Dupont committed
406
      case 395: // duid_type
407

Francis Dupont's avatar
Francis Dupont committed
408
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
409
        { yyoutput << yysym.value.template as< ElementPtr > (); }
410
411
412
#line 411 "dhcp6_parser.cc" // lalr1.cc:636
        break;

Francis Dupont's avatar
Francis Dupont committed
413
      case 428: // ncr_protocol_value
414

Francis Dupont's avatar
Francis Dupont committed
415
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
416
417
418
419
        { yyoutput << yysym.value.template as< ElementPtr > (); }
#line 418 "dhcp6_parser.cc" // lalr1.cc:636
        break;

Francis Dupont's avatar
Francis Dupont committed
420
      case 437: // replace_client_name_value
421

Francis Dupont's avatar
Francis Dupont committed
422
#line 215 "dhcp6_parser.yy" // lalr1.cc:636
423
424
        { yyoutput << yysym.value.template as< ElementPtr > (); }
#line 425 "dhcp6_parser.cc" // lalr1.cc:636
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
        break;


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

  inline
  void
  Dhcp6Parser::yypush_ (const char* m, state_type s, symbol_type& sym)
  {
    stack_symbol_type t (s, sym);
    yypush_ (m, t);
  }

  inline
  void
  Dhcp6Parser::yypush_ (const char* m, stack_symbol_type& s)
  {
    if (m)
      YY_SYMBOL_PRINT (m, s);
    yystack_.push (s);
  }

  inline
  void
  Dhcp6Parser::yypop_ (unsigned int n)
  {
    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

  inline Dhcp6Parser::state_type
  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_];
  }

  inline bool
  Dhcp6Parser::yy_pact_value_is_default_ (int yyvalue)
  {
    return yyvalue == yypact_ninf_;
  }

  inline bool
  Dhcp6Parser::yy_table_value_is_error_ (int yyvalue)
  {
    return yyvalue == yytable_ninf_;
  }

  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;

    // FIXME: This shoud be completely indented.  It is not yet to
    // avoid gratuitous conflicts when merging into the master branch.
    try
      {
    YYCDEBUG << "Starting parse" << std::endl;


    /* 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 ();
    yypush_ (YY_NULLPTR, 0, yyla);

    // A new symbol was pushed on the stack.
  yynewstate:
    YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;

    // Accept?
    if (yystack_[0].state == yyfinal_)
      goto yyacceptlab;

    goto yybackup;

    // Backup.
  yybackup:

    // 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: ";
        try
          {
            symbol_type yylookahead (yylex (ctx));
            yyla.move (yylookahead);
          }
        catch (const syntax_error& yyexc)
          {
            error (yyexc);
            goto yyerrlab1;
          }
      }
    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.
    yypush_ ("Shifting", yyn, yyla);
    goto yynewstate;

  /*-----------------------------------------------------------.
  | yydefault -- do the default action for the current state.  |
  `-----------------------------------------------------------*/
  yydefault:
    yyn = yydefact_[yystack_[0].state];
    if (yyn == 0)
      goto yyerrlab;
    goto yyreduce;

  /*-----------------------------.
  | yyreduce -- Do a reduction.  |
  `-----------------------------*/
  yyreduce:
    yylen = yyr2_[yyn];
    {
      stack_symbol_type yylhs;
      yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);
      /* Variants are always initialized to an empty instance of the
         correct type. The default '$$ = $1' action is NOT applied
         when using variants.  */
        switch (yyr1_[yyn])
    {
Francis Dupont's avatar
Francis Dupont committed
624
625
626
627
628
629
      case 158: // value
      case 162: // map_value
      case 203: // db_type
      case 395: // duid_type
      case 428: // ncr_protocol_value
      case 437: // replace_client_name_value
630
631
632
        yylhs.value.build< ElementPtr > ();
        break;

Francis Dupont's avatar
Francis Dupont committed
633
      case 143: // "boolean"
634
635
636
        yylhs.value.build< bool > ();
        break;

Francis Dupont's avatar
Francis Dupont committed
637
      case 142: // "floating point"
638
639
640
        yylhs.value.build< double > ();
        break;

Francis Dupont's avatar
Francis Dupont committed
641
      case 141: // "integer"
642
643
644
        yylhs.value.build< int64_t > ();
        break;

Francis Dupont's avatar
Francis Dupont committed
645
      case 140: // "constant string"
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
        yylhs.value.build< std::string > ();
        break;

      default:
        break;
    }


      // Compute the default @$.
      {
        slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
        YYLLOC_DEFAULT (yylhs.location, slice, yylen);
      }

      // Perform the reduction.
      YY_REDUCE_PRINT (yyn);
      try
        {
          switch (yyn)
            {
  case 2:
Francis Dupont's avatar
Francis Dupont committed
667
#line 224 "dhcp6_parser.yy" // lalr1.cc:859
668
    { ctx.ctx_ = ctx.NO_KEYWORD; }
669
#line 670 "dhcp6_parser.cc" // lalr1.cc:859
670
671
672
    break;

  case 4:
Francis Dupont's avatar
Francis Dupont committed
673
#line 225 "dhcp6_parser.yy" // lalr1.cc:859
674
    { ctx.ctx_ = ctx.CONFIG; }
675
#line 676 "dhcp6_parser.cc" // lalr1.cc:859
676
677
678
    break;

  case 6:
Francis Dupont's avatar
Francis Dupont committed
679
#line 226 "dhcp6_parser.yy" // lalr1.cc:859
680
    { ctx.ctx_ = ctx.DHCP6; }
681
#line 682 "dhcp6_parser.cc" // lalr1.cc:859
682
683
684
    break;

  case 8:
Francis Dupont's avatar
Francis Dupont committed
685
#line 227 "dhcp6_parser.yy" // lalr1.cc:859
686
    { ctx.ctx_ = ctx.INTERFACES_CONFIG; }
687
#line 688 "dhcp6_parser.cc" // lalr1.cc:859
688
689
690
    break;

  case 10:
Francis Dupont's avatar
Francis Dupont committed
691
#line 228 "dhcp6_parser.yy" // lalr1.cc:859
692
    { ctx.ctx_ = ctx.SUBNET6; }
693
#line 694 "dhcp6_parser.cc" // lalr1.cc:859
694
695
696
    break;

  case 12:
Francis Dupont's avatar
Francis Dupont committed
697
#line 229 "dhcp6_parser.yy" // lalr1.cc:859
698
    { ctx.ctx_ = ctx.POOLS; }
699
#line 700 "dhcp6_parser.cc" // lalr1.cc:859
700
701
702
    break;

  case 14:
Francis Dupont's avatar
Francis Dupont committed
703
#line 230 "dhcp6_parser.yy" // lalr1.cc:859
704
    { ctx.ctx_ = ctx.PD_POOLS; }
705
#line 706 "dhcp6_parser.cc" // lalr1.cc:859
706
707
708
    break;

  case 16:
Francis Dupont's avatar
Francis Dupont committed
709
#line 231 "dhcp6_parser.yy" // lalr1.cc:859
710
    { ctx.ctx_ = ctx.RESERVATIONS; }
711
#line 712 "dhcp6_parser.cc" // lalr1.cc:859
712
713
714
    break;

  case 18:
Francis Dupont's avatar
Francis Dupont committed
715
#line 232 "dhcp6_parser.yy" // lalr1.cc:859
716
    { ctx.ctx_ = ctx.OPTION_DEF; }
717
#line 718 "dhcp6_parser.cc" // lalr1.cc:859
718
719
720
    break;

  case 20:
Francis Dupont's avatar
Francis Dupont committed
721
#line 233 "dhcp6_parser.yy" // lalr1.cc:859
722
    { ctx.ctx_ = ctx.OPTION_DATA; }
723
#line 724 "dhcp6_parser.cc" // lalr1.cc:859
724
725
726
    break;

  case 22:
Francis Dupont's avatar
Francis Dupont committed
727
#line 234 "dhcp6_parser.yy" // lalr1.cc:859
728
    { ctx.ctx_ = ctx.HOOKS_LIBRARIES; }
729
#line 730 "dhcp6_parser.cc" // lalr1.cc:859
730
731
732
    break;

  case 24:
Francis Dupont's avatar
Francis Dupont committed
733
#line 235 "dhcp6_parser.yy" // lalr1.cc:859
734
    { ctx.ctx_ = ctx.DHCP_DDNS; }
735
#line 736 "dhcp6_parser.cc" // lalr1.cc:859
736
737
738
    break;

  case 26:
Francis Dupont's avatar
Francis Dupont committed
739
#line 243 "dhcp6_parser.yy" // lalr1.cc:859
740
    { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
741
#line 742 "dhcp6_parser.cc" // lalr1.cc:859
742
743
    break;

744
  case 27:
Francis Dupont's avatar
Francis Dupont committed
745
#line 244 "dhcp6_parser.yy" // lalr1.cc:859
746
    { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
747
#line 748 "dhcp6_parser.cc" // lalr1.cc:859
748
749
    break;

750
  case 28:
Francis Dupont's avatar
Francis Dupont committed
751
#line 245 "dhcp6_parser.yy" // lalr1.cc:859
752
    { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
753
#line 754 "dhcp6_parser.cc" // lalr1.cc:859
754
755
    break;

756
  case 29:
Francis Dupont's avatar
Francis Dupont committed
757
#line 246 "dhcp6_parser.yy" // lalr1.cc:859
758
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
759
#line 760 "dhcp6_parser.cc" // lalr1.cc:859
760
761
    break;

762
  case 30:
Francis Dupont's avatar
Francis Dupont committed
763
#line 247 "dhcp6_parser.yy" // lalr1.cc:859
764
    { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
765
#line 766 "dhcp6_parser.cc" // lalr1.cc:859
766
767
    break;

768
  case 31:
Francis Dupont's avatar
Francis Dupont committed
769
#line 248 "dhcp6_parser.yy" // lalr1.cc:859
770
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
771
#line 772 "dhcp6_parser.cc" // lalr1.cc:859
772
773
    break;

774
  case 32:
Francis Dupont's avatar
Francis Dupont committed
775
#line 249 "dhcp6_parser.yy" // lalr1.cc:859
776
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
777
#line 778 "dhcp6_parser.cc" // lalr1.cc:859
778
779
    break;

780
  case 33:
Francis Dupont's avatar
Francis Dupont committed
781
#line 252 "dhcp6_parser.yy" // lalr1.cc:859
782
783
784
785
    {
    // Push back the JSON value on the stack
    ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
}
786
#line 787 "dhcp6_parser.cc" // lalr1.cc:859
787
788
    break;

789
  case 34:
Francis Dupont's avatar
Francis Dupont committed
790
#line 257 "dhcp6_parser.yy" // lalr1.cc:859
791
792
793
794
795
796
    {
    // 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);
}
797
#line 798 "dhcp6_parser.cc" // lalr1.cc:859
798
799
    break;

800
  case 35:
Francis Dupont's avatar
Francis Dupont committed
801
#line 262 "dhcp6_parser.yy" // lalr1.cc:859
802
803
804
805
806
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
807
#line 808 "dhcp6_parser.cc" // lalr1.cc:859
808
809
    break;

810
  case 36:
Francis Dupont's avatar
Francis Dupont committed
811
#line 268 "dhcp6_parser.yy" // lalr1.cc:859
812
813
814
815
816
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
#line 814 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 39:
Francis Dupont's avatar
Francis Dupont committed
817
#line 275 "dhcp6_parser.yy" // lalr1.cc:859
818
819
820
821
    {
                  // map containing a single entry
                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                  }
822
#line 823 "dhcp6_parser.cc" // lalr1.cc:859
823
824
    break;

825
  case 40:
Francis Dupont's avatar
Francis Dupont committed
826
#line 279 "dhcp6_parser.yy" // lalr1.cc:859
827
828
829
830
831
    {
                  // map consisting of a shorter map followed by
                  // comma and string:value
                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                  }
832
#line 833 "dhcp6_parser.cc" // lalr1.cc:859
833
834
    break;

835
  case 41:
Francis Dupont's avatar
Francis Dupont committed
836
#line 286 "dhcp6_parser.yy" // lalr1.cc:859
837
838
839
840
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(l);
}
841
#line 842 "dhcp6_parser.cc" // lalr1.cc:859
842
843
    break;

844
  case 42:
Francis Dupont's avatar
Francis Dupont committed
845
#line 289 "dhcp6_parser.yy" // lalr1.cc:859
846
847
848
    {
    // list parsing complete. Put any sanity checking here
}
849
#line 850 "dhcp6_parser.cc" // lalr1.cc:859
850
851
    break;

852
  case 45:
Francis Dupont's avatar
Francis Dupont committed
853
#line 297 "dhcp6_parser.yy" // lalr1.cc:859
854
855
856
857
    {
                  // List consisting of a single element.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
858
#line 859 "dhcp6_parser.cc" // lalr1.cc:859
859
860
    break;

861
  case 46:
Francis Dupont's avatar
Francis Dupont committed
862
#line 301 "dhcp6_parser.yy" // lalr1.cc:859
863
864
865
866
    {
                  // List ending with , and a value.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
867
#line 868 "dhcp6_parser.cc" // lalr1.cc:859
868
869
    break;

870
  case 47:
Francis Dupont's avatar
Francis Dupont committed
871
#line 308 "dhcp6_parser.yy" // lalr1.cc:859
872
873
874
    {
    // List parsing about to start
}
875
#line 876 "dhcp6_parser.cc" // lalr1.cc:859
876
877
    break;

878
  case 48:
Francis Dupont's avatar
Francis Dupont committed
879
#line 310 "dhcp6_parser.yy" // lalr1.cc:859
880
881
882
883
    {
    // list parsing complete. Put any sanity checking here
    //ctx.stack_.pop_back();
}
884
#line 885 "dhcp6_parser.cc" // lalr1.cc:859
885
886
    break;

887
  case 51:
Francis Dupont's avatar
Francis Dupont committed
888
#line 319 "dhcp6_parser.yy" // lalr1.cc:859
889
    {
890
891
892
                          ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
                          ctx.stack_.back()->add(s);
                          }
893
#line 894 "dhcp6_parser.cc" // lalr1.cc:859
894
895
    break;

896
  case 52:
Francis Dupont's avatar
Francis Dupont committed
897
#line 323 "dhcp6_parser.yy" // lalr1.cc:859
898
    {
899
900
901
                          ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
                          ctx.stack_.back()->add(s);
                          }
902
#line 903 "dhcp6_parser.cc" // lalr1.cc:859
903
904
    break;

905
  case 53:
Francis Dupont's avatar
Francis Dupont committed
906
#line 334 "dhcp6_parser.yy" // lalr1.cc:859
907
908
909
910
911
912
    {
    const std::string& where = ctx.contextName();
    const std::string& keyword = yystack_[1].value.as< std::string > ();
    error(yystack_[1].location,
          "got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
913
#line 914 "dhcp6_parser.cc" // lalr1.cc:859
914
915
    break;

916
  case 54:
Francis Dupont's avatar
Francis Dupont committed
917
#line 344 "dhcp6_parser.yy" // lalr1.cc:859
918
919
920
921
922
923
    {
    // 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);
}
924
#line 925 "dhcp6_parser.cc" // lalr1.cc:859
925
926
    break;

927
  case 55:
Francis Dupont's avatar
Francis Dupont committed
928
#line 349 "dhcp6_parser.yy" // lalr1.cc:859
929
930
931
932
933
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
934
#line 935 "dhcp6_parser.cc" // lalr1.cc:859
935
936
    break;

937
  case 63:
Francis Dupont's avatar
Francis Dupont committed
938
#line 368 "dhcp6_parser.yy" // lalr1.cc:859
939
940
941
942
943
944
945
946
    {
    // 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);
}
947
#line 948 "dhcp6_parser.cc" // lalr1.cc:859
948
949
    break;

950
  case 64:
Francis Dupont's avatar
Francis Dupont committed
951
#line 375 "dhcp6_parser.yy" // lalr1.cc:859
952
953
954
955
956
957
958
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
    ctx.stack_.pop_back();
    ctx.leave();
}
959
#line 960 "dhcp6_parser.cc" // lalr1.cc:859
960
961
    break;

962
  case 65:
Francis Dupont's avatar
Francis Dupont committed
963
#line 385 "dhcp6_parser.yy" // lalr1.cc:859
964
965
966
967
968
    {
    // Parse the Dhcp6 map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
969
#line 970 "dhcp6_parser.cc" // lalr1.cc:859
970
971
    break;

972
  case 66:
Francis Dupont's avatar
Francis Dupont committed
973
#line 389 "dhcp6_parser.yy" // lalr1.cc:859
974
975
976
    {
    // parsing completed
}
977
#line 978 "dhcp6_parser.cc" // lalr1.cc:859
978
979
    break;

980
  case 91:
Francis Dupont's avatar
Francis Dupont committed
981
#line 423 "dhcp6_parser.yy" // lalr1.cc:859
982
983
984
985
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("preferred-lifetime", prf);
}
986
#line 987 "dhcp6_parser.cc" // lalr1.cc:859
987
988
    break;

989
  case 92:
Francis Dupont's avatar
Francis Dupont committed
990
#line 428 "dhcp6_parser.yy" // lalr1.cc:859
991
992
993
994
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("valid-lifetime", prf);
}
995
#line 996 "dhcp6_parser.cc" // lalr1.cc:859
996
997
    break;

998
  case 93:
Francis Dupont's avatar
Francis Dupont committed
999
#line 433 "dhcp6_parser.yy" // lalr1.cc:859
1000
1001
1002
1003
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("renew-timer", prf);
}
1004
#line 1005 "dhcp6_parser.cc" // lalr1.cc:859
1005
1006
    break;

1007
  case 94:
Francis Dupont's avatar
Francis Dupont committed
1008
#line 438 "dhcp6_parser.yy" // lalr1.cc:859
1009
1010
1011
1012
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("rebind-timer", prf);
}
1013
#line 1014 "dhcp6_parser.cc" // lalr1.cc:859
1014
1015
    break;

1016
  case 95:
Francis Dupont's avatar
Francis Dupont committed
1017
#line 443 "dhcp6_parser.yy" // lalr1.cc:859
1018
1019
1020
1021
    {
    ElementPtr dpp(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("decline-probation-period", dpp);
}
1022
#line 1023 "dhcp6_parser.cc" // lalr1.cc:859
1023
1024
    break;

1025
  case 96:
Francis Dupont's avatar
Francis Dupont committed
1026
#line 448 "dhcp6_parser.yy" // lalr1.cc:859
1027
1028
1029
1030
1031
1032
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interfaces-config", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.INTERFACES_CONFIG);
}
1033
#line 1034 "dhcp6_parser.cc" // lalr1.cc:859
1034
1035
    break;

1036
  case 97:
Francis Dupont's avatar
Francis Dupont committed
1037
#line 453 "dhcp6_parser.yy" // lalr1.cc:859
1038
1039
1040
1041
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1042
#line 1043 "dhcp6_parser.cc" // lalr1.cc:859
1043
1044
    break;

1045
  case 98:
Francis Dupont's avatar
Francis Dupont committed
1046
#line 458 "dhcp6_parser.yy" // lalr1.cc:859
1047
1048
1049
1050
1051
    {
    // Parse the interfaces-config map
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
1052
#line 1053 "dhcp6_parser.cc" // lalr1.cc:859
1053
1054
    break;

1055
  case 99:
Francis Dupont's avatar
Francis Dupont committed
1056
#line 462 "dhcp6_parser.yy" // lalr1.cc:859
1057
1058
1059
    {
    // parsing completed
}
1060
#line 1061 "dhcp6_parser.cc" // lalr1.cc:859
1061
1062
    break;

1063
  case 100:
Francis Dupont's avatar
Francis Dupont committed
1064
#line 466 "dhcp6_parser.yy" // lalr1.cc:859
1065
1066
1067
1068
1069
1070
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("interfaces", l);
    ctx.stack_.push_back(l);
    ctx.enter(ctx.NO_KEYWORD);
}
1071
#line 1072 "dhcp6_parser.cc" // lalr1.cc:859
1072
1073
    break;

1074
  case 101:
Francis Dupont's avatar
Francis Dupont committed
1075
#line 471 "dhcp6_parser.yy" // lalr1.cc:859
1076
1077
1078
1079
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1080
#line 1081 "dhcp6_parser.cc" // lalr1.cc:859
1081
1082
    break;

1083
  case 102:
Francis Dupont's avatar
Francis Dupont committed
1084
#line 476 "dhcp6_parser.yy" // lalr1.cc:859
1085
1086
1087
1088
1089
1090
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("lease-database", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.LEASE_DATABASE);
}
1091
#line 1092 "dhcp6_parser.cc" // lalr1.cc:859
1092
1093
    break;

1094
  case 103:
Francis Dupont's avatar
Francis Dupont committed
1095
#line 481 "dhcp6_parser.yy" // lalr1.cc:859
1096
1097
1098
1099
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1100
#line 1101 "dhcp6_parser.cc" // lalr1.cc:859
1101
1102
    break;

1103
  case 104:
Francis Dupont's avatar
Francis Dupont committed
1104
#line 486 "dhcp6_parser.yy" // lalr1.cc:859
1105
1106
1107
1108
1109
1110
    {
    ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("hosts-database", i);
    ctx.stack_.push_back(i);
    ctx.enter(ctx.HOSTS_DATABASE);
}
1111
#line 1112 "dhcp6_parser.cc" // lalr1.cc:859
1112
1113
    break;

1114
  case 105:
Francis Dupont's avatar
Francis Dupont committed
1115
#line 491 "dhcp6_parser.yy" // lalr1.cc:859
1116
1117
1118
1119
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1120
#line 1121 "dhcp6_parser.cc" // lalr1.cc:859
1121
1122
    break;

Francis Dupont's avatar
Francis Dupont committed
1123
1124
  case 121:
#line 515 "dhcp6_parser.yy" // lalr1.cc:859
1125
    {
1126
    ctx.enter(ctx.DATABASE_TYPE);
1127
}
1128
#line 1129 "dhcp6_parser.cc" // lalr1.cc:859
1129
1130
    break;

Francis Dupont's avatar
Francis Dupont committed
1131
1132
  case 122:
#line 517 "dhcp6_parser.yy" // lalr1.cc:859
1133
    {
1134
    ctx.stack_.back()->set("type", yystack_[0].value.as< ElementPtr > ());
1135
1136
    ctx.leave();
}
1137
#line 1138 "dhcp6_parser.cc" // lalr1.cc:859
1138
1139
    break;

Francis Dupont's avatar
Francis Dupont committed
1140
1141
  case 123:
#line 522 "dhcp6_parser.yy" // lalr1.cc:859
1142
1143
1144
1145
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); }
#line 1144 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1146
1147
  case 124:
#line 523 "dhcp6_parser.yy" // lalr1.cc:859
1148
1149
1150
1151
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); }
#line 1150 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1152
1153
  case 125:
#line 524 "dhcp6_parser.yy" // lalr1.cc:859
1154
1155
1156
1157
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); }
#line 1156 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1158
1159
  case 126:
#line 525 "dhcp6_parser.yy" // lalr1.cc:859
1160
1161
1162
1163
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); }
#line 1162 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1164
1165
  case 127:
#line 528 "dhcp6_parser.yy" // lalr1.cc:859
1166
1167
1168
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1169
#line 1170 "dhcp6_parser.cc" // lalr1.cc:859
1170
1171
    break;

Francis Dupont's avatar
Francis Dupont committed
1172
1173
  case 128:
#line 530 "dhcp6_parser.yy" // lalr1.cc:859
1174
1175
1176
1177
1178
    {
    ElementPtr user(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("user", user);
    ctx.leave();
}
1179
#line 1180 "dhcp6_parser.cc" // lalr1.cc:859
1180
1181
    break;

Francis Dupont's avatar
Francis Dupont committed
1182
1183
  case 129:
#line 536 "dhcp6_parser.yy" // lalr1.cc:859
1184
1185
1186
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1187
#line 1188 "dhcp6_parser.cc" // lalr1.cc:859
1188
1189
    break;

Francis Dupont's avatar
Francis Dupont committed
1190
1191
  case 130:
#line 538 "dhcp6_parser.yy" // lalr1.cc:859
1192
1193
1194
1195
1196
    {
    ElementPtr pwd(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("password", pwd);
    ctx.leave();
}
1197
#line 1198 "dhcp6_parser.cc" // lalr1.cc:859
1198
1199
    break;

Francis Dupont's avatar
Francis Dupont committed
1200
1201
  case 131:
#line 544 "dhcp6_parser.yy" // lalr1.cc:859
1202
1203
1204
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1205
#line 1206 "dhcp6_parser.cc" // lalr1.cc:859
1206
1207
    break;

Francis Dupont's avatar
Francis Dupont committed
1208
1209
  case 132:
#line 546 "dhcp6_parser.yy" // lalr1.cc:859
1210
1211
1212
1213
1214
    {
    ElementPtr h(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("host", h);
    ctx.leave();
}
1215
#line 1216 "dhcp6_parser.cc" // lalr1.cc:859
1216
1217
    break;

Francis Dupont's avatar
Francis Dupont committed
1218
1219
  case 133:
#line 552 "dhcp6_parser.yy" // lalr1.cc:859
Francis Dupont's avatar
Francis Dupont committed
1220
1221
1222
1223
1224
1225
1226
    {
    ElementPtr p(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("port", p);
}
#line 1225 "dhcp6_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1227
1228
  case 134:
#line 557 "dhcp6_parser.yy" // lalr1.cc:859
1229
1230
1231
    {
    ctx.enter(ctx.NO_KEYWORD);
}
Francis Dupont's avatar
Francis Dupont committed
1232
#line 1233 "dhcp6_parser.cc" // lalr1.cc:859
1233
1234
    break;

Francis Dupont's avatar
Francis Dupont committed
1235
1236
  case 135:
#line 559 "dhcp6_parser.yy" // lalr1.cc:859
1237
1238
1239
1240
1241
    {
    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("name", name);
    ctx.leave();
}
Francis Dupont's avatar
Francis Dupont committed
1242
#line 1243 "dhcp6_parser.cc" // lalr1.cc:859
1243
1244
    break;

Francis Dupont's avatar
Francis Dupont committed
1245
1246
  case 136:
#line 565 "dhcp6_parser.yy" // lalr1.cc:859
1247
1248
1249
1250
    {
    ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("persist", n);
}
Francis Dupont's avatar
Francis Dupont committed
1251
#line 1252 "dhcp6_parser.cc" // lalr1.cc:859
1252
1253
    break;

Francis Dupont's avatar
Francis Dupont committed
1254
1255
  case 137:
#line 570 "dhcp6_parser.yy" // lalr1.cc:859
1256
1257
1258
1259
    {
    ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("lfc-interval", n);
}
Francis Dupont's avatar
Francis Dupont committed
1260
#line 1261 "dhcp6_parser.cc" // lalr1.cc:859
1261
1262
    break;

Francis Dupont's avatar
Francis Dupont committed
1263
1264
  case 138:
#line 575 "dhcp6_parser.yy" // lalr1.cc:859
1265
1266
1267
1268
    {
    ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("readonly", n);
}
Francis Dupont's avatar
Francis Dupont committed
1269
#line 1270 "dhcp6_parser.cc" // lalr1.cc:859
1270
1271
    break;

Francis Dupont's avatar
Francis Dupont committed
1272
1273
  case 139:
#line 580 "dhcp6_parser.yy" // lalr1.cc:859
1274
1275
1276
1277
    {
    ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("connect-timeout", n);
}
Francis Dupont's avatar
Francis Dupont committed
1278
#line 1279 "dhcp6_parser.cc" // lalr1.cc:859
1279
1280
    break;

Francis Dupont's avatar
Francis Dupont committed
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
  case 140:
#line 585 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1287 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 141:
#line 587 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr cp(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
Tomek Mrugalski's avatar
Tomek Mrugalski committed
1293
    ctx.stack_.back()->set("contact-points", cp);
Francis Dupont's avatar
Francis Dupont committed
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
    ctx.leave();
}
#line 1297 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 142:
#line 593 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ctx.enter(ctx.NO_KEYWORD);
}
#line 1305 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 143:
#line 595 "dhcp6_parser.yy" // lalr1.cc:859
    {
    ElementPtr ks(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("keyspace", ks);
    ctx.leave();
}
#line 1315 "dhcp6_parser.cc" // lalr1.cc:859
    break;

  case 144:
#line 602 "dhcp6_parser.yy" // lalr1.cc:859
Tomek Mrugalski's avatar