]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#665,!460] Implemented support in D2
authorThomas Markwalder <tmark@isc.org>
Thu, 8 Aug 2019 17:39:24 +0000 (13:39 -0400)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 14 Aug 2019 08:57:56 +0000 (10:57 +0200)
doc/examples/ddns/sample1.json
doc/examples/kea4/advanced.json

src/bin/d2/d2_lexer.ll
src/bin/d2/d2_parser.yy

src/bin/d2/d2_lexer.cc
src/bin/d2/d2_parser.cc
src/bin/d2/d2_parser.h
src/bin/d2/location.hh
src/bin/d2/position.hh
src/bin/d2/stack.hh

src/bin/d2/tests/testdata/get_config.json

doc/examples/ddns/sample1.json
doc/examples/kea4/advanced.json
src/bin/d2/d2_lexer.cc
src/bin/d2/d2_lexer.ll
src/bin/d2/d2_parser.cc
src/bin/d2/d2_parser.h
src/bin/d2/d2_parser.yy
src/bin/d2/location.hh
src/bin/d2/position.hh
src/bin/d2/stack.hh
src/bin/d2/tests/testdata/get_config.json

index 3d4c3be6f1852ff9bbd02ae41144e168cee1122d..8de7b1b8b875588ec9ae7c5e6a2a21804675dc2f 100644 (file)
 
 // The following configures logging. It assumes that messages with at least
 // informational level (info, warn, error and fatal) should be logged to stdout.
+// It also specifies a custom log pattern.
     "loggers": [
         {
             "name": "kea-dhcp-ddns",
                     // kept.
                     "flush": true,
                     "maxsize": 204800,
-                    "maxver": 4
+                    "maxver": 4,
+                    "pattern": "%d [%c/%i] %m\n"
                 }
             ],
             "debuglevel": 0,
index 38f71ed18ad3a986cfa17c44acb17933928e3b2a..2fa0da8ce4cf92e2272ec0659fa61857b99cc82d 100644 (file)
                       // kept.
                       "flush": true,
                       "maxsize": 204800,
-                      "maxver": 4
+                      "maxver": 4,
+                      // We use pattern to specify custom log message layout
+                      "pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"
                   }
               ],
               "severity": "INFO"
index 9a0752812e8fb7d4be90df50124c0ac44cc3cc21..936909637e387ca98e39ab98eee83433d6541d1a 100644 (file)
@@ -1,6 +1,6 @@
-#line 1 "d2_lexer.cc"
+#line 2 "d2_lexer.cc"
 
-#line 3 "d2_lexer.cc"
+#line 4 "d2_lexer.cc"
 
 #define  YY_INT_ALIGNED short int
 
@@ -691,8 +691,8 @@ static void yynoreturn yy_fatal_error ( const char* msg  );
 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
-#define YY_NUM_RULES 67
-#define YY_END_OF_BUFFER 68
+#define YY_NUM_RULES 68
+#define YY_END_OF_BUFFER 69
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -700,54 +700,55 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_accept[417] =
+static const flex_int16_t yy_accept[424] =
     {   0,
-       60,   60,    0,    0,    0,    0,    0,    0,    0,    0,
-       68,   66,   10,   11,   66,    1,   60,   57,   60,   60,
-       66,   59,   58,   66,   66,   66,   66,   66,   53,   54,
-       66,   66,   66,   55,   56,    5,    5,    5,   66,   66,
-       66,   10,   11,    0,    0,   49,    0,    0,    0,    0,
+       61,   61,    0,    0,    0,    0,    0,    0,    0,    0,
+       69,   67,   10,   11,   67,    1,   61,   58,   61,   61,
+       67,   60,   59,   67,   67,   67,   67,   67,   54,   55,
+       67,   67,   67,   56,   57,    5,    5,    5,   67,   67,
+       67,   10,   11,    0,    0,   50,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    1,
-       60,   60,    0,   59,   60,    3,    2,    6,    0,   60,
+       61,   61,    0,   60,   61,    3,    2,    6,    0,   61,
         0,    0,    0,    0,    0,    0,    4,    0,    0,    9,
-        0,   50,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   51,    0,    0,    0,    0,    0,    0,    0,    0,
 
-       52,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       53,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    2,    0,    0,    0,    0,
+        0,    0,    0,    8,    0,    0,    0,    0,    0,    0,
+        0,    0,   52,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    2,    0,    0,    0,    0,    0,
-        0,    0,    8,    0,    0,    0,    0,    0,    0,    0,
-        0,   51,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   65,   63,
-        0,   62,   61,    0,    0,    0,    0,    0,    0,   19,
-       18,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       66,   64,    0,   63,   62,    0,    0,    0,    0,    0,
+        0,   19,   18,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
-        0,    0,    0,    0,    0,    0,    0,   64,   61,    0,
-        0,    0,    0,    0,    0,   20,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,   43,    0,    0,    0,   14,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   46,   47,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   40,    0,
+       65,   62,    0,    0,    0,    0,    0,    0,   20,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    7,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   44,    0,    0,    0,
+        0,   14,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   47,   48,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   40,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   42,    0,    0,   39,    0,    0,   32,    0,
-
-        0,    0,    0,    0,    0,   36,    0,   22,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   37,   41,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   12,
-        0,    0,    0,    0,    0,    0,    0,   28,    0,   26,
-        0,    0,    0,    0,   45,    0,    0,    0,    0,    0,
-       30,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   29,    0,    0,    0,    0,   44,
-        0,    0,    0,    0,   13,   17,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   31,    0,   27,    0,    0,
-        0,    0,   35,   34,    0,    0,    0,   25,    0,   23,
-
-       16,    0,   24,   21,   48,    0,    0,    0,   33,    0,
-       38,    0,    0,    0,   15,    0
+        7,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   42,    0,    0,
+
+       39,    0,    0,    0,   32,    0,    0,    0,    0,    0,
+        0,   36,    0,   22,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   37,   41,    0,    0,    0,   43,    0,
+        0,    0,    0,    0,    0,    0,   12,    0,    0,    0,
+        0,    0,    0,    0,   28,    0,   26,    0,    0,    0,
+        0,   46,    0,    0,    0,    0,    0,   30,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   29,    0,    0,    0,    0,   45,    0,    0,    0,
+        0,   13,   17,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   31,    0,   27,    0,    0,    0,    0,   35,
+
+       34,    0,    0,    0,   25,    0,   23,   16,    0,   24,
+       21,   49,    0,    0,    0,   33,    0,   38,    0,    0,
+        0,   15,    0
     } ;
 
 static const YY_CHAR yy_ec[256] =
@@ -793,109 +794,111 @@ static const YY_CHAR yy_meta[67] =
         3,    3,    3,    3,    3,    3
     } ;
 
-static const flex_int16_t yy_base[428] =
+static const flex_int16_t yy_base[435] =
     {   0,
         0,    0,   65,   68,   71,    0,   69,   73,   54,   70,
-      735,  736,   89,  731,  137,    0,  192,  736,  197,  200,
-       86,  212,  736,  713,   97,   74,   63,   69,  736,  736,
-       83,   68,   78,  736,  736,  736,  124,  719,  678,    0,
-      711,  128,  726,  212,  234,  736,  674,  680,  172,  672,
-      196,  196,  257,  674,  670,  187,  191,  669,  667,  677,
-      666,  679,   91,  659,  663,  672,  179,  209,  210,    0,
-      281,  289,  308,  314,  293,  736,    0,  736,  232,  257,
-      224,  227,  276,  292,  293,  277,  736,  673,  708,  736,
-      294,  736,  328,  660,  670,  297,  665,  301,  307,  704,
-
-        0,  374,  663,  207,  655,  666,  660,  648,  645,  647,
-      645,  690,  637,  653,  636,  645,  640,  637,  638,  633,
-      300,  650,  643,  646,    0,  307,  317,  255,  313,  320,
-      322,  638,  736,    0,  630,  632,  321,  640,  679,  678,
-      677,  736,  406,  628,  629,  622,  622,  619,  633,  665,
-      618,  613,  615,  632,  660,  624,  292,  625,  657,  612,
-      608,  621,  608,  619,  612,  615,  604,  328,  736,  736,
-      332,  736,  736,  600,    0,  602,  339,  651,  608,  736,
-      736,  438,  599,  610,  597,  641,  605,  593,  592,  601,
-      607,  593,  602,  591,  599,  594,  597,  634,  209,  580,
-
-      632,  581,  592,  579,  590,  622,  621,  736,  736,  588,
-        0,  576,  623,  622,  584,  736,  573,  470,  577,  571,
-      569,  579,  570,  562,  575,  612,  561,  576,  572,  574,
-      557,  548,  555,  736,  556,  553,  550,  736,  550,  548,
-      557,  546,  553,  560,  557,    0,  549,  736,  736,  546,
-      552,  539,  538,  544,  540,  549,  581,  535,  736,  547,
-      537,  532,  535,  529,  541,  578,  527,  528,  204,  537,
-      574,  521,  567,  533,  522,  736,  564,  517,  567,  525,
-      565,  559,  517,  508,  526,  506,  554,  520,  519,  518,
-      555,  554,  736,  507,  500,  736,  503,  545,  736,  492,
-
-      322,  491,  500,  512,  545,  736,  498,  736,  492,  502,
-      485,  479,  478,  466,  502,  450,  500,  736,  736,  465,
-      450,  448,  459,  495,  460,  436,  441,  439,  444,  736,
-      483,  434,  439,  426,  418,  419,  431,  736,  416,  736,
-      414,  429,  412,  426,  736,  416,  412,  460,  421,  414,
-      736,  415,  403,  449,  388,  348,  391,  437,  436,  387,
-      392,  386,  394,  393,  736,  374,  382,  384,  376,  736,
-      420,  367,  418,  366,  736,  736,  362,  358,  354,  404,
-      403,  350,  349,  362,  398,  736,  355,  736,  396,  395,
-      341,  387,  736,  736,  386,  385,  327,  736,  331,  736,
-
-      736,  325,  736,  736,  736,  373,  334,  371,  736,  313,
-      736,  302,  207,  244,  736,  736,  515,  520,  525,  530,
-      535,  540,  543,  216,  130,  115,   87
+      742,  743,   89,  738,  137,    0,  192,  743,  197,  200,
+       86,  212,  743,  720,   97,   74,   63,   69,  743,  743,
+       83,   68,   78,  743,  743,  743,  124,  726,  685,    0,
+      718,  128,  733,  212,  234,  743,  681,  687,  172,  679,
+      196,  196,  257,  681,  677,  187,  191,  676,  674,  684,
+      673,  686,   91,  666,  192,  680,  179,  255,  210,    0,
+      289,  305,  313,  320,  293,  743,    0,  743,  236,  250,
+      220,  244,  240,  245,  272,  266,  743,  681,  716,  743,
+      274,  743,  325,  668,  678,  296,  673,  308,  310,  712,
+
+        0,  371,  671,  202,  663,  674,  668,  656,  653,  655,
+      653,  698,  645,  661,  644,  653,  648,  645,  644,  645,
+      640,  298,  657,  650,  653,    0,  310,  318,  317,  311,
+      320,  328,  645,  743,    0,  637,  639,  322,  647,  686,
+      685,  684,  743,  403,  635,  636,  629,  629,  626,  640,
+      672,  625,  620,  622,  639,  667,  631,  295,  632,  664,
+      619,  615,  614,  627,  614,  625,  618,  621,  610,  329,
+      743,  743,  332,  743,  743,  606,    0,  608,  364,  657,
+      614,  743,  743,  435,  605,  616,  603,  647,  611,  599,
+      598,  607,  613,  599,  608,  597,  605,  600,  603,  640,
+
+      344,  586,  600,  637,  586,  597,  584,  595,  627,  626,
+      743,  743,  593,    0,  581,  628,  627,  589,  743,  578,
+      467,  582,  576,  574,  584,  575,  567,  580,  617,  566,
+      581,  577,  579,  562,  553,  560,  743,  561,  558,  555,
+      556,  743,  554,  552,  561,  550,  557,  564,  561,    0,
+      553,  743,  743,  550,  556,  543,  542,  548,  544,  553,
+      585,  539,  743,  551,  541,  536,  539,  533,  545,  582,
+      531,  532,  204,  532,  540,  577,  524,  570,  536,  525,
+      743,  567,  520,  570,  528,  568,  562,  520,  511,  529,
+      509,  557,  523,  522,  521,  558,  557,  743,  510,  503,
+
+      743,  506,  553,  547,  743,  494,  324,  493,  502,  514,
+      547,  743,  500,  743,  494,  510,  505,  500,  503,  503,
+      533,  469,  518,  743,  743,  479,  452,  450,  743,  461,
+      497,  462,  438,  443,  441,  452,  743,  491,  442,  447,
+      443,  429,  430,  442,  743,  427,  743,  416,  431,  414,
+      428,  743,  418,  414,  462,  423,  422,  743,  423,  411,
+      457,  405,  249,  402,  448,  447,  398,  394,  388,  396,
+      395,  743,  376,  384,  386,  378,  743,  428,  375,  426,
+      374,  743,  743,  379,  369,  365,  415,  414,  352,  351,
+      364,  401,  743,  358,  743,  399,  398,  350,  396,  743,
+
+      743,  395,  394,  340,  743,  339,  743,  743,  333,  743,
+      743,  743,  368,  316,  353,  743,  302,  743,  288,  201,
+      241,  743,  743,  512,  517,  522,  527,  532,  537,  540,
+      216,  130,  115,   87
     } ;
 
-static const flex_int16_t yy_def[428] =
+static const flex_int16_t yy_def[435] =
     {   0,
-      416,    1,  417,  417,    1,    5,    5,    5,    5,    5,
-      416,  416,  416,  416,  416,  418,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  419,
-      416,  416,  416,  420,   15,  416,   45,   45,   45,   45,
-       45,   45,  421,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,   45,   45,   45,   45,   45,  418,
-      416,  416,  416,  416,  416,  416,  422,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  419,  416,
-      420,  416,  416,   45,   45,   45,   45,   45,   45,  423,
-
-       45,  421,   45,   45,   45,   45,   45,   45,   45,   45,
+      423,    1,  424,  424,    1,    5,    5,    5,    5,    5,
+      423,  423,  423,  423,  423,  425,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  426,
+      423,  423,  423,  427,   15,  423,   45,   45,   45,   45,
+       45,   45,  428,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,   45,   45,   45,   45,  425,
+      423,  423,  423,  423,  423,  423,  429,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  426,  423,
+      427,  423,  423,   45,   45,   45,   45,   45,   45,  430,
+
+       45,  428,   45,   45,   45,   45,   45,   45,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,  422,  416,  416,  416,  416,  416,
-      416,  416,  416,  424,   45,   45,   45,   45,   45,   45,
-      423,  416,  421,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,  429,  423,  423,  423,  423,
+      423,  423,  423,  423,  431,   45,   45,   45,   45,   45,
+       45,  430,  423,  428,   45,   45,   45,   45,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,   45,   45,   45,  416,  416,  416,
-      416,  416,  416,  416,  425,   45,   45,   45,   45,  416,
-      416,  421,   45,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,   45,   45,   45,   45,  423,
+      423,  423,  423,  423,  423,  423,  432,   45,   45,   45,
+       45,  423,  423,  428,   45,   45,   45,   45,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
 
-       45,   45,   45,   45,   45,   45,   45,  416,  416,  416,
-      426,   45,   45,   45,   45,  416,   45,  421,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,  416,   45,   45,   45,  416,   45,   45,
-       45,   45,   45,   45,  416,  427,   45,  416,  416,   45,
-       45,   45,   45,   45,   45,   45,   45,   45,  416,   45,
+      423,  423,  423,  433,   45,   45,   45,   45,  423,   45,
+      428,   45,   45,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,   45,  423,   45,   45,   45,
+       45,  423,   45,   45,   45,   45,   45,   45,  423,  434,
+       45,  423,  423,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,  423,   45,   45,   45,   45,   45,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,   45,  416,   45,   45,   45,   45,
+      423,   45,   45,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,   45,   45,   45,   45,  423,   45,   45,
+
+      423,   45,   45,   45,  423,   45,   45,   45,   45,   45,
+       45,  423,   45,  423,   45,   45,   45,   45,   45,   45,
+       45,   45,   45,  423,  423,   45,   45,   45,  423,   45,
+       45,   45,   45,   45,   45,   45,  423,   45,   45,   45,
+       45,   45,   45,   45,  423,   45,  423,   45,   45,   45,
+       45,  423,   45,   45,   45,   45,   45,  423,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,  416,   45,   45,  416,   45,   45,  416,   45,
-
-       45,   45,   45,   45,   45,  416,   45,  416,   45,   45,
-       45,   45,   45,   45,   45,   45,   45,  416,  416,   45,
-       45,   45,   45,   45,   45,   45,   45,   45,   45,  416,
-       45,   45,   45,   45,   45,   45,   45,  416,   45,  416,
-       45,   45,   45,   45,  416,   45,   45,   45,   45,   45,
-      416,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,  416,   45,   45,   45,   45,  416,
-       45,   45,   45,   45,  416,  416,   45,   45,   45,   45,
-       45,   45,   45,   45,   45,  416,   45,  416,   45,   45,
-       45,   45,  416,  416,   45,   45,   45,  416,   45,  416,
-
-      416,   45,  416,  416,  416,   45,   45,   45,  416,   45,
-      416,   45,   45,   45,  416,    0,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416
+       45,  423,   45,   45,   45,   45,  423,   45,   45,   45,
+       45,  423,  423,   45,   45,   45,   45,   45,   45,   45,
+       45,   45,  423,   45,  423,   45,   45,   45,   45,  423,
+
+      423,   45,   45,   45,  423,   45,  423,  423,   45,  423,
+      423,  423,   45,   45,   45,  423,   45,  423,   45,   45,
+       45,  423,    0,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423
     } ;
 
