Browse Source

trac4272a: regen lexer/parser

Francis Dupont 8 years ago
parent
commit
d9d2ae2b1f
6 changed files with 753 additions and 550 deletions
  1. 226 191
      src/lib/eval/lexer.cc
  2. 1 1
      src/lib/eval/location.hh
  3. 335 251
      src/lib/eval/parser.cc
  4. 189 105
      src/lib/eval/parser.h
  5. 1 1
      src/lib/eval/position.hh
  6. 1 1
      src/lib/eval/stack.hh

+ 226 - 191
src/lib/eval/lexer.cc

@@ -483,8 +483,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	(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 41
-#define YY_END_OF_BUFFER 42
+#define YY_NUM_RULES 46
+#define YY_END_OF_BUFFER 47
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -492,55 +492,58 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_acclist[227] =
+static yyconst flex_int16_t yy_acclist[248] =
     {   0,
-       42,   40,   41,    1,   40,   41,    2,   41,   40,   41,
-       35,   40,   41,   36,   40,   41,   39,   40,   41,   40,
-       41,   34,   40,   41,    5,   40,   41,    5,   40,   41,
-       40,   41,   40,   41,   40,   41,16390,   40,   41,16390,
-       37,   40,   41,   38,   40,   41,   40,   41,16390,   40,
-       41,16390,   40,   41,16390,   40,   41,16390,   40,   41,
-    16390,   40,   41,16390,   40,   41,16390,   40,   41,16390,
-       40,   41,16390,   40,   41,16390,   40,   41,16390,   40,
-       41,16390,   40,   41,16390,   40,   41,16390,    1,    2,
-        3,    5,    5,    7,    8,16390,16390, 8198,16390,16390,
-
+       47,   45,   46,    1,   45,   46,    2,   46,   45,   46,
+       40,   45,   46,   41,   45,   46,   44,   45,   46,   45,
+       46,   39,   45,   46,    5,   45,   46,    5,   45,   46,
+       45,   46,   45,   46,   45,   46,16390,   45,   46,16390,
+       42,   45,   46,   43,   45,   46,   45,   46,16390,   45,
+       46,16390,   45,   46,16390,   45,   46,16390,   45,   46,
+    16390,   45,   46,16390,   45,   46,16390,   45,   46,16390,
+       45,   46,16390,   45,   46,16390,   45,   46,16390,   45,
+       46,16390,   45,   46,16390,   45,   46,16390,   45,   46,
+    16390,   45,   46,16390,    1,    2,    3,    5,    5,    7,
+
+        8,16390,16390, 8198,16390,16390,16390,16390,16390,16390,
     16390,16390,16390,16390,16390,16390,16390,16390,16390,16390,
-    16390,16390,   33,16390,16390,16390,16390,16390,16390,16390,
-    16390,16390,    4,    7,   29,16390,   32,16390,16390,16390,
-    16390,16390,   13,16390,16390,16390,16390,   16,16390,16390,
-       31,16390,16390,16390,16390,16390,16390,16390,16390,16390,
-    16390,16390,16390,16390,16390,   17,16390,16390,16390,16390,
-    16390,16390,   15,16390,   23,16390,16390,16390,16390,   12,
-    16390,16390,16390,16390,16390,16390,16390,   18,16390,16390,
-    16390,16390,16390,16390,16390,16390,16390,16390,   19,16390,
-       30,16390,   14,16390,   20,16390,16390,16390,    9,16390,
-
-    16390,   10,16390,   11,16390,   22,16390,16390,16390,   21,
-    16390,    7,16390,   24,16390,16390,16390,   25,16390,   27,
-    16390,   26,16390,16390,   28,16390
+    16390,   38,16390,16390,16390,16390,16390,16390,16390,16390,
+    16390,16390,    4,    7,   34,16390,   37,16390,16390,16390,
+       20,16390,16390,16390,   15,16390,16390,16390,16390,   21,
+    16390,16390,   23,16390,16390,   36,16390,16390,16390,   17,
+    16390,16390,16390,   19,16390,16390,16390,16390,16390,16390,
+    16390,16390,16390,   24,16390,16390,16390,16390,16390,16390,
+    16390,   22,16390,   30,16390,16390,16390,16390,   14,16390,
+    16390,16390,16390,16390,16390,16390,   25,16390,   18,16390,
+
+    16390,16390,16390,16390,16390,16390,16390,16390,16390,   26,
+    16390,   35,16390,   16,16390,   27,16390,16390,16390,    9,
+    16390,16390,   10,16390,   11,16390,   29,16390,16390,16390,
+       28,16390,    7,16390,   31,16390,16390,16390,   32,16390,
+       13,16390,   12,16390,16390,   33,16390
     } ;
 
-static yyconst flex_int16_t yy_accept[162] =
+static yyconst flex_int16_t yy_accept[174] =
     {   0,
         1,    1,    1,    2,    4,    7,    9,   11,   14,   17,
        20,   22,   25,   28,   31,   33,   35,   38,   41,   44,
        47,   50,   53,   56,   59,   62,   65,   68,   71,   74,
-       77,   80,   83,   86,   89,   90,   91,   91,   92,   93,
-       93,   94,   94,   94,   94,   94,   95,   96,   96,   96,
-       97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
-      107,  108,  109,  110,  111,  112,  113,  115,  116,  117,
-      118,  119,  120,  121,  122,  123,  123,  124,  125,  127,
-      129,  130,  131,  132,  133,  135,  136,  137,  138,  140,
-      141,  143,  144,  145,  146,  147,  148,  149,  150,  151,
-
-      152,  152,  153,  154,  155,  156,  158,  159,  160,  161,
-      162,  163,  165,  167,  168,  169,  170,  172,  173,  174,
-      174,  175,  176,  177,  178,  180,  181,  182,  183,  184,
-      185,  186,  187,  188,  189,  189,  191,  193,  195,  197,
-      198,  199,  201,  202,  204,  206,  208,  209,  210,  212,
-      213,  214,  216,  217,  218,  220,  222,  224,  225,  227,
-      227
+       77,   80,   83,   86,   89,   92,   95,   96,   97,   97,
+       98,   99,   99,  100,  100,  100,  100,  100,  101,  102,
+      102,  102,  103,  104,  105,  106,  107,  108,  109,  110,
+      111,  112,  113,  114,  115,  116,  117,  118,  119,  120,
+      121,  122,  124,  125,  126,  127,  128,  129,  130,  131,
+      132,  133,  133,  134,  135,  137,  139,  140,  141,  143,
+      144,  145,  147,  148,  149,  150,  152,  153,  155,  156,
+
+      158,  159,  160,  162,  163,  164,  166,  167,  168,  169,
+      170,  170,  171,  172,  173,  174,  176,  177,  178,  179,
+      180,  181,  182,  184,  186,  187,  188,  189,  191,  192,
+      193,  193,  194,  195,  196,  197,  199,  201,  202,  203,
+      204,  205,  206,  207,  208,  209,  210,  210,  212,  214,
+      216,  218,  219,  220,  222,  223,  225,  227,  229,  230,
+      231,  233,  234,  235,  237,  238,  239,  241,  243,  245,
+      246,  248,  248
     } ;
 
 static yyconst YY_CHAR yy_ec[256] =
@@ -556,9 +559,9 @@ static yyconst YY_CHAR yy_ec[256] =
        17,   17,   17,   17,   17,   17,   17,   18,   17,   17,
        19,    1,   20,    1,   21,    1,   22,   23,   24,   25,
 
-       26,   16,   27,   28,   29,   17,   30,   31,   32,   33,
-       34,   35,   17,   36,   37,   38,   39,   17,   17,   40,
-       41,   17,    1,    1,    1,    1,    1,    1,    1,    1,
+       26,   27,   28,   29,   30,   17,   31,   32,   33,   34,
+       35,   36,   17,   37,   38,   39,   40,   17,   17,   41,
+       42,   17,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -575,151 +578,158 @@ static yyconst YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst YY_CHAR yy_meta[42] =
+static yyconst YY_CHAR yy_meta[43] =
     {   0,
         1,    1,    2,    1,    1,    1,    1,    1,    3,    4,
         4,    4,    4,    5,    1,    4,    1,    1,    1,    1,
-        1,    4,    4,    4,    4,    4,    1,    1,    1,    1,
+        1,    4,    4,    4,    4,    4,    4,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1
+        1,    1
     } ;
 
-static yyconst flex_uint16_t yy_base[166] =
+static yyconst flex_uint16_t yy_base[178] =
     {   0,
-        0,    0,  267,  268,  264,  262,  260,  268,  268,  268,
-       32,  268,   37,   34,  249,  247,   76,  108,  268,  268,
-       23,   35,  221,  231,   42,  230,   35,  224,   30,   41,
-      231,   46,   55,  227,  253,  251,  249,  268,  115,  125,
-      105,  238,  237,    0,  236,    0,  268,  137,  139,    0,
-        0,  268,  218,  223,  225,  213,  216,  222,  203,  216,
-      200,  207,  215,  211,  199,  198,    0,  209,  196,  202,
-      210,  208,  190,  207,  206,  137,    0,    0,    0,    0,
-      202,  202,  188,  199,    0,  190,  187,  191,    0,  182,
-        0,  190,  182,   70,  195,  191,  178,  176,  180,  187,
-
-      141,  186,  188,  171,  183,    0,  181,  184,  164,  170,
-      181,    0,    0,  161,  176,  162,    0,  162,  173,  151,
-      161,  158,  158,  158,    0,  168,  157,  158,  165,  131,
-      153,  152,  158,  150,  155,    0,    0,    0,    0,  160,
-      148,    0,  133,    0,    0,    0,  127,  130,    0,  159,
-       93,    0,   59,   43,    0,    0,    0,   43,    0,  268,
-      172,  174,  176,   54,  179
+        0,    0,  281,  282,  278,  276,  274,  282,  282,  282,
+       33,  282,   38,   35,  263,  261,   78,  111,  282,  282,
+       23,   36,  237,  233,  243,   43,  245,   42,   36,  236,
+       41,  100,  244,  102,   33,  239,  266,  264,  262,  282,
+      133,  137,  110,  251,  250,    0,  249,    0,  282,  138,
+      150,    0,    0,  282,  230,  236,  238,  225,  219,  227,
+      234,  214,  228,  211,  230,  217,  216,  225,  220,  208,
+      207,    0,  219,  205,  211,  220,  217,  217,  198,  216,
+      215,  150,    0,    0,    0,    0,  211,  211,    0,  196,
+      208,    0,  198,  195,  206,    0,  198,    0,  189,    0,
+
+      197,  189,   71,  203,  199,    0,  185,  183,  187,  195,
+      144,  194,  196,  178,  191,    0,  189,  188,  191,  170,
+      176,  188,    0,    0,  167,  183,  168,    0,  168,  180,
+      155,  167,  164,  164,  164,    0,    0,  175,  163,  164,
+      172,  117,  159,  158,  164,  156,  161,    0,    0,    0,
+        0,  167,  165,    0,  155,    0,    0,    0,  139,   72,
+        0,  165,   56,    0,   50,   51,    0,    0,    0,   45,
+        0,  282,  178,  180,  182,   63,  185
     } ;
 
-static yyconst flex_int16_t yy_def[166] =
+static yyconst flex_int16_t yy_def[178] =
     {   0,
-      160,    1,  160,  160,  160,  160,  161,  160,  160,  160,
-      160,  160,  160,   13,  162,  160,  160,   17,  160,  160,
-       17,   17,   17,   18,   18,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,  160,  160,  161,  160,  160,  160,
-       13,  162,  163,  164,  162,  165,  160,  160,   18,   17,
-       18,  160,   18,   18,   18,   18,   18,   18,   18,   18,
+      172,    1,  172,  172,  172,  172,  173,  172,  172,  172,
+      172,  172,  172,   13,  174,  172,  172,   17,  172,  172,
+       17,   17,   17,   17,   18,   18,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,  172,  172,  173,  172,
+      172,  172,   13,  174,  175,  176,  174,  177,  172,  172,
+       18,   17,   18,  172,   18,   18,   18,   18,   18,   18,
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,   18,  160,  164,  165,   18,   18,
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,  172,  176,  177,   18,   18,   18,   18,   18,   18,
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
 
-      160,   18,   18,   18,   18,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,   18,   18,   18,   18,   18,  160,
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,  160,   18,   18,   18,   18,   18,
-       18,   18,   18,   18,   18,   18,   18,   18,   18,  160,
-       18,   18,   18,   18,   18,   18,   18,   18,   18,    0,
-      160,  160,  160,  160,  160
+      172,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+      172,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,  172,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,  172,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,    0,  172,  172,  172,  172,  172
     } ;
 
-static yyconst flex_uint16_t yy_nxt[310] =
+static yyconst flex_uint16_t yy_nxt[325] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        14,   14,   14,   15,   16,   17,   18,   18,   19,   20,
-        4,   21,   17,   22,   17,   23,   24,   25,   18,   18,
-       26,   27,   28,   29,   30,   31,   32,   33,   18,   18,
-       34,   39,   39,   39,   39,   40,   41,   41,   41,   41,
-       42,  160,   43,   53,   44,   54,   63,   77,   43,   43,
-       43,   43,   43,   55,   66,   67,   68,   59,   56,  159,
-       69,   64,   60,  160,   71,  158,   44,   48,   48,   61,
-       73,  112,  113,   49,   72,   50,   50,   50,   50,   42,
-       74,   50,   51,   51,  157,   52,   49,   50,   50,   50,
-
-       50,   50,   51,   51,   51,   51,   51,   51,   51,   51,
-       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
-       51,  160,  160,   51,   39,   39,   39,   39,  156,   51,
-       51,   51,   51,   51,   76,   76,   76,   76,   48,   48,
-      160,  160,  144,  145,  160,  101,   76,   76,   76,   76,
-      120,  120,  120,  120,  155,  154,   52,  153,  160,  135,
-      120,  120,  120,  120,  150,  150,  150,  150,  150,  150,
-      150,  150,   37,  152,   37,   37,   37,   45,   45,   43,
-       43,   78,   78,   78,  151,  149,  148,  147,  146,  143,
-      142,  141,  140,  139,  138,  137,  136,  134,  133,  132,
-
-      131,  130,  129,  128,  127,  126,  125,  124,  123,  122,
-      121,  119,  118,  117,  116,  115,  114,  111,  110,  109,
-      108,  107,  106,  105,  104,  103,  102,  100,   99,   98,
-       97,   96,   95,   94,   93,   92,   91,   90,   89,   88,
-       87,   86,   85,   84,   83,   82,   81,   80,   79,   46,
-       42,   46,   38,   36,   35,   75,   70,   65,   62,   58,
-       57,   47,   46,   38,   36,   35,  160,    3,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,  160,  160,  160,  160,  160,  160
+        4,   21,   17,   22,   23,   24,   17,   25,   26,   27,
+       18,   28,   29,   30,   31,   32,   33,   34,   35,   18,
+       18,   36,   41,   41,   41,   41,   42,   43,   43,   43,
+       43,   44,  172,   45,   55,   46,   56,   68,   79,   45,
+       45,   45,   45,   45,   45,   57,   83,   66,   62,   80,
+       58,   67,  171,   69,   63,  172,   71,   72,   46,   50,
+       50,   64,  123,  124,  170,   51,  169,   52,   52,   52,
+       52,   44,  168,   52,   53,   53,  167,   54,   51,   52,
+
+       52,   52,   52,   52,   52,   53,   53,   53,   53,   53,
+       53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
+       53,   53,   53,   53,  172,   73,   53,  172,  156,  157,
+       74,   76,   53,   53,   53,   53,   53,   53,   77,   50,
+       50,   78,   41,   41,   41,   41,   82,   82,   82,   82,
+      172,  172,  172,  131,  131,  131,  131,   54,  111,   82,
+       82,   82,   82,  147,  131,  131,  131,  131,  166,  172,
+      162,  162,  162,  162,  162,  162,  162,  162,   39,  165,
+       39,   39,   39,   47,   47,   45,   45,   84,   84,   84,
+      164,  163,  161,  160,  159,  158,  155,  154,  153,  152,
+
+      151,  150,  149,  148,  146,  145,  144,  143,  142,  141,
+      140,  139,  138,  137,  136,  135,  134,  133,  132,  130,
+      129,  128,  127,  126,  125,  122,  121,  120,  119,  118,
+      117,  116,  115,  114,  113,  112,  110,  109,  108,  107,
+      106,  105,  104,  103,  102,  101,  100,   99,   98,   97,
+       96,   95,   94,   93,   92,   91,   90,   89,   88,   87,
+       86,   85,   48,   44,   48,   40,   38,   37,   81,   75,
+       70,   65,   61,   60,   59,   49,   48,   40,   38,   37,
+      172,    3,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172
     } ;
 
