dhcp4_parser.cc 136 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   parser4_lex

// First part of user declarations.

#line 39 "dhcp4_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 "dhcp4_parser.h"

// User implementation prologue.

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

#include <dhcp4/parser_context.h>

#line 59 "dhcp4_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 PARSER4_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 // !PARSER4_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 // !PARSER4_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 "dhcp4_parser.yy" // lalr1.cc:479
namespace isc { namespace dhcp {
#line 145 "dhcp4_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
  Dhcp4Parser::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.
  Dhcp4Parser::Dhcp4Parser (isc::dhcp::Parser4Context& ctx_yyarg)
    :
#if PARSER4_DEBUG
      yydebug_ (false),
      yycdebug_ (&std::cerr),
#endif
      ctx (ctx_yyarg)
  {}

  Dhcp4Parser::~Dhcp4Parser ()
  {}


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



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

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

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

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

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

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

  inline
  Dhcp4Parser::stack_symbol_type::stack_symbol_type ()
  {}


  inline
  Dhcp4Parser::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 149: // value
      case 153: // map_value
      case 191: // socket_type
      case 200: // db_type
      case 405: // ncr_protocol_value
      case 414: // replace_client_name_value
262
263
264
        value.move< ElementPtr > (that.value);
        break;

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

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

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

Francis Dupont's avatar
Francis Dupont committed
277
      case 132: // "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
  Dhcp4Parser::stack_symbol_type&
  Dhcp4Parser::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 149: // value
      case 153: // map_value
      case 191: // socket_type
      case 200: // db_type
      case 405: // ncr_protocol_value
      case 414: // replace_client_name_value
302
303
304
        value.copy< ElementPtr > (that.value);
        break;

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

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

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

Francis Dupont's avatar
Francis Dupont committed
317
      case 132: // "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
  Dhcp4Parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
  {
    if (yymsg)
      YY_SYMBOL_PRINT (yymsg, yysym);
  }

#if PARSER4_DEBUG
  template <typename Base>
  void
  Dhcp4Parser::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 132: // "constant string"
358

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

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

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

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

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

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

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

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

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

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

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

Francis Dupont's avatar
Francis Dupont committed
399
      case 191: // socket_type
400

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

Francis Dupont's avatar
Francis Dupont committed
406
      case 200: // db_type
407

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

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

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

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

Francis Dupont's avatar
Francis Dupont committed
422
#line 207 "dhcp4_parser.yy" // lalr1.cc:636
423
424
        { yyoutput << yysym.value.template as< ElementPtr > (); }
#line 425 "dhcp4_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
  Dhcp4Parser::yypush_ (const char* m, state_type s, symbol_type& sym)
  {
    stack_symbol_type t (s, sym);
    yypush_ (m, t);
  }

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

  inline
  void
  Dhcp4Parser::yypop_ (unsigned int n)
  {
    yystack_.pop (n);
  }

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

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


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

  void
  Dhcp4Parser::set_debug_level (debug_level_type l)
  {
    yydebug_ = l;
  }
#endif // PARSER4_DEBUG

  inline Dhcp4Parser::state_type
  Dhcp4Parser::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
  Dhcp4Parser::yy_pact_value_is_default_ (int yyvalue)
  {
    return yyvalue == yypact_ninf_;
  }

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

  int
  Dhcp4Parser::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 149: // value
      case 153: // map_value
      case 191: // socket_type
      case 200: // db_type
      case 405: // ncr_protocol_value
      case 414: // replace_client_name_value
630
631
632
        yylhs.value.build< ElementPtr > ();
        break;

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

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

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

Francis Dupont's avatar
Francis Dupont committed
645
      case 132: // "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 216 "dhcp4_parser.yy" // lalr1.cc:859
668
    { ctx.ctx_ = ctx.NO_KEYWORD; }
669
#line 670 "dhcp4_parser.cc" // lalr1.cc:859
670
671
672
    break;

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

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

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

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

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

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

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

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

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

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