-static const flex_int16_t yy_nxt[803] =
+static const flex_int16_t yy_nxt[810] =
     {   0,
        12,   13,   14,   13,   12,   15,   16,   12,   17,   18,
        19,   20,   21,   22,   22,   22,   23,   24,   12,   12,
@@ -909,9 +912,9 @@ static const flex_int16_t yy_nxt[803] =
        42,   91,   42,   76,   81,   12,   12,   82,   77,   12,
 
        83,   12,   82,   81,   12,   79,   12,   79,   12,   83,
-       80,   80,   80,   81,   12,   12,   12,   12,   39,  246,
+       80,   80,   80,   81,   12,   12,   12,   12,   39,  250,
        12,   82,   84,   12,   83,   42,   85,   42,   12,   42,
-      116,   42,  117,   86,  211,   12,   12,   44,   44,   44,
+      116,   42,  117,   86,  214,   12,   12,   44,   44,   44,
        45,   45,   46,   45,   45,   45,   45,   45,   45,   45,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   47,
        48,   45,   45,   49,   50,   45,   45,   45,   45,   45,
@@ -919,76 +922,76 @@ static const flex_int16_t yy_nxt[803] =
        45,   57,   45,   58,   59,   49,   60,   61,   62,   63,
        64,   65,   66,   67,   68,   69,   45,   45,   45,   45,
 
-       45,   45,   45,   71,   96,   72,   72,   72,   71,  296,
+       45,   45,   45,   71,   96,   72,   72,   72,   71,  301,
        74,   74,   74,   75,   75,   75,   73,   92,   98,   99,
-      175,   73,  121,   71,   73,   74,   74,   74,   96,  105,
-      106,   98,  122,   99,  107,   73,   73,   98,   99,  108,
-       73,  109,  297,   73,  110,   80,   80,   80,   93,  415,
-       98,  126,   99,  235,  127,   73,   45,   45,  145,  146,
-       45,   45,  101,  236,  414,  123,  124,   45,   45,   45,
-       80,   80,   80,   45,  126,   45,   45,  127,   45,  170,
+      177,   73,  122,   71,   73,   74,   74,   74,   96,  105,
+      106,  119,  123,   99,  107,   73,   73,   98,   99,  108,
+       73,  109,  302,   73,  110,  120,  422,  127,   93,   80,
+       80,   80,   99,  146,  147,   73,   45,   45,  421,  379,
+       45,   45,  101,   80,   80,   80,  125,   45,   45,   45,
+      127,  128,  127,   45,  129,   45,   45,   98,   45,   92,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   45,   75,   75,   75,   45,  170,   92,
-
-       71,   45,   72,   72,   72,   73,   75,   75,   75,   45,
-      128,  128,   45,   73,   45,  102,   79,   73,   79,  126,
-      127,   80,   80,   80,   73,   71,  137,   74,   74,   74,
-       93,  139,   73,   91,  128,  131,   73,  140,   73,  168,
-       91,  163,  129,  130,  169,  168,  170,  169,  196,  178,
-      137,  197,  208,  213,  214,  139,  208,   73,  372,  164,
-      413,  140,  215,  168,   91,  173,  412,  169,   91,  171,
-      172,  208,   91,  178,  325,  209,  411,  410,  409,  326,
-       91,  408,  407,   91,  406,   91,  134,  143,  143,  143,
-      405,  404,  403,  402,  143,  143,  143,  143,  143,  143,
-
-      401,  400,  399,  398,  373,  397,  396,  395,  394,  393,
-      392,  391,  390,  143,  143,  143,  143,  143,  143,  182,
-      182,  182,  389,  388,  387,  386,  182,  182,  182,  182,
-      182,  182,  385,  384,  383,  382,  381,  380,  379,  378,
-      377,  376,  375,  374,  371,  182,  182,  182,  182,  182,
-      182,  218,  218,  218,  370,  369,  368,  367,  218,  218,
-      218,  218,  218,  218,  366,  365,  364,  363,  362,  361,
-      360,  359,  358,  357,  356,  355,  354,  218,  218,  218,
-      218,  218,  218,   45,   45,   45,  353,  352,  351,  350,
-       45,   45,   45,   45,   45,   45,  349,  348,  347,  346,
-
-      345,  344,  343,  342,  341,  340,  339,  338,  337,   45,
-       45,   45,   45,   45,   45,   36,   36,   36,   36,   36,
-       70,  336,   70,   70,   70,   89,  335,   89,  334,   89,
-       91,   91,   91,   91,   91,  100,  100,  100,  100,  100,
-      125,  333,  125,  125,  125,  141,  141,  141,  332,  331,
-      330,  329,  328,  327,  324,  323,  322,  321,  320,  319,
-      318,  317,  316,  315,  314,  313,  312,  311,  310,  309,
-      308,  307,  306,  305,  304,  303,  302,  301,  300,  299,
-      298,  295,  294,  293,  292,  291,  290,  289,  288,  287,
-      286,  285,  284,  283,  282,  281,  280,  279,  278,  277,
-
-      276,  275,  274,  273,  272,  271,  270,  269,  268,  267,
-      266,  265,  264,  263,  262,  261,  260,  259,  258,  257,
-      256,  255,  254,  253,  252,  251,  250,  249,  248,  247,
-      245,  244,  243,  242,  241,  240,  239,  238,  237,  234,
-      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
-      223,  222,  221,  220,  219,  217,  216,  212,  210,  207,
-      206,  205,  204,  203,  202,  201,  200,  199,  198,  195,
-      194,  193,  192,  191,  190,  189,  188,  187,  186,  185,
-      184,  183,  142,  181,  180,  179,  177,  176,  174,  167,
-      166,  165,  162,  161,  160,  159,  158,  157,  156,  155,
-
-      154,  153,  152,  151,  150,  149,  148,  147,  144,  142,
-      138,  136,  135,  133,  132,  120,  119,  118,  115,  114,
-      113,  112,  111,  104,  103,   97,   95,   94,   43,   90,
-       88,   87,   78,   43,  416,   11,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-
-      416,  416
+       45,   45,   45,   45,  128,  130,   98,   45,  129,  128,
+
+      129,   45,   75,   75,   75,  380,   75,   75,   75,   45,
+       93,  124,   45,   73,   45,  102,   71,   73,   72,   72,
+       72,   79,  131,   79,  132,  138,   80,   80,   80,   73,
+       91,   71,   73,   74,   74,   74,   73,   91,  140,  165,
+      141,  172,  170,  170,   73,  171,  420,  171,   73,  138,
+      180,  198,  172,  211,  199,  419,  211,  166,  418,  417,
+      172,   91,  140,   73,  141,   91,  170,  173,  171,   91,
+      174,  175,  211,  416,  180,  212,  332,   91,  216,  217,
+       91,  333,   91,  135,  144,  144,  144,  218,  238,  415,
+      414,  144,  144,  144,  144,  144,  144,  413,  239,  412,
+
+      411,  410,  409,  408,  407,  406,  405,  404,  403,  402,
+      144,  144,  144,  144,  144,  144,  184,  184,  184,  401,
+      400,  399,  398,  184,  184,  184,  184,  184,  184,  397,
+      396,  395,  394,  393,  392,  391,  390,  389,  388,  387,
+      386,  385,  184,  184,  184,  184,  184,  184,  221,  221,
+      221,  384,  383,  382,  381,  221,  221,  221,  221,  221,
+      221,  378,  377,  376,  375,  374,  373,  372,  371,  370,
+      369,  368,  367,  366,  221,  221,  221,  221,  221,  221,
+       45,   45,   45,  365,  364,  363,  362,   45,   45,   45,
+       45,   45,   45,  361,  360,  359,  358,  357,  356,  355,
+
+      354,  353,  352,  351,  350,  349,   45,   45,   45,   45,
+       45,   45,   36,   36,   36,   36,   36,   70,  348,   70,
+       70,   70,   89,  347,   89,  346,   89,   91,   91,   91,
+       91,   91,  100,  100,  100,  100,  100,  126,  345,  126,
+      126,  126,  142,  142,  142,  344,  343,  342,  341,  340,
+      339,  338,  337,  336,  335,  334,  331,  330,  329,  328,
+      327,  326,  325,  324,  323,  322,  321,  320,  319,  318,
+      317,  316,  315,  314,  313,  312,  311,  310,  309,  308,
+      307,  306,  305,  304,  303,  300,  299,  298,  297,  296,
+      295,  294,  293,  292,  291,  290,  289,  288,  287,  286,
+
+      285,  284,  283,  282,  281,  280,  279,  278,  277,  276,
+      275,  274,  273,  272,  271,  270,  269,  268,  267,  266,
+      265,  264,  263,  262,  261,  260,  259,  258,  257,  256,
+      255,  254,  253,  252,  251,  249,  248,  247,  246,  245,
+      244,  243,  242,  241,  240,  237,  236,  235,  234,  233,
+      232,  231,  230,  229,  228,  227,  226,  225,  224,  223,
+      222,  220,  219,  215,  213,  210,  209,  208,  207,  206,
+      205,  204,  203,  202,  201,  200,  197,  196,  195,  194,
+      193,  192,  191,  190,  189,  188,  187,  186,  185,  143,
+      183,  182,  181,  179,  178,  176,  169,  168,  167,  164,
+
+      163,  162,  161,  160,  159,  158,  157,  156,  155,  154,
+      153,  152,  151,  150,  149,  148,  145,  143,  139,  137,
+      136,  134,  133,  121,  118,  115,  114,  113,  112,  111,
+      104,  103,   97,   95,   94,   43,   90,   88,   87,   78,
+       43,  423,   11,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+
+      423,  423,  423,  423,  423,  423,  423,  423,  423
     } ;
 
-static const flex_int16_t yy_chk[803] =
+static const flex_int16_t yy_chk[810] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -999,12 +1002,12 @@ static const flex_int16_t yy_chk[803] =
         1,    1,    1,    1,    1,    1,    3,    3,    3,    4,
         4,    4,    3,    9,    7,    4,    5,    5,    8,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,   10,
-       13,  427,   13,   21,   26,    5,    5,   27,   21,    5,
+       13,  434,   13,   21,   26,    5,    5,   27,   21,    5,
 
        28,    9,   32,   31,    5,   25,    5,   25,    5,   33,
-       25,   25,   25,   26,    5,    5,    7,   10,    5,  426,
+       25,   25,   25,   26,    5,    5,    7,   10,    5,  433,
         8,   27,   31,    5,   28,   37,   32,   37,    5,   42,
-       63,   42,   63,   33,  425,    5,    5,   15,   15,   15,
+       63,   42,   63,   33,  432,    5,    5,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
@@ -1012,73 +1015,73 @@ static const flex_int16_t yy_chk[803] =
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
 
-       15,   15,   15,   17,   49,   17,   17,   17,   19,  269,
+       15,   15,   15,   17,   49,   17,   17,   17,   19,  273,
        19,   19,   19,   20,   20,   20,   17,   44,   51,   52,
-      424,   19,   67,   22,   20,   22,   22,   22,   49,   56,
-       56,   68,   67,   69,   56,   17,   22,   51,   52,   56,
-       19,   57,  269,   20,   57,   79,   79,   79,   44,  414,
-       68,   81,   69,  199,   82,   22,   45,   45,  104,  104,
-       45,   45,   53,  199,  413,   68,   69,   45,   45,   53,
-       80,   80,   80,   45,   81,   45,   45,   82,   45,  128,
+      431,   19,   67,   22,   20,   22,   22,   22,   49,   56,
+       56,   65,   67,   69,   56,   17,   22,   51,   52,   56,
+       19,   57,  273,   20,   57,   65,  421,   81,   44,   79,
+       79,   79,   69,  104,  104,   22,   45,   45,  420,  363,
+       45,   45,   53,   80,   80,   80,   69,   45,   45,   53,
+       81,   82,   84,   45,   83,   45,   45,   68,   45,   91,
        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
-       45,   45,   45,   53,   71,   71,   71,   53,  128,   91,
-
-       72,   53,   72,   72,   72,   71,   75,   75,   75,   53,
-       83,   86,   53,   72,   53,   53,   73,   75,   73,   84,
-       85,   73,   73,   73,   71,   74,   96,   74,   74,   74,
-       91,   98,   72,   93,   83,   86,   75,   99,   74,  126,
-       93,  121,   84,   85,  127,  129,  131,  130,  157,  137,
-       96,  157,  168,  177,  177,   98,  171,   74,  356,  121,
-      412,   99,  177,  126,   93,  131,  410,  127,   93,  129,
-      130,  168,   93,  137,  301,  171,  408,  407,  406,  301,
-       93,  402,  399,   93,  397,   93,   93,  102,  102,  102,
-      396,  395,  392,  391,  102,  102,  102,  102,  102,  102,
-
-      390,  389,  387,  385,  356,  384,  383,  382,  381,  380,
-      379,  378,  377,  102,  102,  102,  102,  102,  102,  143,
-      143,  143,  374,  373,  372,  371,  143,  143,  143,  143,
-      143,  143,  369,  368,  367,  366,  364,  363,  362,  361,
-      360,  359,  358,  357,  355,  143,  143,  143,  143,  143,
-      143,  182,  182,  182,  354,  353,  352,  350,  182,  182,
-      182,  182,  182,  182,  349,  348,  347,  346,  344,  343,
-      342,  341,  339,  337,  336,  335,  334,  182,  182,  182,
-      182,  182,  182,  218,  218,  218,  333,  332,  331,  329,
-      218,  218,  218,  218,  218,  218,  328,  327,  326,  325,
-
-      324,  323,  322,  321,  320,  317,  316,  315,  314,  218,
-      218,  218,  218,  218,  218,  417,  417,  417,  417,  417,
-      418,  313,  418,  418,  418,  419,  312,  419,  311,  419,
-      420,  420,  420,  420,  420,  421,  421,  421,  421,  421,
-      422,  310,  422,  422,  422,  423,  423,  423,  309,  307,
-      305,  304,  303,  302,  300,  298,  297,  295,  294,  292,
-      291,  290,  289,  288,  287,  286,  285,  284,  283,  282,
-      281,  280,  279,  278,  277,  275,  274,  273,  272,  271,
-      270,  268,  267,  266,  265,  264,  263,  262,  261,  260,
-      258,  257,  256,  255,  254,  253,  252,  251,  250,  247,
-
-      245,  244,  243,  242,  241,  240,  239,  237,  236,  235,
-      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
-      223,  222,  221,  220,  219,  217,  215,  214,  213,  212,
-      210,  207,  206,  205,  204,  203,  202,  201,  200,  198,
-      197,  196,  195,  194,  193,  192,  191,  190,  189,  188,
-      187,  186,  185,  184,  183,  179,  178,  176,  174,  167,
-      166,  165,  164,  163,  162,  161,  160,  159,  158,  156,
-      155,  154,  153,  152,  151,  150,  149,  148,  147,  146,
-      145,  144,  141,  140,  139,  138,  136,  135,  132,  124,
-      123,  122,  120,  119,  118,  117,  116,  115,  114,  113,
-
-      112,  111,  110,  109,  108,  107,  106,  105,  103,  100,
-       97,   95,   94,   89,   88,   66,   65,   64,   62,   61,
-       60,   59,   58,   55,   54,   50,   48,   47,   43,   41,
-       39,   38,   24,   14,   11,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
-
-      416,  416
+       45,   45,   45,   53,   82,   84,   68,   53,   83,   85,
+
+       86,   53,   71,   71,   71,  363,   75,   75,   75,   53,
+       91,   68,   53,   71,   53,   53,   72,   75,   72,   72,
+       72,   73,   85,   73,   86,   96,   73,   73,   73,   72,
+       93,   74,   71,   74,   74,   74,   75,   93,   98,  122,
+       99,  129,  127,  130,   74,  128,  419,  131,   72,   96,
+      138,  158,  132,  170,  158,  417,  173,  122,  415,  414,
+      129,   93,   98,   74,   99,   93,  127,  130,  128,   93,
+      131,  132,  170,  413,  138,  173,  307,   93,  179,  179,
+       93,  307,   93,   93,  102,  102,  102,  179,  201,  409,
+      406,  102,  102,  102,  102,  102,  102,  404,  201,  403,
+
+      402,  399,  398,  397,  396,  394,  392,  391,  390,  389,
+      102,  102,  102,  102,  102,  102,  144,  144,  144,  388,
+      387,  386,  385,  144,  144,  144,  144,  144,  144,  384,
+      381,  380,  379,  378,  376,  375,  374,  373,  371,  370,
+      369,  368,  144,  144,  144,  144,  144,  144,  184,  184,
+      184,  367,  366,  365,  364,  184,  184,  184,  184,  184,
+      184,  362,  361,  360,  359,  357,  356,  355,  354,  353,
+      351,  350,  349,  348,  184,  184,  184,  184,  184,  184,
+      221,  221,  221,  346,  344,  343,  342,  221,  221,  221,
+      221,  221,  221,  341,  340,  339,  338,  336,  335,  334,
+
+      333,  332,  331,  330,  328,  327,  221,  221,  221,  221,
+      221,  221,  424,  424,  424,  424,  424,  425,  326,  425,
+      425,  425,  426,  323,  426,  322,  426,  427,  427,  427,
+      427,  427,  428,  428,  428,  428,  428,  429,  321,  429,
+      429,  429,  430,  430,  430,  320,  319,  318,  317,  316,
+      315,  313,  311,  310,  309,  308,  306,  304,  303,  302,
+      300,  299,  297,  296,  295,  294,  293,  292,  291,  290,
+      289,  288,  287,  286,  285,  284,  283,  282,  280,  279,
+      278,  277,  276,  275,  274,  272,  271,  270,  269,  268,
+      267,  266,  265,  264,  262,  261,  260,  259,  258,  257,
+
+      256,  255,  254,  251,  249,  248,  247,  246,  245,  244,
+      243,  241,  240,  239,  238,  236,  235,  234,  233,  232,
+      231,  230,  229,  228,  227,  226,  225,  224,  223,  222,
+      220,  218,  217,  216,  215,  213,  210,  209,  208,  207,
+      206,  205,  204,  203,  202,  200,  199,  198,  197,  196,
+      195,  194,  193,  192,  191,  190,  189,  188,  187,  186,
+      185,  181,  180,  178,  176,  169,  168,  167,  166,  165,
+      164,  163,  162,  161,  160,  159,  157,  156,  155,  154,
+      153,  152,  151,  150,  149,  148,  147,  146,  145,  142,
+      141,  140,  139,  137,  136,  133,  125,  124,  123,  121,
+
+      120,  119,  118,  117,  116,  115,  114,  113,  112,  111,
+      110,  109,  108,  107,  106,  105,  103,  100,   97,   95,
+       94,   89,   88,   66,   64,   62,   61,   60,   59,   58,
+       55,   54,   50,   48,   47,   43,   41,   39,   38,   24,
+       14,   11,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  423,
+
+      423,  423,  423,  423,  423,  423,  423,  423,  423
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -1087,15 +1090,15 @@ static char *yy_last_accepting_cpos;
 extern int yy_flex_debug;
 int yy_flex_debug = 1;
 
-static const flex_int16_t yy_rule_linenum[67] =
+static const flex_int16_t yy_rule_linenum[68] =
     {   0,
       133,  135,  137,  142,  143,  148,  149,  150,  162,  165,
       170,  176,  185,  196,  207,  216,  225,  234,  244,  254,
       264,  281,  298,  307,  316,  326,  336,  346,  357,  366,
       376,  386,  396,  405,  414,  424,  433,  443,  452,  461,
-      470,  479,  488,  501,  510,  519,  528,  537,  547,  646,
-      651,  656,  661,  662,  663,  664,  665,  666,  668,  686,
-      699,  704,  708,  710,  712,  714
+      470,  479,  488,  497,  510,  519,  528,  537,  546,  556,
+      655,  660,  665,  670,  671,  672,  673,  674,  675,  677,
+      695,  708,  713,  717,  719,  721,  723
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -1146,7 +1149,7 @@ unsigned int comment_start_line = 0;
 
 /* To avoid the call to exit... oops! */
 #define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
-#line 1149 "d2_lexer.cc"
+#line 1153 "d2_lexer.cc"
 /* noyywrap disables automatic rewinding for the next file to parse. Since we
    always parse only a single string, there's no need to do any wraps. And
    using yywrap requires linking with -lfl, which provides the default yywrap
@@ -1172,8 +1175,8 @@ unsigned int comment_start_line = 0;
    by moving it ahead by yyleng bytes. yyleng specifies the length of the
    currently matched token. */
 #define YY_USER_ACTION  driver.loc_.columns(yyleng);
-#line 1175 "d2_lexer.cc"
-#line 1176 "d2_lexer.cc"
+#line 1179 "d2_lexer.cc"
+#line 1180 "d2_lexer.cc"
 
 #define INITIAL 0
 #define COMMENT 1
@@ -1491,7 +1494,7 @@ YY_DECL
     }
 
 
-#line 1494 "d2_lexer.cc"
+#line 1498 "d2_lexer.cc"
 
        while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
                {
@@ -1520,13 +1523,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 417 )
+                               if ( yy_current_state >= 424 )
                                        yy_c = yy_meta[yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
                        ++yy_cp;
                        }
-               while ( yy_current_state != 416 );
+               while ( yy_current_state != 423 );
                yy_cp = (yy_last_accepting_cpos);
                yy_current_state = (yy_last_accepting_state);
 
@@ -1545,13 +1548,13 @@ do_action:      /* This label is used only to access EOF actions. */
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
-                       else if ( yy_act < 67 )
+                       else if ( yy_act < 68 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
                                         (long)yy_rule_linenum[yy_act], yytext );
-                       else if ( yy_act == 67 )
+                       else if ( yy_act == 68 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
                                         yytext );