-static yyconst flex_int16_t yy_chk[310] =
+static yyconst flex_int16_t yy_chk[325] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,   11,   11,   11,   11,   13,   13,   13,   13,   13,
-       13,   14,   13,   21,   13,   21,   27,  164,   13,   13,
-       13,   13,   13,   22,   29,   29,   30,   25,   22,  158,
-       30,   27,   25,   14,   32,  154,   13,   17,   17,   25,
-       33,   94,   94,   17,   32,   17,   17,   17,   17,   17,
-       33,   17,   17,   17,  153,   17,   17,   17,   17,   17,
+        1,    1,   11,   11,   11,   11,   13,   13,   13,   13,
+       13,   13,   14,   13,   21,   13,   21,   29,   35,   13,
+       13,   13,   13,   13,   13,   22,  176,   28,   26,   35,
+       22,   28,  170,   29,   26,   14,   31,   31,   13,   17,
+       17,   26,  103,  103,  166,   17,  165,   17,   17,   17,
+       17,   17,  163,   17,   17,   17,  160,   17,   17,   17,
 
        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
-       17,   17,   17,   17,   17,   17,   17,   18,   18,   18,
-       18,   18,   41,   18,   39,   39,   39,   39,  151,   18,
-       18,   18,   18,   18,   40,   40,   40,   40,   48,   48,
-       49,   49,  130,  130,   41,   76,   76,   76,   76,   76,
-      101,  101,  101,  101,  148,  147,   48,  143,   49,  120,
-      120,  120,  120,  120,  135,  135,  135,  135,  150,  150,
-      150,  150,  161,  141,  161,  161,  161,  162,  162,  163,
-      163,  165,  165,  165,  140,  134,  133,  132,  131,  129,
-      128,  127,  126,  124,  123,  122,  121,  119,  118,  116,
-
-      115,  114,  111,  110,  109,  108,  107,  105,  104,  103,
-      102,  100,   99,   98,   97,   96,   95,   93,   92,   90,
-       88,   87,   86,   84,   83,   82,   81,   75,   74,   73,
-       72,   71,   70,   69,   68,   66,   65,   64,   63,   62,
-       61,   60,   59,   58,   57,   56,   55,   54,   53,   45,
-       43,   42,   37,   36,   35,   34,   31,   28,   26,   24,
-       23,   16,   15,    7,    6,    5,    3,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,  160,  160,  160,  160,  160,  160
+       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
+       18,   18,   18,   18,   18,   32,   18,   43,  142,  142,
+       32,   34,   18,   18,   18,   18,   18,   18,   34,   50,
+       50,   34,   41,   41,   41,   41,   42,   42,   42,   42,
+       43,   51,   51,  111,  111,  111,  111,   50,   82,   82,
+       82,   82,   82,  131,  131,  131,  131,  131,  159,   51,
+      147,  147,  147,  147,  162,  162,  162,  162,  173,  155,
+      173,  173,  173,  174,  174,  175,  175,  177,  177,  177,
+      153,  152,  146,  145,  144,  143,  141,  140,  139,  138,
+
+      135,  134,  133,  132,  130,  129,  127,  126,  125,  122,
+      121,  120,  119,  118,  117,  115,  114,  113,  112,  110,
+      109,  108,  107,  105,  104,  102,  101,   99,   97,   95,
+       94,   93,   91,   90,   88,   87,   81,   80,   79,   78,
+       77,   76,   75,   74,   73,   71,   70,   69,   68,   67,
+       66,   65,   64,   63,   62,   61,   60,   59,   58,   57,
+       56,   55,   47,   45,   44,   39,   38,   37,   36,   33,
+       30,   27,   25,   24,   23,   16,   15,    7,    6,    5,
+        3,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
+      172,  172,  172,  172
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[42] =
+static yyconst flex_int32_t yy_rule_can_match_eol[47] =
     {   0,
 0, 1, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0,     };
