Browse Source

[4271] Lexer files regenerated.

Tomek Mrugalski 8 years ago
parent
commit
312d0a5670
6 changed files with 799 additions and 500 deletions
  1. 233 187
      src/lib/eval/lexer.cc
  2. 0 1
      src/lib/eval/location.hh
  3. 422 250
      src/lib/eval/parser.cc
  4. 144 60
      src/lib/eval/parser.h
  5. 0 1
      src/lib/eval/position.hh
  6. 0 1
      src/lib/eval/stack.hh

+ 233 - 187
src/lib/eval/lexer.cc

@@ -284,7 +284,7 @@ struct yy_buffer_state
 	/* Number of characters read into yy_ch_buf, not including EOB
 	 * characters.
 	 */
-	yy_size_t yy_n_chars;
+	int yy_n_chars;
 
 	/* Whether we "own" the buffer - i.e., we know we created it,
 	 * and can realloc() it to grow it, and should free() it to
@@ -368,7 +368,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 
 /* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
-static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
 yy_size_t yyleng;
 
 /* Points to current character in buffer. */
@@ -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,61 @@ 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[262] =
     {   0,
-       42,   40,   41,    1,   40,   41,    2,   41,   40,   41,
-       32,   40,   41,   33,   40,   41,   36,   40,   41,   40,
-       41,   31,   40,   41,    5,   40,   41,    5,   40,   41,
-       40,   41,   40,   41,   40,   41,16390,   40,   41,16390,
-       34,   40,   41,   35,   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,
+       32,   45,   46,   33,   45,   46,   37,   45,   46,   36,
+       45,   46,   45,   46,   31,   45,   46,    5,   45,   46,
+        5,   45,   46,   45,   46,   45,   46,   45,   46,16390,
+       45,   46,16390,   34,   45,   46,   35,   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,   30,16390,16390,16390,16390,16390,16390,16390,
-    16390,16390,    4,    7,   26,16390,   29,16390,16390,16390,
-    16390,16390,   15,16390,16390,16390,16390,   18,16390,16390,
-       28,16390,16390,16390,16390,16390,16390,16390,16390,16390,
-    16390,16390,16390,16390,16390,   19,16390,16390,16390,16390,
-    16390,16390,   17,16390,   37,16390,16390,16390,16390,   14,
+    16390,16390,16390,   30,16390,16390,16390,16390,16390,16390,
+    16390,16390,16390,16390,    4,    7,   26,16390,   29,16390,
+    16390,16390,16390,16390,16390,16390,   15,16390,16390,16390,
+    16390,   18,16390,16390,   28,16390,16390,16390,16390,16390,
+    16390,16390,16390,16390,16390,16390,16390,16390,   43,16390,
+    16390,16390,16390,   19,16390,16390,16390,16390,16390,16390,
+       17,16390,   38,16390,16390,16390,16390,   14,16390,16390,
     16390,16390,16390,16390,16390,16390,16390,   20,16390,16390,
-    16390,16390,16390,16390,16390,16390,16390,16390,   21,16390,
-       27,16390,   16,16390,   22,16390,16390,16390,    9,16390,
 
-    16390,   10,16390,   11,16390,   24,16390,16390,16390,   23,
-    16390,    7,16390,   38,16390,16390,16390,   39,16390,   13,
-    16390,   12,16390,16390,   25,16390
+    16390,16390,16390,16390,16390,16390,16390,16390,16390,   21,
+    16390,   27,16390,16390,   16,16390,   22,16390,16390,16390,
+        9,16390,16390,   10,16390,   11,16390,   24,16390,16390,
+    16390,   41,16390,   23,16390,    7,16390,16390,   39,16390,
+    16390,16390,   40,16390,16390,   13,16390,   12,16390,16390,
+    16390,16390,   25,16390,16390,   44,16390,16390,16390,   42,
+    16390
     } ;
 