  case 24:
Francis Dupont's avatar
Francis Dupont committed
733
#line 234 "dhcp4_parser.yy" // lalr1.cc:859
734
    { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
735
#line 736 "dhcp4_parser.cc" // lalr1.cc:859
736
737
    break;

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

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

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

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

762
  case 29:
Francis Dupont's avatar
Francis Dupont committed
763
#line 239 "dhcp4_parser.yy" // lalr1.cc:859
764
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
765
#line 766 "dhcp4_parser.cc" // lalr1.cc:859
766
767
    break;

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

774
  case 31:
Francis Dupont's avatar
Francis Dupont committed
775
#line 243 "dhcp4_parser.yy" // lalr1.cc:859
776
777
778
779
    {
    // Push back the JSON value on the stack
    ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
}
780
#line 781 "dhcp4_parser.cc" // lalr1.cc:859
781
782
    break;

783
  case 32:
Francis Dupont's avatar
Francis Dupont committed
784
#line 248 "dhcp4_parser.yy" // lalr1.cc:859
785
786
787
788
789
790
    {
    // 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);
}
791
#line 792 "dhcp4_parser.cc" // lalr1.cc:859
792
793
    break;

794
  case 33:
Francis Dupont's avatar
Francis Dupont committed
795
#line 253 "dhcp4_parser.yy" // lalr1.cc:859
796
797
798
799
800
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
801
#line 802 "dhcp4_parser.cc" // lalr1.cc:859
802
803
    break;

804
  case 34:
Francis Dupont's avatar
Francis Dupont committed
805
#line 259 "dhcp4_parser.yy" // lalr1.cc:859
806
807
808
809
810
    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
#line 808 "dhcp4_parser.cc" // lalr1.cc:859
    break;

  case 37:
Francis Dupont's avatar
Francis Dupont committed
811
#line 266 "dhcp4_parser.yy" // lalr1.cc:859
812
813
814
815
    {
                  // map containing a single entry
                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                  }
816
#line 817 "dhcp4_parser.cc" // lalr1.cc:859
817
818
    break;

819
  case 38:
Francis Dupont's avatar
Francis Dupont committed
820
#line 270 "dhcp4_parser.yy" // lalr1.cc:859
821
822
823
824
825
    {
                  // 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 > ());
                  }
826
#line 827 "dhcp4_parser.cc" // lalr1.cc:859
827
828
    break;

829
  case 39:
Francis Dupont's avatar
Francis Dupont committed
830
#line 277 "dhcp4_parser.yy" // lalr1.cc:859
831
832
833
834
    {
    ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(l);
}
835
#line 836 "dhcp4_parser.cc" // lalr1.cc:859
836
837
    break;

838
  case 40:
Francis Dupont's avatar
Francis Dupont committed
839
#line 280 "dhcp4_parser.yy" // lalr1.cc:859
840
841
842
    {
    // list parsing complete. Put any sanity checking here
}
843
#line 844 "dhcp4_parser.cc" // lalr1.cc:859
844
845
    break;

846
  case 43:
Francis Dupont's avatar
Francis Dupont committed
847
#line 288 "dhcp4_parser.yy" // lalr1.cc:859
848
849
850
851
    {
                  // List consisting of a single element.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
852
#line 853 "dhcp4_parser.cc" // lalr1.cc:859
853
854
    break;

855
  case 44:
Francis Dupont's avatar
Francis Dupont committed
856
#line 292 "dhcp4_parser.yy" // lalr1.cc:859
857
858
859
860
    {
                  // List ending with , and a value.
                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                  }
861
#line 862 "dhcp4_parser.cc" // lalr1.cc:859
862
863
    break;

864
  case 45:
Francis Dupont's avatar
Francis Dupont committed
865
#line 299 "dhcp4_parser.yy" // lalr1.cc:859
866
867
868
    {
    // List parsing about to start
}
869
#line 870 "dhcp4_parser.cc" // lalr1.cc:859
870
871
    break;

872
  case 46:
Francis Dupont's avatar
Francis Dupont committed
873
#line 301 "dhcp4_parser.yy" // lalr1.cc:859
874
875
876
877
    {
    // list parsing complete. Put any sanity checking here
    //ctx.stack_.pop_back();
}
878
#line 879 "dhcp4_parser.cc" // lalr1.cc:859
879
880
    break;

881
  case 49:
Francis Dupont's avatar
Francis Dupont committed
882
#line 310 "dhcp4_parser.yy" // lalr1.cc:859
883
    {
884
885
886
                          ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
                          ctx.stack_.back()->add(s);
                          }
887
#line 888 "dhcp4_parser.cc" // lalr1.cc:859
888
889
    break;

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

899
  case 51:
Francis Dupont's avatar
Francis Dupont committed
900
#line 325 "dhcp4_parser.yy" // lalr1.cc:859
901
902
903
904
905
906
    {
    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.");
}
907
#line 908 "dhcp4_parser.cc" // lalr1.cc:859
908
909
    break;

910
  case 52:
Francis Dupont's avatar
Francis Dupont committed
911
#line 335 "dhcp4_parser.yy" // lalr1.cc:859
912
913
914
915
916
917
    {
    // 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);
}
918
#line 919 "dhcp4_parser.cc" // lalr1.cc:859
919
920
    break;

921
  case 53:
Francis Dupont's avatar
Francis Dupont committed
922
#line 340 "dhcp4_parser.yy" // lalr1.cc:859
923
924
925
926
927
    {
    // map parsing completed. If we ever want to do any wrap up
    // (maybe some sanity checking), this would be the best place
    // for it.
}
928
#line 929 "dhcp4_parser.cc" // lalr1.cc:859
929
930
    break;

931
  case 61:
Francis Dupont's avatar
Francis Dupont committed
932
#line 359 "dhcp4_parser.yy" // lalr1.cc:859
933
934
935
936
937
938
939
940
    {
    // 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("Dhcp4", m);
    ctx.stack_.push_back(m);
    ctx.enter(ctx.DHCP4);
}
941
#line 942 "dhcp4_parser.cc" // lalr1.cc:859
942
943
    break;

944
  case 62:
Francis Dupont's avatar
Francis Dupont committed
945
#line 366 "dhcp4_parser.yy" // lalr1.cc:859
946
947
948
949
950
951
952
    {
    // 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();
}
953
#line 954 "dhcp4_parser.cc" // lalr1.cc:859
954
955
    break;

956
  case 63:
Francis Dupont's avatar
Francis Dupont committed
957
#line 376 "dhcp4_parser.yy" // lalr1.cc:859
958
    {
Francis Dupont's avatar
Francis Dupont committed
959
    // Parse the Dhcp4 map
960
961
962
    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.push_back(m);
}
963
#line 964 "dhcp4_parser.cc" // lalr1.cc:859
964
965
    break;

966
  case 64:
Francis Dupont's avatar
Francis Dupont committed
967
#line 380 "dhcp4_parser.yy" // lalr1.cc:859
968
969
970
    {
    // parsing completed
}
971
#line 972 "dhcp4_parser.cc" // lalr1.cc:859
972
973
    break;

974
  case 88:
Francis Dupont's avatar
Francis Dupont committed
975
#line 413 "dhcp4_parser.yy" // lalr1.cc:859
976
977
978
979
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("valid-lifetime", prf);
}
980
#line 981 "dhcp4_parser.cc" // lalr1.cc:859
981
982
    break;

983
  case 89:
Francis Dupont's avatar
Francis Dupont committed
984
#line 418 "dhcp4_parser.yy" // lalr1.cc:859
985
986
987
988
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("renew-timer", prf);
}
989
#line 990 "dhcp4_parser.cc" // lalr1.cc:859
990
991
    break;

992
  case 90:
Francis Dupont's avatar
Francis Dupont committed
993
#line 423 "dhcp4_parser.yy" // lalr1.cc:859
994
995
996
997
    {
    ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("rebind-timer", prf);
}
998
#line 999 "dhcp4_parser.cc" // lalr1.cc:859
999
1000
    break;

1001
  case 91:
Francis Dupont's avatar
Francis Dupont committed
1002
#line 428 "dhcp4_parser.yy" // lalr1.cc:859
1003
1004
1005
1006
    {
    ElementPtr dpp(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("decline-probation-period", dpp);
}
1007
#line 1008 "dhcp4_parser.cc" // lalr1.cc:859
1008
1009
    break;

1010
  case 92:
Francis Dupont's avatar
Francis Dupont committed
1011
#line 433 "dhcp4_parser.yy" // lalr1.cc:859
1012
    {
Francis Dupont's avatar
Francis Dupont committed
1013
    ElementPtr echo(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
1014
1015
    ctx.stack_.back()->set("echo-client-id", echo);
}
1016
#line 1017 "dhcp4_parser.cc" // lalr1.cc:859
1017
1018
    break;

1019
  case 93:
Francis Dupont's avatar
Francis Dupont committed
1020
#line 438 "dhcp4_parser.yy" // lalr1.cc:859
1021
    {
Francis Dupont's avatar
Francis Dupont committed
1022
    ElementPtr match(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
1023
1024
    ctx.stack_.back()->set("match-client-id", match);
}
1025
#line 1026 "dhcp4_parser.cc" // lalr1.cc:859
1026
1027
    break;

1028
  case 94:
Francis Dupont's avatar
Francis Dupont committed
1029
#line 444 "dhcp4_parser.yy" // lalr1.cc:859
1030
1031
1032
1033
1034
1035
    {
    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);
}
1036
#line 1037 "dhcp4_parser.cc" // lalr1.cc:859
1037
1038
    break;

1039
  case 95:
Francis Dupont's avatar
Francis Dupont committed
1040
#line 449 "dhcp4_parser.yy" // lalr1.cc:859
1041
1042
1043
1044
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1045
#line 1046 "dhcp4_parser.cc" // lalr1.cc:859
1046
1047
    break;

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

1058
  case 101:
Francis Dupont's avatar
Francis Dupont committed
1059
#line 466 "dhcp4_parser.yy" // lalr1.cc:859
1060
1061
1062
    {
    // parsing completed
}
1063
#line 1064 "dhcp4_parser.cc" // lalr1.cc:859
1064
1065
    break;

1066
  case 102:
Francis Dupont's avatar
Francis Dupont committed
1067
#line 470 "dhcp4_parser.yy" // lalr1.cc:859
1068
1069
1070
1071
1072
1073
    {
    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);
}
1074
#line 1075 "dhcp4_parser.cc" // lalr1.cc:859
1075
1076
    break;

1077
  case 103:
Francis Dupont's avatar
Francis Dupont committed
1078
#line 475 "dhcp4_parser.yy" // lalr1.cc:859
1079
1080
1081
1082
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1083
#line 1084 "dhcp4_parser.cc" // lalr1.cc:859
1084
1085
    break;

1086
  case 104:
Francis Dupont's avatar
Francis Dupont committed
1087
#line 480 "dhcp4_parser.yy" // lalr1.cc:859
1088
    {
1089
    ctx.enter(ctx.DHCP_SOCKET_TYPE);
1090
}
1091
#line 1092 "dhcp4_parser.cc" // lalr1.cc:859
1092
1093
    break;

1094
  case 105:
Francis Dupont's avatar
Francis Dupont committed
1095
#line 482 "dhcp4_parser.yy" // lalr1.cc:859
1096
    {
1097
    ctx.stack_.back()->set("dhcp-socket-type", yystack_[0].value.as< ElementPtr > ());
1098
1099
    ctx.leave();
}
1100
#line 1101 "dhcp4_parser.cc" // lalr1.cc:859
1101
1102
    break;

1103
  case 106:
Francis Dupont's avatar
Francis Dupont committed
1104
#line 487 "dhcp4_parser.yy" // lalr1.cc:859
1105
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); }
1106
#line 1107 "dhcp4_parser.cc" // lalr1.cc:859
1107
1108
    break;

1109
  case 107:
Francis Dupont's avatar
Francis Dupont committed
1110
#line 488 "dhcp4_parser.yy" // lalr1.cc:859
1111
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); }
1112
#line 1113 "dhcp4_parser.cc" // lalr1.cc:859
1113
1114
    break;