+    0, 0, 0, 0, 0, 0, 0,     };
 
 extern int yy_flex_debug;
 int yy_flex_debug = 1;
 
-static yyconst flex_int16_t yy_rule_linenum[41] =
+static yyconst flex_int16_t yy_rule_linenum[46] =
     {   0,
        82,   86,   92,  102,  108,  122,  129,  143,  144,  145,
       146,  147,  148,  149,  150,  151,  152,  153,  154,  155,
       156,  157,  158,  159,  160,  161,  162,  163,  164,  165,
-      166,  167,  168,  169,  170,  171,  172,  173,  174,  176
+      166,  167,  168,  169,  170,  171,  172,  173,  174,  175,
+      176,  177,  178,  179,  181
     } ;
 
 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
@@ -798,7 +808,7 @@ static isc::eval::location loc;
 // by moving it ahead by yyleng bytes. yyleng specifies the length of the
 // currently matched token.
 #define YY_USER_ACTION  loc.columns(yyleng);
-#line 802 "lexer.cc"
+#line 812 "lexer.cc"
 
 #define INITIAL 0
 
@@ -1095,7 +1105,7 @@ YY_DECL
     loc.step();
 
 
-#line 1099 "lexer.cc"
+#line 1109 "lexer.cc"
 
 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
@@ -1123,14 +1133,14 @@ 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 >= 161 )
+				if ( yy_current_state >= 173 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			*(yy_state_ptr)++ = yy_current_state;
 			++yy_cp;
 			}