-static yyconst flex_int16_t yy_accept[162] =
+static yyconst flex_int16_t yy_accept[188] =
     {   0,
         1,    1,    1,    2,    4,    7,    9,   11,   14,   17,
-       20,   22,   25,   28,   31,   33,   35,   38,   41,   44,
+       20,   23,   25,   28,   31,   34,   36,   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,   98,   99,  100,
+      100,  101,  102,  102,  103,  103,  103,  103,  103,  104,
+      105,  105,  105,  106,  107,  108,  109,  110,  111,  112,
+      113,  114,  115,  116,  117,  118,  119,  120,  121,  122,
+      123,  124,  126,  127,  128,  129,  130,  131,  132,  133,
+      134,  135,  135,  136,  137,  139,  141,  142,  143,  144,
+      145,  146,  147,  149,  150,  151,  152,  154,  155,  157,
+
+      158,  159,  160,  161,  162,  163,  164,  165,  166,  167,
+      167,  168,  169,  171,  172,  173,  174,  176,  177,  178,
+      179,  180,  181,  183,  185,  186,  187,  188,  190,  191,
+      192,  193,  193,  194,  195,  196,  197,  198,  200,  201,
+      202,  203,  204,  205,  206,  207,  208,  209,  210,  210,
+      212,  214,  215,  217,  219,  220,  221,  223,  224,  226,
+      228,  230,  231,  232,  234,  236,  237,  238,  239,  241,
+      242,  243,  245,  245,  246,  248,  250,  251,  252,  253,
+      255,  256,  258,  259,  260,  262,  262
     } ;
 
 static yyconst YY_CHAR yy_ec[256] =