1115
  case 108:
Francis Dupont's avatar
Francis Dupont committed
1116
#line 491 "dhcp4_parser.yy" // lalr1.cc:859
1117
1118
1119
1120
1121
1122
    {
    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);
}
1123
#line 1124 "dhcp4_parser.cc" // lalr1.cc:859
1124
1125
    break;

1126
  case 109:
Francis Dupont's avatar
Francis Dupont committed
1127
#line 496 "dhcp4_parser.yy" // lalr1.cc:859
1128
1129
1130
1131
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1132
#line 1133 "dhcp4_parser.cc" // lalr1.cc:859
1133
1134
    break;

1135
  case 110:
Francis Dupont's avatar
Francis Dupont committed
1136
#line 501 "dhcp4_parser.yy" // lalr1.cc:859
1137
1138
1139
1140
1141
1142
    {
    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);
}
1143
#line 1144 "dhcp4_parser.cc" // lalr1.cc:859
1144
1145
    break;

1146
  case 111:
Francis Dupont's avatar
Francis Dupont committed
1147
#line 506 "dhcp4_parser.yy" // lalr1.cc:859
1148
1149
1150
1151
    {
    ctx.stack_.pop_back();
    ctx.leave();
}
1152
#line 1153 "dhcp4_parser.cc" // lalr1.cc:859
1153
1154
    break;