-		while ( yy_current_state != 160 );
+		while ( yy_current_state != 172 );
 
 yy_find_action:
 /* %% [10.0] code to find the action number goes here */
@@ -1193,13 +1203,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 < 41 )
+			else if ( yy_act < 46 )
 				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
 				         (long)yy_rule_linenum[yy_act], yytext );
-			else if ( yy_act == 41 )
+			else if ( yy_act == 46 )
 				fprintf( stderr, "--accepting default rule (\"%s\")\n",
 				         yytext );
-			else if ( yy_act == 42 )
+			else if ( yy_act == 47 )
 				fprintf( stderr, "--(end of buffer or a NUL)\n" );
 			else
 				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
@@ -1316,158 +1326,183 @@ return isc::eval::EvalParser::make_RELAY6(loc);
 case 12:
 YY_RULE_SETUP
 #line 147 "lexer.ll"
-return isc::eval::EvalParser::make_TEXT(loc);
+return isc::eval::EvalParser::make_PEERADDR(loc);
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
 #line 148 "lexer.ll"
-return isc::eval::EvalParser::make_HEX(loc);
+return isc::eval::EvalParser::make_LINKADDR(loc);
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 149 "lexer.ll"
-return isc::eval::EvalParser::make_EXISTS(loc);
+return isc::eval::EvalParser::make_TEXT(loc);
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 150 "lexer.ll"
-return isc::eval::EvalParser::make_PKT4(loc);
+return isc::eval::EvalParser::make_HEX(loc);
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 151 "lexer.ll"
-return isc::eval::EvalParser::make_CHADDR(loc);
+return isc::eval::EvalParser::make_EXISTS(loc);
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 152 "lexer.ll"
-return isc::eval::EvalParser::make_HLEN(loc);
+return isc::eval::EvalParser::make_PKT(loc);
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 153 "lexer.ll"
-return isc::eval::EvalParser::make_HTYPE(loc);
+return isc::eval::EvalParser::make_IFACE(loc);
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 154 "lexer.ll"
-return isc::eval::EvalParser::make_CIADDR(loc);
+return isc::eval::EvalParser::make_SRC(loc);
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 155 "lexer.ll"
-return isc::eval::EvalParser::make_GIADDR(loc);
+return isc::eval::EvalParser::make_DST(loc);
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 156 "lexer.ll"
-return isc::eval::EvalParser::make_YIADDR(loc);
+return isc::eval::EvalParser::make_LEN(loc);
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 157 "lexer.ll"
-return isc::eval::EvalParser::make_SIADDR(loc);
+return isc::eval::EvalParser::make_PKT4(loc);
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 158 "lexer.ll"
-return isc::eval::EvalParser::make_PKT6(loc);
+return isc::eval::EvalParser::make_CHADDR(loc);
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 159 "lexer.ll"
-return isc::eval::EvalParser::make_MSGTYPE(loc);
+return isc::eval::EvalParser::make_HLEN(loc);
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 160 "lexer.ll"
-return isc::eval::EvalParser::make_TRANSID(loc);
+return isc::eval::EvalParser::make_HTYPE(loc);
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 161 "lexer.ll"
-return isc::eval::EvalParser::make_PEERADDR(loc);
+return isc::eval::EvalParser::make_CIADDR(loc);
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 162 "lexer.ll"
-return isc::eval::EvalParser::make_LINKADDR(loc);
+return isc::eval::EvalParser::make_GIADDR(loc);
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 163 "lexer.ll"
-return isc::eval::EvalParser::make_SUBSTRING(loc);
+return isc::eval::EvalParser::make_YIADDR(loc);
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 164 "lexer.ll"
-return isc::eval::EvalParser::make_ALL(loc);
+return isc::eval::EvalParser::make_SIADDR(loc);
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 165 "lexer.ll"
-return isc::eval::EvalParser::make_CONCAT(loc);
+return isc::eval::EvalParser::make_PKT6(loc);
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 166 "lexer.ll"
-return isc::eval::EvalParser::make_NOT(loc);
+return isc::eval::EvalParser::make_MSGTYPE(loc);
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 167 "lexer.ll"
-return isc::eval::EvalParser::make_AND(loc);
+return isc::eval::EvalParser::make_TRANSID(loc);
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 168 "lexer.ll"
-return isc::eval::EvalParser::make_OR(loc);
+return isc::eval::EvalParser::make_SUBSTRING(loc);
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 169 "lexer.ll"
-return isc::eval::EvalParser::make_DOT(loc);
+return isc::eval::EvalParser::make_ALL(loc);
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 170 "lexer.ll"
-return isc::eval::EvalParser::make_LPAREN(loc);
+return isc::eval::EvalParser::make_CONCAT(loc);
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 171 "lexer.ll"
-return isc::eval::EvalParser::make_RPAREN(loc);
+return isc::eval::EvalParser::make_NOT(loc);
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 172 "lexer.ll"
-return isc::eval::EvalParser::make_LBRACKET(loc);
+return isc::eval::EvalParser::make_AND(loc);
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 173 "lexer.ll"
-return isc::eval::EvalParser::make_RBRACKET(loc);
+return isc::eval::EvalParser::make_OR(loc);
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 174 "lexer.ll"
-return isc::eval::EvalParser::make_COMA(loc);
+return isc::eval::EvalParser::make_DOT(loc);
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
+#line 175 "lexer.ll"
+return isc::eval::EvalParser::make_LPAREN(loc);
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
 #line 176 "lexer.ll"