-                       else if ( yy_act == 68 )
+                       else if ( yy_act == 69 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
                                fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
@@ -2061,6 +2064,18 @@ YY_RULE_SETUP
 case 43:
 YY_RULE_SETUP
 #line 488 "d2_lexer.ll"
+{
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
+        return isc::d2::D2Parser::make_PATTERN(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("pattern", driver.loc_);
+    }
+}
+       YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 497 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -2074,9 +2089,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 44:
+case 45:
 YY_RULE_SETUP
-#line 501 "d2_lexer.ll"
+#line 510 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -2086,9 +2101,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 45:
+case 46:
 YY_RULE_SETUP
-#line 510 "d2_lexer.ll"
+#line 519 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -2098,9 +2113,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 46:
+case 47:
 YY_RULE_SETUP
-#line 519 "d2_lexer.ll"
+#line 528 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -2110,9 +2125,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 47:
+case 48:
 YY_RULE_SETUP
-#line 528 "d2_lexer.ll"
+#line 537 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -2122,9 +2137,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 48:
+case 49:
 YY_RULE_SETUP
-#line 537 "d2_lexer.ll"
+#line 546 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -2134,9 +2149,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 49:
+case 50:
 YY_RULE_SETUP
-#line 547 "d2_lexer.ll"
+#line 556 "d2_lexer.ll"
 {
     /* A string has been matched. It contains the actual string and single quotes.
        We need to get those quotes out of the way and just use its content, e.g.
@@ -2236,65 +2251,65 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_STRING(decoded, driver.loc_);
 }
        YY_BREAK
-case 50:
-/* rule 50 can match eol */
+case 51:
+/* rule 51 can match eol */
 YY_RULE_SETUP
-#line 646 "d2_lexer.ll"
+#line 655 "d2_lexer.ll"
 {
     /* Bad string with a forbidden control character inside */
     driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
 }
        YY_BREAK
-case 51:
-/* rule 51 can match eol */
+case 52:
+/* rule 52 can match eol */
 YY_RULE_SETUP
-#line 651 "d2_lexer.ll"
+#line 660 "d2_lexer.ll"
 {
     /* Bad string with a bad escape inside */
     driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
 }
        YY_BREAK
-case 52:
+case 53:
 YY_RULE_SETUP
-#line 656 "d2_lexer.ll"
+#line 665 "d2_lexer.ll"
 {
     /* Bad string with an open escape at the end */
     driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
 }
        YY_BREAK
-case 53:
+case 54:
 YY_RULE_SETUP
-#line 661 "d2_lexer.ll"
+#line 670 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
        YY_BREAK
-case 54:
+case 55:
 YY_RULE_SETUP
-#line 662 "d2_lexer.ll"
+#line 671 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
        YY_BREAK
-case 55:
+case 56:
 YY_RULE_SETUP
-#line 663 "d2_lexer.ll"
+#line 672 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
        YY_BREAK
-case 56:
+case 57:
 YY_RULE_SETUP
-#line 664 "d2_lexer.ll"
+#line 673 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
        YY_BREAK
-case 57:
+case 58:
 YY_RULE_SETUP
-#line 665 "d2_lexer.ll"
+#line 674 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_COMMA(driver.loc_); }
        YY_BREAK
-case 58:
+case 59:
 YY_RULE_SETUP
-#line 666 "d2_lexer.ll"
+#line 675 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_COLON(driver.loc_); }
        YY_BREAK
-case 59:
+case 60:
 YY_RULE_SETUP
-#line 668 "d2_lexer.ll"
+#line 677 "d2_lexer.ll"
 {
     /* An integer was found. */
     std::string tmp(yytext);
@@ -2313,9 +2328,9 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
 }
        YY_BREAK
-case 60:
+case 61:
 YY_RULE_SETUP
-#line 686 "d2_lexer.ll"
+#line 695 "d2_lexer.ll"
 {
     /* A floating point was found. */
     std::string tmp(yytext);
@@ -2329,43 +2344,43 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
 }
        YY_BREAK
-case 61:
+case 62:
 YY_RULE_SETUP
-#line 699 "d2_lexer.ll"
+#line 708 "d2_lexer.ll"
 {
     string tmp(yytext);
     return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
 }
        YY_BREAK
-case 62:
+case 63:
 YY_RULE_SETUP
-#line 704 "d2_lexer.ll"
+#line 713 "d2_lexer.ll"
 {
    return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
 }
        YY_BREAK
-case 63:
+case 64:
 YY_RULE_SETUP
-#line 708 "d2_lexer.ll"
+#line 717 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
        YY_BREAK
-case 64:
+case 65:
 YY_RULE_SETUP
-#line 710 "d2_lexer.ll"
+#line 719 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
        YY_BREAK
-case 65:
+case 66:
 YY_RULE_SETUP
-#line 712 "d2_lexer.ll"
+#line 721 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
        YY_BREAK
-case 66:
+case 67:
 YY_RULE_SETUP
-#line 714 "d2_lexer.ll"
+#line 723 "d2_lexer.ll"
 driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 716 "d2_lexer.ll"
+#line 725 "d2_lexer.ll"
 {
     if (driver.states_.empty()) {
         return isc::d2::D2Parser::make_END(driver.loc_);
@@ -2389,12 +2404,12 @@ case YY_STATE_EOF(INITIAL):
     BEGIN(DIR_EXIT);
 }
        YY_BREAK
-case 67:
+case 68:
 YY_RULE_SETUP
-#line 739 "d2_lexer.ll"
+#line 748 "d2_lexer.ll"
 ECHO;
        YY_BREAK
-#line 2397 "d2_lexer.cc"
+#line 2413 "d2_lexer.cc"
 
        case YY_END_OF_BUFFER:
                {
@@ -2713,7 +2728,7 @@ static int yy_get_next_buffer (void)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 417 )
+                       if ( yy_current_state >= 424 )
                                yy_c = yy_meta[yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2746,11 +2761,11 @@ static int yy_get_next_buffer (void)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 417 )
+               if ( yy_current_state >= 424 )
                        yy_c = yy_meta[yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-       yy_is_jam = (yy_current_state == 416);
+       yy_is_jam = (yy_current_state == 423);
 
                return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3499,7 +3514,7 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 739 "d2_lexer.ll"
+#line 748 "d2_lexer.ll"
 
 
 using namespace isc::dhcp;
index 5decb57ead9af2b3a902a46c0b08e17463e26c06..e28d3dce57c1ec7246c4fc4a08438b341586cd19 100644 (file)
@@ -484,6 +484,15 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
     }
 }
 
+\"pattern\" {
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
+        return isc::d2::D2Parser::make_PATTERN(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("pattern", driver.loc_);
+    }
+}
+
 \"name\" {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
index c760d7d4cf60dd0c0581535913e22c5e59f968e9..d225e3943182a7d6f4905fd217ceac4d1a62e101 100644 (file)
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.4.1.
+// A Bison parser, made by GNU Bison 3.2.1.
 
 // Skeleton implementation for Bison LALR(1) parsers in C++
 
-// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
 
 
 // Unqualified %code blocks.
-#line 34 "d2_parser.yy"
+#line 34 "d2_parser.yy" // lalr1.cc:438
 
 #include <d2/parser_context.h>
 
-#line 51 "d2_parser.cc"
+#line 51 "d2_parser.cc" // lalr1.cc:438
 
 
 #ifndef YY_
@@ -88,7 +88,7 @@
         {                                                               \
           (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;      \
         }                                                               \
-    while (false)
+    while (/*CONSTCOND*/ false)
 # endif
 
 
 #define YYERROR         goto yyerrorlab
 #define YYRECOVERING()  (!!yyerrstatus_)
 
-#line 14 "d2_parser.yy"
+#line 14 "d2_parser.yy" // lalr1.cc:513
 namespace isc { namespace d2 {
-#line 146 "d2_parser.cc"
-
+#line 146 "d2_parser.cc" // lalr1.cc:513
 
   /* Return YYSTR after stripping away unnecessary quotes and
      backslashes, so that it's suitable for yyerror.  The heuristic is
@@ -155,7 +154,7 @@ namespace isc { namespace d2 {
   {
     if (*yystr == '"')
       {
-        std::string yyr;
+        std::string yyr = "";
         char const *yyp = yystr;
 
         for (;;)
@@ -168,10 +167,7 @@ namespace isc { namespace d2 {
             case '\\':
               if (*++yyp != '\\')
                 goto do_not_strip_quotes;
-              else
-                goto append;
-
-            append:
+              // Fall through.
             default:
               yyr += *yyp;
               break;
@@ -199,8 +195,6 @@ namespace isc { namespace d2 {
   D2Parser::~D2Parser ()
   {}
 
-  D2Parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
-  {}
 
   /*---------------.
   | Symbol types.  |
@@ -209,16 +203,16 @@ namespace isc { namespace d2 {
 
 
   // by_state.
-  D2Parser::by_state::by_state () YY_NOEXCEPT
+  D2Parser::by_state::by_state ()
     : state (empty_state)
   {}
 
-  D2Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT
-    : state (that.state)
+  D2Parser::by_state::by_state (const by_state& other)
+    : state (other.state)
   {}
 
   void
-  D2Parser::by_state::clear () YY_NOEXCEPT
+  D2Parser::by_state::clear ()
   {
     state = empty_state;
   }
@@ -230,12 +224,12 @@ namespace isc { namespace d2 {
     that.clear ();
   }
 
-  D2Parser::by_state::by_state (state_type s) YY_NOEXCEPT
+  D2Parser::by_state::by_state (state_type s)
     : state (s)
   {}
 
   D2Parser::symbol_number_type
-  D2Parser::by_state::type_get () const YY_NOEXCEPT
+  D2Parser::by_state::type_get () const
   {
     if (state == empty_state)
       return empty_symbol;
@@ -251,25 +245,25 @@ namespace isc { namespace d2 {
   {
     switch (that.type_get ())
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
         value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value));
         break;
 
-      case 59: // "boolean"
+      case 60: // "boolean"
         value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value));
         break;
 
-      case 58: // "floating point"
+      case 59: // "floating point"
         value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value));
         break;
 
-      case 57: // "integer"
+      case 58: // "integer"
         value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value));
         break;
 
-      case 56: // "constant string"
+      case 57: // "constant string"
         value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
         break;
 
@@ -277,7 +271,7 @@ namespace isc { namespace d2 {
         break;
     }
 
-#if 201103L <= YY_CPLUSPLUS
+#if defined __cplusplus && 201103L <= __cplusplus
     // that is emptied.
     that.state = empty_state;
 #endif
@@ -288,25 +282,25 @@ namespace isc { namespace d2 {
   {
     switch (that.type_get ())
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
         value.move< ElementPtr > (YY_MOVE (that.value));
         break;
 
-      case 59: // "boolean"
+      case 60: // "boolean"
         value.move< bool > (YY_MOVE (that.value));
         break;
 
-      case 58: // "floating point"
+      case 59: // "floating point"
         value.move< double > (YY_MOVE (that.value));
         break;
 
-      case 57: // "integer"
+      case 58: // "integer"
         value.move< int64_t > (YY_MOVE (that.value));
         break;
 
-      case 56: // "constant string"
+      case 57: // "constant string"
         value.move< std::string > (YY_MOVE (that.value));
         break;
 
@@ -318,32 +312,32 @@ namespace isc { namespace d2 {
     that.type = empty_symbol;
   }
 
-#if YY_CPLUSPLUS < 201103L
+#if !defined __cplusplus || __cplusplus < 201103L
   D2Parser::stack_symbol_type&
   D2Parser::stack_symbol_type::operator= (stack_symbol_type& that)
   {
     state = that.state;
     switch (that.type_get ())
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
         value.move< ElementPtr > (that.value);
         break;
 
-      case 59: // "boolean"
+      case 60: // "boolean"
         value.move< bool > (that.value);
         break;
 
-      case 58: // "floating point"
+      case 59: // "floating point"
         value.move< double > (that.value);
         break;
 
-      case 57: // "integer"
+      case 58: // "integer"
         value.move< int64_t > (that.value);
         break;
 
-      case 56: // "constant string"
+      case 57: // "constant string"
         value.move< std::string > (that.value);
         break;
 
@@ -375,59 +369,65 @@ namespace isc { namespace d2 {
     std::ostream& yyoutput = yyo;
     YYUSE (yyoutput);
     symbol_number_type yytype = yysym.type_get ();
-#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408
     // Avoid a (spurious) G++ 4.8 warning about "array subscript is
     // below array bounds".
     if (yysym.empty ())
       std::abort ();
-#endif
     yyo << (yytype < yyntokens_ ? "token" : "nterm")
         << ' ' << yytname_[yytype] << " ("
         << yysym.location << ": ";
     switch (yytype)
     {
-      case 56: // "constant string"
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < std::string > (); }
-#line 393 "d2_parser.cc"
+            case 57: // "constant string"
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< std::string > (); }
+#line 386 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 57: // "integer"
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < int64_t > (); }
-#line 399 "d2_parser.cc"
+      case 58: // "integer"
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< int64_t > (); }
+#line 393 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 58: // "floating point"
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < double > (); }
-#line 405 "d2_parser.cc"
+      case 59: // "floating point"
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< double > (); }
+#line 400 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 59: // "boolean"
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < bool > (); }
-#line 411 "d2_parser.cc"
+      case 60: // "boolean"
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< bool > (); }
+#line 407 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 71: // value
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < ElementPtr > (); }
-#line 417 "d2_parser.cc"
+      case 72: // value
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< ElementPtr > (); }
+#line 414 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 75: // map_value
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < ElementPtr > (); }
-#line 423 "d2_parser.cc"
+      case 76: // map_value
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< ElementPtr > (); }
+#line 421 "d2_parser.cc" // lalr1.cc:672
         break;
 
-      case 99: // ncr_protocol_value
-#line 115 "d2_parser.yy"
-        { yyoutput << yysym.value.template as < ElementPtr > (); }
-#line 429 "d2_parser.cc"
+      case 100: // ncr_protocol_value
+
+#line 116 "d2_parser.yy" // lalr1.cc:672
+        { yyoutput << yysym.value.template as< ElementPtr > (); }
+#line 428 "d2_parser.cc" // lalr1.cc:672
         break;
 
+
       default:
         break;
     }
@@ -446,7 +446,7 @@ namespace isc { namespace d2 {
   void
   D2Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
   {
-#if 201103L <= YY_CPLUSPLUS
+#if defined __cplusplus && 201103L <= __cplusplus
     yypush_ (m, stack_symbol_type (s, std::move (sym)));
 #else
     stack_symbol_type ss (s, sym);
@@ -550,22 +550,17 @@ namespace isc { namespace d2 {
     yystack_.clear ();
     yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla));
 
-  /*-----------------------------------------------.
-  | yynewstate -- push a new symbol on the stack.  |
-  `-----------------------------------------------*/
+    // A new symbol was pushed on the stack.
   yynewstate:
     YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
 
     // Accept?
     if (yystack_[0].state == yyfinal_)
-      YYACCEPT;
+      goto yyacceptlab;
 
     goto yybackup;
 
-
-  /*-----------.
-  | yybackup.  |
-  `-----------*/
+    // Backup.
   yybackup:
     // Try to take a decision without lookahead.
     yyn = yypact_[yystack_[0].state];
@@ -586,7 +581,6 @@ namespace isc { namespace d2 {
 #if YY_EXCEPTIONS
         catch (const syntax_error& yyexc)
           {
-            YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
             error (yyexc);
             goto yyerrlab1;
           }
@@ -618,7 +612,6 @@ namespace isc { namespace d2 {
     yypush_ ("Shifting", yyn, YY_MOVE (yyla));
     goto yynewstate;
 
-
   /*-----------------------------------------------------------.
   | yydefault -- do the default action for the current state.  |
   `-----------------------------------------------------------*/
@@ -628,9 +621,8 @@ namespace isc { namespace d2 {
       goto yyerrlab;
     goto yyreduce;
 
-
   /*-----------------------------.
-  | yyreduce -- do a reduction.  |
+  | yyreduce -- Do a reduction.  |
   `-----------------------------*/
   yyreduce:
     yylen = yyr2_[yyn];
@@ -642,25 +634,25 @@ namespace isc { namespace d2 {
          when using variants.  */
       switch (yyr1_[yyn])
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
         yylhs.value.emplace< ElementPtr > ();
         break;
 
-      case 59: // "boolean"
+      case 60: // "boolean"
         yylhs.value.emplace< bool > ();
         break;
 
-      case 58: // "floating point"
+      case 59: // "floating point"
         yylhs.value.emplace< double > ();
         break;
 
-      case 57: // "integer"
+      case 58: // "integer"
         yylhs.value.emplace< int64_t > ();
         break;
 
-      case 56: // "constant string"
+      case 57: // "constant string"
         yylhs.value.emplace< std::string > ();
         break;
 
@@ -671,8 +663,8 @@ namespace isc { namespace d2 {
 
       // Default location.
       {
-        stack_type::slice range (yystack_, yylen);
-        YYLLOC_DEFAULT (yylhs.location, range, yylen);
+        slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
+        YYLLOC_DEFAULT (yylhs.location, slice, yylen);
         yyerror_range[1].location = yylhs.location;
       }
 
@@ -685,364 +677,364 @@ namespace isc { namespace d2 {
           switch (yyn)
             {
   case 2:
-#line 124 "d2_parser.yy"
+#line 125 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.NO_KEYWORD; }
-#line 691 "d2_parser.cc"
+#line 683 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 4:
-#line 125 "d2_parser.yy"
+#line 126 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.CONFIG; }
-#line 697 "d2_parser.cc"
+#line 689 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 6:
-#line 126 "d2_parser.yy"
+#line 127 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.DHCPDDNS; }
-#line 703 "d2_parser.cc"
+#line 695 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 8:
-#line 127 "d2_parser.yy"
+#line 128 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.TSIG_KEY; }
-#line 709 "d2_parser.cc"
+#line 701 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 10:
-#line 128 "d2_parser.yy"
+#line 129 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.TSIG_KEYS; }
-#line 715 "d2_parser.cc"
+#line 707 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 12:
-#line 129 "d2_parser.yy"
+#line 130 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.DDNS_DOMAIN; }
-#line 721 "d2_parser.cc"
+#line 713 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 14:
-#line 130 "d2_parser.yy"
+#line 131 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.DDNS_DOMAINS; }
-#line 727 "d2_parser.cc"
+#line 719 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 16:
-#line 131 "d2_parser.yy"
+#line 132 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.DNS_SERVERS; }
-#line 733 "d2_parser.cc"
+#line 725 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 18:
-#line 132 "d2_parser.yy"
+#line 133 "d2_parser.yy" // lalr1.cc:907
     { ctx.ctx_ = ctx.DNS_SERVERS; }
-#line 739 "d2_parser.cc"
+#line 731 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 20:
-#line 140 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); }
-#line 745 "d2_parser.cc"
+#line 141 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
+#line 737 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 21:
-#line 141 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); }
-#line 751 "d2_parser.cc"
+#line 142 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
+#line 743 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 22:
-#line 142 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); }
-#line 757 "d2_parser.cc"
+#line 143 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
+#line 749 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 23:
-#line 143 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
-#line 763 "d2_parser.cc"
+#line 144 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
+#line 755 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 24:
-#line 144 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
-#line 769 "d2_parser.cc"
+#line 145 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
+#line 761 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 25:
-#line 145 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 775 "d2_parser.cc"
+#line 146 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 767 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 26:
-#line 146 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 781 "d2_parser.cc"
+#line 147 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 773 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 27:
-#line 149 "d2_parser.yy"
+#line 150 "d2_parser.yy" // lalr1.cc:907
     {
     // Push back the JSON value on the stack
-    ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ());
+    ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
 }
-#line 790 "d2_parser.cc"
+#line 782 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 28:
-#line 154 "d2_parser.yy"
+#line 155 "d2_parser.yy" // lalr1.cc:907
     {
     // 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);
 }
-#line 801 "d2_parser.cc"
+#line 793 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 29:
-#line 159 "d2_parser.yy"
+#line 160 "d2_parser.yy" // lalr1.cc:907
     {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
 }
-#line 811 "d2_parser.cc"
+#line 803 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 30:
-#line 165 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 817 "d2_parser.cc"
+#line 166 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 809 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 33:
-#line 172 "d2_parser.yy"
+#line 173 "d2_parser.yy" // lalr1.cc:907
     {
                   // map containing a single entry
-                  ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
+                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                   }
-#line 826 "d2_parser.cc"
+#line 818 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 34:
-#line 176 "d2_parser.yy"
+#line 177 "d2_parser.yy" // lalr1.cc:907
     {
                   // 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 > ());
+                  ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
                   }
-#line 836 "d2_parser.cc"
+#line 828 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 35:
-#line 183 "d2_parser.yy"
+#line 184 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
 }
-#line 845 "d2_parser.cc"
+#line 837 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 36:
-#line 186 "d2_parser.yy"
+#line 187 "d2_parser.yy" // lalr1.cc:907
     {
     // list parsing complete. Put any sanity checking here
 }
-#line 853 "d2_parser.cc"
+#line 845 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 39:
-#line 194 "d2_parser.yy"
+#line 195 "d2_parser.yy" // lalr1.cc:907
     {
                   // List consisting of a single element.
-                  ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
+                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                   }
-#line 862 "d2_parser.cc"
+#line 854 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 40:
-#line 198 "d2_parser.yy"
+#line 199 "d2_parser.yy" // lalr1.cc:907
     {
                   // List ending with , and a value.
-                  ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
+                  ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
                   }
-#line 871 "d2_parser.cc"
+#line 863 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 41:
-#line 209 "d2_parser.yy"
+#line 210 "d2_parser.yy" // lalr1.cc:907
     {
     const std::string& where = ctx.contextName();
-    const std::string& keyword = yystack_[1].value.as < std::string > ();
+    const std::string& keyword = yystack_[1].value.as< std::string > ();
     error(yystack_[1].location,
           "got unexpected keyword \"" + keyword + "\" in " + where + " map.");
 }
-#line 882 "d2_parser.cc"
+#line 874 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 42:
-#line 219 "d2_parser.yy"
+#line 220 "d2_parser.yy" // lalr1.cc:907
     {
     // 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);
 }
-#line 893 "d2_parser.cc"
+#line 885 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 43:
-#line 224 "d2_parser.yy"
+#line 225 "d2_parser.yy" // lalr1.cc:907
     {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
 }
-#line 903 "d2_parser.cc"
+#line 895 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 52:
-#line 246 "d2_parser.yy"
+#line 247 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("DhcpDdns", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.DHCPDDNS);
 }
-#line 914 "d2_parser.cc"
+#line 906 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 53:
-#line 251 "d2_parser.yy"
+#line 252 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 923 "d2_parser.cc"
+#line 915 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 54:
-#line 256 "d2_parser.yy"
+#line 257 "d2_parser.yy" // lalr1.cc:907
     {
     // Parse the dhcpddns map
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(m);
 }
-#line 933 "d2_parser.cc"
+#line 925 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 55:
-#line 260 "d2_parser.yy"
+#line 261 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 941 "d2_parser.cc"
+#line 933 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 71:
-#line 284 "d2_parser.yy"
+#line 285 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 949 "d2_parser.cc"
+#line 941 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 72:
-#line 286 "d2_parser.yy"
+#line 287 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ip-address", s);
     ctx.leave();
 }
-#line 959 "d2_parser.cc"
+#line 951 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 73:
-#line 292 "d2_parser.yy"
+#line 293 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
+    if (yystack_[0].value.as< int64_t > () <= 0 || yystack_[0].value.as< int64_t > () >= 65536 ) {
         error(yystack_[0].location, "port must be greater than zero but less than 65536");
     }
-    ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("port", i);
 }
-#line 971 "d2_parser.cc"
+#line 963 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 74:
-#line 300 "d2_parser.yy"
+#line 301 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < int64_t > () <= 0) {
+    if (yystack_[0].value.as< int64_t > () <= 0) {
         error(yystack_[0].location, "dns-server-timeout must be greater than zero");
     } else {
-        ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+        ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
         ctx.stack_.back()->set("dns-server-timeout", i);
     }
 }
-#line 984 "d2_parser.cc"
+#line 976 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 75:
-#line 309 "d2_parser.yy"
+#line 310 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NCR_PROTOCOL);
 }
-#line 992 "d2_parser.cc"
+#line 984 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 76:
-#line 311 "d2_parser.yy"
+#line 312 "d2_parser.yy" // lalr1.cc:907
     {
-    ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ());
+    ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 1001 "d2_parser.cc"
+#line 993 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 77:
-#line 317 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); }
-#line 1007 "d2_parser.cc"
+#line 318 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); }
+#line 999 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 78:
-#line 318 "d2_parser.yy"
-    { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); }
-#line 1013 "d2_parser.cc"
+#line 319 "d2_parser.yy" // lalr1.cc:907
+    { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); }
+#line 1005 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 79:
-#line 321 "d2_parser.yy"
+#line 322 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NCR_FORMAT);
 }
-#line 1021 "d2_parser.cc"
+#line 1013 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 80:
-#line 323 "d2_parser.yy"
+#line 324 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ncr-format", json);
     ctx.leave();
 }
-#line 1031 "d2_parser.cc"
+#line 1023 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 81:
-#line 329 "d2_parser.yy"
+#line 330 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1039 "d2_parser.cc"
+#line 1031 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 82:
-#line 331 "d2_parser.yy"
+#line 332 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr parent = ctx.stack_.back();
-    ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
+    ElementPtr user_context = yystack_[0].value.as< ElementPtr > ();
     ConstElementPtr old = parent->get("user-context");
 
     // Handle already existing user context
@@ -1062,23 +1054,23 @@ namespace isc { namespace d2 {
     parent->set("user-context", user_context);
     ctx.leave();
 }
-#line 1066 "d2_parser.cc"
+#line 1058 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 83:
-#line 354 "d2_parser.yy"
+#line 355 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1074 "d2_parser.cc"
+#line 1066 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 84:
-#line 356 "d2_parser.yy"
+#line 357 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr parent = ctx.stack_.back();
     ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
-    ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     user_context->set("comment", comment);
 
     // Handle already existing user context
@@ -1099,731 +1091,748 @@ namespace isc { namespace d2 {
     parent->set("user-context", user_context);
     ctx.leave();
 }
-#line 1103 "d2_parser.cc"
+#line 1095 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 85:
-#line 381 "d2_parser.yy"
+#line 382 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("forward-ddns", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.FORWARD_DDNS);
 }
-#line 1114 "d2_parser.cc"
+#line 1106 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 86:
-#line 386 "d2_parser.yy"
+#line 387 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1123 "d2_parser.cc"
+#line 1115 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 87:
-#line 391 "d2_parser.yy"
+#line 392 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("reverse-ddns", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.REVERSE_DDNS);
 }
-#line 1134 "d2_parser.cc"
+#line 1126 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 88:
-#line 396 "d2_parser.yy"
+#line 397 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1143 "d2_parser.cc"
+#line 1135 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 95:
-#line 415 "d2_parser.yy"
+#line 416 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ddns-domains", l);
     ctx.stack_.push_back(l);
     ctx.enter(ctx.DDNS_DOMAINS);
 }
-#line 1154 "d2_parser.cc"
+#line 1146 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 96:
-#line 420 "d2_parser.yy"
+#line 421 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1163 "d2_parser.cc"
+#line 1155 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 97:
-#line 425 "d2_parser.yy"
+#line 426 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
 }
-#line 1172 "d2_parser.cc"
+#line 1164 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 98:
-#line 428 "d2_parser.yy"
+#line 429 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1180 "d2_parser.cc"
+#line 1172 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 103:
-#line 440 "d2_parser.yy"
+#line 441 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
     ctx.stack_.push_back(m);
 }
-#line 1190 "d2_parser.cc"
+#line 1182 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 104:
-#line 444 "d2_parser.yy"
+#line 445 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
 }
-#line 1198 "d2_parser.cc"
+#line 1190 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 105:
-#line 448 "d2_parser.yy"
+#line 449 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(m);
 }
-#line 1207 "d2_parser.cc"
+#line 1199 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 106:
-#line 451 "d2_parser.yy"
+#line 452 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1215 "d2_parser.cc"
+#line 1207 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 115:
-#line 468 "d2_parser.yy"
+#line 469 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1223 "d2_parser.cc"
+#line 1215 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 116:
-#line 470 "d2_parser.yy"
+#line 471 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < std::string > () == "") {
+    if (yystack_[0].value.as< std::string > () == "") {
         error(yystack_[1].location, "Ddns domain name cannot be blank");
     }
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("name", name);
     ctx.leave();
 }