Francis Dupont's avatar
Francis Dupont committed
1155
1156
  case 127:
#line 530 "dhcp4_parser.yy" // lalr1.cc:859
1157
    {
1158
    ctx.enter(ctx.DATABASE_TYPE);
1159
}
1160
#line 1161 "dhcp4_parser.cc" // lalr1.cc:859
1161
1162
    break;

Francis Dupont's avatar
Francis Dupont committed
1163
1164
  case 128:
#line 532 "dhcp4_parser.yy" // lalr1.cc:859
1165
    {
1166
    ctx.stack_.back()->set("type", yystack_[0].value.as< ElementPtr > ());
1167
1168
    ctx.leave();
}
1169
#line 1170 "dhcp4_parser.cc" // lalr1.cc:859
1170
1171
    break;

Francis Dupont's avatar
Francis Dupont committed
1172
1173
  case 129:
#line 537 "dhcp4_parser.yy" // lalr1.cc:859
1174
1175
1176
1177
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); }
#line 1176 "dhcp4_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1178
1179
  case 130:
#line 538 "dhcp4_parser.yy" // lalr1.cc:859
1180
1181
1182
1183
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); }
#line 1182 "dhcp4_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1184
1185
  case 131:
#line 539 "dhcp4_parser.yy" // lalr1.cc:859
1186
1187
1188
1189
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); }
#line 1188 "dhcp4_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1190
1191
  case 132:
#line 540 "dhcp4_parser.yy" // lalr1.cc:859
1192
1193
1194
1195
    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); }
#line 1194 "dhcp4_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1196
1197
  case 133:
#line 543 "dhcp4_parser.yy" // lalr1.cc:859
1198
1199
1200
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1201
#line 1202 "dhcp4_parser.cc" // lalr1.cc:859
1202
1203
    break;

Francis Dupont's avatar
Francis Dupont committed
1204
1205
  case 134:
#line 545 "dhcp4_parser.yy" // lalr1.cc:859
1206
1207
1208
1209
1210
    {
    ElementPtr user(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("user", user);
    ctx.leave();
}
1211
#line 1212 "dhcp4_parser.cc" // lalr1.cc:859
1212
1213
    break;

Francis Dupont's avatar
Francis Dupont committed
1214
1215
  case 135:
#line 551 "dhcp4_parser.yy" // lalr1.cc:859
1216
1217
1218
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1219
#line 1220 "dhcp4_parser.cc" // lalr1.cc:859
1220
1221
    break;

Francis Dupont's avatar
Francis Dupont committed
1222
1223
  case 136:
#line 553 "dhcp4_parser.yy" // lalr1.cc:859
1224
1225
1226
1227
1228
    {
    ElementPtr pwd(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("password", pwd);
    ctx.leave();
}
1229
#line 1230 "dhcp4_parser.cc" // lalr1.cc:859
1230
1231
    break;

Francis Dupont's avatar
Francis Dupont committed
1232
1233
  case 137:
#line 559 "dhcp4_parser.yy" // lalr1.cc:859
1234
1235
1236
    {
    ctx.enter(ctx.NO_KEYWORD);
}
1237
#line 1238 "dhcp4_parser.cc" // lalr1.cc:859
1238
1239
    break;

Francis Dupont's avatar
Francis Dupont committed
1240
1241
  case 138:
#line 561 "dhcp4_parser.yy" // lalr1.cc:859
1242
1243
1244
1245
1246
    {
    ElementPtr h(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("host", h);
    ctx.leave();
}
1247
#line 1248 "dhcp4_parser.cc" // lalr1.cc:859
1248
1249
    break;

Francis Dupont's avatar
Francis Dupont committed
1250
1251
  case 139:
#line 567 "dhcp4_parser.yy" // lalr1.cc:859
Francis Dupont's avatar
Francis Dupont committed
1252
1253
1254
1255
1256
1257
1258
    {
    ElementPtr p(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
    ctx.stack_.back()->set("port", p);
}
#line 1257 "dhcp4_parser.cc" // lalr1.cc:859
    break;

Francis Dupont's avatar
Francis Dupont committed
1259
1260
  case 140:
#line 572 "dhcp4_parser.yy" // lalr1.cc:859
1261
1262
1263
    {
    ctx.enter(ctx.NO_KEYWORD);
}
Francis Dupont's avatar
Francis Dupont committed
1264
#line 1265 "dhcp4_parser.cc" // lalr1.cc:859
1265
1266
    break;

Francis Dupont's avatar
Francis Dupont committed
1267
1268
  case 141:
#line 574 "dhcp4_parser.yy" // lalr1.cc:859
1269
1270
1271