+return isc::eval::EvalParser::make_RPAREN(loc);
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 177 "lexer.ll"
+return isc::eval::EvalParser::make_LBRACKET(loc);
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 178 "lexer.ll"
+return isc::eval::EvalParser::make_RBRACKET(loc);
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 179 "lexer.ll"
+return isc::eval::EvalParser::make_COMA(loc);
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 181 "lexer.ll"
 driver.error (loc, "Invalid character: " + std::string(yytext));
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 177 "lexer.ll"
+#line 182 "lexer.ll"
 return isc::eval::EvalParser::make_END(loc);
 	YY_BREAK
-case 41:
+case 46:
 YY_RULE_SETUP
-#line 178 "lexer.ll"
+#line 183 "lexer.ll"
 ECHO;
 	YY_BREAK
-#line 1471 "lexer.cc"
+#line 1506 "lexer.cc"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -1752,7 +1787,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 >= 161 )
+			if ( yy_current_state >= 173 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1780,11 +1815,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 >= 161 )
+		if ( yy_current_state >= 173 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 160);
+	yy_is_jam = (yy_current_state == 172);
 	if ( ! yy_is_jam )
 		*(yy_state_ptr)++ = yy_current_state;
 
@@ -2550,7 +2585,7 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 178 "lexer.ll"
+#line 183 "lexer.ll"
 
 
 