-#line 1237 "d2_parser.cc"
+#line 1229 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 117:
-#line 480 "d2_parser.yy"
+#line 481 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1245 "d2_parser.cc"
+#line 1237 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 118:
-#line 482 "d2_parser.yy"
+#line 483 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("key-name", name);
     ctx.leave();
 }
-#line 1256 "d2_parser.cc"
+#line 1248 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 119:
-#line 492 "d2_parser.yy"
+#line 493 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("dns-servers", l);
     ctx.stack_.push_back(l);
     ctx.enter(ctx.DNS_SERVERS);
 }
-#line 1267 "d2_parser.cc"
+#line 1259 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 120:
-#line 497 "d2_parser.yy"
+#line 498 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1276 "d2_parser.cc"
+#line 1268 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 121:
-#line 502 "d2_parser.yy"
+#line 503 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
 }
-#line 1285 "d2_parser.cc"
+#line 1277 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 122:
-#line 505 "d2_parser.yy"
+#line 506 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1293 "d2_parser.cc"
+#line 1285 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 125:
-#line 513 "d2_parser.yy"
+#line 514 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
     ctx.stack_.push_back(m);
 }
-#line 1303 "d2_parser.cc"
+#line 1295 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 126:
-#line 517 "d2_parser.yy"
+#line 518 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
 }
-#line 1311 "d2_parser.cc"
+#line 1303 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 127:
-#line 521 "d2_parser.yy"
+#line 522 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(m);
 }
-#line 1320 "d2_parser.cc"
+#line 1312 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 128:
-#line 524 "d2_parser.yy"
+#line 525 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1328 "d2_parser.cc"
+#line 1320 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 137:
-#line 540 "d2_parser.yy"
+#line 541 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1336 "d2_parser.cc"
+#line 1328 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 138:
-#line 542 "d2_parser.yy"
+#line 543 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < std::string > () != "") {
+    if (yystack_[0].value.as< std::string > () != "") {
         error(yystack_[1].location, "hostname is not yet supported");
     }
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("hostname", name);
     ctx.leave();
 }
-#line 1350 "d2_parser.cc"
+#line 1342 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 139:
-#line 552 "d2_parser.yy"
+#line 553 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1358 "d2_parser.cc"
+#line 1350 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 140:
-#line 554 "d2_parser.yy"
+#line 555 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ip-address", s);
     ctx.leave();
 }
-#line 1368 "d2_parser.cc"
+#line 1360 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 141:
-#line 560 "d2_parser.yy"
+#line 561 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
+    if (yystack_[0].value.as< int64_t > () <= 0 || yystack_[0].value.as< int64_t > () >= 65536 ) {
         error(yystack_[0].location, "port must be greater than zero but less than 65536");
     }
-    ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("port", i);
 }
-#line 1380 "d2_parser.cc"
+#line 1372 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 142:
-#line 574 "d2_parser.yy"
+#line 575 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("tsig-keys", l);
     ctx.stack_.push_back(l);
     ctx.enter(ctx.TSIG_KEYS);
 }
-#line 1391 "d2_parser.cc"
+#line 1383 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 143:
-#line 579 "d2_parser.yy"
+#line 580 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1400 "d2_parser.cc"
+#line 1392 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 144:
-#line 584 "d2_parser.yy"
+#line 585 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
 }
-#line 1409 "d2_parser.cc"
+#line 1401 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 145:
-#line 587 "d2_parser.yy"
+#line 588 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1417 "d2_parser.cc"
+#line 1409 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 150:
-#line 599 "d2_parser.yy"
+#line 600 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
     ctx.stack_.push_back(m);
 }
-#line 1427 "d2_parser.cc"
+#line 1419 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 151:
-#line 603 "d2_parser.yy"
+#line 604 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
 }
-#line 1435 "d2_parser.cc"
+#line 1427 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 152:
-#line 607 "d2_parser.yy"
+#line 608 "d2_parser.yy" // lalr1.cc:907
     {
     // Parse tsig key list entry map
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(m);
 }
-#line 1445 "d2_parser.cc"
+#line 1437 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 153:
-#line 611 "d2_parser.yy"
+#line 612 "d2_parser.yy" // lalr1.cc:907
     {
     // parsing completed
 }
-#line 1453 "d2_parser.cc"
+#line 1445 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 163:
-#line 629 "d2_parser.yy"
+#line 630 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1461 "d2_parser.cc"
+#line 1453 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 164:
-#line 631 "d2_parser.yy"
+#line 632 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < std::string > () == "") {
+    if (yystack_[0].value.as< std::string > () == "") {
         error(yystack_[1].location, "TSIG key name cannot be blank");
     }
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("name", name);
     ctx.leave();
 }
-#line 1475 "d2_parser.cc"
+#line 1467 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 165:
-#line 641 "d2_parser.yy"
+#line 642 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1483 "d2_parser.cc"
+#line 1475 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 166:
-#line 643 "d2_parser.yy"
+#line 644 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < std::string > () == "") {
+    if (yystack_[0].value.as< std::string > () == "") {
         error(yystack_[1].location, "TSIG key algorithm cannot be blank");
     }
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("algorithm", elem);
     ctx.leave();
 }
-#line 1496 "d2_parser.cc"
+#line 1488 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 167:
-#line 652 "d2_parser.yy"
+#line 653 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0  && (yystack_[0].value.as < int64_t > () % 8 != 0))) {
+    if (yystack_[0].value.as< int64_t > () < 0 || (yystack_[0].value.as< int64_t > () > 0  && (yystack_[0].value.as< int64_t > () % 8 != 0))) {
         error(yystack_[0].location, "TSIG key digest-bits must either be zero or a positive, multiple of eight");
     }
-    ElementPtr elem(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("digest-bits", elem);
 }
-#line 1508 "d2_parser.cc"
+#line 1500 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 168:
-#line 660 "d2_parser.yy"
+#line 661 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1516 "d2_parser.cc"
+#line 1508 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 169:
-#line 662 "d2_parser.yy"
+#line 663 "d2_parser.yy" // lalr1.cc:907
     {
-    if (yystack_[0].value.as < std::string > () == "") {
+    if (yystack_[0].value.as< std::string > () == "") {
         error(yystack_[1].location, "TSIG key secret cannot be blank");
     }
-    ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("secret", elem);
     ctx.leave();
 }
-#line 1529 "d2_parser.cc"
+#line 1521 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 170:
-#line 676 "d2_parser.yy"
+#line 677 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("control-socket", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.CONTROL_SOCKET);
 }
-#line 1540 "d2_parser.cc"
+#line 1532 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 171:
-#line 681 "d2_parser.yy"
+#line 682 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1549 "d2_parser.cc"
+#line 1541 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 179:
-#line 697 "d2_parser.yy"
+#line 698 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1557 "d2_parser.cc"
+#line 1549 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 180:
-#line 699 "d2_parser.yy"
+#line 700 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr stype(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("socket-type", stype);
     ctx.leave();
 }
-#line 1567 "d2_parser.cc"
+#line 1559 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 181:
-#line 705 "d2_parser.yy"
+#line 706 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1575 "d2_parser.cc"
+#line 1567 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 182:
-#line 707 "d2_parser.yy"
+#line 708 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("socket-name", name);
     ctx.leave();
 }
-#line 1585 "d2_parser.cc"
+#line 1577 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 183:
-#line 715 "d2_parser.yy"
+#line 716 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1593 "d2_parser.cc"
+#line 1585 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 184:
-#line 717 "d2_parser.yy"
+#line 718 "d2_parser.yy" // lalr1.cc:907
     {
-    ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ());
+    ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 1602 "d2_parser.cc"
+#line 1594 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 185:
-#line 722 "d2_parser.yy"
+#line 723 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1610 "d2_parser.cc"
+#line 1602 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 186:
-#line 724 "d2_parser.yy"
+#line 725 "d2_parser.yy" // lalr1.cc:907
     {
-    ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ());
+    ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 1619 "d2_parser.cc"
+#line 1611 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 187:
-#line 729 "d2_parser.yy"
+#line 730 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1627 "d2_parser.cc"
+#line 1619 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 188:
-#line 731 "d2_parser.yy"
+#line 732 "d2_parser.yy" // lalr1.cc:907
     {
-    ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ());
+    ctx.stack_.back()->set("Control-agent", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 1636 "d2_parser.cc"
+#line 1628 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 189:
-#line 741 "d2_parser.yy"
+#line 742 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("Logging", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.LOGGING);
 }
-#line 1647 "d2_parser.cc"
+#line 1639 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 190:
-#line 746 "d2_parser.yy"
+#line 747 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1656 "d2_parser.cc"
+#line 1648 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 194:
-#line 763 "d2_parser.yy"
+#line 764 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("loggers", l);
     ctx.stack_.push_back(l);
     ctx.enter(ctx.LOGGERS);
 }
-#line 1667 "d2_parser.cc"
+#line 1659 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 195:
-#line 768 "d2_parser.yy"
+#line 769 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1676 "d2_parser.cc"
+#line 1668 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 198:
-#line 780 "d2_parser.yy"
+#line 781 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(l);
     ctx.stack_.push_back(l);
 }
-#line 1686 "d2_parser.cc"
+#line 1678 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 199:
-#line 784 "d2_parser.yy"
+#line 785 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
 }
-#line 1694 "d2_parser.cc"
+#line 1686 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 209:
-#line 801 "d2_parser.yy"
+#line 802 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1702 "d2_parser.cc"
+#line 1694 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 210:
-#line 803 "d2_parser.yy"
+#line 804 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("name", name);
     ctx.leave();
 }
-#line 1712 "d2_parser.cc"
+#line 1704 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 211:
-#line 809 "d2_parser.yy"
+#line 810 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("debuglevel", dl);
 }
-#line 1721 "d2_parser.cc"
+#line 1713 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 212:
-#line 813 "d2_parser.yy"
+#line 814 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1729 "d2_parser.cc"
+#line 1721 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 213:
-#line 815 "d2_parser.yy"
+#line 816 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("severity", sev);
     ctx.leave();
 }
-#line 1739 "d2_parser.cc"
+#line 1731 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 214:
-#line 821 "d2_parser.yy"
+#line 822 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("output_options", l);
     ctx.stack_.push_back(l);
     ctx.enter(ctx.OUTPUT_OPTIONS);
 }
-#line 1750 "d2_parser.cc"
+#line 1742 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 215:
-#line 826 "d2_parser.yy"
+#line 827 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1759 "d2_parser.cc"
+#line 1751 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 218:
-#line 835 "d2_parser.yy"
+#line 836 "d2_parser.yy" // lalr1.cc:907
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
     ctx.stack_.push_back(m);
 }
-#line 1769 "d2_parser.cc"
+#line 1761 "d2_parser.cc" // lalr1.cc:907
     break;
 
   case 219:
-#line 839 "d2_parser.yy"
+#line 840 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.stack_.pop_back();
 }
-#line 1777 "d2_parser.cc"
+#line 1769 "d2_parser.cc" // lalr1.cc:907
     break;
 
-  case 226:
-#line 853 "d2_parser.yy"
+  case 227:
+#line 855 "d2_parser.yy" // lalr1.cc:907
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1785 "d2_parser.cc"
+#line 1777 "d2_parser.cc" // lalr1.cc:907
     break;
 
-  case 227:
-#line 855 "d2_parser.yy"
+  case 228:
+#line 857 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("output", sev);
     ctx.leave();
 }
-#line 1795 "d2_parser.cc"
+#line 1787 "d2_parser.cc" // lalr1.cc:907
     break;
 
-  case 228:
-#line 861 "d2_parser.yy"
+  case 229:
+#line 863 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("flush", flush);
 }
-#line 1804 "d2_parser.cc"
+#line 1796 "d2_parser.cc" // lalr1.cc:907
     break;
 
-  case 229:
-#line 866 "d2_parser.yy"
+  case 230:
+#line 868 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("maxsize", maxsize);
 }
-#line 1813 "d2_parser.cc"
+#line 1805 "d2_parser.cc" // lalr1.cc:907
     break;
 
-  case 230:
-#line 871 "d2_parser.yy"
+  case 231:
+#line 873 "d2_parser.yy" // lalr1.cc:907
     {
-    ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
+    ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("maxver", maxver);
 }
-#line 1822 "d2_parser.cc"
+#line 1814 "d2_parser.cc" // lalr1.cc:907
+    break;
+
+  case 232:
+#line 878 "d2_parser.yy" // lalr1.cc:907
+    {
+    ctx.enter(ctx.NO_KEYWORD);
+}
+#line 1822 "d2_parser.cc" // lalr1.cc:907
     break;
 
+  case 233:
+#line 880 "d2_parser.yy" // lalr1.cc:907
+    {
+    ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ctx.stack_.back()->set("pattern", sev);
+    ctx.leave();
+}
+#line 1832 "d2_parser.cc" // lalr1.cc:907
+    break;
 
-#line 1826 "d2_parser.cc"
 
+#line 1836 "d2_parser.cc" // lalr1.cc:907
             default:
               break;
             }