@@ -549,16 +555,16 @@ static yyconst YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    2,    1,    1,    1,    1,    1,    1,    4,    5,
-        6,    1,    1,    7,    8,    9,    1,   10,   11,   11,
-       11,   12,   11,   13,   11,   11,   11,   14,    1,    1,
-       15,    1,    1,    1,   16,   16,   16,   16,   16,   16,
-       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
-       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,
+        6,    7,    1,    8,    9,   10,    1,   11,   12,   12,
+       12,   13,   12,   14,   12,   12,   12,   15,    1,    1,
+       16,    1,    1,    1,   17,   17,   17,   17,   17,   17,
+       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,   18,   19,   18,   18,
+       20,    1,   21,    1,   22,    1,   23,   24,   25,   26,
+
+       27,   17,   28,   29,   30,   18,   31,   32,   33,   34,
+       35,   36,   18,   37,   38,   39,   40,   41,   18,   42,
+       43,   18,    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 +581,166 @@ 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[44] =
     {   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,    1,    2,    1,    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,    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[192] =
     {   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,  296,  297,  293,  291,  289,  297,  297,  297,
+      297,   33,  297,   38,   35,  277,  275,   79,  112,  297,
+      297,   24,   36,  267,   25,  259,   46,  258,   37,  252,
+       32,   43,  259,   46,   52,  258,  254,  281,  279,  277,
+      297,  119,  129,   53,  265,  264,    0,  263,    0,  297,
+      142,  144,    0,    0,  297,  245,  250,  252,  240,  234,
+      233,  241,  247,  227,  241,  224,  232,  240,  236,  224,
+      223,    0,  234,  221,  227,  235,  233,  214,  232,  220,
+      230,  138,    0,    0,    0,    0,  226,  226,  227,  222,
+      210,  221,    0,  212,  209,  213,    0,  204,    0,  212,
+
+      204,   70,  217,  213,  200,  198,  202,  209,  208,  142,
+      207,  209,    0,  194,  191,  203,    0,  201,  204,  183,
+      190,  201,    0,    0,  180,  196,  182,    0,  182,  184,
+      192,  147,  180,  177,  179,  176,  176,    0,  186,  165,
+      164,  171,  153,  159,  157,  163,  155,  154,  157,    0,
+        0,  153,    0,    0,  163,  161,    0,  161,    0,    0,
+        0,  156,  159,  175,    0,  161,  153,  145,    0,  144,
+      146,    0,  174,  141,    0,    0,  150,  132,  135,    0,
+      111,    0,   90,   61,    0,  297,  199,  201,  203,   83,
+      206
+
     } ;
 
-static yyconst flex_int16_t yy_def[166] =
+static yyconst flex_int16_t yy_def[192] =
     {   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,
-       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,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+      186,    1,  186,  186,  186,  186,  187,  186,  186,  186,
+      186,  186,  186,  186,   14,  188,  186,  186,   18,  186,
+      186,   18,   18,   18,   18,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,  186,  186,  187,
+      186,  186,  186,   14,  188,  189,  190,  188,  191,  186,
+      186,   19,   18,   19,  186,   19,   19,   19,   19,   18,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,  186,  190,  191,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+
+       19,   19,   19,   19,   19,   19,   19,   19,   19,  186,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,  186,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,  186,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,  186,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
+       19,   19,   19,   19,   19,    0,  186,  186,  186,  186,
+      186
 
-      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
     } ;
 
-static yyconst flex_uint16_t yy_nxt[310] =
+static yyconst flex_uint16_t yy_nxt[341] =
     {   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
+       14,   15,   15,   15,   16,   17,   18,   19,   19,   20,
+       21,    4,   22,   18,   23,   24,   25,   26,   27,   19,
+       19,   28,   29,   30,   31,   32,   33,   34,   35,   19,
+       36,   19,   37,   42,   42,   42,   42,   43,   44,   44,
+       44,   44,   45,  186,   46,   56,   47,   57,   61,   68,
+       46,   46,   46,   46,   46,   58,   62,   71,   72,   73,
+       59,  186,   64,   74,   69,   76,  186,   65,   78,   47,
+       51,   51,  123,  124,   66,   77,   83,   52,   79,   53,
+       53,   53,   53,   45,  186,   53,   54,   54,  185,   55,
+
+       52,   53,   53,   53,   53,   53,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,  186,  184,   54,   42,
+       42,   42,   42,  183,   54,   54,   54,   54,   54,   82,
+       82,   82,   82,   51,   51,  186,  186,  110,   82,   82,
+       82,   82,  132,  132,  132,  132,  149,  132,  132,  132,
+      132,  182,   55,  181,  186,  159,  160,  166,  166,  166,
+      166,  166,  166,  166,  166,  186,  186,  180,  179,  177,
+      176,  175,  174,  173,  172,  171,  170,  169,  168,  167,
+      165,  164,  163,  162,  186,  161,  158,  157,  178,   40,
+
+      156,   40,   40,   40,   48,   48,   46,   46,   84,   84,
+       84,  155,  154,  153,  152,  151,  150,  148,  147,  146,
+      145,  144,  143,  142,  141,  140,  139,  138,  137,  136,
+      135,  134,  133,  131,  130,  129,  128,  127,  126,  125,
+      122,  121,  120,  119,  118,  117,  116,  115,  114,  113,
+      112,  111,  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,   49,   45,   49,
+       41,   39,   38,   81,   80,   75,   70,   67,   63,   60,
+       50,   49,   41,   39,   38,  186,    3,  186,  186,  186,
+
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186
     } ;
 
-static yyconst flex_int16_t yy_chk[310] =
+static yyconst flex_int16_t yy_chk[341] =
     {   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,
-
-       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
+        1,    1,    1,   12,   12,   12,   12,   14,   14,   14,
+       14,   14,   14,   15,   14,   22,   14,   22,   25,   29,
+       14,   14,   14,   14,   14,   23,   25,   31,   31,   32,
+       23,   44,   27,   32,   29,   34,   15,   27,   35,   14,
+       18,   18,  102,  102,   27,   34,  190,   18,   35,   18,
+       18,   18,   18,   18,   44,   18,   18,   18,  184,   18,
+
+       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
+       18,   18,   19,   19,   19,   19,   19,  183,   19,   42,
+       42,   42,   42,  181,   19,   19,   19,   19,   19,   43,
+       43,   43,   43,   51,   51,   52,   52,   82,   82,   82,
+       82,   82,  110,  110,  110,  110,  132,  132,  132,  132,
+      132,  179,   51,  178,   52,  143,  143,  149,  149,  149,
+      149,  166,  166,  166,  166,  173,  173,  177,  174,  171,
+      170,  168,  167,  164,  163,  162,  158,  156,  155,  152,
+      148,  147,  146,  145,  173,  144,  142,  141,  173,  187,
+
+      140,  187,  187,  187,  188,  188,  189,  189,  191,  191,
+      191,  139,  137,  136,  135,  134,  133,  131,  130,  129,
+      127,  126,  125,  122,  121,  120,  119,  118,  116,  115,
+      114,  112,  111,  109,  108,  107,  106,  105,  104,  103,
+      101,  100,   98,   96,   95,   94,   92,   91,   90,   89,
+       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,   48,   46,   45,
+       40,   39,   38,   37,   36,   33,   30,   28,   26,   24,
+       17,   16,    7,    6,    5,    3,  186,  186,  186,  186,
+
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  186,  186,  186
     } ;
 
 /* 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,  173,  174,  175,  177
+      166,  167,  168,  169,  170,  171,  172,  174,  175,  176,
+      177,  178,  179,  180,  182
     } ;
 
 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
@@ -798,7 +819,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 823 "lexer.cc"
 
 #define INITIAL 0
 
@@ -1095,7 +1116,7 @@ YY_DECL
     loc.step();
 
 
-#line 1099 "lexer.cc"
+#line 1120 "lexer.cc"
 
 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
@@ -1123,14 +1144,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 >= 187 )
 					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 != 186 );
 
 yy_find_action:
 /* %% [10.0] code to find the action number goes here */
@@ -1193,13 +1214,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 );
@@ -1440,34 +1461,59 @@ return isc::eval::EvalParser::make_COMA(loc);
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 173 "lexer.ll"
-return isc::eval::EvalParser::make_PKT6(loc);
+#line 172 "lexer.ll"
+return isc::eval::EvalParser::make_ANY(loc);
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 174 "lexer.ll"
-return isc::eval::EvalParser::make_MSGTYPE(loc);
+return isc::eval::EvalParser::make_PKT6(loc);
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 175 "lexer.ll"
-return isc::eval::EvalParser::make_TRANSID(loc);
+return isc::eval::EvalParser::make_MSGTYPE(loc);
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
+#line 176 "lexer.ll"
+return isc::eval::EvalParser::make_TRANSID(loc);
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
 #line 177 "lexer.ll"