+ 1 - 1
src/lib/eval/location.hh

@@ -1,4 +1,4 @@
-// Generated 201606101509
+// Generated 201608081450
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Locations for Bison parsers in C++

File diff suppressed because it is too large
+ 335 - 251
src/lib/eval/parser.cc


+ 189 - 105
src/lib/eval/parser.h

@@ -304,21 +304,24 @@ namespace isc { namespace eval {
       // pkt6_field
       char dummy3[sizeof(TokenPkt6::FieldType)];
 
+      // pkt_metadata
+      char dummy4[sizeof(TokenPkt::MetadataType)];
+
       // relay6_field
-      char dummy4[sizeof(TokenRelay6Field::FieldType)];
+      char dummy5[sizeof(TokenRelay6Field::FieldType)];
 
       // "constant string"
       // "integer"
       // "constant hexstring"
       // "option name"
       // "ip address"
-      char dummy5[sizeof(std::string)];
+      char dummy6[sizeof(std::string)];
 
       // option_code
-      char dummy6[sizeof(uint16_t)];
+      char dummy7[sizeof(uint16_t)];
 
       // nest_level
-      char dummy7[sizeof(uint8_t)];
+      char dummy8[sizeof(uint8_t)];
 };
 
     /// Symbol semantic values.
@@ -351,34 +354,39 @@ namespace isc { namespace eval {
         TOKEN_OPTION = 264,
         TOKEN_RELAY4 = 265,
         TOKEN_RELAY6 = 266,
-        TOKEN_LBRACKET = 267,
-        TOKEN_RBRACKET = 268,
-        TOKEN_DOT = 269,
-        TOKEN_TEXT = 270,
-        TOKEN_HEX = 271,
-        TOKEN_EXISTS = 272,
-        TOKEN_PKT4 = 273,
-        TOKEN_CHADDR = 274,
-        TOKEN_HLEN = 275,
-        TOKEN_HTYPE = 276,
-        TOKEN_CIADDR = 277,
-        TOKEN_GIADDR = 278,
-        TOKEN_YIADDR = 279,
-        TOKEN_SIADDR = 280,
-        TOKEN_PKT6 = 281,
-        TOKEN_MSGTYPE = 282,
-        TOKEN_TRANSID = 283,
-        TOKEN_PEERADDR = 284,
-        TOKEN_LINKADDR = 285,
-        TOKEN_SUBSTRING = 286,
-        TOKEN_ALL = 287,
-        TOKEN_COMA = 288,
-        TOKEN_CONCAT = 289,
-        TOKEN_STRING = 290,
-        TOKEN_INTEGER = 291,
-        TOKEN_HEXSTRING = 292,
-        TOKEN_OPTION_NAME = 293,
-        TOKEN_IP_ADDRESS = 294
+        TOKEN_PEERADDR = 267,
+        TOKEN_LINKADDR = 268,
+        TOKEN_LBRACKET = 269,
+        TOKEN_RBRACKET = 270,
+        TOKEN_DOT = 271,
+        TOKEN_TEXT = 272,
+        TOKEN_HEX = 273,
+        TOKEN_EXISTS = 274,
+        TOKEN_PKT = 275,
+        TOKEN_IFACE = 276,
+        TOKEN_SRC = 277,
+        TOKEN_DST = 278,
+        TOKEN_LEN = 279,
+        TOKEN_PKT4 = 280,
+        TOKEN_CHADDR = 281,
+        TOKEN_HLEN = 282,
+        TOKEN_HTYPE = 283,
+        TOKEN_CIADDR = 284,
+        TOKEN_GIADDR = 285,
+        TOKEN_YIADDR = 286,
+        TOKEN_SIADDR = 287,
+        TOKEN_PKT6 = 288,
+        TOKEN_MSGTYPE = 289,
+        TOKEN_TRANSID = 290,
+        TOKEN_SUBSTRING = 291,
+        TOKEN_ALL = 292,
+        TOKEN_COMA = 293,
+        TOKEN_CONCAT = 294,
+        TOKEN_STRING = 295,
+        TOKEN_INTEGER = 296,
+        TOKEN_HEXSTRING = 297,
+        TOKEN_OPTION_NAME = 298,
+        TOKEN_IP_ADDRESS = 299
       };
     };
 
@@ -422,6 +430,8 @@ namespace isc { namespace eval {
 
   basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType v, const location_type& l);
 
+  basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType v, const location_type& l);
+
   basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType v, const location_type& l);
 
   basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l);