@@ -1831,7 +1840,6 @@ namespace isc { namespace d2 {
 #if YY_EXCEPTIONS
       catch (const syntax_error& yyexc)
         {
-          YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
           error (yyexc);
           YYERROR;
         }
@@ -1846,7 +1854,6 @@ namespace isc { namespace d2 {
     }
     goto yynewstate;
 
-
   /*--------------------------------------.
   | yyerrlab -- here on detecting error.  |
   `--------------------------------------*/
@@ -1883,18 +1890,18 @@ namespace isc { namespace d2 {
   | yyerrorlab -- error raised explicitly by YYERROR.  |
   `---------------------------------------------------*/
   yyerrorlab:
-    /* Pacify compilers when the user code never invokes YYERROR and
-       the label yyerrorlab therefore never appears in user code.  */
-    if (false)
-      YYERROR;
 
+    /* Pacify compilers like GCC when the user code never invokes
+       YYERROR and the label yyerrorlab therefore never appears in user
+       code.  */
+    if (false)
+      goto yyerrorlab;
     /* Do not reclaim the symbols of the rule whose action triggered
        this YYERROR.  */
     yypop_ (yylen);
     yylen = 0;
     goto yyerrlab1;
 
-
   /*-------------------------------------------------------------.
   | yyerrlab1 -- common code for both syntax error and YYERROR.  |
   `-------------------------------------------------------------*/
@@ -1935,26 +1942,16 @@ namespace isc { namespace d2 {
     }
     goto yynewstate;
 
-
-  /*-------------------------------------.
-  | yyacceptlab -- YYACCEPT comes here.  |
-  `-------------------------------------*/
+    // Accept.
   yyacceptlab:
     yyresult = 0;
     goto yyreturn;
 
-
-  /*-----------------------------------.
-  | yyabortlab -- YYABORT comes here.  |
-  `-----------------------------------*/
+    // Abort.
   yyabortlab:
     yyresult = 1;
     goto yyreturn;
 
-
-  /*-----------------------------------------------------.
-  | yyreturn -- parsing is finished, return the result.  |
-  `-----------------------------------------------------*/
   yyreturn:
     if (!yyla.empty ())
       yy_destroy_ ("Cleanup: discarding lookahead", yyla);
@@ -2101,44 +2098,44 @@ namespace isc { namespace d2 {
   D2Parser::yypact_[] =
   {
       69,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-      16,     2,     7,    24,    34,    52,    38,    77,    48,   108,
+      14,     2,     1,    23,    37,    11,    39,    43,    47,    51,
     -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
     -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,     2,    71,
-       9,    10,    40,   121,    53,   128,    14,   129,  -238,   131,
-     135,   140,   138,   151,  -238,  -238,  -238,  -238,  -238,   160,
-    -238,    15,  -238,  -238,  -238,  -238,  -238,  -238,  -238,   161,
-     162,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,    46,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,  -238,  -238,  -238,  -238,  -238,   167,  -238,  -238,  -238,
-    -238,  -238,    66,  -238,  -238,  -238,  -238,  -238,  -238,   150,
-     169,  -238,  -238,  -238,  -238,  -238,  -238,  -238,    86,  -238,
-    -238,  -238,  -238,  -238,   168,   170,  -238,  -238,   171,  -238,
-    -238,  -238,  -238,    90,  -238,  -238,  -238,  -238,  -238,    36,
-    -238,  -238,     2,     2,  -238,   120,   173,   174,   175,   176,
-     177,  -238,     9,  -238,   178,   126,   127,   181,   182,   183,
-     184,   185,   186,   187,   188,   189,    10,  -238,   190,   139,
-     191,   193,    40,  -238,    40,  -238,   121,   194,   195,   196,
-      53,  -238,    53,  -238,   128,   197,   145,   199,    14,  -238,
-      14,   129,  -238,  -238,  -238,   200,     2,     2,     2,   198,
-     205,  -238,   157,  -238,  -238,    88,   202,   207,   163,   208,
-     209,   212,   211,   215,  -238,   165,  -238,   172,   179,  -238,
-      92,  -238,   180,   219,   192,  -238,    94,  -238,   201,  -238,
-     210,  -238,    96,  -238,     2,  -238,  -238,  -238,    10,   203,
-    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,   -18,   -18,
-     121,    55,   218,  -238,  -238,  -238,  -238,  -238,   129,  -238,
-    -238,  -238,  -238,  -238,  -238,   100,   102,  -238,  -238,  -238,
-    -238,   122,  -238,  -238,  -238,   149,   220,  -238,  -238,  -238,
-    -238,  -238,   152,  -238,  -238,  -238,  -238,    50,  -238,    80,
-    -238,   203,  -238,   223,   -18,  -238,  -238,  -238,   225,   226,
-      55,  -238,    45,   218,  -238,  -238,  -238,   227,  -238,   213,
-     214,  -238,  -238,  -238,   229,  -238,  -238,  -238,  -238,   155,
-    -238,  -238,  -238,  -238,  -238,  -238,   128,  -238,  -238,   230,
-     233,   206,   234,    45,  -238,   236,   216,   235,  -238,   221,
-    -238,  -238,  -238,   224,  -238,  -238,   123,  -238,     6,   224,
-    -238,  -238,   239,   240,   241,   159,  -238,  -238,  -238,  -238,
-    -238,  -238,   242,   148,   217,   222,     6,  -238,   228,  -238,
-    -238,  -238,  -238,  -238
+    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,     2,    22,
+       8,     9,    18,    85,    50,   104,    13,   120,  -238,    84,
+     125,   132,   129,   135,  -238,  -238,  -238,  -238,  -238,   140,
+    -238,    55,  -238,  -238,  -238,  -238,  -238,  -238,  -238,   142,
+     150,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
+    -238,    66,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
+    -238,  -238,  -238,  -238,  -238,  -238,   160,  -238,  -238,  -238,
+    -238,  -238,    68,  -238,  -238,  -238,  -238,  -238,  -238,   167,
+     153,  -238,  -238,  -238,  -238,  -238,  -238,  -238,    83,  -238,
+    -238,  -238,  -238,  -238,   168,   162,  -238,  -238,   171,  -238,
+    -238,  -238,  -238,    97,  -238,  -238,  -238,  -238,  -238,    49,
+    -238,  -238,     2,     2,  -238,   119,   174,   175,   176,   177,
+     178,  -238,     8,  -238,   179,   126,   128,   181,   183,   184,
+     185,   186,   187,   188,   189,   190,     9,  -238,   191,   138,
+     193,   194,    18,  -238,    18,  -238,    85,   195,   196,   197,
+      50,  -238,    50,  -238,   104,   198,   145,   200,    13,  -238,
+      13,   120,  -238,  -238,  -238,   201,     2,     2,     2,   205,
+     206,  -238,   157,  -238,  -238,    19,   199,   208,   161,   209,
+     210,   202,   212,   216,  -238,   166,  -238,   170,   172,  -238,
+      98,  -238,   173,   219,   180,  -238,   100,  -238,   182,  -238,
+     192,  -238,   101,  -238,     2,  -238,  -238,  -238,     9,   203,
+    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,    -4,    -4,
+      85,    59,   218,  -238,  -238,  -238,  -238,  -238,   120,  -238,
+    -238,  -238,  -238,  -238,  -238,   127,   149,  -238,  -238,  -238,
+    -238,   152,  -238,  -238,  -238,   155,   220,  -238,  -238,  -238,
+    -238,  -238,   159,  -238,  -238,  -238,  -238,    77,  -238,   107,
+    -238,   203,  -238,   224,    -4,  -238,  -238,  -238,   227,   228,
+      59,  -238,    45,   218,  -238,  -238,  -238,   229,  -238,   207,
+     211,  -238,  -238,  -238,   231,  -238,  -238,  -238,  -238,   163,
+    -238,  -238,  -238,  -238,  -238,  -238,   104,  -238,  -238,   232,
+     234,   214,   236,    45,  -238,   237,   213,   239,  -238,   217,
+    -238,  -238,  -238,   226,  -238,  -238,   123,  -238,    52,   226,
+    -238,  -238,   238,   241,   242,  -238,   169,  -238,  -238,  -238,
+    -238,  -238,  -238,  -238,   243,   215,   221,   222,   244,    52,
+    -238,   225,  -238,  -238,  -238,   230,  -238,  -238,  -238
   };
 
   const unsigned char
@@ -2180,29 +2177,29 @@ namespace isc { namespace d2 {
      200,   202,   204,   205,   203,   197,    99,   180,   182,     0,
        0,     0,     0,     0,   199,     0,     0,     0,   211,     0,
      201,    96,   210,     0,   213,   218,     0,   216,     0,     0,
-     215,   226,     0,     0,     0,     0,   220,   222,   223,   224,
-     225,   217,     0,     0,     0,     0,     0,   219,     0,   228,
-     229,   230,   221,   227
+     215,   227,     0,     0,     0,   232,     0,   220,   222,   223,
+     224,   225,   226,   217,     0,     0,     0,     0,     0,     0,
+     219,     0,   229,   230,   231,     0,   221,   228,   233
   };
 
   const short
   D2Parser::yypgoto_[] =
   {
     -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,   -38,  -238,    22,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,  -238,   -50,  -238,  -238,  -238,    85,  -238,  -238,  -238,
-    -238,     1,    74,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
+    -238,   -38,  -238,    33,  -238,  -238,  -238,  -238,  -238,  -238,
+    -238,  -238,   -50,  -238,  -238,  -238,    89,  -238,  -238,  -238,
+    -238,     4,    79,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
     -238,  -238,   -51,  -238,   -39,  -238,  -238,  -238,  -238,  -238,
-      -8,  -238,   -52,  -238,  -238,  -238,  -238,   -83,  -238,    61,
-    -238,  -238,  -238,    64,    68,  -238,  -238,  -238,  -238,  -238,
-    -238,  -238,  -238,    -4,    67,  -238,  -238,  -238,    65,    78,
-    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,    18,
-    -238,    81,  -238,  -238,  -238,    91,    98,  -238,  -238,  -238,
-    -238,  -238,  -238,  -238,  -238,  -238,  -238,   -29,  -238,  -238,
+      -6,  -238,   -48,  -238,  -238,  -238,  -238,   -79,  -238,    64,
+    -238,  -238,  -238,    71,    75,  -238,  -238,  -238,  -238,  -238,
+    -238,  -238,  -238,    -2,    76,  -238,  -238,  -238,    67,    78,
+    -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,    21,
+    -238,    92,  -238,  -238,  -238,    99,    87,  -238,  -238,  -238,
+    -238,  -238,  -238,  -238,  -238,  -238,  -238,   -26,  -238,  -238,
     -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,  -238,
-    -238,   -19,  -237,  -238,  -238,   -30,  -238,  -238,   -58,  -238,
-    -238,  -238,  -238,  -238,  -238,  -238,  -238,   -73,  -238,  -238,
-     -89,  -238,  -238,  -238,  -238,  -238
+    -238,   -16,  -237,  -238,  -238,   -27,  -238,  -238,   -55,  -238,
+    -238,  -238,  -238,  -238,  -238,  -238,  -238,   -70,  -238,  -238,
+     -89,  -238,  -238,  -238,  -238,  -238,  -238,  -238
   };
 
   const short
@@ -2221,153 +2218,153 @@ namespace isc { namespace d2 {
      178,   116,   117,   180,   103,   174,   292,   293,   294,   308,
      295,   309,    74,   156,    75,   157,    76,   158,    77,   160,
      276,   277,   104,   175,   297,   298,   312,   329,   330,   331,
-     339,   332,   333,   342,   334,   340,   356,   357,   358,   365,
-     366,   367,   372,   368,   369,   370
+     339,   332,   333,   342,   334,   340,   356,   357,   358,   366,
+     367,   368,   374,   369,   370,   371,   372,   378
   };
 
   const unsigned short
   D2Parser::yytable_[] =
   {
-      70,   110,   109,   126,   125,   141,   140,    21,   279,    22,
-      58,    23,   278,   111,    32,   127,    20,   142,   162,    64,
-      65,    66,    67,   163,    78,    79,    80,    81,   137,   138,
-      82,    34,    83,    84,    85,    86,    83,    84,    69,   201,
-      87,    36,   202,   139,    88,    40,    68,   361,    89,   176,
-     362,   363,   364,   313,   177,    44,   314,    38,    24,    25,
-      26,    27,    83,    84,   278,    69,    69,    83,    84,   182,
-      69,   105,   106,   107,   183,    83,    84,    83,    84,   108,
-     122,   123,    42,   201,   322,   323,   315,   324,   325,   190,
-     287,   288,   124,   198,   191,   182,    69,   190,   199,   198,
-     266,    69,   270,   176,   273,   301,   251,   252,   300,    69,
-     302,    69,    70,    46,   203,   204,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,   304,   359,    61,   118,   360,
-     305,   110,   109,   110,   109,   133,   148,   151,   152,   126,
-     125,   126,   125,   111,   153,   111,   154,   141,   140,   141,
-     140,   127,   304,   127,   155,   310,   185,   306,   343,   142,
-     311,   142,   376,   344,   161,   165,   166,   377,   245,   246,
-     247,   179,   186,   194,   193,   196,   205,   206,   207,   208,
-     209,   210,   212,   213,   214,   215,   216,   217,   218,   219,
-     220,   221,   222,   223,   225,   227,   226,   228,   232,   233,
-     234,   238,   239,   240,   244,   248,   274,   379,   280,   280,
-     290,   289,   249,   250,    22,   258,   259,   260,   261,   257,
-     262,   263,   291,   254,   268,   296,   307,   317,   264,   319,
-     320,   355,   336,   341,   346,   265,   267,   347,   349,   255,
-     353,    89,   351,   373,   374,   375,   378,   211,   269,   275,
-     224,   285,   318,   345,   280,   237,   236,   271,   235,   290,
-     289,   327,   326,   348,   299,   242,   272,   231,   243,   337,
-     338,   291,   352,   328,   380,   230,   241,   354,   286,   381,
-     229,   321,   316,   335,   383,   350,   371,   382,     0,     0,
-       0,     0,   327,   326,     0,     0,     0,     0,     0,     0,
+      70,   110,   109,   126,   125,   141,   140,    21,    32,    22,
+      58,    23,   278,   111,    20,   127,    38,   142,    64,    65,
+      66,    67,   279,    78,    79,    80,    81,   137,   138,    82,
+      34,    83,    84,    85,    86,    83,    84,   251,   252,    87,
+      83,    84,   139,    88,    36,    68,    40,    89,    42,   105,
+     106,   107,   201,    69,    44,   202,    46,   108,   162,    24,
+      25,    26,    27,   163,   278,    69,    69,    83,    84,   176,
+      69,   182,    83,    84,   177,    69,   183,   122,   123,    61,
+     313,    83,    84,   314,   322,   323,   190,   324,   325,   124,
+     151,   191,   118,   361,   287,   288,   362,   363,   364,   365,
+     198,   182,    69,   190,   198,   199,   266,    69,   270,   273,
+     201,   133,    70,   315,   203,   204,    69,     1,     2,     3,
+       4,     5,     6,     7,     8,     9,   359,   148,   152,   360,
+     176,   110,   109,   110,   109,   300,   153,   154,   155,   126,
+     125,   126,   125,   111,   161,   111,   165,   141,   140,   141,
+     140,   127,   301,   127,   166,   304,   186,   302,   304,   142,
+     305,   142,   310,   306,   179,   194,   343,   311,   245,   246,
+     247,   344,   379,   185,   193,   196,   205,   380,   206,   207,
+     208,   209,   210,   212,   213,   215,   214,   216,   217,   218,
+     219,   220,   221,   222,   223,   225,   226,   227,   228,   232,
+     233,   234,   238,   239,   240,   244,   274,   260,   280,   280,
+     290,   289,   248,   249,   250,    22,   258,   259,   257,   261,
+     254,   262,   291,   263,   268,   296,   307,   264,   317,   265,
+     267,   319,   320,   355,   336,   341,   346,   269,   347,   271,
+     349,    89,   375,   351,   353,   376,   377,   381,   385,   272,
+     255,   211,   275,   285,   280,   224,   318,   345,   237,   290,
+     289,   327,   326,   236,   337,   235,   299,   242,   338,   229,
+     352,   291,   348,   328,   354,   382,   241,   243,   231,   383,
+     384,   286,   387,   230,   321,   316,   335,   388,   350,   373,
+     386,     0,   327,   326,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,   328
   };
 
   const short
   D2Parser::yycheck_[] =
   {
-      50,    52,    52,    54,    54,    56,    56,     5,    26,     7,
-      48,     9,   249,    52,     7,    54,     0,    56,     3,    10,
-      11,    12,    13,     8,    14,    15,    16,    17,    14,    15,
-      20,     7,    22,    23,    24,    25,    22,    23,    56,     3,
-      30,     7,     6,    29,    34,     7,    37,    41,    38,     3,
-      44,    45,    46,     3,     8,     7,     6,     5,    56,    57,
-      58,    59,    22,    23,   301,    56,    56,    22,    23,     3,
-      56,    31,    32,    33,     8,    22,    23,    22,    23,    39,
-      27,    28,     5,     3,    39,    40,     6,    42,    43,     3,
-      35,    36,    39,     3,     8,     3,    56,     3,     8,     3,
-       8,    56,     8,     3,     8,     3,    18,    19,     8,    56,
-       8,    56,   162,     5,   152,   153,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,     3,     3,    56,     7,     6,
-       8,   182,   182,   184,   184,     7,     7,     6,     3,   190,
-     190,   192,   192,   182,     4,   184,     8,   198,   198,   200,
-     200,   190,     3,   192,     3,     3,     6,     8,     3,   198,
-       8,   200,     3,     8,     4,     4,     4,     8,   206,   207,
-     208,     4,     3,     3,     6,     4,    56,     4,     4,     4,
-       4,     4,     4,    57,    57,     4,     4,     4,     4,     4,
-       4,     4,     4,     4,     4,     4,    57,     4,     4,     4,
-       4,     4,    57,     4,     4,     7,   244,    59,   258,   259,
-     261,   261,     7,    56,     7,     7,     7,     5,     7,    56,
-       5,    56,   261,    21,     5,     7,     6,     4,    56,     4,
-       4,     7,     5,     4,     4,    56,    56,     4,     4,   217,
-       5,    38,     6,     4,     4,     4,     4,   162,    56,   248,
-     176,   259,   304,   336,   304,   194,   192,    56,   190,   310,
-     310,   312,   312,    57,   268,   200,    56,   186,   201,    56,
-      56,   310,    56,   312,    57,   184,   198,    56,   260,    57,
-     182,   310,   301,   313,    56,   343,   359,   376,    -1,    -1,
-      -1,    -1,   343,   343,    -1,    -1,    -1,    -1,    -1,    -1,
+      50,    52,    52,    54,    54,    56,    56,     5,     7,     7,
+      48,     9,   249,    52,     0,    54,     5,    56,    10,    11,
+      12,    13,    26,    14,    15,    16,    17,    14,    15,    20,
+       7,    22,    23,    24,    25,    22,    23,    18,    19,    30,
+      22,    23,    29,    34,     7,    37,     7,    38,     5,    31,
+      32,    33,     3,    57,     7,     6,     5,    39,     3,    57,
+      58,    59,    60,     8,   301,    57,    57,    22,    23,     3,
+      57,     3,    22,    23,     8,    57,     8,    27,    28,    57,
+       3,    22,    23,     6,    39,    40,     3,    42,    43,    39,
+       6,     8,     7,    41,    35,    36,    44,    45,    46,    47,
+       3,     3,    57,     3,     3,     8,     8,    57,     8,     8,
+       3,     7,   162,     6,   152,   153,    57,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,     3,     7,     3,     6,
+       3,   182,   182,   184,   184,     8,     4,     8,     3,   190,
+     190,   192,   192,   182,     4,   184,     4,   198,   198,   200,
+     200,   190,     3,   192,     4,     3,     3,     8,     3,   198,
+       8,   200,     3,     8,     4,     3,     3,     8,   206,   207,
+     208,     8,     3,     6,     6,     4,    57,     8,     4,     4,
+       4,     4,     4,     4,    58,     4,    58,     4,     4,     4,
+       4,     4,     4,     4,     4,     4,    58,     4,     4,     4,
+       4,     4,     4,    58,     4,     4,   244,     5,   258,   259,
+     261,   261,     7,     7,    57,     7,     7,     7,    57,     7,
+      21,     5,   261,    57,     5,     7,     6,    57,     4,    57,
+      57,     4,     4,     7,     5,     4,     4,    57,     4,    57,
+       4,    38,     4,     6,     5,     4,     4,     4,     4,    57,
+     217,   162,   248,   259,   304,   176,   304,   336,   194,   310,
+     310,   312,   312,   192,    57,   190,   268,   200,    57,   182,
+      57,   310,    58,   312,    57,    60,   198,   201,   186,    58,
+      58,   260,    57,   184,   310,   301,   313,    57,   343,   359,
+     379,    -1,   343,   343,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   343
   };
 
   const unsigned char
   D2Parser::yystos_[] =
   {
-       0,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
-       0,     5,     7,     9,    56,    57,    58,    59,    71,    72,
-      73,    78,     7,    83,     7,    89,     7,   153,     5,   147,
-       7,   121,     5,   115,     7,   136,     5,   131,    79,    74,
-      84,    90,   154,   148,   122,   116,   137,   132,    71,    80,
-      81,    56,    76,    77,    10,    11,    12,    13,    37,    56,
-      82,    85,    86,    87,   172,   174,   176,   178,    14,    15,
+       0,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+       0,     5,     7,     9,    57,    58,    59,    60,    72,    73,
+      74,    79,     7,    84,     7,    90,     7,   154,     5,   148,
+       7,   122,     5,   116,     7,   137,     5,   132,    80,    75,
+      85,    91,   155,   149,   123,   117,   138,   133,    72,    81,
+      82,    57,    77,    78,    10,    11,    12,    13,    37,    57,
+      83,    86,    87,    88,   173,   175,   177,   179,    14,    15,
       16,    17,    20,    22,    23,    24,    25,    30,    34,    38,
-      82,    91,    92,    93,    95,    96,    97,   100,   102,   104,
-     106,   108,   145,   164,   182,    31,    32,    33,    39,    82,
-     102,   104,   155,   156,   157,   159,   161,   162,     7,   149,
-     150,   151,    27,    28,    39,    82,   102,   104,   123,   124,
-     125,   127,   129,     7,   117,   118,   119,    14,    15,    29,
-      82,   102,   104,   138,   139,   140,   142,   144,     7,   133,
-     134,     6,     3,     4,     8,     3,   173,   175,   177,    88,
-     179,     4,     3,     8,    94,     4,     4,    98,   101,   103,
-     105,   107,   109,   146,   165,   183,     3,     8,   160,     4,
-     163,   158,     3,     8,   152,     6,     3,   128,   130,   126,
-       3,     8,   120,     6,     3,   143,     4,   141,     3,     8,
-     135,     3,     6,    71,    71,    56,     4,     4,     4,     4,
-       4,    86,     4,    57,    57,     4,     4,     4,     4,     4,
-       4,     4,     4,     4,    92,     4,    57,     4,     4,   156,
-     155,   151,     4,     4,     4,   124,   123,   119,     4,    57,
-       4,   139,   138,   134,     4,    71,    71,    71,     7,     7,
-      56,    18,    19,    99,    21,    73,    75,    56,     7,     7,
-       5,     7,     5,    56,    56,    56,     8,    56,     5,    56,
-       8,    56,    56,     8,    71,    91,   180,   181,   182,    26,
-      82,   110,   111,   112,   113,   110,   149,    35,    36,    82,
-     102,   104,   166,   167,   168,   170,     7,   184,   185,   133,
-       8,     3,     8,   114,     3,     8,     8,     6,   169,   171,
-       3,     8,   186,     3,     6,     6,   181,     4,   112,     4,
-       4,   167,    39,    40,    42,    43,    82,   102,   104,   187,
-     188,   189,   191,   192,   194,   185,     5,    56,    56,   190,
-     195,     4,   193,     3,     8,   117,     4,     4,    57,     4,
-     188,     6,    56,     5,    56,     7,   196,   197,   198,     3,
-       6,    41,    44,    45,    46,   199,   200,   201,   203,   204,
-     205,   197,   202,     4,     4,     4,     3,     8,     4,    59,
-      57,    57,   200,    56
+      83,    92,    93,    94,    96,    97,    98,   101,   103,   105,
+     107,   109,   146,   165,   183,    31,    32,    33,    39,    83,
+     103,   105,   156,   157,   158,   160,   162,   163,     7,   150,
+     151,   152,    27,    28,    39,    83,   103,   105,   124,   125,
+     126,   128,   130,     7,   118,   119,   120,    14,    15,    29,
+      83,   103,   105,   139,   140,   141,   143,   145,     7,   134,
+     135,     6,     3,     4,     8,     3,   174,   176,   178,    89,
+     180,     4,     3,     8,    95,     4,     4,    99,   102,   104,
+     106,   108,   110,   147,   166,   184,     3,     8,   161,     4,
+     164,   159,     3,     8,   153,     6,     3,   129,   131,   127,
+       3,     8,   121,     6,     3,   144,     4,   142,     3,     8,
+     136,     3,     6,    72,    72,    57,     4,     4,     4,     4,
+       4,    87,     4,    58,    58,     4,     4,     4,     4,     4,
+       4,     4,     4,     4,    93,     4,    58,     4,     4,   157,
+     156,   152,     4,     4,     4,   125,   124,   120,     4,    58,
+       4,   140,   139,   135,     4,    72,    72,    72,     7,     7,
+      57,    18,    19,   100,    21,    74,    76,    57,     7,     7,
+       5,     7,     5,    57,    57,    57,     8,    57,     5,    57,
+       8,    57,    57,     8,    72,    92,   181,   182,   183,    26,
+      83,   111,   112,   113,   114,   111,   150,    35,    36,    83,
+     103,   105,   167,   168,   169,   171,     7,   185,   186,   134,
+       8,     3,     8,   115,     3,     8,     8,     6,   170,   172,
+       3,     8,   187,     3,     6,     6,   182,     4,   113,     4,
+       4,   168,    39,    40,    42,    43,    83,   103,   105,   188,
+     189,   190,   192,   193,   195,   186,     5,    57,    57,   191,
+     196,     4,   194,     3,     8,   118,     4,     4,    58,     4,
+     189,     6,    57,     5,    57,     7,   197,   198,   199,     3,
+       6,    41,    44,    45,    46,    47,   200,   201,   202,   204,
+     205,   206,   207,   198,   203,     4,     4,     4,   208,     3,
+       8,     4,    60,    58,    58,     4,   201,    57,    57
   };
 
   const unsigned char
   D2Parser::yyr1_[] =
   {
-       0,    60,    62,    61,    63,    61,    64,    61,    65,    61,
-      66,    61,    67,    61,    68,    61,    69,    61,    70,    61,
-      71,    71,    71,    71,    71,    71,    71,    72,    74,    73,
-      75,    76,    76,    77,    77,    79,    78,    80,    80,    81,
-      81,    82,    84,    83,    85,    85,    86,    86,    86,    86,
-      86,    86,    88,    87,    90,    89,    91,    91,    92,    92,
-      92,    92,    92,    92,    92,    92,    92,    92,    92,    92,
-      92,    94,    93,    95,    96,    98,    97,    99,    99,   101,
-     100,   103,   102,   105,   104,   107,   106,   109,   108,   110,
-     110,   111,   111,   112,   112,   114,   113,   116,   115,   117,
-     117,   118,   118,   120,   119,   122,   121,   123,   123,   124,
-     124,   124,   124,   124,   124,   126,   125,   128,   127,   130,
-     129,   132,   131,   133,   133,   135,   134,   137,   136,   138,
-     138,   139,   139,   139,   139,   139,   139,   141,   140,   143,
-     142,   144,   146,   145,   148,   147,   149,   149,   150,   150,
-     152,   151,   154,   153,   155,   155,   156,   156,   156,   156,
-     156,   156,   156,   158,   157,   160,   159,   161,   163,   162,
-     165,   164,   166,   166,   167,   167,   167,   167,   167,   169,
-     168,   171,   170,   173,   172,   175,   174,   177,   176,   179,
-     178,   180,   180,   181,   183,   182,   184,   184,   186,   185,
-     187,   187,   188,   188,   188,   188,   188,   188,   188,   190,
-     189,   191,   193,   192,   195,   194,   196,   196,   198,   197,
-     199,   199,   200,   200,   200,   200,   202,   201,   203,   204,
-     205
+       0,    61,    63,    62,    64,    62,    65,    62,    66,    62,
+      67,    62,    68,    62,    69,    62,    70,    62,    71,    62,
+      72,    72,    72,    72,    72,    72,    72,    73,    75,    74,
+      76,    77,    77,    78,    78,    80,    79,    81,    81,    82,
+      82,    83,    85,    84,    86,    86,    87,    87,    87,    87,
+      87,    87,    89,    88,    91,    90,    92,    92,    93,    93,
+      93,    93,    93,    93,    93,    93,    93,    93,    93,    93,
+      93,    95,    94,    96,    97,    99,    98,   100,   100,   102,
+     101,   104,   103,   106,   105,   108,   107,   110,   109,   111,
+     111,   112,   112,   113,   113,   115,   114,   117,   116,   118,
+     118,   119,   119,   121,   120,   123,   122,   124,   124,   125,
+     125,   125,   125,   125,   125,   127,   126,   129,   128,   131,
+     130,   133,   132,   134,   134,   136,   135,   138,   137,   139,
+     139,   140,   140,   140,   140,   140,   140,   142,   141,   144,
+     143,   145,   147,   146,   149,   148,   150,   150,   151,   151,
+     153,   152,   155,   154,   156,   156,   157,   157,   157,   157,
+     157,   157,   157,   159,   158,   161,   160,   162,   164,   163,
+     166,   165,   167,   167,   168,   168,   168,   168,   168,   170,
+     169,   172,   171,   174,   173,   176,   175,   178,   177,   180,
+     179,   181,   181,   182,   184,   183,   185,   185,   187,   186,
+     188,   188,   189,   189,   189,   189,   189,   189,   189,   191,
+     190,   192,   194,   193,   196,   195,   197,   197,   199,   198,
+     200,   200,   201,   201,   201,   201,   201,   203,   202,   204,
+     205,   206,   208,   207
   };
 
   const unsigned char
@@ -2395,8 +2392,8 @@ namespace isc { namespace d2 {
        6,     1,     3,     1,     0,     6,     1,     3,     0,     4,
        1,     3,     1,     1,     1,     1,     1,     1,     1,     0,
        4,     3,     0,     4,     0,     6,     1,     3,     0,     4,
-       1,     3,     1,     1,     1,     1,     0,     4,     3,     3,
-       3
+       1,     3,     1,     1,     1,     1,     1,     0,     4,     3,
+       3,     3,     0,     4
   };
 
 
@@ -2416,7 +2413,7 @@ namespace isc { namespace d2 {
   "\"algorithm\"", "\"digest-bits\"", "\"secret\"", "\"control-socket\"",
   "\"socket-type\"", "\"socket-name\"", "\"Logging\"", "\"loggers\"",
   "\"name\"", "\"output_options\"", "\"output\"", "\"debuglevel\"",
-  "\"severity\"", "\"flush\"", "\"maxsize\"", "\"maxver\"",
+  "\"severity\"", "\"flush\"", "\"maxsize\"", "\"maxver\"", "\"pattern\"",
   "TOPLEVEL_JSON", "TOPLEVEL_DHCPDDNS", "SUB_DHCPDDNS", "SUB_TSIG_KEY",
   "SUB_TSIG_KEYS", "SUB_DDNS_DOMAIN", "SUB_DDNS_DOMAINS", "SUB_DNS_SERVER",
   "SUB_DNS_SERVERS", "\"constant string\"", "\"integer\"",
@@ -2452,37 +2449,37 @@ namespace isc { namespace d2 {
   "debuglevel", "severity", "$@51", "output_options_list", "$@52",
   "output_options_list_content", "output_entry", "$@53",
   "output_params_list", "output_params", "output", "$@54", "flush",
-  "maxsize", "maxver", YY_NULLPTR
+  "maxsize", "maxver", "pattern", "$@55", YY_NULLPTR
   };
 
 #if D2_PARSER_DEBUG
   const unsigned short
   D2Parser::yyrline_[] =
   {
-       0,   124,   124,   124,   125,   125,   126,   126,   127,   127,
-     128,   128,   129,   129,   130,   130,   131,   131,   132,   132,
-     140,   141,   142,   143,   144,   145,   146,   149,   154,   154,
-     165,   168,   169,   172,   176,   183,   183,   190,   191,   194,
-     198,   209,   219,   219,   231,   232,   236,   237,   238,   239,
-     240,   241,   246,   246,   256,   256,   264,   265,   269,   270,
-     271,   272,   273,   274,   275,   276,   277,   278,   279,   280,
-     281,   284,   284,   292,   300,   309,   309,   317,   318,   321,
-     321,   329,   329,   354,   354,   381,   381,   391,   391,   401,
-     402,   405,   406,   409,   410,   415,   415,   425,   425,   432,
-     433,   436,   437,   440,   440,   448,   448,   455,   456,   459,
-     460,   461,   462,   463,   464,   468,   468,   480,   480,   492,
-     492,   502,   502,   509,   510,   513,   513,   521,   521,   528,
-     529,   532,   533,   534,   535,   536,   537,   540,   540,   552,
-     552,   560,   574,   574,   584,   584,   591,   592,   595,   596,
-     599,   599,   607,   607,   616,   617,   620,   621,   622,   623,
-     624,   625,   626,   629,   629,   641,   641,   652,   660,   660,
-     676,   676,   686,   687,   690,   691,   692,   693,   694,   697,
-     697,   705,   705,   715,   715,   722,   722,   729,   729,   741,
-     741,   754,   755,   759,   763,   763,   775,   776,   780,   780,
-     788,   789,   792,   793,   794,   795,   796,   797,   798,   801,
-     801,   809,   813,   813,   821,   821,   831,   832,   835,   835,
-     843,   844,   847,   848,   849,   850,   853,   853,   861,   866,
-     871
+       0,   125,   125,   125,   126,   126,   127,   127,   128,   128,
+     129,   129,   130,   130,   131,   131,   132,   132,   133,   133,
+     141,   142,   143,   144,   145,   146,   147,   150,   155,   155,
+     166,   169,   170,   173,   177,   184,   184,   191,   192,   195,
+     199,   210,   220,   220,   232,   233,   237,   238,   239,   240,
+     241,   242,   247,   247,   257,   257,   265,   266,   270,   271,
+     272,   273,   274,   275,   276,   277,   278,   279,   280,   281,
+     282,   285,   285,   293,   301,   310,   310,   318,   319,   322,
+     322,   330,   330,   355,   355,   382,   382,   392,   392,   402,
+     403,   406,   407,   410,   411,   416,   416,   426,   426,   433,
+     434,   437,   438,   441,   441,   449,   449,   456,   457,   460,
+     461,   462,   463,   464,   465,   469,   469,   481,   481,   493,
+     493,   503,   503,   510,   511,   514,   514,   522,   522,   529,
+     530,   533,   534,   535,   536,   537,   538,   541,   541,   553,
+     553,   561,   575,   575,   585,   585,   592,   593,   596,   597,
+     600,   600,   608,   608,   617,   618,   621,   622,   623,   624,
+     625,   626,   627,   630,   630,   642,   642,   653,   661,   661,
+     677,   677,   687,   688,   691,   692,   693,   694,   695,   698,
+     698,   706,   706,   716,   716,   723,   723,   730,   730,   742,
+     742,   755,   756,   760,   764,   764,   776,   777,   781,   781,
+     789,   790,   793,   794,   795,   796,   797,   798,   799,   802,
+     802,   810,   814,   814,   822,   822,   832,   833,   836,   836,
+     844,   845,   848,   849,   850,   851,   852,   855,   855,   863,
+     868,   873,   878,   878
   };
 
   // Print the state stack on the debug stream.
@@ -2515,11 +2512,10 @@ namespace isc { namespace d2 {
 #endif // D2_PARSER_DEBUG
 
 
-#line 14 "d2_parser.yy"
+#line 14 "d2_parser.yy" // lalr1.cc:1218
 } } // isc::d2
-#line 2521 "d2_parser.cc"
-
-#line 876 "d2_parser.yy"
+#line 2518 "d2_parser.cc" // lalr1.cc:1218
+#line 886 "d2_parser.yy" // lalr1.cc:1219
 
 
 void
index 229e6075973b92867e0bdce06dcc04f721d72a26..8f107676c4085313a3f6c56b703c81493de24a71 100644 (file)
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.4.1.
+// A Bison parser, made by GNU Bison 3.2.1.
 
 // Skeleton interface for Bison LALR(1) parsers in C++
 
-// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
@@ -44,7 +44,7 @@
 #ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED
 # define YY_D2_PARSER_D2_PARSER_H_INCLUDED
 // //                    "%code requires" blocks.
-#line 17 "d2_parser.yy"
+#line 17 "d2_parser.yy" // lalr1.cc:404
 
 #include <string>
 #include <cc/data.h>
@@ -56,7 +56,7 @@ using namespace isc::d2;
 using namespace isc::data;
 using namespace std;
 
-#line 60 "d2_parser.h"
+#line 60 "d2_parser.h" // lalr1.cc:404
 
 # include <cassert>
 # include <cstdlib> // std::abort
@@ -65,14 +65,8 @@ using namespace std;
 # include <string>
 # include <vector>
 
-#if defined __cplusplus
-# define YY_CPLUSPLUS __cplusplus
-#else
-# define YY_CPLUSPLUS 199711L
-#endif
-
 // Support move semantics when possible.
-#if 201103L <= YY_CPLUSPLUS
+#if defined __cplusplus && 201103L <= __cplusplus
 # define YY_MOVE           std::move
 # define YY_MOVE_OR_COPY   move
 # define YY_MOVE_REF(Type) Type&&
@@ -85,22 +79,6 @@ using namespace std;
 # define YY_RVREF(Type)    const Type&
 # define YY_COPY(Type)     const Type&
 #endif
-
-// Support noexcept when possible.
-#if 201103L <= YY_CPLUSPLUS
-# define YY_NOEXCEPT noexcept
-# define YY_NOTHROW
-#else
-# define YY_NOEXCEPT
-# define YY_NOTHROW throw ()
-#endif
-
-// Support constexpr when possible.
-#if 201703 <= YY_CPLUSPLUS
-# define YY_CONSTEXPR constexpr
-#else
-# define YY_CONSTEXPR
-#endif
 # include "location.hh"
 #include <typeinfo>
 #ifndef YYASSERT
@@ -178,80 +156,193 @@ using namespace std;
 # endif /* ! defined YYDEBUG */
 #endif  /* ! defined D2_PARSER_DEBUG */
 
-#line 14 "d2_parser.yy"
+#line 14 "d2_parser.yy" // lalr1.cc:404
 namespace isc { namespace d2 {
-#line 184 "d2_parser.h"
+#line 162 "d2_parser.h" // lalr1.cc:404
+
+  /// A stack with random access from its top.
+  template <typename T, typename S = std::vector<T> >
+  class stack
+  {
+  public:
+    // Hide our reversed order.
+    typedef typename S::reverse_iterator iterator;
+    typedef typename S::const_reverse_iterator const_iterator;
+    typedef typename S::size_type size_type;
 
+    stack (size_type n = 200)
+      : seq_ (n)
+    {}
+
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
+    T&
+    operator[] (size_type i)
+    {
+      return seq_[size () - 1 - i];
+    }
 
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
+    T&
+    operator[] (int i)
+    {
+      return operator[] (size_type (i));
+    }
 
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
+    const T&
+    operator[] (size_type i) const
+    {
+      return seq_[size () - 1 - i];
+    }
 
-  /// A Bison parser.
-  class D2Parser
+    /// Random access.
+    ///
+    /// Index 0 returns the topmost element.
+    const T&
+    operator[] (int i) const
+    {
+      return operator[] (size_type (i));
+    }
+
+    /// Steal the contents of \a t.
+    ///
+    /// Close to move-semantics.
+    void
+    push (YY_MOVE_REF (T) t)
+    {
+      seq_.push_back (T ());
+      operator[](0).move (t);
+    }
+
+    void
+    pop (int n = 1)
+    {
+      for (; 0 < n; --n)
+        seq_.pop_back ();
+    }
+
+    void
+    clear ()
+    {
+      seq_.clear ();
+    }
+
+    size_type
+    size () const
+    {
+      return seq_.size ();
+    }
+
+    const_iterator
+    begin () const
+    {
+      return seq_.rbegin ();
+    }
+
+    const_iterator
+    end () const
+    {
+      return seq_.rend ();
+    }
+
+  private:
+    stack (const stack&);
+    stack& operator= (const stack&);
+    /// The wrapped container.
+    S seq_;
+  };
+
+  /// Present a slice of the top of a stack.
+  template <typename T, typename S = stack<T> >
+  class slice
   {
   public:
-#ifndef D2_PARSER_STYPE
-  /// A buffer to store and retrieve objects.
+    slice (const S& stack, int range)
+      : stack_ (stack)
+      , range_ (range)
+    {}
+
+    const T&
+    operator[] (int i) const
+    {
+      return stack_[range_ - i];
+    }
+
+  private:
+    const S& stack_;
+    int range_;
+  };
+
+
+
+  /// A char[S] buffer to store and retrieve objects.
   ///
   /// Sort of a variant, but does not keep track of the nature
   /// of the stored data, since that knowledge is available
-  /// via the current parser state.
-  class semantic_type
+  /// via the current state.
+  template <size_t S>
+  struct variant
   {
-  public:
     /// Type of *this.
-    typedef semantic_type self_type;
+    typedef variant<S> self_type;
 
     /// Empty construction.
-    semantic_type () YY_NOEXCEPT
+    variant ()
       : yybuffer_ ()
       , yytypeid_ (YY_NULLPTR)
     {}
 
     /// Construct and fill.
     template <typename T>
-    semantic_type (YY_RVREF (T) t)
+    variant (YY_RVREF (T) t)
       : yytypeid_ (&typeid (T))
     {
-      YYASSERT (sizeof (T) <= size);
+      YYASSERT (sizeof (T) <= S);
       new (yyas_<T> ()) T (YY_MOVE (t));
     }
 
     /// Destruction, allowed only if empty.
-    ~semantic_type () YY_NOEXCEPT
+    ~variant ()
     {
       YYASSERT (!yytypeid_);
     }
 
-# if 201103L <= YY_CPLUSPLUS
-    /// Instantiate a \a T in here from \a t.
-    template <typename T, typename... U>
-    T&
-    emplace (U&&... u)
-    {
-      YYASSERT (!yytypeid_);
-      YYASSERT (sizeof (T) <= size);
-      yytypeid_ = & typeid (T);
-      return *new (yyas_<T> ()) T (std::forward <U>(u)...);
-    }
-# else
     /// Instantiate an empty \a T in here.
     template <typename T>
     T&
     emplace ()
     {
       YYASSERT (!yytypeid_);
-      YYASSERT (sizeof (T) <= size);
+      YYASSERT (sizeof (T) <= S);
       yytypeid_ = & typeid (T);
       return *new (yyas_<T> ()) T ();
     }
 
+# if defined __cplusplus && 201103L <= __cplusplus
+    /// Instantiate a \a T in here from \a t.
+    template <typename T, typename U>
+    T&
+    emplace (U&& u)
+    {
+      YYASSERT (!yytypeid_);
+      YYASSERT (sizeof (T) <= S);
+      yytypeid_ = & typeid (T);
+      return *new (yyas_<T> ()) T (std::forward <U>(u));
+    }
+# else
     /// Instantiate a \a T in here from \a t.
     template <typename T>
     T&
     emplace (const T& t)
     {
       YYASSERT (!yytypeid_);
-      YYASSERT (sizeof (T) <= size);
+      YYASSERT (sizeof (T) <= S);
       yytypeid_ = & typeid (T);
       return *new (yyas_<T> ()) T (t);
     }
@@ -278,75 +369,75 @@ namespace isc { namespace d2 {
     /// Accessor to a built \a T.
     template <typename T>
     T&
-    as () YY_NOEXCEPT
+    as ()
     {
       YYASSERT (yytypeid_);
       YYASSERT (*yytypeid_ == typeid (T));
-      YYASSERT (sizeof (T) <= size);
+      YYASSERT (sizeof (T) <= S);
       return *yyas_<T> ();
     }
 
     /// Const accessor to a built \a T (for %printer).
     template <typename T>
     const T&
-    as () const YY_NOEXCEPT
+    as () const
     {
       YYASSERT (yytypeid_);
       YYASSERT (*yytypeid_ == typeid (T));
-      YYASSERT (sizeof (T) <= size);
+      YYASSERT (sizeof (T) <= S);
       return *yyas_<T> ();
     }
 
-    /// Swap the content with \a that, of same type.
+    /// Swap the content with \a other, of same type.
     ///
     /// Both variants must be built beforehand, because swapping the actual
     /// data requires reading it (with as()), and this is not possible on
     /// unconstructed variants: it would require some dynamic testing, which
     /// should not be the variant's responsibility.
     /// Swapping between built and (possibly) non-built is done with
-    /// self_type::move ().
+    /// variant::move ().
     template <typename T>
     void
-    swap (self_type& that) YY_NOEXCEPT
+    swap (self_type& other)
     {
       YYASSERT (yytypeid_);
-      YYASSERT (*yytypeid_ == *that.yytypeid_);
-      std::swap (as<T> (), that.as<T> ());
+      YYASSERT (*yytypeid_ == *other.yytypeid_);
+      std::swap (as<T> (), other.as<T> ());
     }
 
-    /// Move the content of \a that to this.
+    /// Move the content of \a other to this.
     ///
-    /// Destroys \a that.
+    /// Destroys \a other.
     template <typename T>
     void
-    move (self_type& that)
+    move (self_type& other)
     {
-# if 201103L <= YY_CPLUSPLUS
-      emplace<T> (std::move (that.as<T> ()));
+# if defined __cplusplus && 201103L <= __cplusplus
+      emplace<T> (std::move (other.as<T> ()));
 # else
       emplace<T> ();
-      swap<T> (that);
+      swap<T> (other);
 # endif
-      that.destroy<T> ();
+      other.destroy<T> ();
     }
 
-# if 201103L <= YY_CPLUSPLUS
-    /// Move the content of \a that to this.
+# if defined __cplusplus && 201103L <= __cplusplus
+    /// Move the content of \a other to this.
     template <typename T>
     void
-    move (self_type&& that)
+    move (self_type&& other)
     {
-      emplace<T> (std::move (that.as<T> ()));
-      that.destroy<T> ();
+      emplace<T> (std::move (other.as<T> ()));
+      other.destroy<T> ();
     }
 #endif
 
-    /// Copy the content of \a that to this.
+    /// Copy the content of \a other to this.
     template <typename T>
     void
-    copy (const self_type& that)
+    copy (const self_type& other)
     {
-      emplace<T> (that.as<T> ());
+      emplace<T> (other.as<T> ());
     }
 
     /// Destroy the stored \a T.
@@ -361,12 +452,12 @@ namespace isc { namespace d2 {
   private:
     /// Prohibit blind copies.
     self_type& operator= (const self_type&);
-    semantic_type (const self_type&);
+    variant (const self_type&);
 
     /// Accessor to raw memory as \a T.
     template <typename T>
     T*
-    yyas_ () YY_NOEXCEPT
+    yyas_ ()
     {
       void *yyp = yybuffer_.yyraw;
       return static_cast<T*> (yyp);
@@ -375,12 +466,30 @@ namespace isc { namespace d2 {
     /// Const accessor to raw memory as \a T.
     template <typename T>
     const T*
-    yyas_ () const YY_NOEXCEPT
+    yyas_ () const
     {
       const void *yyp = yybuffer_.yyraw;
       return static_cast<const T*> (yyp);
      }
 
+    union
+    {
+      /// Strongest alignment constraints.
+      long double yyalign_me;
+      /// A buffer large enough to store any of the semantic values.
+      char yyraw[S];
+    } yybuffer_;
+
+    /// Whether the content is built: if defined, the name of the stored type.
+    const std::type_info *yytypeid_;
+  };
+
+
+  /// A Bison parser.
+  class D2Parser
+  {
+  public:
+#ifndef D2_PARSER_STYPE
     /// An auxiliary type to compute the largest semantic type.
     union union_type
     {
@@ -400,24 +509,10 @@ namespace isc { namespace d2 {
 
       // "constant string"
       char dummy5[sizeof (std::string)];
-    };
-
-    /// The size of the largest semantic type.
-    enum { size = sizeof (union_type) };
-
-    /// A buffer to store semantic values.
-    union
-    {
-      /// Strongest alignment constraints.
-      long double yyalign_me;
-      /// A buffer large enough to store any of the semantic values.
-      char yyraw[size];
-    } yybuffer_;
-
-    /// Whether the content is built: if defined, the name of the stored type.
-    const std::type_info *yytypeid_;
-  };
+};
 
+    /// Symbol semantic values.
+    typedef variant<sizeof (union_type)> semantic_type;
 #else
     typedef D2_PARSER_STYPE semantic_type;
 #endif
@@ -427,18 +522,7 @@ namespace isc { namespace d2 {
     /// Syntax errors thrown from user actions.
     struct syntax_error : std::runtime_error
     {
-      syntax_error (const location_type& l, const std::string& m)
-        : std::runtime_error (m)
-        , location (l)
-      {}
-
-      syntax_error (const syntax_error& s)
-        : std::runtime_error (s.what ())
-        , location (s.location)
-      {}
-
-      ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
-
+      syntax_error (const location_type& l, const std::string& m);
       location_type location;
     };
 
@@ -492,19 +576,20 @@ namespace isc { namespace d2 {
         TOKEN_FLUSH = 299,
         TOKEN_MAXSIZE = 300,
         TOKEN_MAXVER = 301,
-        TOKEN_TOPLEVEL_JSON = 302,
-        TOKEN_TOPLEVEL_DHCPDDNS = 303,
-        TOKEN_SUB_DHCPDDNS = 304,
-        TOKEN_SUB_TSIG_KEY = 305,
-        TOKEN_SUB_TSIG_KEYS = 306,
-        TOKEN_SUB_DDNS_DOMAIN = 307,
-        TOKEN_SUB_DDNS_DOMAINS = 308,
-        TOKEN_SUB_DNS_SERVER = 309,
-        TOKEN_SUB_DNS_SERVERS = 310,
-        TOKEN_STRING = 311,
-        TOKEN_INTEGER = 312,
-        TOKEN_FLOAT = 313,
-        TOKEN_BOOLEAN = 314
+        TOKEN_PATTERN = 302,
+        TOKEN_TOPLEVEL_JSON = 303,
+        TOKEN_TOPLEVEL_DHCPDDNS = 304,
+        TOKEN_SUB_DHCPDDNS = 305,
+        TOKEN_SUB_TSIG_KEY = 306,
+        TOKEN_SUB_TSIG_KEYS = 307,
+        TOKEN_SUB_DDNS_DOMAIN = 308,
+        TOKEN_SUB_DDNS_DOMAINS = 309,
+        TOKEN_SUB_DNS_SERVER = 310,
+        TOKEN_SUB_DNS_SERVERS = 311,
+        TOKEN_STRING = 312,
+        TOKEN_INTEGER = 313,
+        TOKEN_FLOAT = 314,
+        TOKEN_BOOLEAN = 315
       };
     };
 
@@ -533,150 +618,29 @@ namespace isc { namespace d2 {
       typedef Base super_type;
 
       /// Default constructor.
-      basic_symbol ()
-        : value ()
-        , location ()
-      {}
-
-#if 201103L <= YY_CPLUSPLUS
-      /// Move constructor.
-      basic_symbol (basic_symbol&& that);
-#endif
+      basic_symbol ();
+
+      /// Move or copy constructor.
+      basic_symbol (YY_RVREF (basic_symbol) other);
 
-      /// Copy constructor.
-      basic_symbol (const basic_symbol& that);
 
       /// Constructor for valueless symbols, and symbols from each type.
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, location_type&& l)
-        : Base (t)
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const location_type& l)
-        : Base (t)
-        , location (l)
-      {}
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
-        : Base (t)
-        , value (std::move (v))
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
-        : Base (t)
-        , value (v)
-        , location (l)
-      {}
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
-        : Base (t)
-        , value (std::move (v))
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
-        : Base (t)
-        , value (v)
-        , location (l)
-      {}
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
-        : Base (t)
-        , value (std::move (v))
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
-        : Base (t)
-        , value (v)
-        , location (l)
-      {}
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
-        : Base (t)
-        , value (std::move (v))
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
-        : Base (t)
-        , value (v)
-        , location (l)
-      {}
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
-        : Base (t)
-        , value (std::move (v))
-        , location (std::move (l))
-      {}
-#else
-      basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
-        : Base (t)
-        , value (v)
-        , location (l)
-      {}
-#endif
+      basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l);
+      basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l);
+      basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l);
+      basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l);
+      basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l);
+      basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l);
+
 
       /// Destroy the symbol.
-      ~basic_symbol ()
-      {
-        clear ();
-      }
+      ~basic_symbol ();
 
       /// Destroy contents, and record that is empty.
-      void clear ()
-      {
-        // User destructor.
-        symbol_number_type yytype = this->type_get ();
-        basic_symbol<Base>& yysym = *this;
-        (void) yysym;
-        switch (yytype)
-        {
-       default:
-          break;
-        }
-
-        // Type destructor.
-switch (yytype)
-    {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
-        value.template destroy< ElementPtr > ();
-        break;
-
-      case 59: // "boolean"
-        value.template destroy< bool > ();
-        break;
-
-      case 58: // "floating point"
-        value.template destroy< double > ();
-        break;
-
-      case 57: // "integer"
-        value.template destroy< int64_t > ();
-        break;
-
-      case 56: // "constant string"
-        value.template destroy< std::string > ();
-        break;
-
-      default:
-        break;
-    }
-
-        Base::clear ();
-      }
+      void clear ();
 
       /// Whether empty.
-      bool empty () const YY_NOEXCEPT;
+      bool empty () const;
 
       /// Destructive move, \a s is emptied into this.
       void move (basic_symbol& s);
@@ -688,9 +652,9 @@ switch (yytype)
       location_type location;
 
     private:
-#if YY_CPLUSPLUS < 201103L
+#if !defined __cplusplus || __cplusplus < 201103L
       /// Assignment operator.
-      basic_symbol& operator= (const basic_symbol& that);
+      basic_symbol& operator= (const basic_symbol& other);
 #endif
     };
 
@@ -700,13 +664,8 @@ switch (yytype)
       /// Default constructor.
       by_type ();
 
-#if 201103L <= YY_CPLUSPLUS
-      /// Move constructor.
-      by_type (by_type&& that);
-#endif
-
       /// Copy constructor.
-      by_type (const by_type& that);
+      by_type (const by_type& other);
 
       /// The symbol type as needed by the constructor.
       typedef token_type kind_type;
@@ -722,10 +681,10 @@ switch (yytype)
 
       /// The (internal) type number (corresponding to \a type).
       /// \a empty when empty.
-      symbol_number_type type_get () const YY_NOEXCEPT;
+      symbol_number_type type_get () const;
 
       /// The token.
-      token_type token () const YY_NOEXCEPT;
+      token_type token () const;
 
       /// The symbol type.
       /// \a empty_symbol when empty.
@@ -734,81 +693,7 @@ switch (yytype)
     };
 
     /// "External" symbols: returned by the scanner.
-    struct symbol_type : basic_symbol<by_type>
-    {
-      /// Superclass.
-      typedef basic_symbol<by_type> super_type;
-
-      /// Empty symbol.
-      symbol_type () {}
-
-      /// Constructor for valueless symbols, and symbols from each type.
-#if 201103L <= YY_CPLUSPLUS
-      symbol_type (int tok, location_type l)
-        : super_type(token_type (tok), std::move (l))
-      {
-        YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS);
-      }
-#else
-      symbol_type (int tok, const location_type& l)
-        : super_type(token_type (tok), l)
-      {
-        YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      symbol_type (int tok, bool v, location_type l)
-        : super_type(token_type (tok), std::move (v), std::move (l))
-      {
-        YYASSERT (tok == token::TOKEN_BOOLEAN);
-      }
-#else
-      symbol_type (int tok, const bool& v, const location_type& l)
-        : super_type(token_type (tok), v, l)
-      {
-        YYASSERT (tok == token::TOKEN_BOOLEAN);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      symbol_type (int tok, double v, location_type l)
-        : super_type(token_type (tok), std::move (v), std::move (l))
-      {
-        YYASSERT (tok == token::TOKEN_FLOAT);
-      }
-#else
-      symbol_type (int tok, const double& v, const location_type& l)
-        : super_type(token_type (tok), v, l)
-      {
-        YYASSERT (tok == token::TOKEN_FLOAT);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      symbol_type (int tok, int64_t v, location_type l)
-        : super_type(token_type (tok), std::move (v), std::move (l))
-      {
-        YYASSERT (tok == token::TOKEN_INTEGER);
-      }
-#else
-      symbol_type (int tok, const int64_t& v, const location_type& l)
-        : super_type(token_type (tok), v, l)
-      {
-        YYASSERT (tok == token::TOKEN_INTEGER);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      symbol_type (int tok, std::string v, location_type l)
-        : super_type(token_type (tok), std::move (v), std::move (l))
-      {
-        YYASSERT (tok == token::TOKEN_STRING);
-      }
-#else
-      symbol_type (int tok, const std::string& v, const location_type& l)
-        : super_type(token_type (tok), v, l)
-      {
-        YYASSERT (tok == token::TOKEN_STRING);
-      }
-#endif
-    };
+    typedef basic_symbol<by_type> symbol_type;
 
     /// Build a parser object.
     D2Parser (isc::d2::D2ParserContext& ctx_yyarg);
@@ -844,877 +729,243 @@ switch (yytype)
     /// Report a syntax error.
     void error (const syntax_error& err);
 
-    // Implementation of make_symbol for each symbol type.
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_END (location_type l)
-      {
-        return symbol_type (token::TOKEN_END, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_END (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_END, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_COMMA (location_type l)
-      {
-        return symbol_type (token::TOKEN_COMMA, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_COMMA (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_COMMA, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_COLON (location_type l)
-      {
-        return symbol_type (token::TOKEN_COLON, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_COLON (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_COLON, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_LSQUARE_BRACKET (location_type l)
-      {
-        return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_LSQUARE_BRACKET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_RSQUARE_BRACKET (location_type l)
-      {
-        return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_RSQUARE_BRACKET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_LCURLY_BRACKET (location_type l)
-      {
-        return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_LCURLY_BRACKET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_RCURLY_BRACKET (location_type l)
-      {
-        return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_RCURLY_BRACKET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_NULL_TYPE (location_type l)
-      {
-        return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_NULL_TYPE (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_NULL_TYPE, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DHCP6 (location_type l)
-      {
-        return symbol_type (token::TOKEN_DHCP6, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DHCP6 (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DHCP6, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DHCP4 (location_type l)
-      {
-        return symbol_type (token::TOKEN_DHCP4, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DHCP4 (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DHCP4, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_CONTROL_AGENT (location_type l)
-      {
-        return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_CONTROL_AGENT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_CONTROL_AGENT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DHCPDDNS (location_type l)
-      {
-        return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DHCPDDNS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DHCPDDNS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_IP_ADDRESS (location_type l)
-      {
-        return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_IP_ADDRESS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_IP_ADDRESS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_PORT (location_type l)
-      {
-        return symbol_type (token::TOKEN_PORT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_PORT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_PORT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DNS_SERVER_TIMEOUT (location_type l)
-      {
-        return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DNS_SERVER_TIMEOUT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_NCR_PROTOCOL (location_type l)
-      {
-        return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_NCR_PROTOCOL (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_UDP (location_type l)
-      {
-        return symbol_type (token::TOKEN_UDP, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_UDP (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_UDP, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_TCP (location_type l)
-      {
-        return symbol_type (token::TOKEN_TCP, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_TCP (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_TCP, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_NCR_FORMAT (location_type l)
-      {
-        return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_NCR_FORMAT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_NCR_FORMAT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_JSON (location_type l)
-      {
-        return symbol_type (token::TOKEN_JSON, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_JSON (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_JSON, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_USER_CONTEXT (location_type l)
-      {
-        return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_USER_CONTEXT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_USER_CONTEXT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_COMMENT (location_type l)
-      {
-        return symbol_type (token::TOKEN_COMMENT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_COMMENT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_COMMENT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_FORWARD_DDNS (location_type l)
-      {
-        return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_FORWARD_DDNS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_FORWARD_DDNS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_REVERSE_DDNS (location_type l)
-      {
-        return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_REVERSE_DDNS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_REVERSE_DDNS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DDNS_DOMAINS (location_type l)
-      {
-        return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DDNS_DOMAINS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DDNS_DOMAINS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_KEY_NAME (location_type l)
-      {
-        return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_KEY_NAME (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_KEY_NAME, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DNS_SERVERS (location_type l)
-      {
-        return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DNS_SERVERS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DNS_SERVERS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_HOSTNAME (location_type l)
-      {
-        return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_HOSTNAME (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_HOSTNAME, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_TSIG_KEYS (location_type l)
-      {
-        return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_TSIG_KEYS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_TSIG_KEYS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_ALGORITHM (location_type l)
-      {
-        return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_ALGORITHM (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_ALGORITHM, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DIGEST_BITS (location_type l)
-      {
-        return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DIGEST_BITS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DIGEST_BITS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SECRET (location_type l)
-      {
-        return symbol_type (token::TOKEN_SECRET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SECRET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SECRET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_CONTROL_SOCKET (location_type l)
-      {
-        return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_CONTROL_SOCKET (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SOCKET_TYPE (location_type l)
-      {
-        return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SOCKET_TYPE (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SOCKET_TYPE, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SOCKET_NAME (location_type l)
-      {
-        return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SOCKET_NAME (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SOCKET_NAME, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_LOGGING (location_type l)
-      {
-        return symbol_type (token::TOKEN_LOGGING, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_LOGGING (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_LOGGING, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_LOGGERS (location_type l)
-      {
-        return symbol_type (token::TOKEN_LOGGERS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_LOGGERS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_LOGGERS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_NAME (location_type l)
-      {
-        return symbol_type (token::TOKEN_NAME, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_NAME (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_NAME, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_OUTPUT_OPTIONS (location_type l)
-      {
-        return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_OUTPUT_OPTIONS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_OUTPUT (location_type l)
-      {
-        return symbol_type (token::TOKEN_OUTPUT, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_OUTPUT (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_OUTPUT, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_DEBUGLEVEL (location_type l)
-      {
-        return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_DEBUGLEVEL (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_DEBUGLEVEL, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SEVERITY (location_type l)
-      {
-        return symbol_type (token::TOKEN_SEVERITY, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SEVERITY (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SEVERITY, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_FLUSH (location_type l)
-      {
-        return symbol_type (token::TOKEN_FLUSH, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_FLUSH (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_FLUSH, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_MAXSIZE (location_type l)
-      {
-        return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_MAXSIZE (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_MAXSIZE, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_MAXVER (location_type l)
-      {
-        return symbol_type (token::TOKEN_MAXVER, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_MAXVER (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_MAXVER, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_TOPLEVEL_JSON (location_type l)
-      {
-        return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_TOPLEVEL_JSON (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_TOPLEVEL_DHCPDDNS (location_type l)
-      {
-        return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_TOPLEVEL_DHCPDDNS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_DHCPDDNS (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_DHCPDDNS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_DHCPDDNS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_TSIG_KEY (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_TSIG_KEY (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_TSIG_KEY, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_TSIG_KEYS (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_TSIG_KEYS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_DDNS_DOMAIN (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_DDNS_DOMAIN (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_DDNS_DOMAINS (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_DDNS_DOMAINS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_DNS_SERVER (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_DNS_SERVER (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_DNS_SERVER, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_SUB_DNS_SERVERS (location_type l)
-      {
-        return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_SUB_DNS_SERVERS (const location_type& l)
-      {
-        return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_STRING (std::string v, location_type l)
-      {
-        return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_STRING (const std::string& v, const location_type& l)
-      {
-        return symbol_type (token::TOKEN_STRING, v, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_INTEGER (int64_t v, location_type l)
-      {
-        return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_INTEGER (const int64_t& v, const location_type& l)
-      {
-        return symbol_type (token::TOKEN_INTEGER, v, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_FLOAT (double v, location_type l)
-      {
-        return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_FLOAT (const double& v, const location_type& l)
-      {
-        return symbol_type (token::TOKEN_FLOAT, v, l);
-      }
-#endif
-#if 201103L <= YY_CPLUSPLUS
-      static
-      symbol_type
-      make_BOOLEAN (bool v, location_type l)
-      {
-        return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
-      }
-#else
-      static
-      symbol_type
-      make_BOOLEAN (const bool& v, const location_type& l)
-      {
-        return symbol_type (token::TOKEN_BOOLEAN, v, l);
-      }
-#endif
+    // Symbol constructors declarations.
+    static
+    symbol_type
+    make_END (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_COMMA (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_COLON (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_LSQUARE_BRACKET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_RSQUARE_BRACKET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_LCURLY_BRACKET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_RCURLY_BRACKET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_NULL_TYPE (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DHCP6 (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DHCP4 (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_CONTROL_AGENT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DHCPDDNS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_IP_ADDRESS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_PORT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DNS_SERVER_TIMEOUT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_NCR_PROTOCOL (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_UDP (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_TCP (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_NCR_FORMAT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_JSON (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_USER_CONTEXT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_COMMENT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_FORWARD_DDNS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_REVERSE_DDNS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DDNS_DOMAINS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_KEY_NAME (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DNS_SERVERS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_HOSTNAME (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_TSIG_KEYS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_ALGORITHM (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DIGEST_BITS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SECRET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_CONTROL_SOCKET (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SOCKET_TYPE (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SOCKET_NAME (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_LOGGING (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_LOGGERS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_NAME (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_OUTPUT_OPTIONS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_OUTPUT (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_DEBUGLEVEL (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SEVERITY (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_FLUSH (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_MAXSIZE (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_MAXVER (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_PATTERN (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_TOPLEVEL_JSON (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_TOPLEVEL_DHCPDDNS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_DHCPDDNS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_TSIG_KEY (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_TSIG_KEYS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_DDNS_DOMAIN (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_DDNS_DOMAINS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_DNS_SERVER (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_SUB_DNS_SERVERS (YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l);
+
+    static
+    symbol_type
+    make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l);
+
 
 
   private:
@@ -1822,26 +1073,26 @@ switch (yytype)
     struct by_state
     {
       /// Default constructor.
-      by_state () YY_NOEXCEPT;
+      by_state ();
 
       /// The symbol type as needed by the constructor.
       typedef state_type kind_type;
 
       /// Constructor.
-      by_state (kind_type s) YY_NOEXCEPT;
+      by_state (kind_type s);
 
       /// Copy constructor.
-      by_state (const by_state& that) YY_NOEXCEPT;
+      by_state (const by_state& other);
 
       /// Record that this symbol is empty.
-      void clear () YY_NOEXCEPT;
+      void clear ();
 
       /// Steal the symbol type from \a that.
       void move (by_state& that);
 
       /// The (internal) type number (corresponding to \a state).
       /// \a empty_symbol when empty.
-      symbol_number_type type_get () const YY_NOEXCEPT;
+      symbol_number_type type_get () const;
 
       /// The state number used to denote an empty symbol.
       enum { empty_state = -1 };
@@ -1862,137 +1113,13 @@ switch (yytype)
       stack_symbol_type (YY_RVREF (stack_symbol_type) that);
       /// Steal the contents from \a sym to build this.
       stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
-#if YY_CPLUSPLUS < 201103L
+#if !defined __cplusplus || __cplusplus < 201103L
       /// Assignment, needed by push_back by some old implementations.
       /// Moves the contents of that.
       stack_symbol_type& operator= (stack_symbol_type& that);
 #endif
     };
 
-    /// A stack with random access from its top.
-    template <typename T, typename S = std::vector<T> >
-    class stack
-    {
-    public:
-      // Hide our reversed order.
-      typedef typename S::reverse_iterator iterator;
-      typedef typename S::const_reverse_iterator const_iterator;
-      typedef typename S::size_type size_type;
-
-      stack (size_type n = 200)
-        : seq_ (n)
-      {}
-
-      /// Random access.
-      ///
-      /// Index 0 returns the topmost element.
-      T&
-      operator[] (size_type i)
-      {
-        return seq_[size () - 1 - i];
-      }
-
-      /// Random access.
-      ///
-      /// Index 0 returns the topmost element.
-      T&
-      operator[] (int i)
-      {
-        return operator[] (size_type (i));
-      }
-
-      /// Random access.
-      ///
-      /// Index 0 returns the topmost element.
-      const T&
-      operator[] (size_type i) const
-      {
-        return seq_[size () - 1 - i];
-      }
-
-      /// Random access.
-      ///
-      /// Index 0 returns the topmost element.
-      const T&
-      operator[] (int i) const
-      {
-        return operator[] (size_type (i));
-      }
-
-      /// Steal the contents of \a t.
-      ///
-      /// Close to move-semantics.
-      void
-      push (YY_MOVE_REF (T) t)
-      {
-        seq_.push_back (T ());
-        operator[] (0).move (t);
-      }
-
-      /// Pop elements from the stack.
-      void
-      pop (int n = 1) YY_NOEXCEPT
-      {
-        for (; 0 < n; --n)
-          seq_.pop_back ();
-      }
-
-      /// Pop all elements from the stack.
-      void
-      clear () YY_NOEXCEPT
-      {
-        seq_.clear ();
-      }
-
-      /// Number of elements on the stack.
-      size_type
-      size () const YY_NOEXCEPT
-      {
-        return seq_.size ();
-      }
-
-      /// Iterator on top of the stack (going downwards).
-      const_iterator
-      begin () const YY_NOEXCEPT
-      {
-        return seq_.rbegin ();
-      }
-
-      /// Bottom of the stack.
-      const_iterator
-      end () const YY_NOEXCEPT
-      {
-        return seq_.rend ();
-      }
-
-      /// Present a slice of the top of a stack.
-      class slice
-      {
-      public:
-        slice (const stack& stack, int range)
-          : stack_ (stack)
-          , range_ (range)
-        {}
-
-        const T&
-        operator[] (int i) const
-        {
-          return stack_[range_ - i];
-        }
-
-      private:
-        const stack& stack_;
-        int range_;
-      };
-
-    private:
-      stack (const stack&);
-      stack& operator= (const stack&);
-      /// The wrapped container.
-      S seq_;
-    };
-
-
     /// Stack type.
     typedef stack<stack_symbol_type> stack_type;
 
@@ -2022,11 +1149,11 @@ switch (yytype)
     {
       yyeof_ = 0,
       yylast_ = 304,     ///< Last index in yytable_.
-      yynnts_ = 146,  ///< Number of nonterminal symbols.
+      yynnts_ = 148,  ///< Number of nonterminal symbols.
       yyfinal_ = 20, ///< Termination state number.
       yyterror_ = 1,
       yyerrcode_ = 256,
-      yyntokens_ = 60  ///< Number of tokens.
+      yyntokens_ = 61  ///< Number of tokens.
     };
 
 
@@ -2034,17 +1161,16 @@ switch (yytype)
     isc::d2::D2ParserContext& ctx;
   };
 
+  // Symbol number corresponding to token number t.
   inline
   D2Parser::token_number_type
   D2Parser::yytranslate_ (token_type t)
   {
-    // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
-    // TOKEN-NUM as returned by yylex.
     static
     const token_number_type
     translate_table[] =
     {
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -2075,9 +1201,9 @@ switch (yytype)
       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
+      55,    56,    57,    58,    59,    60
     };
-    const unsigned user_token_number_max_ = 314;
+    const unsigned user_token_number_max_ = 315;
     const token_number_type undef_token_ = 2;
 
     if (static_cast<int> (t) <= yyeof_)
@@ -2088,36 +1214,47 @@ switch (yytype)
       return undef_token_;
   }
 
+  inline
+  D2Parser::syntax_error::syntax_error (const location_type& l, const std::string& m)
+    : std::runtime_error (m)
+    , location (l)
+  {}
+
   // basic_symbol.
-#if 201103L <= YY_CPLUSPLUS
   template <typename Base>
-  D2Parser::basic_symbol<Base>::basic_symbol (basic_symbol&& that)
-    : Base (std::move (that))
+  D2Parser::basic_symbol<Base>::basic_symbol ()
+    : value ()
+    , location ()
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (YY_RVREF (basic_symbol) other)
+    : Base (YY_MOVE (other))
     , value ()
-    , location (std::move (that.location))
+    , location (YY_MOVE (other.location))
   {
-    switch (this->type_get ())
+    switch (other.type_get ())
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
-        value.move< ElementPtr > (std::move (that.value));
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
+        value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (other.value));
         break;
 
-      case 59: // "boolean"
-        value.move< bool > (std::move (that.value));
+      case 60: // "boolean"
+        value.YY_MOVE_OR_COPY< bool > (YY_MOVE (other.value));
         break;
 
-      case 58: // "floating point"
-        value.move< double > (std::move (that.value));
+      case 59: // "floating point"
+        value.YY_MOVE_OR_COPY< double > (YY_MOVE (other.value));
         break;
 
-      case 57: // "integer"
-        value.move< int64_t > (std::move (that.value));
+      case 58: // "integer"
+        value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (other.value));
         break;
 
-      case 56: // "constant string"
-        value.move< std::string > (std::move (that.value));
+      case 57: // "constant string"
+        value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (other.value));
         break;
 
       default:
@@ -2125,49 +1262,107 @@ switch (yytype)
     }
 
   }
-#endif
 
+
+  // Implementation of basic_symbol constructor for each type.
   template <typename Base>
-  D2Parser::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
-    : Base (that)
-    , value ()
-    , location (that.location)
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l)
+    : Base (t)
+    , location (YY_MOVE (l))
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l)
+    : Base (t)
+    , value (YY_MOVE (v))
+    , location (YY_MOVE (l))
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l)
+    : Base (t)
+    , value (YY_MOVE (v))
+    , location (YY_MOVE (l))
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l)
+    : Base (t)
+    , value (YY_MOVE (v))
+    , location (YY_MOVE (l))
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l)
+    : Base (t)
+    , value (YY_MOVE (v))
+    , location (YY_MOVE (l))
+  {}
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l)
+    : Base (t)
+    , value (YY_MOVE (v))
+    , location (YY_MOVE (l))
+  {}
+
+
+
+  template <typename Base>
+  D2Parser::basic_symbol<Base>::~basic_symbol ()
+  {
+    clear ();
+  }
+
+  template <typename Base>
+  void
+  D2Parser::basic_symbol<Base>::clear ()
   {
-    switch (this->type_get ())
+    // User destructor.
+    symbol_number_type yytype = this->type_get ();
+    basic_symbol<Base>& yysym = *this;
+    (void) yysym;
+    switch (yytype)
+    {
+   default:
+      break;
+    }
+
+    // Type destructor.
+  switch (yytype)
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
-        value.copy< ElementPtr > (YY_MOVE (that.value));
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
+        value.template destroy< ElementPtr > ();
         break;
 
-      case 59: // "boolean"
-        value.copy< bool > (YY_MOVE (that.value));
+      case 60: // "boolean"
+        value.template destroy< bool > ();
         break;
 
-      case 58: // "floating point"
-        value.copy< double > (YY_MOVE (that.value));
+      case 59: // "floating point"
+        value.template destroy< double > ();
         break;
 
-      case 57: // "integer"
-        value.copy< int64_t > (YY_MOVE (that.value));
+      case 58: // "integer"
+        value.template destroy< int64_t > ();
         break;
 
-      case 56: // "constant string"
-        value.copy< std::string > (YY_MOVE (that.value));
+      case 57: // "constant string"
+        value.template destroy< std::string > ();
         break;
 
       default:
         break;
     }
 
+    Base::clear ();
   }
 
-
-
   template <typename Base>
   bool
-  D2Parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
+  D2Parser::basic_symbol<Base>::empty () const
   {
     return Base::type_get () == empty_symbol;
   }
@@ -2179,25 +1374,25 @@ switch (yytype)
     super_type::move (s);
     switch (this->type_get ())
     {
-      case 71: // value
-      case 75: // map_value
-      case 99: // ncr_protocol_value
+      case 72: // value
+      case 76: // map_value
+      case 100: // ncr_protocol_value
         value.move< ElementPtr > (YY_MOVE (s.value));
         break;
 
-      case 59: // "boolean"
+      case 60: // "boolean"
         value.move< bool > (YY_MOVE (s.value));
         break;
 
-      case 58: // "floating point"
+      case 59: // "floating point"
         value.move< double > (YY_MOVE (s.value));
         break;
 
-      case 57: // "integer"
+      case 58: // "integer"
         value.move< int64_t > (YY_MOVE (s.value));
         break;
 
-      case 56: // "constant string"
+      case 57: // "constant string"
         value.move< std::string > (YY_MOVE (s.value));
         break;
 
@@ -2214,18 +1409,9 @@ switch (yytype)
     : type (empty_symbol)
   {}
 
-#if 201103L <= YY_CPLUSPLUS
-  inline
-  D2Parser::by_type::by_type (by_type&& that)
-    : type (that.type)
-  {
-    that.clear ();
-  }
-#endif
-
   inline
-  D2Parser::by_type::by_type (const by_type& that)
-    : type (that.type)
+  D2Parser::by_type::by_type (const by_type& other)
+    : type (other.type)
   {}
 
   inline
@@ -2250,14 +1436,14 @@ switch (yytype)
 
   inline
   int
-  D2Parser::by_type::type_get () const YY_NOEXCEPT
+  D2Parser::by_type::type_get () const
   {
     return type;
   }
 
   inline
   D2Parser::token_type
-  D2Parser::by_type::token () const YY_NOEXCEPT
+  D2Parser::by_type::token () const
   {
     // YYTOKNUM[NUM] -- (External) token number corresponding to the
     // (internal) symbol number NUM (which must be that of a token).  */
@@ -2270,16 +1456,431 @@ switch (yytype)
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
-     305,   306,   307,   308,   309,   310,   311,   312,   313,   314
+     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
+     315
     };
-    return token_type (yytoken_number_[type]);
+    return static_cast<token_type> (yytoken_number_[type]);
   }
 
-#line 14 "d2_parser.yy"
-} } // isc::d2
-#line 2281 "d2_parser.h"
+  // Implementation of make_symbol for each symbol type.
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_END (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_END, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_COMMA (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_COMMA, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_COLON (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_COLON, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_LSQUARE_BRACKET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_LSQUARE_BRACKET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_RSQUARE_BRACKET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_RSQUARE_BRACKET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_LCURLY_BRACKET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_LCURLY_BRACKET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_RCURLY_BRACKET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_RCURLY_BRACKET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_NULL_TYPE (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_NULL_TYPE, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DHCP6 (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DHCP6, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DHCP4 (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DHCP4, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_CONTROL_AGENT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_CONTROL_AGENT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DHCPDDNS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DHCPDDNS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_IP_ADDRESS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_IP_ADDRESS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_PORT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_PORT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DNS_SERVER_TIMEOUT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_NCR_PROTOCOL (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_NCR_PROTOCOL, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_UDP (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_UDP, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_TCP (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_TCP, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_NCR_FORMAT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_NCR_FORMAT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_JSON (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_JSON, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_USER_CONTEXT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_USER_CONTEXT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_COMMENT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_COMMENT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_FORWARD_DDNS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_FORWARD_DDNS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_REVERSE_DDNS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_REVERSE_DDNS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DDNS_DOMAINS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DDNS_DOMAINS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_KEY_NAME (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_KEY_NAME, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DNS_SERVERS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DNS_SERVERS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_HOSTNAME (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_HOSTNAME, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_TSIG_KEYS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_TSIG_KEYS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_ALGORITHM (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_ALGORITHM, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DIGEST_BITS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DIGEST_BITS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SECRET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SECRET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_CONTROL_SOCKET (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_CONTROL_SOCKET, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SOCKET_TYPE (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SOCKET_TYPE, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SOCKET_NAME (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SOCKET_NAME, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_LOGGING (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_LOGGING, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_LOGGERS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_LOGGERS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_NAME (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_NAME, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_OUTPUT_OPTIONS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_OUTPUT_OPTIONS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_OUTPUT (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_OUTPUT, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_DEBUGLEVEL (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_DEBUGLEVEL, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SEVERITY (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SEVERITY, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_FLUSH (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_FLUSH, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_MAXSIZE (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_MAXSIZE, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_MAXVER (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_MAXVER, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_PATTERN (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_PATTERN, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_TOPLEVEL_JSON (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_TOPLEVEL_JSON, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_TOPLEVEL_DHCPDDNS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_DHCPDDNS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_DHCPDDNS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_TSIG_KEY (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_TSIG_KEY, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_TSIG_KEYS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_TSIG_KEYS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_DDNS_DOMAIN (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_DDNS_DOMAINS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_DNS_SERVER (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_DNS_SERVER, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_SUB_DNS_SERVERS (YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_SUB_DNS_SERVERS, YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_STRING, YY_MOVE (v), YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_INTEGER, YY_MOVE (v), YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_FLOAT, YY_MOVE (v), YY_MOVE (l));
+  }
+
+  inline
+  D2Parser::symbol_type
+  D2Parser::make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l)
+  {
+    return symbol_type (token::TOKEN_BOOLEAN, YY_MOVE (v), YY_MOVE (l));
+  }
 
 
+#line 14 "d2_parser.yy" // lalr1.cc:404
+} } // isc::d2
+#line 1883 "d2_parser.h" // lalr1.cc:404
+
 
 
 
index 5fd42a1f733eea67f41c991787c7051fffed6ddd..0130e7a62ef3e5c928fc36b3bcf2c5768fa4db58 100644 (file)
@@ -89,6 +89,7 @@ using namespace std;
   FLUSH "flush"
   MAXSIZE "maxsize"
   MAXVER "maxver"
+  PATTERN "pattern"
 
   // Not real tokens, just a way to signal what the parser is expected to
   // parse.
@@ -848,6 +849,7 @@ output_params: output
              | flush
              | maxsize
              | maxver
+             | pattern
              ;
 
 output: OUTPUT {
@@ -873,6 +875,14 @@ maxver: MAXVER COLON INTEGER {
     ctx.stack_.back()->set("maxver", maxver);
 }
 
+pattern: PATTERN {
+    ctx.enter(ctx.NO_KEYWORD);
+} COLON STRING {
+    ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("pattern", sev);
+    ctx.leave();
+};
+
 %%
 
 void
index 3a82a88a3184954a01789741d59fee2af4ddbabc..fd43145f268954ab54ecf43dcbfa819f8c15418f 100644 (file)
@@ -1,9 +1,8 @@
-// Generated 201906181714
-// A Bison parser, made by GNU Bison 3.4.1.
+// A Bison parser, made by GNU Bison 3.2.1.
 
 // Locations for Bison parsers in C++
 
-// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018 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
 #  endif
 # endif
 
-#line 14 "d2_parser.yy"
+#line 14 "d2_parser.yy" // location.cc:339
 namespace isc { namespace d2 {
-#line 60 "location.hh"
-
+#line 60 "location.hh" // location.cc:339
   /// A point in a source file.
   class position
   {
@@ -318,8 +316,7 @@ namespace isc { namespace d2 {
     return ostr;
   }
 
-#line 14 "d2_parser.yy"
+#line 14 "d2_parser.yy" // location.cc:339
 } } // isc::d2
-#line 323 "location.hh"
-
+#line 322 "location.hh" // location.cc:339
 #endif // !YY_D2_PARSER_LOCATION_HH_INCLUDED
index 160393c15e766e1433b659a275e92604cf82588e..22ef35f744d2e26eb583a751ca8d621cf4b3a5bd 100644 (file)
@@ -1,5 +1,4 @@
-// Generated 201906181714
-// A Bison parser, made by GNU Bison 3.4.1.
+// A Bison parser, made by GNU Bison 3.2.1.
 
 // Starting with Bison 3.2, this file is useless: the structure it
 // used to define is now defined in "location.hh".
index 958da53ee1e4681c6d6548a82d300c34a602564b..81e152d836b96a78a0b6b5cd75d1557e8601f5d0 100644 (file)
@@ -1,5 +1,4 @@
-// Generated 201906181714
-// A Bison parser, made by GNU Bison 3.4.1.
+// A Bison parser, made by GNU Bison 3.2.1.
 
 // Starting with Bison 3.2, this file is useless: the structure it
 // used to define is now defined with the parser itself.
index c08f25e219f6cdc55b20ece56b47cf1a62b1dfcf..6d46b68d9be0f8047c9d608fe19eb87769f90d31 100644 (file)
@@ -41,7 +41,8 @@
                         "flush": true,
                         "maxsize": 204800,
                         "maxver": 4,
-                        "output": "stdout"
+                        "output": "stdout",
+                        "pattern": "%d [%c/%i] %m\n"
                     }
                 ],
                 "severity": "INFO"