+return isc::eval::EvalParser::make_VENDOR(loc);
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 178 "lexer.ll"
+return isc::eval::EvalParser::make_VENDOR_CLASS(loc);
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 179 "lexer.ll"
+return isc::eval::EvalParser::make_DATA(loc);
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 180 "lexer.ll"
+return isc::eval::EvalParser::make_ENTERPRISE(loc);
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 182 "lexer.ll"
 driver.error (loc, "Invalid character: " + std::string(yytext));
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 178 "lexer.ll"
+#line 183 "lexer.ll"
 return isc::eval::EvalParser::make_END(loc);
 	YY_BREAK
-case 41:
+case 46:
 YY_RULE_SETUP
-#line 179 "lexer.ll"
+#line 184 "lexer.ll"
 ECHO;
 	YY_BREAK
-#line 1471 "lexer.cc"
+#line 1517 "lexer.cc"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -1709,9 +1755,9 @@ static int yy_get_next_buffer (void)
 	else
 		ret_val = EOB_ACT_CONTINUE_SCAN;
 
-	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+	if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
@@ -1752,7 +1798,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 >= 187 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1780,11 +1826,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 >= 187 )
 			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 == 186);
 	if ( ! yy_is_jam )
 		*(yy_state_ptr)++ = yy_current_state;
 
@@ -2177,7 +2223,7 @@ static void yyensure_buffer_stack (void)
 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 		 * immediate realloc on the next call.
          */