@@ -539,6 +549,14 @@ namespace isc { namespace eval {
 
     static inline
     symbol_type
+    make_PEERADDR (const location_type& l);
+
+    static inline
+    symbol_type
+    make_LINKADDR (const location_type& l);
+
+    static inline
+    symbol_type
     make_LBRACKET (const location_type& l);
 
     static inline
@@ -563,6 +581,26 @@ namespace isc { namespace eval {
 
     static inline
     symbol_type
+    make_PKT (const location_type& l);
+
+    static inline
+    symbol_type
+    make_IFACE (const location_type& l);
+
+    static inline
+    symbol_type
+    make_SRC (const location_type& l);
+
+    static inline
+    symbol_type
+    make_DST (const location_type& l);
+
+    static inline
+    symbol_type
+    make_LEN (const location_type& l);
+
+    static inline
+    symbol_type
     make_PKT4 (const location_type& l);
 
     static inline
@@ -607,14 +645,6 @@ namespace isc { namespace eval {
 
     static inline
     symbol_type
-    make_PEERADDR (const location_type& l);
-
-    static inline
-    symbol_type
-    make_LINKADDR (const location_type& l);
-
-    static inline
-    symbol_type
     make_SUBSTRING (const location_type& l);
 
     static inline
@@ -734,7 +764,7 @@ namespace isc { namespace eval {
   // number is the opposite.  If YYTABLE_NINF, syntax error.
   static const unsigned char yytable_[];
 
-  static const unsigned char yycheck_[];
+  static const signed char yycheck_[];
 
   // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   // symbol of state STATE-NUM.
@@ -854,12 +884,12 @@ namespace isc { namespace eval {
     enum
     {
       yyeof_ = 0,
-      yylast_ = 112,     ///< Last index in yytable_.
-      yynnts_ = 12,  ///< Number of nonterminal symbols.
-      yyfinal_ = 25, ///< Termination state number.
+      yylast_ = 121,     ///< Last index in yytable_.
+      yynnts_ = 13,  ///< Number of nonterminal symbols.
+      yyfinal_ = 27, ///< Termination state number.
       yyterror_ = 1,
       yyerrcode_ = 256,
-      yyntokens_ = 40  ///< Number of tokens.
+      yyntokens_ = 45  ///< Number of tokens.
     };
 
 
@@ -905,9 +935,9 @@ namespace isc { namespace eval {
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44
     };
-    const unsigned int user_token_number_max_ = 294;
+    const unsigned int user_token_number_max_ = 299;
     const token_number_type undef_token_ = 2;
 
     if (static_cast<int>(t) <= yyeof_)
@@ -940,35 +970,39 @@ namespace isc { namespace eval {
   {
       switch (other.type_get ())
     {
-      case 45: // option_repr_type
+      case 50: // option_repr_type
         value.copy< TokenOption::RepresentationType > (other.value);
         break;
 
-      case 47: // pkt4_field
+      case 53: // pkt4_field
         value.copy< TokenPkt4::FieldType > (other.value);
         break;
 
-      case 48: // pkt6_field
+      case 54: // pkt6_field
         value.copy< TokenPkt6::FieldType > (other.value);
         break;
 
-      case 49: // relay6_field
+      case 52: // pkt_metadata
+        value.copy< TokenPkt::MetadataType > (other.value);
+        break;
+
+      case 55: // relay6_field
         value.copy< TokenRelay6Field::FieldType > (other.value);
         break;
 
-      case 35: // "constant string"
-      case 36: // "integer"
-      case 37: // "constant hexstring"
-      case 38: // "option name"
-      case 39: // "ip address"
+      case 40: // "constant string"
+      case 41: // "integer"
+      case 42: // "constant hexstring"
+      case 43: // "option name"
+      case 44: // "ip address"
         value.copy< std::string > (other.value);
         break;
 
-      case 44: // option_code
+      case 49: // option_code
         value.copy< uint16_t > (other.value);
         break;
 
-      case 46: // nest_level
+      case 51: // nest_level
         value.copy< uint8_t > (other.value);
         break;
 
@@ -989,35 +1023,39 @@ namespace isc { namespace eval {
     (void) v;
       switch (this->type_get ())
     {
-      case 45: // option_repr_type
+      case 50: // option_repr_type
         value.copy< TokenOption::RepresentationType > (v);
         break;
 
-      case 47: // pkt4_field
+      case 53: // pkt4_field
         value.copy< TokenPkt4::FieldType > (v);
         break;
 
-      case 48: // pkt6_field
+      case 54: // pkt6_field
         value.copy< TokenPkt6::FieldType > (v);
         break;
 
-      case 49: // relay6_field
+      case 52: // pkt_metadata
+        value.copy< TokenPkt::MetadataType > (v);
+        break;
+
+      case 55: // relay6_field
         value.copy< TokenRelay6Field::FieldType > (v);
         break;
 
-      case 35: // "constant string"
-      case 36: // "integer"
-      case 37: // "constant hexstring"
-      case 38: // "option name"
-      case 39: // "ip address"
+      case 40: // "constant string"
+      case 41: // "integer"
+      case 42: // "constant hexstring"
+      case 43: // "option name"
+      case 44: // "ip address"
         value.copy< std::string > (v);
         break;
 
-      case 44: // option_code
+      case 49: // option_code
         value.copy< uint16_t > (v);
         break;
 
-      case 46: // nest_level
+      case 51: // nest_level
         value.copy< uint8_t > (v);
         break;
 
@@ -1058,6 +1096,13 @@ namespace isc { namespace eval {
   {}
 
   template <typename Base>
+  EvalParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType v, const location_type& l)
+    : Base (t)
+    , value (v)
+    , location (l)
+  {}
+
+  template <typename Base>
   EvalParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType v, const location_type& l)
     : Base (t)
     , value (v)
@@ -1111,35 +1156,39 @@ namespace isc { namespace eval {
     // Type destructor.
     switch (yytype)
     {
-      case 45: // option_repr_type
+      case 50: // option_repr_type
         value.template destroy< TokenOption::RepresentationType > ();
         break;
 
-      case 47: // pkt4_field
+      case 53: // pkt4_field
         value.template destroy< TokenPkt4::FieldType > ();
         break;
 
-      case 48: // pkt6_field
+      case 54: // pkt6_field
         value.template destroy< TokenPkt6::FieldType > ();
         break;
 
-      case 49: // relay6_field
+      case 52: // pkt_metadata
+        value.template destroy< TokenPkt::MetadataType > ();
+        break;
+
+      case 55: // relay6_field
         value.template destroy< TokenRelay6Field::FieldType > ();
         break;
 
-      case 35: // "constant string"
-      case 36: // "integer"
-      case 37: // "constant hexstring"
-      case 38: // "option name"
-      case 39: // "ip address"
+      case 40: // "constant string"
+      case 41: // "integer"
+      case 42: // "constant hexstring"
+      case 43: // "option name"
+      case 44: // "ip address"
         value.template destroy< std::string > ();
         break;
 
-      case 44: // option_code
+      case 49: // option_code
         value.template destroy< uint16_t > ();
         break;
 
-      case 46: // nest_level
+      case 51: // nest_level
         value.template destroy< uint8_t > ();
         break;
 
@@ -1166,35 +1215,39 @@ namespace isc { namespace eval {
     super_type::move(s);
       switch (this->type_get ())
     {
-      case 45: // option_repr_type
+      case 50: // option_repr_type
         value.move< TokenOption::RepresentationType > (s.value);
         break;
 
-      case 47: // pkt4_field
+      case 53: // pkt4_field
         value.move< TokenPkt4::FieldType > (s.value);
         break;
 
-      case 48: // pkt6_field
+      case 54: // pkt6_field
         value.move< TokenPkt6::FieldType > (s.value);
         break;
 
-      case 49: // relay6_field
+      case 52: // pkt_metadata
+        value.move< TokenPkt::MetadataType > (s.value);
+        break;
+
+      case 55: // relay6_field
         value.move< TokenRelay6Field::FieldType > (s.value);
         break;
 
-      case 35: // "constant string"
-      case 36: // "integer"
-      case 37: // "constant hexstring"
-      case 38: // "option name"
-      case 39: // "ip address"
+      case 40: // "constant string"
+      case 41: // "integer"
+      case 42: // "constant hexstring"
+      case 43: // "option name"
+      case 44: // "ip address"
         value.move< std::string > (s.value);
         break;
 
-      case 44: // option_code
+      case 49: // option_code
         value.move< uint16_t > (s.value);
         break;
 
-      case 46: // nest_level
+      case 51: // nest_level
         value.move< uint8_t > (s.value);
         break;
 
@@ -1256,7 +1309,8 @@ namespace isc { namespace eval {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299
     };
     return static_cast<token_type> (yytoken_number_[type]);
   }
@@ -1322,6 +1376,18 @@ namespace isc { namespace eval {
   }
 
   EvalParser::symbol_type
+  EvalParser::make_PEERADDR (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_PEERADDR, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_LINKADDR (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_LINKADDR, l);
+  }
+
+  EvalParser::symbol_type
   EvalParser::make_LBRACKET (const location_type& l)
   {
     return symbol_type (token::TOKEN_LBRACKET, l);
@@ -1358,6 +1424,36 @@ namespace isc { namespace eval {
   }
 
   EvalParser::symbol_type
+  EvalParser::make_PKT (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_PKT, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_IFACE (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_IFACE, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_SRC (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_SRC, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_DST (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_DST, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_LEN (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_LEN, l);
+  }
+
+  EvalParser::symbol_type
   EvalParser::make_PKT4 (const location_type& l)
   {
     return symbol_type (token::TOKEN_PKT4, l);
@@ -1424,18 +1520,6 @@ namespace isc { namespace eval {
   }
 
   EvalParser::symbol_type
-  EvalParser::make_PEERADDR (const location_type& l)
-  {
-    return symbol_type (token::TOKEN_PEERADDR, l);
-  }
-
-  EvalParser::symbol_type
-  EvalParser::make_LINKADDR (const location_type& l)
-  {
-    return symbol_type (token::TOKEN_LINKADDR, l);
-  }
-
-  EvalParser::symbol_type
   EvalParser::make_SUBSTRING (const location_type& l)
   {
     return symbol_type (token::TOKEN_SUBSTRING, l);
@@ -1492,7 +1576,7 @@ namespace isc { namespace eval {
 
 #line 13 "parser.yy" // lalr1.cc:377
 } } // isc::eval
-#line 1496 "parser.h" // lalr1.cc:377
+#line 1580 "parser.h" // lalr1.cc:377
 
 
 

+ 1 - 1
src/lib/eval/position.hh

@@ -1,4 +1,4 @@
-// Generated 201606101509
+// Generated 201608081450
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Positions for Bison parsers in C++

+ 1 - 1
src/lib/eval/stack.hh

@@ -1,4 +1,4 @@
-// Generated 201606101509
+// Generated 201608081450
 // A Bison parser, made by GNU Bison 3.0.4.
 
 // Stack handling for Bison parsers in C++