-		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
 								(num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
@@ -2550,7 +2596,7 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 179 "lexer.ll"
+#line 184 "lexer.ll"
 
 
 

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

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

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


+ 144 - 60
src/lib/eval/parser.h

@@ -317,8 +317,11 @@ namespace isc { namespace eval {
       // option_code
       char dummy6[sizeof(uint16_t)];
 
+      // enterprise_id
+      char dummy7[sizeof(uint32_t)];
+
       // nest_level
-      char dummy7[sizeof(uint8_t)];
+      char dummy8[sizeof(uint8_t)];
 };
 
     /// Symbol semantic values.
@@ -374,11 +377,16 @@ namespace isc { namespace eval {
         TOKEN_PKT6 = 287,
         TOKEN_MSGTYPE = 288,
         TOKEN_TRANSID = 289,
-        TOKEN_STRING = 290,
-        TOKEN_INTEGER = 291,
-        TOKEN_HEXSTRING = 292,
-        TOKEN_OPTION_NAME = 293,
-        TOKEN_IP_ADDRESS = 294
+        TOKEN_VENDOR_CLASS = 290,
+        TOKEN_VENDOR = 291,
+        TOKEN_ANY = 292,
+        TOKEN_DATA = 293,
+        TOKEN_ENTERPRISE = 294,
+        TOKEN_STRING = 295,
+        TOKEN_INTEGER = 296,
+        TOKEN_HEXSTRING = 297,
+        TOKEN_OPTION_NAME = 298,
+        TOKEN_IP_ADDRESS = 299
       };
     };
 
@@ -428,6 +436,8 @@ namespace isc { namespace eval {
 
   basic_symbol (typename Base::kind_type t, const uint16_t v, const location_type& l);
 
+  basic_symbol (typename Base::kind_type t, const uint32_t v, const location_type& l);
+
   basic_symbol (typename Base::kind_type t, const uint8_t v, const location_type& l);
 
 
@@ -631,6 +641,26 @@ namespace isc { namespace eval {
 
     static inline
     symbol_type
+    make_VENDOR_CLASS (const location_type& l);
+
+    static inline
+    symbol_type
+    make_VENDOR (const location_type& l);
+
+    static inline
+    symbol_type
+    make_ANY (const location_type& l);
+
+    static inline
+    symbol_type
+    make_DATA (const location_type& l);
+
+    static inline
+    symbol_type
+    make_ENTERPRISE (const location_type& l);
+
+    static inline
+    symbol_type
     make_STRING (const std::string& v, const location_type& l);
 
     static inline
@@ -716,7 +746,7 @@ namespace isc { namespace eval {
     // Tables.
   // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   // STATE-NUM.
-  static const signed char yypact_[];
+  static const short int yypact_[];
 
   // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
   // Performed when YYTABLE does not specify something else to do.  Zero
@@ -734,7 +764,7 @@ namespace isc { namespace eval {
   // number is the opposite.  If YYTABLE_NINF, syntax error.
   static const unsigned char yytable_[];
 
-  static const signed char yycheck_[];
+  static const short int 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_ = 113,     ///< Last index in yytable_.
-      yynnts_ = 12,  ///< Number of nonterminal symbols.
-      yyfinal_ = 25, ///< Termination state number.
+      yylast_ = 169,     ///< Last index in yytable_.
+      yynnts_ = 13,  ///< Number of nonterminal symbols.
+      yyfinal_ = 31, ///< 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 46: // pkt4_field
+      case 52: // pkt4_field
         value.copy< TokenPkt4::FieldType > (other.value);
         break;
 
-      case 51: // pkt6_field
+      case 57: // pkt6_field
         value.copy< TokenPkt6::FieldType > (other.value);
         break;
 
-      case 49: // relay6_field
+      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 50: // nest_level
+      case 51: // enterprise_id
+        value.copy< uint32_t > (other.value);
+        break;
+
+      case 56: // 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 46: // pkt4_field
+      case 52: // pkt4_field
         value.copy< TokenPkt4::FieldType > (v);
         break;
 
-      case 51: // pkt6_field
+      case 57: // pkt6_field
         value.copy< TokenPkt6::FieldType > (v);
         break;
 
-      case 49: // relay6_field
+      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 50: // nest_level
+      case 51: // enterprise_id
+        value.copy< uint32_t > (v);
+        break;
+
+      case 56: // nest_level
         value.copy< uint8_t > (v);
         break;
 
@@ -1079,6 +1117,13 @@ namespace isc { namespace eval {
   {}
 
   template <typename Base>
+  EvalParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const uint32_t 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 uint8_t 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 46: // pkt4_field
+      case 52: // pkt4_field
         value.template destroy< TokenPkt4::FieldType > ();
         break;
 
-      case 51: // pkt6_field
+      case 57: // pkt6_field
         value.template destroy< TokenPkt6::FieldType > ();
         break;
 
-      case 49: // relay6_field
+      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 50: // nest_level
+      case 51: // enterprise_id
+        value.template destroy< uint32_t > ();
+        break;
+
+      case 56: // 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 46: // pkt4_field
+      case 52: // pkt4_field
         value.move< TokenPkt4::FieldType > (s.value);
         break;
 
-      case 51: // pkt6_field
+      case 57: // pkt6_field
         value.move< TokenPkt6::FieldType > (s.value);
         break;
 
-      case 49: // relay6_field
+      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 50: // nest_level
+      case 51: // enterprise_id
+        value.move< uint32_t > (s.value);
+        break;
+
+      case 56: // 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]);
   }
@@ -1460,6 +1514,36 @@ namespace isc { namespace eval {
   }
 
   EvalParser::symbol_type
+  EvalParser::make_VENDOR_CLASS (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_VENDOR_CLASS, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_VENDOR (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_VENDOR, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_ANY (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_ANY, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_DATA (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_DATA, l);
+  }
+
+  EvalParser::symbol_type
+  EvalParser::make_ENTERPRISE (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_ENTERPRISE, l);
+  }
+
+  EvalParser::symbol_type
   EvalParser::make_STRING (const std::string& v, const location_type& l)
   {
     return symbol_type (token::TOKEN_STRING, v, 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
 
 
 

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

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

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

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