Add support for query key extraction 75/2375/1
authorvlad shkapenyuk <vshkap@research.att.com>
Wed, 29 Jan 2020 19:06:38 +0000 (14:06 -0500)
committervlad shkapenyuk <vshkap@research.att.com>
Wed, 29 Jan 2020 19:06:38 +0000 (14:06 -0500)
Signed-off-by: vlad shkapenyuk <vshkap@research.att.com>
Change-Id: I06db57103272b6b4406f811d5a061f22782c29d8

18 files changed:
include/app.h
src/ftacmp/analyze_fta.h
src/ftacmp/field_list.h
src/ftacmp/fta.tab.cc
src/ftacmp/fta.tab.cc.h
src/ftacmp/fta.y
src/ftacmp/generate_utils.cc
src/ftacmp/generate_utils.h
src/ftacmp/iface_q.cc
src/ftacmp/iface_q.h
src/ftacmp/parse_fta.h
src/ftacmp/parse_schema.cc
src/ftacmp/parse_schema.h
src/ftacmp/query_plan.cc
src/ftacmp/query_plan.h
src/ftacmp/stream_query.cc
src/ftacmp/stream_query.h
src/ftacmp/translate_fta.cc

index d9967e3..0f9c25f 100644 (file)
 /* HIGH LEVEL APPLICATION INTERFACE */
 /* ================================ */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 
 
@@ -103,4 +107,8 @@ gs_retval_t ftaapp_remove_fta(FTAID f, gs_uint32_t recursive);
 gs_retval_t ftaapp_get_tuple(FTAID * f, gs_uint32_t * size, void *tbuffer,
                              gs_int32_t tbuf_size, gs_int32_t timeout);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 32833c5..0d2a7e0 100644 (file)
@@ -90,6 +90,9 @@ public:
   }
 };
 
+//     Make visible for predicate insertion
+void make_cnf_from_pr(predicate_t *pr, std::vector<cnf_elem *> &clist);
+
 
 //             A GB variable is identified by its name and
 //             its source table variable -- so that joins can be expressed.
index 9b0e1d6..d2a7e0f 100644 (file)
@@ -29,10 +29,11 @@ public:
        field_list(xml_t *x);
 
        int verify_field(std::string name, std::string type, std::string &err){
-               if(fields.count(name) == 0){
-                       err += "\tCould not find field "+name+" in the field list\n";
-                       return 1;
-               }
+// Perhaps re-enable this at some point but for now its an annoyance.
+//             if(fields.count(name) == 0){
+//                     err += "\tCould not find field "+name+" in the field list\n";
+//                     return 1;
+//             }
                if(fields[name] == "")
                        return 0;
                if(type_verifier[fields[name]] != type_verifier[type]){
index 1a32671..30b1938 100644 (file)
@@ -1,14 +1,13 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 3.0.4.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,9 +15,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -47,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "3.0.4"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
 /* Pure parsers.  */
 #define YYPURE 0
 
-/* Using locations.  */
-#define YYLSP_NEEDED 0
+/* Push parsers.  */
+#define YYPUSH 0
 
-/* Substitute the variable and function names.  */
-#define yyparse FtaParserparse
-#define yylex   FtaParserlex
-#define yyerror FtaParsererror
-#define yylval  FtaParserlval
-#define yychar  FtaParserchar
-#define yydebug FtaParserdebug
-#define yynerrs FtaParsernerrs
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     NAME = 258,
-     STRING_TOKEN = 259,
-     INTNUM = 260,
-     LONGINTNUM = 261,
-     APPROXNUM = 262,
-     OR = 263,
-     AND = 264,
-     NOT = 265,
-     COMPARISON = 266,
-     SHIFT_OP = 267,
-     UMINUS = 268,
-     SEMICOLON = 269,
-     LEFTBRACE = 270,
-     RIGHTBRACE = 271,
-     BY = 272,
-     AS = 273,
-     AGGR = 274,
-     FROM = 275,
-     INNER_JOIN = 276,
-     FILTER_JOIN = 277,
-     OUTER_JOIN = 278,
-     LEFT_OUTER_JOIN = 279,
-     RIGHT_OUTER_JOIN = 280,
-     GROUP = 281,
-     HAVING = 282,
-     IN = 283,
-     SELECT = 284,
-     WHERE = 285,
-     SUPERGROUP = 286,
-     CLEANING_WHEN = 287,
-     CLEANING_BY = 288,
-     CLOSING_WHEN = 289,
-     SUCH = 290,
-     THAT = 291,
-     CUBE = 292,
-     ROLLUP = 293,
-     GROUPING_SETS = 294,
-     TRUE_V = 295,
-     FALSE_V = 296,
-     TIMEVAL_L = 297,
-     HEX_L = 298,
-     LHEX_L = 299,
-     IP_L = 300,
-     IPV6_L = 301,
-     MERGE = 302,
-     SLACK = 303,
-     DEFINE_SEC = 304,
-     PARAM_SEC = 305,
-     PROTOCOL = 306,
-     TABLE = 307,
-     STREAM = 308,
-     FTA = 309,
-     UNPACK_FCNS = 310,
-     OPERATOR = 311,
-     OPERATOR_VIEW = 312,
-     FIELDS = 313,
-     SUBQUERIES = 314,
-     SELECTION_PUSHDOWN = 315
-   };
-#endif
-/* Tokens.  */
-#define NAME 258
-#define STRING_TOKEN 259
-#define INTNUM 260
-#define LONGINTNUM 261
-#define APPROXNUM 262
-#define OR 263
-#define AND 264
-#define NOT 265
-#define COMPARISON 266
-#define SHIFT_OP 267
-#define UMINUS 268
-#define SEMICOLON 269
-#define LEFTBRACE 270
-#define RIGHTBRACE 271
-#define BY 272
-#define AS 273
-#define AGGR 274
-#define FROM 275
-#define INNER_JOIN 276
-#define FILTER_JOIN 277
-#define OUTER_JOIN 278
-#define LEFT_OUTER_JOIN 279
-#define RIGHT_OUTER_JOIN 280
-#define GROUP 281
-#define HAVING 282
-#define IN 283
-#define SELECT 284
-#define WHERE 285
-#define SUPERGROUP 286
-#define CLEANING_WHEN 287
-#define CLEANING_BY 288
-#define CLOSING_WHEN 289
-#define SUCH 290
-#define THAT 291
-#define CUBE 292
-#define ROLLUP 293
-#define GROUPING_SETS 294
-#define TRUE_V 295
-#define FALSE_V 296
-#define TIMEVAL_L 297
-#define HEX_L 298
-#define LHEX_L 299
-#define IP_L 300
-#define IPV6_L 301
-#define MERGE 302
-#define SLACK 303
-#define DEFINE_SEC 304
-#define PARAM_SEC 305
-#define PROTOCOL 306
-#define TABLE 307
-#define STREAM 308
-#define FTA 309
-#define UNPACK_FCNS 310
-#define OPERATOR 311
-#define OPERATOR_VIEW 312
-#define FIELDS 313
-#define SUBQUERIES 314
-#define SELECTION_PUSHDOWN 315
+/* Pull parsers.  */
+#define YYPULL 1
 
 
+/* Substitute the variable and function names.  */
+#define yyparse         FtaParserparse
+#define yylex           FtaParserlex
+#define yyerror         FtaParsererror
+#define yydebug         FtaParserdebug
+#define yynerrs         FtaParsernerrs
 
+#define yylval          FtaParserlval
+#define yychar          FtaParserchar
 
 /* Copy the first part of user declarations.  */
-#line 8 "fta.y"
+#line 23 "fta.y" /* yacc.c:339  */
 
 
 
@@ -224,11 +96,15 @@ extern var_defs_t *fta_parse_defines;
 #define YYDEBUG 1
 
 
+#line 100 "fta.tab.cc" /* yacc.c:339  */
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULLPTR
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULLPTR nullptr
+#  else
+#   define YY_NULLPTR 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -238,15 +114,91 @@ extern var_defs_t *fta_parse_defines;
 # define YYERROR_VERBOSE 0
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+   by #include "fta.tab.cc.h".  */
+#ifndef YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED
+# define YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int FtaParserdebug;
 #endif
 
+/* Token type.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+  enum yytokentype
+  {
+    NAME = 258,
+    STRING_TOKEN = 259,
+    INTNUM = 260,
+    LONGINTNUM = 261,
+    APPROXNUM = 262,
+    OR = 263,
+    AND = 264,
+    NOT = 265,
+    COMPARISON = 266,
+    SHIFT_OP = 267,
+    UMINUS = 268,
+    SEMICOLON = 269,
+    LEFTBRACE = 270,
+    RIGHTBRACE = 271,
+    BY = 272,
+    AS = 273,
+    AGGR = 274,
+    FROM = 275,
+    INNER_JOIN = 276,
+    FILTER_JOIN = 277,
+    OUTER_JOIN = 278,
+    LEFT_OUTER_JOIN = 279,
+    RIGHT_OUTER_JOIN = 280,
+    GROUP = 281,
+    HAVING = 282,
+    IN = 283,
+    SELECT = 284,
+    WHERE = 285,
+    SUPERGROUP = 286,
+    CLEANING_WHEN = 287,
+    CLEANING_BY = 288,
+    CLOSING_WHEN = 289,
+    SUCH = 290,
+    THAT = 291,
+    CUBE = 292,
+    ROLLUP = 293,
+    GROUPING_SETS = 294,
+    TRUE_V = 295,
+    FALSE_V = 296,
+    TIMEVAL_L = 297,
+    HEX_L = 298,
+    LHEX_L = 299,
+    IP_L = 300,
+    IPV6_L = 301,
+    MERGE = 302,
+    SLACK = 303,
+    DEFINE_SEC = 304,
+    PARAM_SEC = 305,
+    PROTOCOL = 306,
+    TABLE = 307,
+    STREAM = 308,
+    FTA = 309,
+    UNPACK_FCNS = 310,
+    OPERATOR = 311,
+    OPERATOR_VIEW = 312,
+    FIELDS = 313,
+    SUBQUERIES = 314,
+    SELECTION_PUSHDOWN = 315
+  };
+#endif
+
+/* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 37 "fta.y"
+
+union YYSTYPE
 {
+#line 52 "fta.y" /* yacc.c:355  */
+
        int intval;
        double floatval;
        char *strval;
@@ -289,22 +241,25 @@ typedef union YYSTYPE
        unpack_fcn      *ufcn;
        unpack_fcn_list *ufcnl;
 
-}
-/* Line 193 of yacc.c.  */
-#line 295 "fta.tab.cc"
-       YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
+
+#line 246 "fta.tab.cc" /* yacc.c:355  */
+};
+
+typedef union YYSTYPE YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
 #endif
 
 
+extern YYSTYPE FtaParserlval;
 
-/* Copy the second part of user declarations.  */
+int FtaParserparse (void);
+
+#endif /* !YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED  */
 
+/* Copy the second part of user declarations.  */
 
-/* Line 216 of yacc.c.  */
-#line 308 "fta.tab.cc"
+#line 263 "fta.tab.cc" /* yacc.c:358  */
 
 #ifdef short
 # undef short
@@ -318,11 +273,8 @@ typedef unsigned char yytype_uint8;
 
 #ifdef YYTYPE_INT8
 typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
 #else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
 #endif
 
 #ifdef YYTYPE_UINT16
@@ -342,8 +294,7 @@ typedef short int yytype_int16;
 #  define YYSIZE_T __SIZE_TYPE__
 # elif defined size_t
 #  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 #  define YYSIZE_T size_t
 # else
@@ -354,41 +305,70 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
 #  endif
 # endif
 # ifndef YY_
-#  define YY_(msgid) msgid
+#  define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__                                               \
+      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
+     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+#  define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
 #else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
 #endif
 
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+    _Pragma ("GCC diagnostic pop")
 #else
-static int
-YYID (i)
-    int i;
+# define YY_INITIAL_VALUE(Value) Value
 #endif
-{
-  return i;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
 #endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
 
 #if ! defined yyoverflow || YYERROR_VERBOSE
 
@@ -407,11 +387,11 @@ YYID (i)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -419,8 +399,8 @@ YYID (i)
 # endif
 
 # ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+   /* Pacify GCC's 'empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
     /* The OS might guarantee only one guard page at the bottom of the stack,
        and a page size can be as small as 4096 bytes.  So we cannot safely
@@ -434,25 +414,23 @@ YYID (i)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
-            && (defined YYFREE || defined free)))
+             && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#   if ! defined malloc && ! defined EXIT_SUCCESS
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
+#   if ! defined free && ! defined EXIT_SUCCESS
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
@@ -462,14 +440,14 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 
 #if (! defined yyoverflow \
      && (! defined __cplusplus \
-        || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
 
 /* The size of the maximum gap between one aligned stack and the next.  */
 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -480,46 +458,50 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)             \
-      do                                       \
-       {                                       \
-         YYSIZE_T yyi;                         \
-         for (yyi = 0; yyi < (Count); yyi++)   \
-           (To)[yyi] = (From)[yyi];            \
-       }                                       \
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack)                                       \
-    do                                                                 \
-      {                                                                        \
-       YYSIZE_T yynewbytes;                                            \
-       YYCOPY (&yyptr->Stack, Stack, yysize);                          \
-       Stack = &yyptr->Stack;                                          \
-       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-       yyptr += yynewbytes / sizeof (*yyptr);                          \
-      }                                                                        \
-    while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
+    do                                                                  \
+      {                                                                 \
+        YYSIZE_T yynewbytes;                                            \
+        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+        Stack = &yyptr->Stack_alloc;                                    \
+        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+        yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                 \
+    while (0)
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (0)
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  57
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   708
+#define YYLAST   695
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  80
@@ -527,17 +509,19 @@ union yyalloc
 #define YYNNTS  59
 /* YYNRULES -- Number of rules.  */
 #define YYNRULES  176
-/* YYNRULES -- Number of states.  */
+/* YYNSTATES -- Number of states.  */
 #define YYNSTATES  377
 
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+   by yylex, with out-of-bounds checking.  */
 #define YYUNDEFTOK  2
 #define YYMAXUTOK   315
 
-#define YYTRANSLATE(YYX)                                               \
+#define YYTRANSLATE(YYX)                                                \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+   as returned by yylex, without out-of-bounds checking.  */
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -575,124 +559,31 @@ static const yytype_uint8 yytranslate[] =
 };
 
 #if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     5,     7,    13,    17,    21,    24,    27,
-      29,    33,    37,    40,    43,    45,    47,    51,    56,    60,
-      65,    69,    71,    74,    78,    82,    86,    90,    96,    98,
-     107,   110,   114,   118,   122,   126,   135,   137,   141,   143,
-     146,   148,   152,   158,   164,   170,   172,   176,   177,   179,
-     182,   183,   186,   187,   190,   191,   194,   195,   197,   200,
-     204,   208,   211,   215,   217,   219,   221,   225,   230,   234,
-     240,   242,   246,   250,   254,   258,   262,   266,   270,   274,
-     278,   281,   284,   287,   290,   292,   295,   297,   299,   303,
-     308,   313,   318,   322,   328,   334,   340,   345,   347,   351,
-     355,   361,   363,   367,   369,   371,   373,   375,   377,   379,
-     382,   385,   388,   391,   394,   397,   398,   402,   403,   406,
-     410,   416,   418,   423,   428,   433,   435,   439,   441,   445,
-     447,   451,   457,   461,   464,   469,   471,   475,   481,   485,
-     489,   491,   495,   499,   501,   504,   512,   519,   536,   541,
-     543,   547,   551,   553,   557,   562,   564,   567,   574,   579,
-     580,   584,   586,   589,   592,   595,   599,   604,   609,   614,
-     615,   619,   620,   624,   626,   630,   634
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int16 yyrhs[] =
-{
-      81,     0,    -1,    83,    -1,   125,    -1,    61,    22,   125,
-      82,    23,    -1,    85,    84,    88,    -1,    84,    85,    88,
-      -1,    84,    88,    -1,    85,    88,    -1,    88,    -1,    85,
-      84,    89,    -1,    84,    85,    89,    -1,    84,    89,    -1,
-      85,    89,    -1,    89,    -1,    82,    -1,    83,    21,    82,
-      -1,    57,    22,    86,    23,    -1,    57,    22,    23,    -1,
-      56,    22,    86,    23,    -1,    56,    22,    23,    -1,    87,
-      -1,    86,    87,    -1,     3,     4,    21,    -1,     3,     3,
-      21,    -1,    36,    90,    91,    -1,    54,   122,    92,    -1,
-      54,   122,    55,   109,    92,    -1,   110,    -1,    92,    97,
-     113,   114,   102,    99,   100,   101,    -1,    27,    93,    -1,
-      28,    27,    93,    -1,    30,    27,    93,    -1,    32,    27,
-      93,    -1,    31,    27,    93,    -1,    29,    68,   121,    69,
-       5,    70,    27,    93,    -1,    94,    -1,    93,    69,    94,
-      -1,    95,    -1,    95,     3,    -1,    96,    -1,     3,    71,
-      96,    -1,     3,    71,     3,    71,    96,    -1,     4,    71,
-       3,    71,    96,    -1,    72,     3,    73,    71,    96,    -1,
-       3,    -1,    96,    18,     3,    -1,    -1,    98,    -1,    37,
-     104,    -1,    -1,    39,   104,    -1,    -1,    40,   104,    -1,
-      -1,    41,   104,    -1,    -1,   103,    -1,    34,   104,    -1,
-     104,     8,   104,    -1,   104,     9,   104,    -1,    10,   104,
-      -1,    68,   104,    70,    -1,   105,    -1,   106,    -1,   107,
-      -1,     3,    72,    73,    -1,     3,    72,   111,    73,    -1,
-     109,    11,   109,    -1,   109,    35,    72,   108,    73,    -1,
-     112,    -1,   108,    69,   112,    -1,   109,    15,   109,    -1,
-     109,    16,   109,    -1,   109,    12,   109,    -1,   109,    17,
-     109,    -1,   109,    18,   109,    -1,   109,    13,   109,    -1,
-     109,    19,   109,    -1,   109,    14,   109,    -1,    15,   109,
-      -1,    16,   109,    -1,    74,   109,    -1,    75,   109,    -1,
-     112,    -1,    76,     3,    -1,   120,    -1,   121,    -1,    68,
-     109,    70,    -1,    26,    68,    17,    70,    -1,    26,    68,
-     109,    70,    -1,     3,    68,   111,    70,    -1,     3,    68,
-      70,    -1,    26,    76,    68,    17,    70,    -1,    26,    76,
-      68,   109,    70,    -1,     3,    76,    68,   111,    70,    -1,
-       3,    76,    68,    70,    -1,   109,    -1,   109,    25,     3,
-      -1,   110,    69,   109,    -1,   110,    69,   109,    25,     3,
-      -1,   109,    -1,   111,    69,   109,    -1,     4,    -1,     5,
-      -1,     6,    -1,     7,    -1,    47,    -1,    48,    -1,    49,
-       4,    -1,    50,     4,    -1,    51,     4,    -1,    52,     4,
-      -1,    53,     4,    -1,    77,     3,    -1,    -1,    33,    24,
-     117,    -1,    -1,    38,   124,    -1,    68,   118,    70,    -1,
-     115,    69,    68,   118,    70,    -1,   119,    -1,    45,    68,
-     118,    70,    -1,    44,    68,   118,    70,    -1,    46,    68,
-     115,    70,    -1,   116,    -1,   117,    69,   116,    -1,   119,
-      -1,   118,    69,   119,    -1,     3,    -1,     3,    71,     3,
-      -1,     3,    71,     3,    71,     3,    -1,   109,    25,     3,
-      -1,    78,     3,    -1,     3,    71,    78,     3,    -1,     3,
-      -1,     3,    71,     3,    -1,     3,    71,     3,    71,     3,
-      -1,   121,    79,   121,    -1,   122,    79,   121,    -1,     3,
-      -1,   123,    69,   123,    -1,   124,    69,   123,    -1,   126,
-      -1,   125,   126,    -1,    58,     3,   136,   135,    22,   131,
-      23,    -1,    60,    96,   136,    22,   131,    23,    -1,    64,
-       3,    22,    63,   133,    65,    22,   131,    23,    66,    22,
-     129,    23,    67,   133,    23,    -1,    62,    22,   127,    23,
-      -1,   128,    -1,   127,    21,   128,    -1,     3,     3,     5,
-      -1,   130,    -1,   129,    21,   130,    -1,     3,    68,   138,
-      70,    -1,   132,    -1,   131,   132,    -1,     3,     3,     3,
-     133,   135,    21,    -1,     3,     3,   133,    21,    -1,    -1,
-      68,   134,    70,    -1,     3,    -1,     3,     3,    -1,     3,
-       4,    -1,     3,     5,    -1,   134,    69,     3,    -1,   134,
-      69,     3,     3,    -1,   134,    69,     3,     4,    -1,   134,
-      69,     3,     5,    -1,    -1,    72,   137,    73,    -1,    -1,
-      68,   137,    70,    -1,     3,    -1,   137,    69,     3,    -1,
-       3,     3,   133,    -1,   138,    69,     3,     3,   133,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   189,   189,   194,   201,   215,   220,   225,   230,   234,
-     237,   242,   247,   251,   255,   260,   261,   265,   266,   270,
-     271,   275,   276,   280,   281,   285,   289,   291,   299,   303,
-     315,   316,   317,   318,   319,   320,   324,   325,   329,   330,
-     334,   335,   336,   337,   338,   342,   343,   348,   349,   353,
-     357,   358,   362,   363,   367,   368,   372,   373,   377,   384,
-     385,   386,   387,   388,   392,   393,   394,   395,   399,   403,
-     407,   408,   414,   415,   416,   417,   418,   419,   420,   421,
-     422,   423,   424,   425,   426,   427,   428,   429,   430,   431,
-     432,   433,   434,   435,   436,   437,   438,   443,   444,   445,
-     446,   450,   451,   455,   456,   457,   458,   459,   460,   461,
-     462,   463,   464,   465,   466,   472,   473,   477,   478,   482,
-     483,   487,   488,   489,   490,   494,   495,   499,   500,   504,
-     505,   506,   507,   518,   519,   523,   524,   525,   529,   530,
-     534,   538,   539,   554,   555,   558,   560,   562,   564,   568,
-     569,   573,   577,   578,   582,   585,   586,   590,   591,   595,
-     596,   600,   601,   602,   603,   604,   605,   606,   607,   611,
-     612,   616,   617,   621,   622,   626,   627
+       0,   204,   204,   209,   216,   230,   235,   240,   245,   249,
+     252,   257,   262,   266,   270,   275,   276,   280,   281,   285,
+     286,   290,   291,   295,   296,   300,   304,   306,   314,   318,
+     330,   331,   332,   333,   334,   335,   339,   340,   344,   345,
+     349,   350,   351,   352,   353,   357,   358,   363,   364,   368,
+     372,   373,   377,   378,   382,   383,   387,   388,   392,   399,
+     400,   401,   402,   403,   407,   408,   409,   410,   414,   418,
+     422,   423,   429,   430,   431,   432,   433,   434,   435,   436,
+     437,   438,   439,   440,   441,   442,   443,   444,   445,   446,
+     447,   448,   449,   450,   451,   452,   453,   458,   459,   460,
+     461,   465,   466,   470,   471,   472,   473,   474,   475,   476,
+     477,   478,   479,   480,   481,   487,   488,   492,   493,   497,
+     498,   502,   503,   504,   505,   509,   510,   514,   515,   519,
+     520,   521,   522,   533,   534,   538,   539,   540,   544,   545,
+     549,   553,   554,   569,   570,   573,   575,   577,   579,   583,
+     584,   588,   592,   593,   597,   600,   601,   605,   606,   610,
+     611,   615,   616,   617,   618,   619,   620,   621,   622,   626,
+     627,   631,   632,   636,   637,   641,   642
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -724,13 +615,13 @@ static const char *const yytname[] =
   "unpack_func_list", "unpack_func", "subqueryspec_list", "subq_spec",
   "field_list", "field", "opt_param_commalist", "param_commalist",
   "opt_singleparam_commalist_bkt", "opt_singleparam_commalist",
-  "singleparam_commalist", "namevec_commalist", 0
+  "singleparam_commalist", "namevec_commalist", YY_NULLPTR
 };
 #endif
 
 # ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+   (internal) symbol number NUM (which must be that of a token).  */
 static const yytype_uint16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
@@ -744,55 +635,63 @@ static const yytype_uint16 yytoknum[] =
 };
 # endif
 
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    80,    81,    81,    81,    82,    82,    82,    82,    82,
-      82,    82,    82,    82,    82,    83,    83,    84,    84,    85,
-      85,    86,    86,    87,    87,    88,    89,    89,    90,    91,
-      92,    92,    92,    92,    92,    92,    93,    93,    94,    94,
-      95,    95,    95,    95,    95,    96,    96,    97,    97,    98,
-      99,    99,   100,   100,   101,   101,   102,   102,   103,   104,
-     104,   104,   104,   104,   105,   105,   105,   105,   106,   107,
-     108,   108,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   110,   110,   110,
-     110,   111,   111,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   112,   112,   112,   113,   113,   114,   114,   115,
-     115,   116,   116,   116,   116,   117,   117,   118,   118,   119,
-     119,   119,   119,   120,   120,   121,   121,   121,   122,   122,
-     123,   124,   124,   125,   125,   126,   126,   126,   126,   127,
-     127,   128,   129,   129,   130,   131,   131,   132,   132,   133,
-     133,   134,   134,   134,   134,   134,   134,   134,   134,   135,
-     135,   136,   136,   137,   137,   138,   138
-};
+#define YYPACT_NINF -277
 
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
+#define yypact_value_is_default(Yystate) \
+  (!!((Yystate) == (-277)))
+
+#define YYTABLE_NINF -138
+
+#define yytable_value_is_error(Yytable_value) \
+  0
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+static const yytype_int16 yypact[] =
 {
-       0,     2,     1,     1,     5,     3,     3,     2,     2,     1,
-       3,     3,     2,     2,     1,     1,     3,     4,     3,     4,
-       3,     1,     2,     3,     3,     3,     3,     5,     1,     8,
-       2,     3,     3,     3,     3,     8,     1,     3,     1,     2,
-       1,     3,     5,     5,     5,     1,     3,     0,     1,     2,
-       0,     2,     0,     2,     0,     2,     0,     1,     2,     3,
-       3,     2,     3,     1,     1,     1,     3,     4,     3,     5,
-       1,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-       2,     2,     2,     2,     1,     2,     1,     1,     3,     4,
-       4,     4,     3,     5,     5,     5,     4,     1,     3,     3,
-       5,     1,     3,     1,     1,     1,     1,     1,     1,     2,
-       2,     2,     2,     2,     2,     0,     3,     0,     2,     3,
-       5,     1,     4,     4,     4,     1,     3,     1,     3,     1,
-       3,     5,     3,     2,     4,     1,     3,     5,     3,     3,
-       1,     3,     3,     1,     2,     7,     6,    16,     4,     1,
-       3,     3,     1,     3,     4,     1,     2,     6,     4,     0,
-       3,     1,     2,     2,     2,     3,     4,     4,     4,     0,
-       3,     0,     3,     1,     3,     3,     5
+     413,   489,    37,    51,   105,   114,   120,   124,   128,   126,
+     142,  -277,   136,    72,    24,  -277,  -277,   169,  -277,   104,
+    -277,  -277,  -277,  -277,   489,   489,     0,  -277,  -277,   175,
+     189,   213,   217,   224,   489,   489,   489,   170,   229,   240,
+     338,   426,   182,  -277,  -277,  -277,   235,   230,   369,    35,
+      36,   253,  -277,     1,   169,   319,   289,  -277,    -9,    95,
+    -277,  -277,    95,  -277,  -277,  -277,   148,     8,   255,  -277,
+    -277,   242,   267,  -277,  -277,  -277,  -277,  -277,   257,  -277,
+    -277,  -277,  -277,  -277,    17,   309,   269,   312,   313,   321,
+    -277,   316,   489,   489,   489,   489,   489,   489,   489,   489,
+     347,   489,   351,    37,   489,    37,  -277,   130,  -277,    41,
+    -277,  -277,    81,   372,   305,   375,   378,   360,    83,   382,
+      62,  -277,   323,  -277,  -277,  -277,  -277,  -277,  -277,   676,
+     101,   331,   400,   281,   342,   595,   357,  -277,   348,   349,
+     410,   353,  -277,   420,   412,    17,    37,    17,    17,    17,
+     411,   395,  -277,   264,   554,   248,   143,   143,  -277,  -277,
+    -277,  -277,   533,  -277,   615,  -277,   408,   415,  -277,  -277,
+    -277,   187,   112,   378,   425,  -277,  -277,   150,   447,   429,
+     463,   319,  -277,   253,   489,  -277,   469,  -277,  -277,   165,
+    -277,  -277,   414,   603,   475,   477,   409,    17,  -277,   353,
+     421,   353,   353,   353,   308,   411,   411,   176,  -277,  -277,
+    -277,   495,   457,   445,   488,  -277,  -277,  -277,  -277,  -277,
+    -277,   513,  -277,   -37,   447,   514,  -277,   516,   107,  -277,
+    -277,  -277,  -277,   455,   676,  -277,  -277,  -277,  -277,   451,
+     412,   458,   482,  -277,   550,   450,  -277,    20,   376,   411,
+     411,   489,   449,   162,   553,   525,  -277,   199,  -277,   113,
+    -277,    11,  -277,  -277,   538,   120,   120,   120,   491,  -277,
+     -32,  -277,   565,  -277,   676,   294,    38,   494,   522,   523,
+     636,  -277,   524,  -277,  -277,   529,   530,   411,   555,  -277,
+    -277,  -277,  -277,  -277,   253,   571,   447,   412,   412,   412,
+     573,  -277,   -27,  -277,    10,   528,   528,   556,   594,   162,
+     553,   553,   176,   411,   561,   305,  -277,   115,    17,   294,
+    -277,   570,   172,  -277,   184,   528,   186,  -277,  -277,  -277,
+    -277,   176,   411,   582,   604,   560,   353,  -277,   632,   528,
+    -277,  -277,   233,   568,  -277,   176,   411,  -277,  -277,   616,
+     662,  -277,  -277,   528,   176,   634,   243,   572,    99,  -277,
+    -277,   653,   634,   590,   655,   245,  -277,   253,   253,   656,
+    -277,   637,  -277,   659,  -277,   253,  -277
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
+  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+     Performed when YYTABLE does not specify something else to do.  Zero
+     means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
@@ -800,265 +699,216 @@ static const yytype_uint8 yydefact[] =
      103,   104,   105,   106,     0,     0,     0,   107,   108,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    97,    28,    84,    86,    87,   135,     0,     0,     0,
-       0,   171,    45,   171,     0,     0,     0,     1,     0,     0,
+       0,   159,    45,   171,     0,     0,     0,     1,     0,     0,
        7,    12,     0,     8,    13,   144,     0,     0,     0,    80,
       81,     0,     0,   109,   110,   111,   112,   113,     0,    82,
       83,    85,   114,   133,     0,     0,     0,     0,     0,     0,
       25,    47,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    26,     0,    20,     0,
       21,    18,     0,     0,   169,     0,     0,     0,     0,     0,
-     149,     0,    16,     6,    11,     5,    10,    92,   101,     0,
-     136,     0,     0,     0,     0,     0,    88,    45,     0,     0,
-      30,    36,    38,    40,     0,     0,     0,     0,     0,     0,
-     115,    48,    74,    77,    79,    72,    73,    75,    76,    78,
-      98,    99,   138,     0,   139,     0,     0,    19,    22,    17,
-     173,     0,     0,     0,    46,     0,     0,     0,     0,   148,
-     159,     0,    91,     0,   134,    96,     0,    89,    90,     0,
-       0,     0,     0,     0,     0,    39,    31,     0,    32,    34,
-      33,   135,     0,     0,    49,    63,    64,    65,     0,     0,
-     117,     0,    27,    24,    23,     0,   172,     0,     0,     0,
-       0,   155,     4,   151,   150,     0,     0,   102,   137,    95,
-      93,    94,    45,    41,     0,     0,    37,     0,     0,    61,
-       0,     0,     0,     0,     0,     0,     0,     0,    56,   100,
-     174,   170,     0,   159,   146,   156,   161,     0,     0,     0,
-       0,     0,     0,    66,     0,    62,    59,    60,    68,     0,
-     129,     0,     0,     0,     0,   125,   116,   121,   140,     0,
-     118,     0,    50,    57,   145,   159,     0,   162,   163,   164,
-       0,   160,     0,    42,    43,    44,     0,    67,     0,    70,
-       0,     0,     0,     0,     0,     0,     0,     0,    58,     0,
-      52,   169,   158,   165,     0,     0,     0,    69,   130,     0,
-     127,     0,     0,     0,   132,   126,   141,   142,    51,     0,
-      54,     0,   166,   167,   168,     0,    35,    71,     0,     0,
+       0,   149,     0,    16,     6,    11,     5,    10,    92,   101,
+       0,   136,     0,     0,     0,     0,     0,    88,    45,     0,
+       0,    30,    36,    38,    40,     0,     0,     0,     0,     0,
+       0,   115,    48,    74,    77,    79,    72,    73,    75,    76,
+      78,    98,    99,   138,     0,   139,     0,     0,    19,    22,
+      17,   161,     0,     0,     0,    46,   173,     0,     0,     0,
+       0,     0,   148,   159,     0,    91,     0,   134,    96,     0,
+      89,    90,     0,     0,     0,     0,     0,     0,    39,    31,
+       0,    32,    34,    33,   135,     0,     0,    49,    63,    64,
+      65,     0,     0,   117,     0,    27,    24,    23,   162,   163,
+     164,     0,   160,     0,     0,     0,   172,     0,     0,   155,
+       4,   151,   150,     0,   102,   137,    95,    93,    94,    45,
+      41,     0,     0,    37,     0,     0,    61,     0,     0,     0,
+       0,     0,     0,     0,     0,    56,   100,   165,   170,     0,
+     174,   159,   146,   156,     0,     0,     0,     0,     0,    66,
+       0,    62,    59,    60,    68,     0,   129,     0,     0,     0,
+       0,   125,   116,   121,   140,     0,   118,     0,    50,    57,
+     166,   167,   168,   145,   159,     0,     0,    42,    43,    44,
+       0,    67,     0,    70,     0,     0,     0,     0,     0,     0,
+       0,     0,    58,     0,    52,   169,   158,     0,     0,     0,
+      69,   130,     0,   127,     0,     0,     0,   132,   126,   141,
+     142,    51,     0,    54,     0,     0,    35,    71,     0,     0,
      123,   122,     0,     0,   124,    53,     0,    29,   157,     0,
      131,   128,   119,     0,    55,     0,     0,     0,     0,   152,
      120,     0,     0,     0,     0,     0,   153,   159,   159,     0,
      154,     0,   175,     0,   147,   159,   176
 };
 
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,    10,    11,    12,    13,    14,   109,   110,    15,    16,
-      40,    90,    91,   140,   141,   142,   143,   150,   151,   310,
-     330,   347,   282,   283,   204,   205,   206,   207,   298,   208,
-      42,   129,    43,   210,   248,   323,   275,   276,   319,   320,
-      44,    45,    48,   279,   280,    17,    18,   119,   120,   358,
-     359,   220,   221,   226,   257,   173,   114,   171,   365
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -247
-static const yytype_int16 yypact[] =
+  /* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
 {
-     121,   535,    76,     6,    60,    85,   115,   111,   132,   123,
-     165,  -247,   147,    -9,   117,  -247,  -247,   178,  -247,    87,
-    -247,  -247,  -247,  -247,   535,   535,   -24,  -247,  -247,   207,
-     219,   223,   235,   242,   535,   535,   535,   198,   222,   266,
-     261,   554,   230,  -247,  -247,  -247,   243,   238,   360,   104,
-     107,   252,  -247,    18,   178,   319,   329,  -247,   -14,   163,
-    -247,  -247,   163,  -247,  -247,  -247,   200,    12,   295,  -247,
-    -247,   279,   301,  -247,  -247,  -247,  -247,  -247,   294,  -247,
-    -247,  -247,  -247,  -247,    13,   366,   326,   373,   374,   397,
-    -247,   359,   535,   535,   535,   535,   535,   535,   535,   535,
-     423,   535,   424,    76,   535,    76,  -247,    63,  -247,   113,
-    -247,  -247,   153,   425,   362,   432,   414,   422,   435,    30,
-    -247,   377,  -247,  -247,  -247,  -247,  -247,  -247,   689,   197,
-     370,   439,   355,   383,   327,   369,  -247,   385,   386,   451,
-     390,  -247,   464,   450,    13,    76,    13,    13,    13,   445,
-     436,  -247,   486,   395,   318,   191,   191,  -247,  -247,  -247,
-    -247,   645,  -247,   624,  -247,   449,   452,  -247,  -247,  -247,
-    -247,   210,   425,   455,  -247,   469,   458,   478,   319,  -247,
-     419,   535,  -247,   485,  -247,  -247,   228,  -247,  -247,   420,
-     616,   488,   511,   416,    13,  -247,   390,   446,   390,   390,
-     390,   247,   445,   445,   205,  -247,  -247,  -247,   126,   492,
-     479,   515,  -247,  -247,  -247,   521,  -247,   -19,   469,   522,
-     161,  -247,  -247,  -247,  -247,   523,   463,   689,  -247,  -247,
-    -247,  -247,   460,   450,   472,   473,  -247,   524,   459,  -247,
-      11,   246,   445,   445,   535,   474,   144,   527,   513,  -247,
-    -247,  -247,   164,    15,  -247,  -247,   268,   233,   526,   115,
-     115,   115,   475,  -247,    59,  -247,   540,  -247,   689,    25,
-      43,   489,   490,   491,   659,  -247,   493,  -247,  -247,   494,
-     505,   445,   537,  -247,  -247,   419,   539,  -247,  -247,  -247,
-     574,  -247,   469,   450,   450,   450,   551,  -247,    93,  -247,
-      23,   549,   549,   512,   578,   144,   527,   527,   205,   445,
-     550,   362,  -247,   345,   221,    13,    25,  -247,   216,   255,
-    -247,   296,   549,   298,  -247,  -247,  -247,  -247,   205,   445,
-     548,   570,  -247,  -247,  -247,   528,   390,  -247,   589,   549,
-    -247,  -247,   308,   525,  -247,   205,   445,  -247,  -247,   573,
-     675,  -247,  -247,   549,   205,   601,   310,   538,   177,  -247,
-    -247,   602,   601,   541,   604,   313,  -247,   419,   419,   611,
-    -247,   592,  -247,   613,  -247,   419,  -247
+    -277,  -277,   -36,  -277,   625,   650,   614,    47,    12,    53,
+    -277,  -277,   -40,  -142,   470,  -277,    -5,  -277,  -277,  -277,
+    -277,  -277,  -277,  -277,  -188,  -277,  -277,  -277,  -277,    -1,
+    -277,  -124,  -244,  -277,  -277,  -277,   359,  -277,  -276,  -237,
+    -277,     2,  -277,    15,  -277,   612,    -7,  -277,   490,  -277,
+     307,  -209,  -216,  -181,  -277,   355,  -277,   499,  -277
 };
 
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
+  /* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
 {
-    -247,  -247,   -37,  -247,   605,   607,   568,   -71,    50,   110,
-    -247,  -247,   -38,  -142,   427,  -247,    -5,  -247,  -247,  -247,
-    -247,  -247,  -247,  -247,  -194,  -247,  -247,  -247,  -247,    -1,
-    -247,  -121,  -232,  -247,  -247,  -247,   317,  -247,  -233,  -234,
-    -247,     1,  -247,    92,  -247,   590,    -4,  -247,   467,  -247,
-     284,  -193,  -206,  -246,  -247,   336,   595,   477,  -247
+      -1,    10,    11,    12,    13,    14,   109,   110,    15,    16,
+      40,    90,    91,   141,   142,   143,   144,   151,   152,   314,
+     333,   347,   288,   289,   207,   208,   209,   210,   302,   211,
+      42,   130,    43,   213,   255,   326,   281,   282,   322,   323,
+      44,    45,    48,   285,   286,    17,    18,   120,   121,   358,
+     359,   228,   229,   114,   172,   174,   117,   177,   365
 };
 
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -138
+  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule whose
+     number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int16 yytable[] =
 {
-      41,    53,   196,    47,   198,   199,   200,   286,   239,   240,
-     106,   186,   277,    65,   255,   130,   137,   138,   285,   242,
-     243,   122,     1,    69,    70,   252,   318,     1,    49,    20,
-      21,    22,    23,    78,    79,    80,   115,   299,   168,   311,
-       2,   168,     3,     4,    71,     2,   255,     3,   266,   267,
-     215,   178,    72,   179,   251,  -135,  -135,  -135,  -135,  -135,
-    -135,  -135,  -135,    60,    63,   128,   165,   166,  -135,   321,
-     134,   277,    27,    28,    29,    30,    31,    32,    33,    46,
-     176,   265,    50,   225,   337,   139,   113,   308,    51,   342,
-     131,   152,   153,   154,   155,   156,   157,   158,   159,   314,
-     161,   131,    38,   163,   162,   351,   164,   107,   255,   123,
-     107,    66,   125,    65,   300,   328,   107,   264,    52,    68,
-     356,   371,   372,    61,    64,   212,    56,   108,   181,   376,
-     111,   128,   297,    54,   190,   345,   167,   244,    92,    93,
-      94,    95,    96,    97,    98,    99,   197,   270,    20,    21,
-      22,    23,   354,     1,    55,    66,   107,     1,    67,    24,
-      25,   245,   316,    68,   219,    57,   317,   219,    58,   124,
-      26,     2,   126,   336,     4,     2,   169,     3,     4,     5,
-     227,     6,     7,     8,   254,     9,   233,   284,   271,   272,
-     273,    27,    28,    29,    30,    31,    32,    33,   362,     1,
-     363,    81,   241,    19,    20,    21,    22,    23,    97,    98,
-      99,    73,    34,   242,   243,    24,    25,     2,    35,    36,
-      37,    38,    39,    74,   219,    82,    26,    75,  -136,  -136,
-    -136,  -136,  -136,  -136,  -136,  -136,     5,   128,     6,    76,
-       8,  -136,     9,   268,   335,   274,    77,    27,    28,    29,
-      30,    31,    32,    33,   293,   294,   295,   244,    92,    93,
-      94,    95,    96,    97,    98,    99,   181,   182,    34,    83,
-     127,   287,   288,   289,    35,    36,    37,    38,    39,   215,
-     216,   245,    19,    20,    21,    22,    23,   338,    84,    85,
-      86,    87,    88,    89,    24,    25,   133,   181,   229,   101,
-     274,   274,   290,   291,   274,    26,    92,    93,    94,    95,
-      96,    97,    98,    99,   102,    66,   136,   103,    67,   238,
-     113,   274,   118,    68,   339,   340,    27,    28,    29,    30,
-      31,    32,    33,    95,    96,    97,    98,    99,   274,    92,
-      93,    94,    95,    96,    97,    98,    99,    34,   332,   333,
-     334,   121,   274,    35,    36,    37,    38,    39,    19,    20,
-      21,    22,    23,   132,   136,   339,   341,   343,   344,   135,
-      24,    25,    19,    20,    21,    22,    23,   339,   352,   339,
-     360,    26,   369,   370,    24,    25,   189,    84,    85,    86,
-      87,    88,    89,   144,   145,    26,   149,   188,   326,   327,
-     146,   147,    27,    28,    29,    30,    31,    32,    33,    94,
-      95,    96,    97,    98,    99,   104,    27,    28,    29,    30,
-      31,    32,    33,    34,   148,   185,   160,   130,   170,    35,
-      36,    37,    38,    39,   172,   174,   175,    34,   177,   105,
-     180,   183,   184,    35,    36,    37,    38,    39,   201,    20,
-      21,    22,    23,   187,   193,   202,   191,   192,     1,   194,
-      24,    25,    19,    20,    21,    22,    23,   195,   115,   209,
-     213,    26,   219,   214,    24,    25,     2,   218,     3,     4,
-       5,   222,     6,   223,     8,    26,     9,   225,   228,   235,
-     230,   232,    27,    28,    29,    30,    31,    32,    33,    93,
-      94,    95,    96,    97,    98,    99,    27,    28,    29,    30,
-      31,    32,    33,   203,   234,   237,   246,   247,   249,    35,
-      36,    37,    38,    39,   250,   253,   256,    34,   258,   262,
-     278,   259,   263,    35,    36,    37,    38,    39,    19,    20,
-      21,    22,    23,   260,   261,   296,   269,   281,   292,   243,
-      24,    25,   270,    20,    21,    22,    23,   301,   302,   303,
-     312,    26,   305,   306,    24,    25,    92,    93,    94,    95,
-      96,    97,    98,    99,   307,    26,   309,   313,   315,   100,
-     322,   324,    27,    28,    29,    30,    31,    32,    33,   346,
-     329,   348,   350,   353,   349,   355,    27,    28,    29,    30,
-      31,    32,    33,    34,   357,   364,   361,   368,   367,    35,
-      36,    37,    38,    39,   373,   374,   375,    34,   112,    62,
-      59,   236,   325,    35,    36,    37,    38,    39,    92,    93,
-      94,    95,    96,    97,    98,    99,    92,    93,    94,    95,
-      96,    97,    98,    99,   117,   224,   366,   331,   116,   217,
-       0,    84,    85,    86,    87,    88,    89,    92,    93,    94,
-      95,    96,    97,    98,    99,     0,     0,     0,     0,     0,
-     211,    92,    93,    94,    95,    96,    97,    98,    99,     0,
-       0,     0,     0,     0,   304,     0,   231,  -137,  -137,  -137,
-    -137,  -137,  -137,  -137,  -137,     0,     0,     0,     0,     0,
-    -137,    92,    93,    94,    95,    96,    97,    98,    99
+      41,    53,   233,   199,    47,   201,   202,   203,   106,   189,
+      65,   131,   263,   321,   294,   259,   283,   246,   247,   115,
+     138,   139,   123,    69,    70,    60,    63,     1,   249,   250,
+     324,   303,   225,    78,    79,    80,   258,   184,   107,   107,
+      46,   301,   319,   263,   107,     2,   320,     3,     4,   342,
+    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,   108,   111,
+       1,   272,   273,  -135,   168,   129,    61,    64,    71,   116,
+     135,   124,   283,    49,   126,   337,    72,   356,     2,   113,
+     295,     4,   179,   181,   107,   182,   132,   317,   132,   140,
+     271,   153,   154,   155,   156,   157,   158,   159,   160,   312,
+     162,   263,   351,   164,   170,   163,    66,   165,     1,   304,
+     227,    65,   125,   315,    68,   127,   227,    51,   227,     1,
+     362,   270,   363,    52,   215,   331,     2,    50,     3,    56,
+     262,     1,   129,   166,   167,   193,   293,     2,   335,     3,
+       4,     5,    57,     6,   345,     8,    54,     9,   200,     2,
+      55,    19,    20,    21,    22,    23,   169,    58,   354,   169,
+      97,    98,    99,    24,    25,   276,    20,    21,    22,    23,
+     184,   185,    66,    81,    26,    67,   336,    24,    25,    73,
+      68,   221,   222,   234,   249,   250,   371,   372,    26,   240,
+     218,   219,   220,    74,   376,    27,    28,    29,    30,    31,
+      32,    33,   290,   291,   292,   248,   277,   278,   279,    27,
+      28,    29,    30,    31,    32,    33,    34,    75,   128,   225,
+     226,    76,    35,    36,    37,    38,    39,     5,    77,     6,
+      34,     8,    82,     9,   184,   236,    35,    36,    37,    38,
+      39,   339,   340,    83,   129,    19,    20,    21,    22,    23,
+     274,   101,   280,   339,   341,   343,   344,    24,    25,   134,
+     297,   298,   299,    95,    96,    97,    98,    99,    26,    92,
+      93,    94,    95,    96,    97,    98,    99,    93,    94,    95,
+      96,    97,    98,    99,    19,    20,    21,    22,    23,    27,
+      28,    29,    30,    31,    32,    33,    24,    25,    20,    21,
+      22,    23,   339,   352,   280,   280,   102,    26,   280,   103,
+      34,   122,   339,   360,   369,   370,    35,    36,    37,    38,
+      39,   113,   119,   133,   280,   329,   330,   137,    27,    28,
+      29,    30,    31,    32,    33,   136,   145,   146,   280,   147,
+     148,    27,    28,    29,    30,    31,    32,    33,   149,    34,
+     161,   188,   280,   150,   131,    35,    36,    37,    38,    39,
+      19,    20,    21,    22,    23,    84,    85,    86,    87,    88,
+      89,    38,    24,    25,   192,   171,    66,   173,   175,    67,
+     245,   176,   178,    26,    68,   180,   183,   251,    92,    93,
+      94,    95,    96,    97,    98,    99,    84,    85,    86,    87,
+      88,    89,   186,   187,    27,    28,    29,    30,    31,    32,
+      33,   252,   190,   196,   204,    20,    21,    22,    23,   194,
+     195,   205,   197,   198,   104,    34,    24,    25,   212,   216,
+     115,    35,    36,    37,    38,    39,   217,    26,    92,    93,
+      94,    95,    96,    97,    98,    99,   137,   224,   105,     1,
+     227,   100,   230,    19,    20,    21,    22,    23,    27,    28,
+      29,    30,    31,    32,    33,    24,    25,     2,   231,     3,
+       4,     5,   235,     6,     7,     8,    26,     9,   239,   206,
+     241,   253,   242,   254,   237,    35,    36,    37,    38,    39,
+     244,   256,    19,    20,    21,    22,    23,    27,    28,    29,
+      30,    31,    32,    33,    24,    25,   251,    92,    93,    94,
+      95,    96,    97,    98,    99,    26,   257,   260,    34,   261,
+     264,   275,   265,   269,    35,    36,    37,    38,    39,   266,
+     252,   276,    20,    21,    22,    23,    27,    28,    29,    30,
+      31,    32,    33,    24,    25,    92,    93,    94,    95,    96,
+      97,    98,    99,   267,    26,   268,   284,    34,   214,   287,
+     296,   300,   305,    35,    36,    37,    38,    39,    94,    95,
+      96,    97,    98,    99,   250,    27,    28,    29,    30,    31,
+      32,    33,  -136,  -136,  -136,  -136,  -136,  -136,  -136,  -136,
+     306,   307,   316,   309,   313,  -136,    34,   327,   310,   311,
+     318,   332,    35,    36,    37,    38,    39,    92,    93,    94,
+      95,    96,    97,    98,    99,    92,    93,    94,    95,    96,
+      97,    98,    99,   346,   325,   348,   349,    92,    93,    94,
+      95,    96,    97,    98,    99,   350,   353,   357,   355,    62,
+     361,   338,    84,    85,    86,    87,    88,    89,    92,    93,
+      94,    95,    96,    97,    98,    99,   364,   367,   368,   373,
+     374,   308,   375,    59,   112,   191,   118,   243,   328,   366,
+     334,   232,   223,   238,  -137,  -137,  -137,  -137,  -137,  -137,
+    -137,  -137,     0,     0,     0,     0,     0,  -137,    92,    93,
+      94,    95,    96,    97,    98,    99
 };
 
 static const yytype_int16 yycheck[] =
 {
-       1,     6,   144,     2,   146,   147,   148,   253,   202,   203,
-      48,   132,   246,    17,   220,     3,     3,     4,     3,     8,
-       9,    58,    36,    24,    25,   218,     3,    36,    22,     4,
-       5,     6,     7,    34,    35,    36,    18,   269,   109,   285,
-      54,   112,    56,    57,    68,    54,   252,    56,   242,   243,
-      69,    21,    76,    23,    73,    12,    13,    14,    15,    16,
-      17,    18,    19,    13,    14,    66,     3,     4,    25,   302,
-      71,   305,    47,    48,    49,    50,    51,    52,    53,     3,
-     117,    70,    22,    68,   316,    72,    68,   281,     3,   322,
-      78,    92,    93,    94,    95,    96,    97,    98,    99,   292,
-     101,    78,    77,   104,   103,   339,   105,     3,   314,    59,
-       3,    68,    62,   117,    71,   309,     3,   238,     3,    76,
-     353,   367,   368,    13,    14,   163,     3,    23,    69,   375,
-      23,   132,    73,    22,   135,   329,    23,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,   145,     3,     4,     5,
-       6,     7,   346,    36,    22,    68,     3,    36,    71,    15,
-      16,    35,    69,    76,     3,     0,    73,     3,    21,    59,
-      26,    54,    62,   315,    57,    54,    23,    56,    57,    58,
-     181,    60,    61,    62,    23,    64,   191,    23,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    21,    36,
-      23,     3,   203,     3,     4,     5,     6,     7,    17,    18,
-      19,     4,    68,     8,     9,    15,    16,    54,    74,    75,
-      76,    77,    78,     4,     3,     3,    26,     4,    12,    13,
-      14,    15,    16,    17,    18,    19,    58,   238,    60,     4,
-      62,    25,    64,   244,    23,   246,     4,    47,    48,    49,
-      50,    51,    52,    53,   259,   260,   261,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    69,    70,    68,     3,
-      70,     3,     4,     5,    74,    75,    76,    77,    78,    69,
-      70,    35,     3,     4,     5,     6,     7,    71,    27,    28,
-      29,    30,    31,    32,    15,    16,    17,    69,    70,    69,
-     301,   302,    69,    70,   305,    26,    12,    13,    14,    15,
-      16,    17,    18,    19,    71,    68,    70,    79,    71,    72,
-      68,   322,     3,    76,    69,    70,    47,    48,    49,    50,
-      51,    52,    53,    15,    16,    17,    18,    19,   339,    12,
-      13,    14,    15,    16,    17,    18,    19,    68,     3,     4,
-       5,    22,   353,    74,    75,    76,    77,    78,     3,     4,
-       5,     6,     7,    68,    70,    69,    70,    69,    70,    68,
-      15,    16,     3,     4,     5,     6,     7,    69,    70,    69,
-      70,    26,    69,    70,    15,    16,    17,    27,    28,    29,
-      30,    31,    32,    27,    68,    26,    37,    70,   306,   307,
-      27,    27,    47,    48,    49,    50,    51,    52,    53,    14,
-      15,    16,    17,    18,    19,    55,    47,    48,    49,    50,
-      51,    52,    53,    68,    27,    70,     3,     3,     3,    74,
-      75,    76,    77,    78,    72,     3,    22,    68,     3,    79,
-      63,    71,     3,    74,    75,    76,    77,    78,     3,     4,
-       5,     6,     7,    70,     3,    10,    71,    71,    36,    69,
-      15,    16,     3,     4,     5,     6,     7,     3,    18,    33,
-      21,    26,     3,    21,    15,    16,    54,    22,    56,    57,
-      58,    23,    60,     5,    62,    26,    64,    68,     3,    73,
-      70,     3,    47,    48,    49,    50,    51,    52,    53,    13,
-      14,    15,    16,    17,    18,    19,    47,    48,    49,    50,
-      51,    52,    53,    68,     3,    69,    24,    38,     3,    74,
-      75,    76,    77,    78,     3,     3,     3,    68,    65,     5,
-       3,    71,    73,    74,    75,    76,    77,    78,     3,     4,
-       5,     6,     7,    71,    71,    70,    72,    34,    22,     9,
-      15,    16,     3,     4,     5,     6,     7,    68,    68,    68,
-      21,    26,    69,    69,    15,    16,    12,    13,    14,    15,
-      16,    17,    18,    19,    69,    26,    39,     3,    27,    25,
-      68,     3,    47,    48,    49,    50,    51,    52,    53,    41,
-      40,    21,     3,    68,    66,    22,    47,    48,    49,    50,
-      51,    52,    53,    68,     3,     3,    68,     3,    67,    74,
-      75,    76,    77,    78,     3,    23,     3,    68,    50,    14,
-      13,   194,   305,    74,    75,    76,    77,    78,    12,    13,
-      14,    15,    16,    17,    18,    19,    12,    13,    14,    15,
-      16,    17,    18,    19,    54,   178,   362,   311,    53,   172,
-      -1,    27,    28,    29,    30,    31,    32,    12,    13,    14,
-      15,    16,    17,    18,    19,    -1,    -1,    -1,    -1,    -1,
-      25,    12,    13,    14,    15,    16,    17,    18,    19,    -1,
-      -1,    -1,    -1,    -1,    25,    -1,    70,    12,    13,    14,
-      15,    16,    17,    18,    19,    -1,    -1,    -1,    -1,    -1,
-      25,    12,    13,    14,    15,    16,    17,    18,    19
+       1,     6,   183,   145,     2,   147,   148,   149,    48,   133,
+      17,     3,   228,     3,     3,   224,   253,   205,   206,    18,
+       3,     4,    58,    24,    25,    13,    14,    36,     8,     9,
+     306,   275,    69,    34,    35,    36,    73,    69,     3,     3,
+       3,    73,    69,   259,     3,    54,    73,    56,    57,   325,
+      12,    13,    14,    15,    16,    17,    18,    19,    23,    23,
+      36,   249,   250,    25,    23,    66,    13,    14,    68,    68,
+      71,    59,   309,    22,    62,   319,    76,   353,    54,    68,
+     261,    57,   118,    21,     3,    23,    78,   296,    78,    72,
+      70,    92,    93,    94,    95,    96,    97,    98,    99,   287,
+     101,   317,   339,   104,    23,   103,    68,   105,    36,    71,
+       3,   118,    59,   294,    76,    62,     3,     3,     3,    36,
+      21,   245,    23,     3,   164,   313,    54,    22,    56,     3,
+      23,    36,   133,     3,     4,   136,    23,    54,    23,    56,
+      57,    58,     0,    60,   332,    62,    22,    64,   146,    54,
+      22,     3,     4,     5,     6,     7,   109,    21,   346,   112,
+      17,    18,    19,    15,    16,     3,     4,     5,     6,     7,
+      69,    70,    68,     3,    26,    71,   318,    15,    16,     4,
+      76,    69,    70,   184,     8,     9,   367,   368,    26,   194,
+       3,     4,     5,     4,   375,    47,    48,    49,    50,    51,
+      52,    53,     3,     4,     5,   206,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    68,     4,    70,    69,
+      70,     4,    74,    75,    76,    77,    78,    58,     4,    60,
+      68,    62,     3,    64,    69,    70,    74,    75,    76,    77,
+      78,    69,    70,     3,   245,     3,     4,     5,     6,     7,
+     251,    69,   253,    69,    70,    69,    70,    15,    16,    17,
+     265,   266,   267,    15,    16,    17,    18,    19,    26,    12,
+      13,    14,    15,    16,    17,    18,    19,    13,    14,    15,
+      16,    17,    18,    19,     3,     4,     5,     6,     7,    47,
+      48,    49,    50,    51,    52,    53,    15,    16,     4,     5,
+       6,     7,    69,    70,   305,   306,    71,    26,   309,    79,
+      68,    22,    69,    70,    69,    70,    74,    75,    76,    77,
+      78,    68,     3,    68,   325,   310,   311,    70,    47,    48,
+      49,    50,    51,    52,    53,    68,    27,    68,   339,    27,
+      27,    47,    48,    49,    50,    51,    52,    53,    27,    68,
+       3,    70,   353,    37,     3,    74,    75,    76,    77,    78,
+       3,     4,     5,     6,     7,    27,    28,    29,    30,    31,
+      32,    77,    15,    16,    17,     3,    68,    72,     3,    71,
+      72,     3,    22,    26,    76,     3,    63,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    27,    28,    29,    30,
+      31,    32,    71,     3,    47,    48,    49,    50,    51,    52,
+      53,    35,    70,     3,     3,     4,     5,     6,     7,    71,
+      71,    10,    69,     3,    55,    68,    15,    16,    33,    21,
+      18,    74,    75,    76,    77,    78,    21,    26,    12,    13,
+      14,    15,    16,    17,    18,    19,    70,    22,    79,    36,
+       3,    25,    23,     3,     4,     5,     6,     7,    47,    48,
+      49,    50,    51,    52,    53,    15,    16,    54,     5,    56,
+      57,    58,     3,    60,    61,    62,    26,    64,     3,    68,
+       3,    24,    73,    38,    70,    74,    75,    76,    77,    78,
+      69,     3,     3,     4,     5,     6,     7,    47,    48,    49,
+      50,    51,    52,    53,    15,    16,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    26,     3,     3,    68,     3,
+      65,    72,    71,    73,    74,    75,    76,    77,    78,    71,
+      35,     3,     4,     5,     6,     7,    47,    48,    49,    50,
+      51,    52,    53,    15,    16,    12,    13,    14,    15,    16,
+      17,    18,    19,    71,    26,     5,     3,    68,    25,    34,
+      22,    70,    68,    74,    75,    76,    77,    78,    14,    15,
+      16,    17,    18,    19,     9,    47,    48,    49,    50,    51,
+      52,    53,    12,    13,    14,    15,    16,    17,    18,    19,
+      68,    68,    21,    69,    39,    25,    68,     3,    69,    69,
+      27,    40,    74,    75,    76,    77,    78,    12,    13,    14,
+      15,    16,    17,    18,    19,    12,    13,    14,    15,    16,
+      17,    18,    19,    41,    68,    21,    66,    12,    13,    14,
+      15,    16,    17,    18,    19,     3,    68,     3,    22,    14,
+      68,    71,    27,    28,    29,    30,    31,    32,    12,    13,
+      14,    15,    16,    17,    18,    19,     3,    67,     3,     3,
+      23,    25,     3,    13,    50,    70,    54,   197,   309,   362,
+     315,   181,   173,    70,    12,    13,    14,    15,    16,    17,
+      18,    19,    -1,    -1,    -1,    -1,    -1,    25,    12,    13,
+      14,    15,    16,    17,    18,    19
 };
 
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
+  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+     symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
        0,    36,    54,    56,    57,    58,    60,    61,    62,    64,
@@ -1072,125 +922,117 @@ static const yytype_uint8 yystos[] =
      109,     3,     3,     3,    27,    28,    29,    30,    31,    32,
       91,    92,    12,    13,    14,    15,    16,    17,    18,    19,
       25,    69,    71,    79,    55,    79,    92,     3,    23,    86,
-      87,    23,    86,    68,   136,    18,   136,   125,     3,   127,
-     128,    22,    82,    88,    89,    88,    89,    70,   109,   111,
-       3,    78,    68,    17,   109,    68,    70,     3,     4,    72,
-      93,    94,    95,    96,    27,    68,    27,    27,    27,    37,
-      97,    98,   109,   109,   109,   109,   109,   109,   109,   109,
-       3,   109,   121,   109,   121,     3,     4,    23,    87,    23,
-       3,   137,    72,   135,     3,    22,    82,     3,    21,    23,
-      63,    69,    70,    71,     3,    70,   111,    70,    70,    17,
-     109,    71,    71,     3,    69,     3,    93,   121,    93,    93,
-      93,     3,    10,    68,   104,   105,   106,   107,   109,    33,
-     113,    25,    92,    21,    21,    69,    70,   137,    22,     3,
-     131,   132,    23,     5,   128,    68,   133,   109,     3,    70,
-      70,    70,     3,    96,     3,    73,    94,    69,    72,   104,
-     104,   109,     8,     9,    11,    35,    24,    38,   114,     3,
-       3,    73,   131,     3,    23,   132,     3,   134,    65,    71,
-      71,    71,     5,    73,   111,    70,   104,   104,   109,    72,
-       3,    44,    45,    46,   109,   116,   117,   119,     3,   123,
-     124,    34,   102,   103,    23,     3,   133,     3,     4,     5,
-      69,    70,    22,    96,    96,    96,    70,    73,   108,   112,
-      71,    68,    68,    68,    25,    69,    69,    69,   104,    39,
-      99,   133,    21,     3,   131,    27,    69,    73,     3,   118,
-     119,   118,    68,   115,     3,   116,   123,   123,   104,    40,
-     100,   135,     3,     4,     5,    23,    93,   112,    71,    69,
+      87,    23,    86,    68,   133,    18,    68,   136,   125,     3,
+     127,   128,    22,    82,    88,    89,    88,    89,    70,   109,
+     111,     3,    78,    68,    17,   109,    68,    70,     3,     4,
+      72,    93,    94,    95,    96,    27,    68,    27,    27,    27,
+      37,    97,    98,   109,   109,   109,   109,   109,   109,   109,
+     109,     3,   109,   121,   109,   121,     3,     4,    23,    87,
+      23,     3,   134,    72,   135,     3,     3,   137,    22,    82,
+       3,    21,    23,    63,    69,    70,    71,     3,    70,   111,
+      70,    70,    17,   109,    71,    71,     3,    69,     3,    93,
+     121,    93,    93,    93,     3,    10,    68,   104,   105,   106,
+     107,   109,    33,   113,    25,    92,    21,    21,     3,     4,
+       5,    69,    70,   137,    22,    69,    70,     3,   131,   132,
+      23,     5,   128,   133,   109,     3,    70,    70,    70,     3,
+      96,     3,    73,    94,    69,    72,   104,   104,   109,     8,
+       9,    11,    35,    24,    38,   114,     3,     3,    73,   131,
+       3,     3,    23,   132,    65,    71,    71,    71,     5,    73,
+     111,    70,   104,   104,   109,    72,     3,    44,    45,    46,
+     109,   116,   117,   119,     3,   123,   124,    34,   102,   103,
+       3,     4,     5,    23,     3,   133,    22,    96,    96,    96,
+      70,    73,   108,   112,    71,    68,    68,    68,    25,    69,
+      69,    69,   104,    39,    99,   133,    21,   131,    27,    69,
+      73,     3,   118,   119,   118,    68,   115,     3,   116,   123,
+     123,   104,    40,   100,   135,    23,    93,   112,    71,    69,
       70,    70,   118,    69,    70,   104,    41,   101,    21,    66,
        3,   119,    70,    68,   104,    22,   118,     3,   129,   130,
       70,    68,    21,    23,     3,   138,   130,    67,     3,    69,
       70,   133,   133,     3,    23,     3,   133
 };
 
-#define yyerrok                (yyerrstatus = 0)
-#define yyclearin      (yychar = YYEMPTY)
-#define YYEMPTY                (-2)
-#define YYEOF          0
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    80,    81,    81,    81,    82,    82,    82,    82,    82,
+      82,    82,    82,    82,    82,    83,    83,    84,    84,    85,
+      85,    86,    86,    87,    87,    88,    89,    89,    90,    91,
+      92,    92,    92,    92,    92,    92,    93,    93,    94,    94,
+      95,    95,    95,    95,    95,    96,    96,    97,    97,    98,
+      99,    99,   100,   100,   101,   101,   102,   102,   103,   104,
+     104,   104,   104,   104,   105,   105,   105,   105,   106,   107,
+     108,   108,   109,   109,   109,   109,   109,   109,   109,   109,
+     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
+     109,   109,   109,   109,   109,   109,   109,   110,   110,   110,
+     110,   111,   111,   112,   112,   112,   112,   112,   112,   112,
+     112,   112,   112,   112,   112,   113,   113,   114,   114,   115,
+     115,   116,   116,   116,   116,   117,   117,   118,   118,   119,
+     119,   119,   119,   120,   120,   121,   121,   121,   122,   122,
+     123,   124,   124,   125,   125,   126,   126,   126,   126,   127,
+     127,   128,   129,   129,   130,   131,   131,   132,   132,   133,
+     133,   134,   134,   134,   134,   134,   134,   134,   134,   135,
+     135,   136,   136,   137,   137,   138,   138
+};
+
+  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     1,     5,     3,     3,     2,     2,     1,
+       3,     3,     2,     2,     1,     1,     3,     4,     3,     4,
+       3,     1,     2,     3,     3,     3,     3,     5,     1,     8,
+       2,     3,     3,     3,     3,     8,     1,     3,     1,     2,
+       1,     3,     5,     5,     5,     1,     3,     0,     1,     2,
+       0,     2,     0,     2,     0,     2,     0,     1,     2,     3,
+       3,     2,     3,     1,     1,     1,     3,     4,     3,     5,
+       1,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       2,     2,     2,     2,     1,     2,     1,     1,     3,     4,
+       4,     4,     3,     5,     5,     5,     4,     1,     3,     3,
+       5,     1,     3,     1,     1,     1,     1,     1,     1,     2,
+       2,     2,     2,     2,     2,     0,     3,     0,     2,     3,
+       5,     1,     4,     4,     4,     1,     3,     1,     3,     1,
+       3,     5,     3,     2,     4,     1,     3,     5,     3,     3,
+       1,     3,     3,     1,     2,     7,     6,    16,     4,     1,
+       3,     3,     1,     3,     4,     1,     2,     6,     4,     0,
+       3,     1,     2,     2,     2,     3,     4,     4,     4,     0,
+       3,     0,     3,     1,     3,     3,     5
+};
 
-#define YYACCEPT       goto yyacceptlab
-#define YYABORT                goto yyabortlab
-#define YYERROR                goto yyerrorlab
 
+#define yyerrok         (yyerrstatus = 0)
+#define yyclearin       (yychar = YYEMPTY)
+#define YYEMPTY         (-2)
+#define YYEOF           0
 
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYACCEPT        goto yyacceptlab
+#define YYABORT         goto yyabortlab
+#define YYERROR         goto yyerrorlab
 
-#define YYFAIL         goto yyerrlab
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)                                 \
-do                                                             \
-  if (yychar == YYEMPTY && yylen == 1)                         \
-    {                                                          \
-      yychar = (Token);                                                \
-      yylval = (Value);                                                \
-      yytoken = YYTRANSLATE (yychar);                          \
-      YYPOPSTACK (1);                                          \
-      goto yybackup;                                           \
-    }                                                          \
-  else                                                         \
-    {                                                          \
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
       yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;                                                 \
-    }                                                          \
-while (YYID (0))
-
-
-#define YYTERROR       1
-#define YYERRCODE      256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
-    do                                                                 \
-      if (YYID (N))                                                    \
-       {                                                               \
-         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
-         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
-         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
-         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
-       }                                                               \
-      else                                                             \
-       {                                                               \
-         (Current).first_line   = (Current).last_line   =              \
-           YYRHSLOC (Rhs, 0).last_line;                                \
-         (Current).first_column = (Current).last_column =              \
-           YYRHSLOC (Rhs, 0).last_column;                              \
-       }                                                               \
-    while (YYID (0))
-#endif
+      YYERROR;                                                  \
+    }                                                           \
+while (0)
 
+/* Error token number */
+#define YYTERROR        1
+#define YYERRCODE       256
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)                 \
-     fprintf (File, "%d.%d-%d.%d",                     \
-             (Loc).first_line, (Loc).first_column,     \
-             (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
 
 
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
 /* Enable debugging if requested.  */
 #if YYDEBUG
 
@@ -1199,54 +1041,46 @@ while (YYID (0))
 #  define YYFPRINTF fprintf
 # endif
 
-# define YYDPRINTF(Args)                       \
-do {                                           \
-  if (yydebug)                                 \
-    YYFPRINTF Args;                            \
-} while (YYID (0))
+# define YYDPRINTF(Args)                        \
+do {                                            \
+  if (yydebug)                                  \
+    YYFPRINTF Args;                             \
+} while (0)
 
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
-do {                                                                     \
-  if (yydebug)                                                           \
-    {                                                                    \
-      YYFPRINTF (stderr, "%s ", Title);                                          \
-      yy_symbol_print (stderr,                                           \
-                 Type, Value); \
-      YYFPRINTF (stderr, "\n");                                                  \
-    }                                                                    \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
 
 
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
+do {                                                                      \
+  if (yydebug)                                                            \
+    {                                                                     \
+      YYFPRINTF (stderr, "%s ", Title);                                   \
+      yy_symbol_print (stderr,                                            \
+                  Type, Value); \
+      YYFPRINTF (stderr, "\n");                                           \
+    }                                                                     \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT.  |
+`----------------------------------------*/
 
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
 # endif
-  switch (yytype)
-    {
-      default:
-       break;
-    }
+  YYUSE (yytype);
 }
 
 
@@ -1254,22 +1088,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+  YYFPRINTF (yyoutput, "%s %s (",
+             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
 
   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
   YYFPRINTF (yyoutput, ")");
@@ -1280,66 +1103,54 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
 | TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
-#else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
-#endif
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
-# define YY_STACK_PRINT(Bottom, Top)                           \
-do {                                                           \
-  if (yydebug)                                                 \
-    yy_stack_print ((Bottom), (Top));                          \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top)                            \
+do {                                                            \
+  if (yydebug)                                                  \
+    yy_stack_print ((Bottom), (Top));                           \
+} while (0)
 
 
 /*------------------------------------------------.
 | Report that the YYRULE is going to be reduced.  |
 `------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
 static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
 {
+  unsigned long int yylno = yyrline[yyrule];
   int yynrhs = yyr2[yyrule];
   int yyi;
-  unsigned long int yylno = yyrline[yyrule];
   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-            yyrule - 1, yylno);
+             yyrule - 1, yylno);
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-                      &(yyvsp[(yyi + 1) - (yynrhs)])
-                                      );
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr,
+                       yystos[yyssp[yyi + 1 - yynrhs]],
+                       &(yyvsp[(yyi + 1) - (yynrhs)])
+                                              );
+      YYFPRINTF (stderr, "\n");
     }
 }
 
-# define YY_REDUCE_PRINT(Rule)         \
-do {                                   \
-  if (yydebug)                         \
-    yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule)          \
+do {                                    \
+  if (yydebug)                          \
+    yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
@@ -1353,7 +1164,7 @@ int yydebug;
 
 
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef        YYINITDEPTH
+#ifndef YYINITDEPTH
 # define YYINITDEPTH 200
 #endif
 
@@ -1368,7 +1179,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-\f
 
 #if YYERROR_VERBOSE
 
@@ -1377,15 +1187,8 @@ int yydebug;
 #   define yystrlen strlen
 #  else
 /* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static YYSIZE_T
 yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
 {
   YYSIZE_T yylen;
   for (yylen = 0; yystr[yylen]; yylen++)
@@ -1401,16 +1204,8 @@ yystrlen (yystr)
 #  else
 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static char *
 yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
 {
   char *yyd = yydest;
   const char *yys = yysrc;
@@ -1440,27 +1235,27 @@ yytnamerr (char *yyres, const char *yystr)
       char const *yyp = yystr;
 
       for (;;)
-       switch (*++yyp)
-         {
-         case '\'':
-         case ',':
-           goto do_not_strip_quotes;
-
-         case '\\':
-           if (*++yyp != '\\')
-             goto do_not_strip_quotes;
-           /* Fall through.  */
-         default:
-           if (yyres)
-             yyres[yyn] = *yyp;
-           yyn++;
-           break;
-
-         case '"':
-           if (yyres)
-             yyres[yyn] = '\0';
-           return yyn;
-         }
+        switch (*++yyp)
+          {
+          case '\'':
+          case ',':
+            goto do_not_strip_quotes;
+
+          case '\\':
+            if (*++yyp != '\\')
+              goto do_not_strip_quotes;
+            /* Fall through.  */
+          default:
+            if (yyres)
+              yyres[yyn] = *yyp;
+            yyn++;
+            break;
+
+          case '"':
+            if (yyres)
+              yyres[yyn] = '\0';
+            return yyn;
+          }
     do_not_strip_quotes: ;
     }
 
@@ -1471,211 +1266,209 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
 {
-  int yyn = yypact[yystate];
+  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULLPTR;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
+  switch (yycount)
     {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-        constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-                   + sizeof yyexpecting - 1
-                   + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-                      * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-        YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-       if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-         {
-           if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-             {
-               yycount = 1;
-               yysize = yysize0;
-               yyformat[sizeof yyunexpected - 1] = '\0';
-               break;
-             }
-           yyarg[yycount++] = yytname[yyx];
-           yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-           yysize_overflow |= (yysize1 < yysize);
-           yysize = yysize1;
-           yyfmt = yystpcpy (yyfmt, yyprefix);
-           yyprefix = yyor;
-         }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-       return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-       {
-         /* Avoid sprintf, as that infringes on the user's name space.
-            Don't have undefined behavior even if the translation
-            produced a string with the wrong number of "%s"s.  */
-         char *yyp = yyresult;
-         int yyi = 0;
-         while ((*yyp = *yyf) != '\0')
-           {
-             if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-               {
-                 yyp += yytnamerr (yyp, yyarg[yyi++]);
-                 yyf += 2;
-               }
-             else
-               {
-                 yyp++;
-                 yyf++;
-               }
-           }
-       }
-      return yysize;
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
     }
+
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-\f
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
 
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
 {
   YYUSE (yyvaluep);
-
   if (!yymsg)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
-  switch (yytype)
-    {
-
-      default:
-       break;
-    }
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  YYUSE (yytype);
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
-\f
-
-/* Prevent warnings from -Wmissing-prototypes.  */
 
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
 
 
 
-/* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
-
 /* Number of syntax errors so far.  */
 int yynerrs;
 
 
-
 /*----------.
 | yyparse.  |
 `----------*/
 
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 int
 yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
 {
-  
-  int yystate;
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       'yyss': related to states.
+       'yyvs': related to semantic values.
+
+       Refer to the stacks through separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
   int yyn;
   int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
+  /* Lookahead token as an internal (translated) token number.  */
   int yytoken = 0;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
@@ -1683,54 +1476,22 @@ yyparse ()
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-
-
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;            /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
+  yychar = YYEMPTY; /* Cause a token to be read.  */
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -1751,25 +1512,23 @@ yyparse ()
 
 #ifdef yyoverflow
       {
-       /* Give user a chance to reallocate the stack.  Use copies of
-          these so that the &'s don't force the real ones into
-          memory.  */
-       YYSTYPE *yyvs1 = yyvs;
-       yytype_int16 *yyss1 = yyss;
-
-
-       /* Each stack pointer address is followed by the size of the
-          data in use in that stack, in bytes.  This used to be a
-          conditional around just the two extra args, but that might
-          be undefined if yyoverflow is a macro.  */
-       yyoverflow (YY_("memory exhausted"),
-                   &yyss1, yysize * sizeof (*yyssp),
-                   &yyvs1, yysize * sizeof (*yyvsp),
-
-                   &yystacksize);
-
-       yyss = yyss1;
-       yyvs = yyvs1;
+        /* Give user a chance to reallocate the stack.  Use copies of
+           these so that the &'s don't force the real ones into
+           memory.  */
+        YYSTYPE *yyvs1 = yyvs;
+        yytype_int16 *yyss1 = yyss;
+
+        /* Each stack pointer address is followed by the size of the
+           data in use in that stack, in bytes.  This used to be a
+           conditional around just the two extra args, but that might
+           be undefined if yyoverflow is a macro.  */
+        yyoverflow (YY_("memory exhausted"),
+                    &yyss1, yysize * sizeof (*yyssp),
+                    &yyvs1, yysize * sizeof (*yyvsp),
+                    &yystacksize);
+
+        yyss = yyss1;
+        yyvs = yyvs1;
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
@@ -1777,23 +1536,22 @@ yyparse ()
 # else
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
-       goto yyexhaustedlab;
+        goto yyexhaustedlab;
       yystacksize *= 2;
       if (YYMAXDEPTH < yystacksize)
-       yystacksize = YYMAXDEPTH;
+        yystacksize = YYMAXDEPTH;
 
       {
-       yytype_int16 *yyss1 = yyss;
-       union yyalloc *yyptr =
-         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-       if (! yyptr)
-         goto yyexhaustedlab;
-       YYSTACK_RELOCATE (yyss);
-       YYSTACK_RELOCATE (yyvs);
-
+        yytype_int16 *yyss1 = yyss;
+        union yyalloc *yyptr =
+          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+        if (! yyptr)
+          goto yyexhaustedlab;
+        YYSTACK_RELOCATE (yyss_alloc, yyss);
+        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
-       if (yyss1 != yyssa)
-         YYSTACK_FREE (yyss1);
+        if (yyss1 != yyssa)
+          YYSTACK_FREE (yyss1);
       }
 # endif
 #endif /* no yyoverflow */
@@ -1801,16 +1559,18 @@ yyparse ()
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                 (unsigned long int) yystacksize));
+                  (unsigned long int) yystacksize));
 
       if (yyss + yystacksize - 1 <= yyssp)
-       YYABORT;
+        YYABORT;
     }
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1819,20 +1579,20 @@ yyparse ()
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
+      yychar = yylex ();
     }
 
   if (yychar <= YYEOF)
@@ -1854,29 +1614,27 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-       goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
   goto yynewstate;
 
@@ -1899,7 +1657,7 @@ yyreduce:
   yylen = yyr2[yyn];
 
   /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
+     '$$ = $1'.
 
      Otherwise, the following line sets YYVAL to garbage.
      This behavior is undocumented and Bison
@@ -1913,935 +1671,1120 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 189 "fta.y"
+#line 204 "fta.y" /* yacc.c:1646  */
     {
-               fta_parse_result->parse_tree_list = (yyvsp[(1) - (1)].q_list);
+               fta_parse_result->parse_tree_list = (yyvsp[0].q_list);
                fta_parse_result->tables = NULL;
                fta_parse_result->parse_type = QUERY_PARSE;
-       ;}
+       }
+#line 1681 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 3:
-#line 194 "fta.y"
+#line 209 "fta.y" /* yacc.c:1646  */
     {
                fta_parse_result->parse_tree_list = NULL;
                fta_parse_result->fta_parse_tree = NULL;
-               fta_parse_result->tables = (yyvsp[(1) - (1)].table_list_schema);
+               fta_parse_result->tables = (yyvsp[0].table_list_schema);
                fta_parse_result->parse_type = TABLE_PARSE;
-       ;}
+       }
+#line 1692 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 4:
-#line 201 "fta.y"
+#line 216 "fta.y" /* yacc.c:1646  */
     {
                fta_parse_result->parse_tree_list = NULL;
-               fta_parse_result->fta_parse_tree = (yyvsp[(4) - (5)].tblp);
-               fta_parse_result->tables = (yyvsp[(3) - (5)].table_list_schema);
+               fta_parse_result->fta_parse_tree = (yyvsp[-1].tblp);
+               fta_parse_result->tables = (yyvsp[-2].table_list_schema);
                fta_parse_result->parse_type = STREAM_PARSE;
-       ;}
+       }
+#line 1703 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 5:
-#line 215 "fta.y"
+#line 230 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(3) - (3)].tblp)->add_nmap((yyvsp[(1) - (3)].var_defs));                 // Memory leak : plug it.
-                               (yyvsp[(3) - (3)].tblp)->add_param_list((yyvsp[(2) - (3)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(3) - (3)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-2].var_defs));                        // Memory leak : plug it.
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-1].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1713 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 6:
-#line 220 "fta.y"
+#line 235 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(3) - (3)].tblp)->add_nmap((yyvsp[(2) - (3)].var_defs));                 // Memory leak : plug it.
-                               (yyvsp[(3) - (3)].tblp)->add_param_list((yyvsp[(1) - (3)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(3) - (3)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-1].var_defs));                        // Memory leak : plug it.
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-2].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1723 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 7:
-#line 225 "fta.y"
+#line 240 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(2) - (2)].tblp)->add_nmap(NULL);                        // Memory leak : plug it.
-                               (yyvsp[(2) - (2)].tblp)->add_param_list((yyvsp[(1) - (2)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(2) - (2)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap(NULL);                        // Memory leak : plug it.
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-1].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1733 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 8:
-#line 230 "fta.y"
+#line 245 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(2) - (2)].tblp)->add_nmap((yyvsp[(1) - (2)].var_defs));                 // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(2) - (2)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-1].var_defs));                        // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1742 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 9:
-#line 234 "fta.y"
+#line 249 "fta.y" /* yacc.c:1646  */
     {
-                               (yyval.tblp) = (yyvsp[(1) - (1)].tblp);
-                       ;}
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1750 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 10:
-#line 237 "fta.y"
+#line 252 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(3) - (3)].tblp)->add_nmap((yyvsp[(1) - (3)].var_defs));                 // Memory leak : plug it.
-                               (yyvsp[(3) - (3)].tblp)->add_param_list((yyvsp[(2) - (3)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(3) - (3)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-2].var_defs));                        // Memory leak : plug it.
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-1].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1760 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 11:
-#line 242 "fta.y"
+#line 257 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(3) - (3)].tblp)->add_nmap((yyvsp[(2) - (3)].var_defs));                 // Memory leak : plug it.
-                               (yyvsp[(3) - (3)].tblp)->add_param_list((yyvsp[(1) - (3)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(3) - (3)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-1].var_defs));                        // Memory leak : plug it.
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-2].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1770 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 12:
-#line 247 "fta.y"
+#line 262 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(2) - (2)].tblp)->add_param_list((yyvsp[(1) - (2)].var_defs));           // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(2) - (2)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_param_list((yyvsp[-1].var_defs));          // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1779 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 13:
-#line 251 "fta.y"
+#line 266 "fta.y" /* yacc.c:1646  */
     {
-                               (yyvsp[(2) - (2)].tblp)->add_nmap((yyvsp[(1) - (2)].var_defs));                 // Memory leak : plug it.
-                               (yyval.tblp) = (yyvsp[(2) - (2)].tblp);
-                       ;}
+                               (yyvsp[0].tblp)->add_nmap((yyvsp[-1].var_defs));                        // Memory leak : plug it.
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1788 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 14:
-#line 255 "fta.y"
+#line 270 "fta.y" /* yacc.c:1646  */
     {
-                               (yyval.tblp) = (yyvsp[(1) - (1)].tblp);
-                       ;}
+                               (yyval.tblp) = (yyvsp[0].tblp);
+                       }
+#line 1796 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 15:
-#line 260 "fta.y"
-    {(yyval.q_list) = new query_list_t((yyvsp[(1) - (1)].tblp));;}
+#line 275 "fta.y" /* yacc.c:1646  */
+    {(yyval.q_list) = new query_list_t((yyvsp[0].tblp));}
+#line 1802 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 16:
-#line 261 "fta.y"
-    {(yyval.q_list) = (yyvsp[(1) - (3)].q_list)->append((yyvsp[(3) - (3)].tblp));;}
+#line 276 "fta.y" /* yacc.c:1646  */
+    {(yyval.q_list) = (yyvsp[-2].q_list)->append((yyvsp[0].tblp));}
+#line 1808 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 17:
-#line 265 "fta.y"
-    {(yyval.var_defs)=(yyvsp[(3) - (4)].var_defs);;}
+#line 280 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs)=(yyvsp[-1].var_defs);}
+#line 1814 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 18:
-#line 266 "fta.y"
-    {(yyval.var_defs)=NULL;;}
+#line 281 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs)=NULL;}
+#line 1820 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 19:
-#line 270 "fta.y"
-    {(yyval.var_defs)=(yyvsp[(3) - (4)].var_defs);fta_parse_defines=(yyvsp[(3) - (4)].var_defs);;}
+#line 285 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs)=(yyvsp[-1].var_defs);fta_parse_defines=(yyvsp[-1].var_defs);}
+#line 1826 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 20:
-#line 271 "fta.y"
-    {(yyval.var_defs)=NULL;fta_parse_defines = NULL;;}
+#line 286 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs)=NULL;fta_parse_defines = NULL;}
+#line 1832 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 21:
-#line 275 "fta.y"
-    {(yyval.var_defs) = new var_defs_t((yyvsp[(1) - (1)].var_pair));;}
+#line 290 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs) = new var_defs_t((yyvsp[0].var_pair));}
+#line 1838 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 22:
-#line 276 "fta.y"
-    {(yyval.var_defs) = (yyvsp[(1) - (2)].var_defs)->add_var_pair((yyvsp[(2) - (2)].var_pair));;}
+#line 291 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_defs) = (yyvsp[-1].var_defs)->add_var_pair((yyvsp[0].var_pair));}
+#line 1844 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 23:
-#line 280 "fta.y"
-    {(yyval.var_pair) = new var_pair_t((yyvsp[(1) - (3)].strval),(yyvsp[(2) - (3)].strval));;}
+#line 295 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_pair) = new var_pair_t((yyvsp[-2].strval),(yyvsp[-1].strval));}
+#line 1850 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 24:
-#line 281 "fta.y"
-    {(yyval.var_pair) = new var_pair_t((yyvsp[(1) - (3)].strval),(yyvsp[(2) - (3)].strval));;}
+#line 296 "fta.y" /* yacc.c:1646  */
+    {(yyval.var_pair) = new var_pair_t((yyvsp[-2].strval),(yyvsp[-1].strval));}
+#line 1856 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 25:
-#line 285 "fta.y"
-    {(yyval.tblp) = (yyvsp[(3) - (3)].tblp)->add_selection((yyvsp[(2) - (3)].select_listval));;}
+#line 300 "fta.y" /* yacc.c:1646  */
+    {(yyval.tblp) = (yyvsp[0].tblp)->add_selection((yyvsp[-1].select_listval));}
+#line 1862 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 26:
-#line 290 "fta.y"
-    {(yyval.tblp) = new table_exp_t((yyvsp[(2) - (3)].clist),(yyvsp[(3) - (3)].tbl_list));;}
+#line 305 "fta.y" /* yacc.c:1646  */
+    {(yyval.tblp) = new table_exp_t((yyvsp[-1].clist),(yyvsp[0].tbl_list));}
+#line 1868 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 27:
-#line 292 "fta.y"
-    {(yyval.tblp) = new table_exp_t((yyvsp[(2) - (5)].clist),(yyvsp[(4) - (5)].scalarval),(yyvsp[(5) - (5)].tbl_list));;}
+#line 307 "fta.y" /* yacc.c:1646  */
+    {(yyval.tblp) = new table_exp_t((yyvsp[-3].clist),(yyvsp[-1].scalarval),(yyvsp[0].tbl_list));}
+#line 1874 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 28:
-#line 299 "fta.y"
-    { (yyval.select_listval) = (yyvsp[(1) - (1)].select_listval);;}
+#line 314 "fta.y" /* yacc.c:1646  */
+    { (yyval.select_listval) = (yyvsp[0].select_listval);}
+#line 1880 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 29:
-#line 311 "fta.y"
-    {(yyval.tblp)=new table_exp_t((yyvsp[(1) - (8)].tbl_list),(yyvsp[(2) - (8)].predp),(yyvsp[(3) - (8)].extended_gb_list),(yyvsp[(4) - (8)].clist),(yyvsp[(5) - (8)].predp),(yyvsp[(6) - (8)].predp),(yyvsp[(7) - (8)].predp), (yyvsp[(8) - (8)].predp));;}
+#line 326 "fta.y" /* yacc.c:1646  */
+    {(yyval.tblp)=new table_exp_t((yyvsp[-7].tbl_list),(yyvsp[-6].predp),(yyvsp[-5].extended_gb_list),(yyvsp[-4].clist),(yyvsp[-3].predp),(yyvsp[-2].predp),(yyvsp[-1].predp), (yyvsp[0].predp));}
+#line 1886 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 30:
-#line 315 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(2) - (2)].tbl_list); (yyval.tbl_list)->set_properties(-1);;}
+#line 330 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(-1);}
+#line 1892 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 31:
-#line 316 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(3) - (3)].tbl_list); (yyval.tbl_list)->set_properties(INNER_JOIN_PROPERTY);;}
+#line 331 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(INNER_JOIN_PROPERTY);}
+#line 1898 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 32:
-#line 317 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(3) - (3)].tbl_list); (yyval.tbl_list)->set_properties(OUTER_JOIN_PROPERTY);;}
+#line 332 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(OUTER_JOIN_PROPERTY);}
+#line 1904 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 33:
-#line 318 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(3) - (3)].tbl_list); (yyval.tbl_list)->set_properties(RIGHT_OUTER_JOIN_PROPERTY);;}
+#line 333 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(RIGHT_OUTER_JOIN_PROPERTY);}
+#line 1910 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 34:
-#line 319 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(3) - (3)].tbl_list); (yyval.tbl_list)->set_properties(LEFT_OUTER_JOIN_PROPERTY);;}
+#line 334 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(LEFT_OUTER_JOIN_PROPERTY);}
+#line 1916 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 35:
-#line 320 "fta.y"
-    {(yyval.tbl_list) = (yyvsp[(8) - (8)].tbl_list); (yyval.tbl_list)->set_properties(FILTER_JOIN_PROPERTY); (yyval.tbl_list)->set_colref((yyvsp[(3) - (8)].colref)); (yyval.tbl_list)->set_temporal_range((yyvsp[(5) - (8)].strval));;}
+#line 335 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = (yyvsp[0].tbl_list); (yyval.tbl_list)->set_properties(FILTER_JOIN_PROPERTY); (yyval.tbl_list)->set_colref((yyvsp[-5].colref)); (yyval.tbl_list)->set_temporal_range((yyvsp[-3].strval));}
+#line 1922 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 36:
-#line 324 "fta.y"
-    {(yyval.tbl_list) = new tablevar_list_t((yyvsp[(1) - (1)].table));;}
+#line 339 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list) = new tablevar_list_t((yyvsp[0].table));}
+#line 1928 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 37:
-#line 325 "fta.y"
-    {(yyval.tbl_list)= (yyvsp[(1) - (3)].tbl_list)->append_table((yyvsp[(3) - (3)].table));;}
+#line 340 "fta.y" /* yacc.c:1646  */
+    {(yyval.tbl_list)= (yyvsp[-2].tbl_list)->append_table((yyvsp[0].table));}
+#line 1934 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 38:
-#line 329 "fta.y"
-    { (yyval.table) = (yyvsp[(1) - (1)].table);;}
+#line 344 "fta.y" /* yacc.c:1646  */
+    { (yyval.table) = (yyvsp[0].table);}
+#line 1940 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 39:
-#line 330 "fta.y"
-    { (yyval.table)= (yyvsp[(1) - (2)].table)->set_range_var((yyvsp[(2) - (2)].strval));;}
+#line 345 "fta.y" /* yacc.c:1646  */
+    { (yyval.table)= (yyvsp[-1].table)->set_range_var((yyvsp[0].strval));}
+#line 1946 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 40:
-#line 334 "fta.y"
-    {(yyval.table) = new tablevar_t((yyvsp[(1) - (1)].stringval)->c_str());;}
+#line 349 "fta.y" /* yacc.c:1646  */
+    {(yyval.table) = new tablevar_t((yyvsp[0].stringval)->c_str());}
+#line 1952 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 41:
-#line 335 "fta.y"
-    {(yyval.table) = new tablevar_t((yyvsp[(1) - (3)].strval),(yyvsp[(3) - (3)].stringval)->c_str(),0);;}
+#line 350 "fta.y" /* yacc.c:1646  */
+    {(yyval.table) = new tablevar_t((yyvsp[-2].strval),(yyvsp[0].stringval)->c_str(),0);}
+#line 1958 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 42:
-#line 336 "fta.y"
-    {(yyval.table) = new tablevar_t((yyvsp[(1) - (5)].strval),(yyvsp[(3) - (5)].strval),(yyvsp[(5) - (5)].stringval)->c_str());;}
+#line 351 "fta.y" /* yacc.c:1646  */
+    {(yyval.table) = new tablevar_t((yyvsp[-4].strval),(yyvsp[-2].strval),(yyvsp[0].stringval)->c_str());}
+#line 1964 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 43:
-#line 337 "fta.y"
-    {(yyval.table) = new tablevar_t((yyvsp[(1) - (5)].strval),(yyvsp[(3) - (5)].strval),(yyvsp[(5) - (5)].stringval)->c_str());;}
+#line 352 "fta.y" /* yacc.c:1646  */
+    {(yyval.table) = new tablevar_t((yyvsp[-4].strval),(yyvsp[-2].strval),(yyvsp[0].stringval)->c_str());}
+#line 1970 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 44:
-#line 338 "fta.y"
-    {(yyval.table) = new tablevar_t((yyvsp[(2) - (5)].strval),(yyvsp[(5) - (5)].stringval)->c_str(),1);;}
+#line 353 "fta.y" /* yacc.c:1646  */
+    {(yyval.table) = new tablevar_t((yyvsp[-3].strval),(yyvsp[0].stringval)->c_str(),1);}
+#line 1976 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 45:
-#line 342 "fta.y"
-    {(yyval.stringval) = new string_t((yyvsp[(1) - (1)].strval));;}
+#line 357 "fta.y" /* yacc.c:1646  */
+    {(yyval.stringval) = new string_t((yyvsp[0].strval));}
+#line 1982 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 46:
-#line 343 "fta.y"
-    {(yyval.stringval) = (yyval.stringval)->append("/",(yyvsp[(3) - (3)].strval));;}
+#line 358 "fta.y" /* yacc.c:1646  */
+    {(yyval.stringval) = (yyval.stringval)->append("/",(yyvsp[0].strval));}
+#line 1988 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 47:
-#line 348 "fta.y"
-    {(yyval.predp)=NULL;;}
+#line 363 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=NULL;}
+#line 1994 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 48:
-#line 349 "fta.y"
-    {(yyval.predp)=(yyvsp[(1) - (1)].predp);;}
+#line 364 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=(yyvsp[0].predp);}
+#line 2000 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 49:
-#line 353 "fta.y"
-    {(yyval.predp) = (yyvsp[(2) - (2)].predp);;}
+#line 368 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = (yyvsp[0].predp);}
+#line 2006 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 50:
-#line 357 "fta.y"
-    {(yyval.predp)=NULL;;}
+#line 372 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=NULL;}
+#line 2012 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 51:
-#line 358 "fta.y"
-    {(yyval.predp)=(yyvsp[(2) - (2)].predp); ;}
+#line 373 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=(yyvsp[0].predp); }
+#line 2018 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 52:
-#line 362 "fta.y"
-    {(yyval.predp)=NULL;;}
+#line 377 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=NULL;}
+#line 2024 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 53:
-#line 363 "fta.y"
-    {(yyval.predp)=(yyvsp[(2) - (2)].predp); ;}
+#line 378 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=(yyvsp[0].predp); }
+#line 2030 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 54:
-#line 367 "fta.y"
-    {(yyval.predp)=NULL;;}
+#line 382 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=NULL;}
+#line 2036 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 55:
-#line 368 "fta.y"
-    {(yyval.predp)=(yyvsp[(2) - (2)].predp); ;}
+#line 383 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=(yyvsp[0].predp); }
+#line 2042 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 56:
-#line 372 "fta.y"
-    {(yyval.predp)=NULL;;}
+#line 387 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=NULL;}
+#line 2048 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 57:
-#line 373 "fta.y"
-    {(yyval.predp)=(yyvsp[(1) - (1)].predp);;}
+#line 388 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=(yyvsp[0].predp);}
+#line 2054 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 58:
-#line 377 "fta.y"
-    {(yyval.predp) = (yyvsp[(2) - (2)].predp);;}
+#line 392 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = (yyvsp[0].predp);}
+#line 2060 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 59:
-#line 384 "fta.y"
-    {(yyval.predp)=new predicate_t("OR",(yyvsp[(1) - (3)].predp),(yyvsp[(3) - (3)].predp));;}
+#line 399 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=new predicate_t("OR",(yyvsp[-2].predp),(yyvsp[0].predp));}
+#line 2066 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 60:
-#line 385 "fta.y"
-    {(yyval.predp)=new predicate_t("AND",(yyvsp[(1) - (3)].predp),(yyvsp[(3) - (3)].predp));;}
+#line 400 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp)=new predicate_t("AND",(yyvsp[-2].predp),(yyvsp[0].predp));}
+#line 2072 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 61:
-#line 386 "fta.y"
-    {(yyval.predp) = new predicate_t("NOT", (yyvsp[(2) - (2)].predp) );;}
+#line 401 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = new predicate_t("NOT", (yyvsp[0].predp) );}
+#line 2078 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 62:
-#line 387 "fta.y"
-    {(yyval.predp) = (yyvsp[(2) - (3)].predp);;}
+#line 402 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = (yyvsp[-1].predp);}
+#line 2084 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 63:
-#line 388 "fta.y"
-    {(yyval.predp) = (yyvsp[(1) - (1)].predp);;}
+#line 403 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = (yyvsp[0].predp);}
+#line 2090 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 64:
-#line 392 "fta.y"
-    { (yyval.predp)=(yyvsp[(1) - (1)].predp);;}
+#line 407 "fta.y" /* yacc.c:1646  */
+    { (yyval.predp)=(yyvsp[0].predp);}
+#line 2096 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 65:
-#line 393 "fta.y"
-    { (yyval.predp) = (yyvsp[(1) - (1)].predp);;}
+#line 408 "fta.y" /* yacc.c:1646  */
+    { (yyval.predp) = (yyvsp[0].predp);}
+#line 2102 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 66:
-#line 394 "fta.y"
-    {(yyval.predp) = predicate_t::make_paramless_fcn_predicate((yyvsp[(1) - (3)].strval)); ;}
+#line 409 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = predicate_t::make_paramless_fcn_predicate((yyvsp[-2].strval)); }
+#line 2108 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 67:
-#line 395 "fta.y"
-    {(yyval.predp) = new predicate_t((yyvsp[(1) - (4)].strval), (yyvsp[(3) - (4)].se_listval)->get_se_list()); ;}
+#line 410 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = new predicate_t((yyvsp[-3].strval), (yyvsp[-1].se_listval)->get_se_list()); }
+#line 2114 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 68:
-#line 399 "fta.y"
-    {(yyval.predp) = new predicate_t((yyvsp[(1) - (3)].scalarval),(yyvsp[(2) - (3)].strval),(yyvsp[(3) - (3)].scalarval));;}
+#line 414 "fta.y" /* yacc.c:1646  */
+    {(yyval.predp) = new predicate_t((yyvsp[-2].scalarval),(yyvsp[-1].strval),(yyvsp[0].scalarval));}
+#line 2120 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 69:
-#line 403 "fta.y"
-    { (yyval.predp) = new predicate_t((yyvsp[(1) - (5)].scalarval),(yyvsp[(4) - (5)].lit_l)); ;}
+#line 418 "fta.y" /* yacc.c:1646  */
+    { (yyval.predp) = new predicate_t((yyvsp[-4].scalarval),(yyvsp[-1].lit_l)); }
+#line 2126 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 70:
-#line 407 "fta.y"
-    {(yyval.lit_l) = new literal_list_t((yyvsp[(1) - (1)].litval));;}
+#line 422 "fta.y" /* yacc.c:1646  */
+    {(yyval.lit_l) = new literal_list_t((yyvsp[0].litval));}
+#line 2132 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 71:
-#line 408 "fta.y"
-    {(yyval.lit_l) = (yyvsp[(1) - (3)].lit_l)->append_literal((yyvsp[(3) - (3)].litval));;}
+#line 423 "fta.y" /* yacc.c:1646  */
+    {(yyval.lit_l) = (yyvsp[-2].lit_l)->append_literal((yyvsp[0].litval));}
+#line 2138 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 72:
-#line 414 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("+",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 429 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("+",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2144 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 73:
-#line 415 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("-",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 430 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("-",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2150 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 74:
-#line 416 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("|",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 431 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("|",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2156 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 75:
-#line 417 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("*",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 432 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("*",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2162 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 76:
-#line 418 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("/",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 433 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("/",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2168 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 77:
-#line 419 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("&",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 434 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("&",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2174 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 78:
-#line 420 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t("%",(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 435 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t("%",(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2180 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 79:
-#line 421 "fta.y"
-    { (yyval.scalarval)=new scalarexp_t((yyvsp[(2) - (3)].strval),(yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].scalarval));;}
+#line 436 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)=new scalarexp_t((yyvsp[-1].strval),(yyvsp[-2].scalarval),(yyvsp[0].scalarval));}
+#line 2186 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 80:
-#line 422 "fta.y"
-    { (yyval.scalarval) = new scalarexp_t("+",(yyvsp[(2) - (2)].scalarval));;}
+#line 437 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = new scalarexp_t("+",(yyvsp[0].scalarval));}
+#line 2192 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 81:
-#line 423 "fta.y"
-    { (yyval.scalarval) = new scalarexp_t("-",(yyvsp[(2) - (2)].scalarval));;}
+#line 438 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = new scalarexp_t("-",(yyvsp[0].scalarval));}
+#line 2198 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 82:
-#line 424 "fta.y"
-    { (yyval.scalarval) = new scalarexp_t("!",(yyvsp[(2) - (2)].scalarval));;}
+#line 439 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = new scalarexp_t("!",(yyvsp[0].scalarval));}
+#line 2204 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 83:
-#line 425 "fta.y"
-    { (yyval.scalarval) = new scalarexp_t("~",(yyvsp[(2) - (2)].scalarval));;}
+#line 440 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = new scalarexp_t("~",(yyvsp[0].scalarval));}
+#line 2210 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 84:
-#line 426 "fta.y"
-    { (yyval.scalarval)= new scalarexp_t((yyvsp[(1) - (1)].litval));;}
+#line 441 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval)= new scalarexp_t((yyvsp[0].litval));}
+#line 2216 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 85:
-#line 427 "fta.y"
-    {(yyval.scalarval) = scalarexp_t::make_param_reference((yyvsp[(2) - (2)].strval));;}
+#line 442 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = scalarexp_t::make_param_reference((yyvsp[0].strval));}
+#line 2222 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 86:
-#line 428 "fta.y"
-    {(yyval.scalarval) = scalarexp_t::make_iface_param_reference((yyvsp[(1) - (1)].ifpref));;}
+#line 443 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = scalarexp_t::make_iface_param_reference((yyvsp[0].ifpref));}
+#line 2228 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 87:
-#line 429 "fta.y"
-    { (yyval.scalarval) = new scalarexp_t((yyvsp[(1) - (1)].colref));;}
+#line 444 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = new scalarexp_t((yyvsp[0].colref));}
+#line 2234 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 88:
-#line 430 "fta.y"
-    {(yyval.scalarval) = (yyvsp[(2) - (3)].scalarval);;}
+#line 445 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = (yyvsp[-1].scalarval);}
+#line 2240 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 89:
-#line 431 "fta.y"
-    { (yyval.scalarval) = scalarexp_t::make_star_aggr((yyvsp[(1) - (4)].strval)); ;}
+#line 446 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = scalarexp_t::make_star_aggr((yyvsp[-3].strval)); }
+#line 2246 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 90:
-#line 432 "fta.y"
-    { (yyval.scalarval) = scalarexp_t::make_se_aggr((yyvsp[(1) - (4)].strval),(yyvsp[(3) - (4)].scalarval)); ;}
+#line 447 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = scalarexp_t::make_se_aggr((yyvsp[-3].strval),(yyvsp[-1].scalarval)); }
+#line 2252 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 91:
-#line 433 "fta.y"
-    {(yyval.scalarval) = new scalarexp_t((yyvsp[(1) - (4)].strval), (yyvsp[(3) - (4)].se_listval)->get_se_list()); ;}
+#line 448 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = new scalarexp_t((yyvsp[-3].strval), (yyvsp[-1].se_listval)->get_se_list()); }
+#line 2258 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 92:
-#line 434 "fta.y"
-    {(yyval.scalarval) = scalarexp_t::make_paramless_fcn((yyvsp[(1) - (3)].strval)); ;}
+#line 449 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = scalarexp_t::make_paramless_fcn((yyvsp[-2].strval)); }
+#line 2264 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 93:
-#line 435 "fta.y"
-    { (yyval.scalarval) = scalarexp_t::make_star_aggr((yyvsp[(1) - (5)].strval)); (yyval.scalarval)->set_superaggr(true); ;}
+#line 450 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = scalarexp_t::make_star_aggr((yyvsp[-4].strval)); (yyval.scalarval)->set_superaggr(true); }
+#line 2270 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 94:
-#line 436 "fta.y"
-    { (yyval.scalarval) = scalarexp_t::make_se_aggr((yyvsp[(1) - (5)].strval),(yyvsp[(4) - (5)].scalarval)); (yyval.scalarval)->set_superaggr(true); ;}
+#line 451 "fta.y" /* yacc.c:1646  */
+    { (yyval.scalarval) = scalarexp_t::make_se_aggr((yyvsp[-4].strval),(yyvsp[-1].scalarval)); (yyval.scalarval)->set_superaggr(true); }
+#line 2276 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 95:
-#line 437 "fta.y"
-    {(yyval.scalarval) = new scalarexp_t((yyvsp[(1) - (5)].strval), (yyvsp[(4) - (5)].se_listval)->get_se_list()); (yyval.scalarval)->set_superaggr(true); ;}
+#line 452 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = new scalarexp_t((yyvsp[-4].strval), (yyvsp[-1].se_listval)->get_se_list()); (yyval.scalarval)->set_superaggr(true); }
+#line 2282 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 96:
-#line 438 "fta.y"
-    {(yyval.scalarval) = scalarexp_t::make_paramless_fcn((yyvsp[(1) - (4)].strval)); (yyval.scalarval)->set_superaggr(true); ;}
+#line 453 "fta.y" /* yacc.c:1646  */
+    {(yyval.scalarval) = scalarexp_t::make_paramless_fcn((yyvsp[-3].strval)); (yyval.scalarval)->set_superaggr(true); }
+#line 2288 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 97:
-#line 443 "fta.y"
-    {  (yyval.select_listval)= new select_list_t((yyvsp[(1) - (1)].scalarval)); ;}
+#line 458 "fta.y" /* yacc.c:1646  */
+    {  (yyval.select_listval)= new select_list_t((yyvsp[0].scalarval)); }
+#line 2294 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 98:
-#line 444 "fta.y"
-    {  (yyval.select_listval)= new select_list_t((yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].strval)); ;}
+#line 459 "fta.y" /* yacc.c:1646  */
+    {  (yyval.select_listval)= new select_list_t((yyvsp[-2].scalarval),(yyvsp[0].strval)); }
+#line 2300 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 99:
-#line 445 "fta.y"
-    { (yyval.select_listval)=(yyvsp[(1) - (3)].select_listval)->append((yyvsp[(3) - (3)].scalarval)); ;}
+#line 460 "fta.y" /* yacc.c:1646  */
+    { (yyval.select_listval)=(yyvsp[-2].select_listval)->append((yyvsp[0].scalarval)); }
+#line 2306 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 100:
-#line 446 "fta.y"
-    { (yyval.select_listval)=(yyvsp[(1) - (5)].select_listval)->append((yyvsp[(3) - (5)].scalarval),(yyvsp[(5) - (5)].strval)); ;}
+#line 461 "fta.y" /* yacc.c:1646  */
+    { (yyval.select_listval)=(yyvsp[-4].select_listval)->append((yyvsp[-2].scalarval),(yyvsp[0].strval)); }
+#line 2312 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 101:
-#line 450 "fta.y"
-    {  (yyval.se_listval)= new se_list_t((yyvsp[(1) - (1)].scalarval)); ;}
+#line 465 "fta.y" /* yacc.c:1646  */
+    {  (yyval.se_listval)= new se_list_t((yyvsp[0].scalarval)); }
+#line 2318 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 102:
-#line 451 "fta.y"
-    { (yyval.se_listval)=(yyvsp[(1) - (3)].se_listval)->append((yyvsp[(3) - (3)].scalarval)); ;}
+#line 466 "fta.y" /* yacc.c:1646  */
+    { (yyval.se_listval)=(yyvsp[-2].se_listval)->append((yyvsp[0].scalarval)); }
+#line 2324 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 103:
-#line 455 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(1) - (1)].strval),LITERAL_STRING);;}
+#line 470 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_STRING);}
+#line 2330 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 104:
-#line 456 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(1) - (1)].strval),LITERAL_INT);;}
+#line 471 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_INT);}
+#line 2336 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 105:
-#line 457 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(1) - (1)].strval),LITERAL_LONGINT);;}
+#line 472 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_LONGINT);}
+#line 2342 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 106:
-#line 458 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(1) - (1)].strval),LITERAL_FLOAT);;}
+#line 473 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_FLOAT);}
+#line 2348 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 107:
-#line 459 "fta.y"
-    {(yyval.litval) = new literal_t("TRUE",LITERAL_BOOL);;}
+#line 474 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t("TRUE",LITERAL_BOOL);}
+#line 2354 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 108:
-#line 460 "fta.y"
-    {(yyval.litval) = new literal_t("FALSE",LITERAL_BOOL);;}
+#line 475 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t("FALSE",LITERAL_BOOL);}
+#line 2360 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 109:
-#line 461 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(2) - (2)].strval),LITERAL_TIMEVAL);;}
+#line 476 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_TIMEVAL);}
+#line 2366 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 110:
-#line 462 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(2) - (2)].strval),LITERAL_HEX);;}
+#line 477 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_HEX);}
+#line 2372 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 111:
-#line 463 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(2) - (2)].strval),LITERAL_LONGHEX);;}
+#line 478 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_LONGHEX);}
+#line 2378 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 112:
-#line 464 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(2) - (2)].strval),LITERAL_IP);;}
+#line 479 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_IP);}
+#line 2384 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 113:
-#line 465 "fta.y"
-    {(yyval.litval) = new literal_t((yyvsp[(2) - (2)].strval),LITERAL_IPV6);;}
+#line 480 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = new literal_t((yyvsp[0].strval),LITERAL_IPV6);}
+#line 2390 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 114:
-#line 466 "fta.y"
-    {(yyval.litval) = literal_t::make_define_literal((yyvsp[(2) - (2)].strval),fta_parse_defines);;}
+#line 481 "fta.y" /* yacc.c:1646  */
+    {(yyval.litval) = literal_t::make_define_literal((yyvsp[0].strval),fta_parse_defines);}
+#line 2396 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 115:
-#line 472 "fta.y"
-    {(yyval.extended_gb_list) = NULL;;}
+#line 487 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb_list) = NULL;}
+#line 2402 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 116:
-#line 473 "fta.y"
-    {(yyval.extended_gb_list) = (yyvsp[(3) - (3)].extended_gb_list);;}
+#line 488 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb_list) = (yyvsp[0].extended_gb_list);}
+#line 2408 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 117:
-#line 477 "fta.y"
-    {(yyval.clist) = NULL;;}
+#line 492 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist) = NULL;}
+#line 2414 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 118:
-#line 478 "fta.y"
-    {(yyval.clist) = (yyvsp[(2) - (2)].clist);;}
+#line 493 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist) = (yyvsp[0].clist);}
+#line 2420 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 119:
-#line 482 "fta.y"
-    { (yyval.list_of_gb_list) = new list_of_gb_list_t((yyvsp[(2) - (3)].gb_list));;}
+#line 497 "fta.y" /* yacc.c:1646  */
+    { (yyval.list_of_gb_list) = new list_of_gb_list_t((yyvsp[-1].gb_list));}
+#line 2426 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 120:
-#line 483 "fta.y"
-    {(yyval.list_of_gb_list) = (yyvsp[(1) - (5)].list_of_gb_list)->append((yyvsp[(4) - (5)].gb_list));;}
+#line 498 "fta.y" /* yacc.c:1646  */
+    {(yyval.list_of_gb_list) = (yyvsp[-4].list_of_gb_list)->append((yyvsp[-1].gb_list));}
+#line 2432 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 121:
-#line 487 "fta.y"
-    {(yyval.extended_gb) = extended_gb_t::create_from_gb((yyvsp[(1) - (1)].gb_val));;}
+#line 502 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb) = extended_gb_t::create_from_gb((yyvsp[0].gb_val));}
+#line 2438 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 122:
-#line 488 "fta.y"
-    {(yyval.extended_gb) = extended_gb_t::extended_create_from_rollup((yyvsp[(3) - (4)].gb_list));;}
+#line 503 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb) = extended_gb_t::extended_create_from_rollup((yyvsp[-1].gb_list));}
+#line 2444 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 123:
-#line 489 "fta.y"
-    {(yyval.extended_gb) = extended_gb_t::extended_create_from_cube((yyvsp[(3) - (4)].gb_list));;}
+#line 504 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb) = extended_gb_t::extended_create_from_cube((yyvsp[-1].gb_list));}
+#line 2450 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 124:
-#line 490 "fta.y"
-    {(yyval.extended_gb) = extended_gb_t::extended_create_from_gsets((yyvsp[(3) - (4)].list_of_gb_list));;}
+#line 505 "fta.y" /* yacc.c:1646  */
+    {(yyval.extended_gb) = extended_gb_t::extended_create_from_gsets((yyvsp[-1].list_of_gb_list));}
+#line 2456 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 125:
-#line 494 "fta.y"
-    { (yyval.extended_gb_list) = new extended_gb_list_t((yyvsp[(1) - (1)].extended_gb));;}
+#line 509 "fta.y" /* yacc.c:1646  */
+    { (yyval.extended_gb_list) = new extended_gb_list_t((yyvsp[0].extended_gb));}
+#line 2462 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 126:
-#line 495 "fta.y"
-    { (yyval.extended_gb_list)=(yyvsp[(1) - (3)].extended_gb_list)->append((yyvsp[(3) - (3)].extended_gb));;}
+#line 510 "fta.y" /* yacc.c:1646  */
+    { (yyval.extended_gb_list)=(yyvsp[-2].extended_gb_list)->append((yyvsp[0].extended_gb));}
+#line 2468 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 127:
-#line 499 "fta.y"
-    { (yyval.gb_list) = new gb_list_t((yyvsp[(1) - (1)].gb_val));;}
+#line 514 "fta.y" /* yacc.c:1646  */
+    { (yyval.gb_list) = new gb_list_t((yyvsp[0].gb_val));}
+#line 2474 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 128:
-#line 500 "fta.y"
-    { (yyval.gb_list)=(yyvsp[(1) - (3)].gb_list)->append((yyvsp[(3) - (3)].gb_val));;}
+#line 515 "fta.y" /* yacc.c:1646  */
+    { (yyval.gb_list)=(yyvsp[-2].gb_list)->append((yyvsp[0].gb_val));}
+#line 2480 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 129:
-#line 504 "fta.y"
-    {(yyval.gb_val) = new gb_t((yyvsp[(1) - (1)].strval)); ;}
+#line 519 "fta.y" /* yacc.c:1646  */
+    {(yyval.gb_val) = new gb_t((yyvsp[0].strval)); }
+#line 2486 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 130:
-#line 505 "fta.y"
-    {(yyval.gb_val) = new gb_t((yyvsp[(1) - (3)].strval),(yyvsp[(3) - (3)].strval)); ;}
+#line 520 "fta.y" /* yacc.c:1646  */
+    {(yyval.gb_val) = new gb_t((yyvsp[-2].strval),(yyvsp[0].strval)); }
+#line 2492 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 131:
-#line 506 "fta.y"
-    {(yyval.gb_val) = new gb_t((yyvsp[(1) - (5)].strval),(yyvsp[(3) - (5)].strval),(yyvsp[(5) - (5)].strval)); ;}
+#line 521 "fta.y" /* yacc.c:1646  */
+    {(yyval.gb_val) = new gb_t((yyvsp[-4].strval),(yyvsp[-2].strval),(yyvsp[0].strval)); }
+#line 2498 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 132:
-#line 507 "fta.y"
-    {(yyval.gb_val) = new gb_t((yyvsp[(1) - (3)].scalarval),(yyvsp[(3) - (3)].strval)); ;}
+#line 522 "fta.y" /* yacc.c:1646  */
+    {(yyval.gb_val) = new gb_t((yyvsp[-2].scalarval),(yyvsp[0].strval)); }
+#line 2504 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 133:
-#line 518 "fta.y"
-    {(yyval.ifpref) = new ifpref_t((yyvsp[(2) - (2)].strval));;}
+#line 533 "fta.y" /* yacc.c:1646  */
+    {(yyval.ifpref) = new ifpref_t((yyvsp[0].strval));}
+#line 2510 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 134:
-#line 519 "fta.y"
-    {(yyval.ifpref) = new ifpref_t((yyvsp[(1) - (4)].strval), (yyvsp[(4) - (4)].strval));;}
+#line 534 "fta.y" /* yacc.c:1646  */
+    {(yyval.ifpref) = new ifpref_t((yyvsp[-3].strval), (yyvsp[0].strval));}
+#line 2516 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 135:
-#line 523 "fta.y"
-    {(yyval.colref) = new colref_t((yyvsp[(1) - (1)].strval)); ;}
+#line 538 "fta.y" /* yacc.c:1646  */
+    {(yyval.colref) = new colref_t((yyvsp[0].strval)); }
+#line 2522 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 136:
-#line 524 "fta.y"
-    {(yyval.colref) = new colref_t((yyvsp[(1) - (3)].strval),(yyvsp[(3) - (3)].strval)); ;}
+#line 539 "fta.y" /* yacc.c:1646  */
+    {(yyval.colref) = new colref_t((yyvsp[-2].strval),(yyvsp[0].strval)); }
+#line 2528 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 137:
-#line 525 "fta.y"
-    {(yyval.colref) = new colref_t((yyvsp[(1) - (5)].strval),(yyvsp[(3) - (5)].strval),(yyvsp[(5) - (5)].strval)); ;}
+#line 540 "fta.y" /* yacc.c:1646  */
+    {(yyval.colref) = new colref_t((yyvsp[-4].strval),(yyvsp[-2].strval),(yyvsp[0].strval)); }
+#line 2534 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 138:
-#line 529 "fta.y"
-    {(yyval.clist)=new colref_list_t((yyvsp[(1) - (3)].colref)); (yyval.clist)->append((yyvsp[(3) - (3)].colref));;}
+#line 544 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist)=new colref_list_t((yyvsp[-2].colref)); (yyval.clist)->append((yyvsp[0].colref));}
+#line 2540 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 139:
-#line 530 "fta.y"
-    {(yyval.clist) = (yyvsp[(1) - (3)].clist)->append((yyvsp[(3) - (3)].colref));;}
+#line 545 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist) = (yyvsp[-2].clist)->append((yyvsp[0].colref));}
+#line 2546 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 140:
-#line 534 "fta.y"
-    {(yyval.colref) = new colref_t((yyvsp[(1) - (1)].strval)); ;}
+#line 549 "fta.y" /* yacc.c:1646  */
+    {(yyval.colref) = new colref_t((yyvsp[0].strval)); }
+#line 2552 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 141:
-#line 538 "fta.y"
-    {(yyval.clist)=new colref_list_t((yyvsp[(1) - (3)].colref)); (yyval.clist)->append((yyvsp[(3) - (3)].colref));;}
+#line 553 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist)=new colref_list_t((yyvsp[-2].colref)); (yyval.clist)->append((yyvsp[0].colref));}
+#line 2558 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 142:
-#line 539 "fta.y"
-    {(yyval.clist) = (yyvsp[(1) - (3)].clist)->append((yyvsp[(3) - (3)].colref));;}
+#line 554 "fta.y" /* yacc.c:1646  */
+    {(yyval.clist) = (yyvsp[-2].clist)->append((yyvsp[0].colref));}
+#line 2564 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 143:
-#line 554 "fta.y"
-    {(yyval.table_list_schema) = new table_list((yyvsp[(1) - (1)].table_def_t));;}
+#line 569 "fta.y" /* yacc.c:1646  */
+    {(yyval.table_list_schema) = new table_list((yyvsp[0].table_def_t));}
+#line 2570 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 144:
-#line 555 "fta.y"
-    {(yyval.table_list_schema) = (yyvsp[(1) - (2)].table_list_schema)->append_table((yyvsp[(2) - (2)].table_def_t));;}
+#line 570 "fta.y" /* yacc.c:1646  */
+    {(yyval.table_list_schema) = (yyvsp[-1].table_list_schema)->append_table((yyvsp[0].table_def_t));}
+#line 2576 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 145:
-#line 558 "fta.y"
+#line 573 "fta.y" /* yacc.c:1646  */
     {
-                                       (yyval.table_def_t)=new table_def((yyvsp[(2) - (7)].strval),(yyvsp[(3) - (7)].plist_t),(yyvsp[(4) - (7)].plist_t), (yyvsp[(6) - (7)].field_list_t), PROTOCOL_SCHEMA); delete (yyvsp[(6) - (7)].field_list_t);;}
+                                       (yyval.table_def_t)=new table_def((yyvsp[-5].strval),(yyvsp[-4].plist_t),(yyvsp[-3].plist_t), (yyvsp[-1].field_list_t), PROTOCOL_SCHEMA); delete (yyvsp[-4].plist_t); delete (yyvsp[-1].field_list_t);}
+#line 2583 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 146:
-#line 560 "fta.y"
+#line 575 "fta.y" /* yacc.c:1646  */
     {
-                                       (yyval.table_def_t)=new table_def((yyvsp[(2) - (6)].stringval)->c_str(),(yyvsp[(3) - (6)].plist_t),NULL,(yyvsp[(5) - (6)].field_list_t), STREAM_SCHEMA); delete (yyvsp[(5) - (6)].field_list_t);;}
+                                       (yyval.table_def_t)=new table_def((yyvsp[-4].stringval)->c_str(),(yyvsp[-3].plist_t),NULL,(yyvsp[-1].field_list_t), STREAM_SCHEMA); delete (yyvsp[-1].field_list_t);}
+#line 2590 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 147:
-#line 562 "fta.y"
+#line 577 "fta.y" /* yacc.c:1646  */
     {
-                               (yyval.table_def_t) = new table_def((yyvsp[(2) - (16)].strval), (yyvsp[(5) - (16)].plist_t), (yyvsp[(8) - (16)].field_list_t), (yyvsp[(12) - (16)].subqueryspec_list_t), (yyvsp[(15) - (16)].plist_t)); ;}
+                               (yyval.table_def_t) = new table_def((yyvsp[-14].strval), (yyvsp[-11].plist_t), (yyvsp[-8].field_list_t), (yyvsp[-4].subqueryspec_list_t), (yyvsp[-1].plist_t)); }
+#line 2597 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 148:
-#line 564 "fta.y"
-    { (yyval.table_def_t) = new table_def((yyvsp[(3) - (4)].ufcnl)); ;}
+#line 579 "fta.y" /* yacc.c:1646  */
+    { (yyval.table_def_t) = new table_def((yyvsp[-1].ufcnl)); }
+#line 2603 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 149:
-#line 568 "fta.y"
-    {(yyval.ufcnl) = new unpack_fcn_list((yyvsp[(1) - (1)].ufcn));;}
+#line 583 "fta.y" /* yacc.c:1646  */
+    {(yyval.ufcnl) = new unpack_fcn_list((yyvsp[0].ufcn));}
+#line 2609 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 150:
-#line 569 "fta.y"
-    {(yyval.ufcnl) = (yyvsp[(1) - (3)].ufcnl) -> append((yyvsp[(3) - (3)].ufcn));;}
+#line 584 "fta.y" /* yacc.c:1646  */
+    {(yyval.ufcnl) = (yyvsp[-2].ufcnl) -> append((yyvsp[0].ufcn));}
+#line 2615 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 151:
-#line 573 "fta.y"
-    {(yyval.ufcn) = new unpack_fcn((yyvsp[(1) - (3)].strval),(yyvsp[(2) - (3)].strval),(yyvsp[(3) - (3)].strval));;}
+#line 588 "fta.y" /* yacc.c:1646  */
+    {(yyval.ufcn) = new unpack_fcn((yyvsp[-2].strval),(yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2621 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 152:
-#line 577 "fta.y"
-    {(yyval.subqueryspec_list_t) = new subqueryspec_list((yyvsp[(1) - (1)].subq_spec_t));;}
+#line 592 "fta.y" /* yacc.c:1646  */
+    {(yyval.subqueryspec_list_t) = new subqueryspec_list((yyvsp[0].subq_spec_t));}
+#line 2627 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 153:
-#line 578 "fta.y"
-    {(yyval.subqueryspec_list_t) = (yyvsp[(1) - (3)].subqueryspec_list_t)->append((yyvsp[(3) - (3)].subq_spec_t));;}
+#line 593 "fta.y" /* yacc.c:1646  */
+    {(yyval.subqueryspec_list_t) = (yyvsp[-2].subqueryspec_list_t)->append((yyvsp[0].subq_spec_t));}
+#line 2633 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 154:
-#line 582 "fta.y"
-    {(yyval.subq_spec_t)=new subquery_spec((yyvsp[(1) - (4)].strval), (yyvsp[(3) - (4)].namevec_t)); delete (yyvsp[(3) - (4)].namevec_t);;}
+#line 597 "fta.y" /* yacc.c:1646  */
+    {(yyval.subq_spec_t)=new subquery_spec((yyvsp[-3].strval), (yyvsp[-1].namevec_t)); delete (yyvsp[-1].namevec_t);}
+#line 2639 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 155:
-#line 585 "fta.y"
-    {(yyval.field_list_t) = new field_entry_list((yyvsp[(1) - (1)].field_t));;}
+#line 600 "fta.y" /* yacc.c:1646  */
+    {(yyval.field_list_t) = new field_entry_list((yyvsp[0].field_t));}
+#line 2645 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 156:
-#line 586 "fta.y"
-    {(yyval.field_list_t) = (yyvsp[(1) - (2)].field_list_t)->append_field((yyvsp[(2) - (2)].field_t));;}
+#line 601 "fta.y" /* yacc.c:1646  */
+    {(yyval.field_list_t) = (yyvsp[-1].field_list_t)->append_field((yyvsp[0].field_t));}
+#line 2651 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 157:
-#line 590 "fta.y"
-    {(yyval.field_t) = new field_entry((yyvsp[(1) - (6)].strval),(yyvsp[(2) - (6)].strval),(yyvsp[(3) - (6)].strval),(yyvsp[(4) - (6)].plist_t),(yyvsp[(5) - (6)].plist_t));;}
+#line 605 "fta.y" /* yacc.c:1646  */
+    {(yyval.field_t) = new field_entry((yyvsp[-5].strval),(yyvsp[-4].strval),(yyvsp[-3].strval),(yyvsp[-2].plist_t),(yyvsp[-1].plist_t));}
+#line 2657 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 158:
-#line 591 "fta.y"
-    {(yyval.field_t) = new field_entry((yyvsp[(1) - (4)].strval),(yyvsp[(2) - (4)].strval),"",(yyvsp[(3) - (4)].plist_t),NULL);;}
+#line 606 "fta.y" /* yacc.c:1646  */
+    {(yyval.field_t) = new field_entry((yyvsp[-3].strval),(yyvsp[-2].strval),"",(yyvsp[-1].plist_t),NULL);}
+#line 2663 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 159:
-#line 595 "fta.y"
-    {(yyval.plist_t) = NULL;;}
+#line 610 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = NULL;}
+#line 2669 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 160:
-#line 596 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(2) - (3)].plist_t);;}
+#line 611 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-1].plist_t);}
+#line 2675 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 161:
-#line 600 "fta.y"
-    {(yyval.plist_t) = new param_list((yyvsp[(1) - (1)].strval));;}
+#line 615 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = new param_list((yyvsp[0].strval));}
+#line 2681 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 162:
-#line 601 "fta.y"
-    {(yyval.plist_t) = new param_list((yyvsp[(1) - (2)].strval),(yyvsp[(2) - (2)].strval));;}
+#line 616 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = new param_list((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2687 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 163:
-#line 602 "fta.y"
-    {(yyval.plist_t) = new param_list((yyvsp[(1) - (2)].strval),(yyvsp[(2) - (2)].strval));;}
+#line 617 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = new param_list((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2693 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 164:
-#line 603 "fta.y"
-    {(yyval.plist_t) = new param_list((yyvsp[(1) - (2)].strval),(yyvsp[(2) - (2)].strval));;}
+#line 618 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = new param_list((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2699 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 165:
-#line 604 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(1) - (3)].plist_t)->append((yyvsp[(3) - (3)].strval));;}
+#line 619 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-2].plist_t)->append((yyvsp[0].strval));}
+#line 2705 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 166:
-#line 605 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(1) - (4)].plist_t)->append((yyvsp[(3) - (4)].strval),(yyvsp[(4) - (4)].strval));;}
+#line 620 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-3].plist_t)->append((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2711 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 167:
-#line 606 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(1) - (4)].plist_t)->append((yyvsp[(3) - (4)].strval),(yyvsp[(4) - (4)].strval));;}
+#line 621 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-3].plist_t)->append((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2717 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 168:
-#line 607 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(1) - (4)].plist_t)->append((yyvsp[(3) - (4)].strval),(yyvsp[(4) - (4)].strval));;}
+#line 622 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-3].plist_t)->append((yyvsp[-1].strval),(yyvsp[0].strval));}
+#line 2723 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 169:
-#line 611 "fta.y"
-    {(yyval.plist_t) = NULL;;}
+#line 626 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = NULL;}
+#line 2729 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 170:
-#line 612 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(2) - (3)].plist_t);;}
+#line 627 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-1].plist_t);}
+#line 2735 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 171:
-#line 616 "fta.y"
-    {(yyval.plist_t) = NULL;;}
+#line 631 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = NULL;}
+#line 2741 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 172:
-#line 617 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(2) - (3)].plist_t);;}
+#line 632 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-1].plist_t);}
+#line 2747 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 173:
-#line 621 "fta.y"
-    {(yyval.plist_t) = new param_list((yyvsp[(1) - (1)].strval));;}
+#line 636 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = new param_list((yyvsp[0].strval));}
+#line 2753 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 174:
-#line 622 "fta.y"
-    {(yyval.plist_t) = (yyvsp[(1) - (3)].plist_t)->append((yyvsp[(3) - (3)].strval));;}
+#line 637 "fta.y" /* yacc.c:1646  */
+    {(yyval.plist_t) = (yyvsp[-2].plist_t)->append((yyvsp[0].strval));}
+#line 2759 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 175:
-#line 626 "fta.y"
-    {(yyval.namevec_t) = new name_vec((yyvsp[(1) - (3)].strval),(yyvsp[(2) - (3)].strval),(yyvsp[(3) - (3)].plist_t));;}
+#line 641 "fta.y" /* yacc.c:1646  */
+    {(yyval.namevec_t) = new name_vec((yyvsp[-2].strval),(yyvsp[-1].strval),(yyvsp[0].plist_t));}
+#line 2765 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
   case 176:
-#line 627 "fta.y"
-    {(yyval.namevec_t) = (yyvsp[(1) - (5)].namevec_t)->append((yyvsp[(3) - (5)].strval),(yyvsp[(4) - (5)].strval), (yyvsp[(5) - (5)].plist_t));;}
+#line 642 "fta.y" /* yacc.c:1646  */
+    {(yyval.namevec_t) = (yyvsp[-4].namevec_t)->append((yyvsp[-2].strval),(yyvsp[-1].strval), (yyvsp[0].plist_t));}
+#line 2771 "fta.tab.cc" /* yacc.c:1646  */
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 2843 "fta.tab.cc"
+#line 2775 "fta.tab.cc" /* yacc.c:1646  */
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -2850,8 +2793,7 @@ yyreduce:
 
   *++yyvsp = yyval;
 
-
-  /* Now `shift' the result of the reduction.  Determine what state
+  /* Now 'shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
 
@@ -2866,10 +2808,14 @@ yyreduce:
   goto yynewstate;
 
 
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error |
+`--------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -2877,37 +2823,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-       YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-       if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-         {
-           YYSIZE_T yyalloc = 2 * yysize;
-           if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-             yyalloc = YYSTACK_ALLOC_MAXIMUM;
-           if (yymsg != yymsgbuf)
-             YYSTACK_FREE (yymsg);
-           yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-           if (yymsg)
-             yymsg_alloc = yyalloc;
-           else
-             {
-               yymsg = yymsgbuf;
-               yymsg_alloc = sizeof yymsgbuf;
-             }
-         }
-
-       if (0 < yysize && yysize <= yymsg_alloc)
-         {
-           (void) yysyntax_error (yymsg, yystate, yychar);
-           yyerror (yymsg);
-         }
-       else
-         {
-           yyerror (YY_("syntax error"));
-           if (yysize != 0)
-             goto yyexhaustedlab;
-         }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -2915,24 +2860,24 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
-        error, discard it.  */
+      /* If just tried and failed to reuse lookahead token after an
+         error, discard it.  */
 
       if (yychar <= YYEOF)
-       {
-         /* Return failure if at end of input.  */
-         if (yychar == YYEOF)
-           YYABORT;
-       }
+        {
+          /* Return failure if at end of input.  */
+          if (yychar == YYEOF)
+            YYABORT;
+        }
       else
-       {
-         yydestruct ("Error: discarding",
-                     yytoken, &yylval);
-         yychar = YYEMPTY;
-       }
+        {
+          yydestruct ("Error: discarding",
+                      yytoken, &yylval);
+          yychar = YYEMPTY;
+        }
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -2948,7 +2893,7 @@ yyerrorlab:
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
-  /* Do not reclaim the symbols of the rule which action triggered
+  /* Do not reclaim the symbols of the rule whose action triggered
      this YYERROR.  */
   YYPOPSTACK (yylen);
   yylen = 0;
@@ -2961,38 +2906,37 @@ yyerrorlab:
 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
 `-------------------------------------------------------------*/
 yyerrlab1:
-  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
+  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
 
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-       {
-         yyn += YYTERROR;
-         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-           {
-             yyn = yytable[yyn];
-             if (0 < yyn)
-               break;
-           }
-       }
+      if (!yypact_value_is_default (yyn))
+        {
+          yyn += YYTERROR;
+          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+            {
+              yyn = yytable[yyn];
+              if (0 < yyn)
+                break;
+            }
+        }
 
       /* Pop the current state because it cannot handle the error token.  */
       if (yyssp == yyss)
-       YYABORT;
+        YYABORT;
 
 
       yydestruct ("Error: popping",
-                 yystos[yystate], yyvsp);
+                  yystos[yystate], yyvsp);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
 
   /* Shift the error token.  */
@@ -3016,7 +2960,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -3027,17 +2971,22 @@ yyexhaustedlab:
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-                yytoken, &yylval);
-  /* Do not reclaim the symbols of the rule which action triggered
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
+  /* Do not reclaim the symbols of the rule whose action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
   YY_STACK_PRINT (yyss, yyssp);
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-                 yystos[*yyssp], yyvsp);
+                  yystos[*yyssp], yyvsp);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
@@ -3048,12 +2997,8 @@ yyreturn:
   if (yymsg != yymsgbuf)
     YYSTACK_FREE (yymsg);
 #endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
+  return yyresult;
 }
-
-
-#line 630 "fta.y"
-
+#line 645 "fta.y" /* yacc.c:1906  */
 
 
index f75c6b1..038a211 100644 (file)
@@ -1,14 +1,13 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 3.0.4.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,9 +15,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
-/* Tokens.  */
+#ifndef YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED
+# define YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int FtaParserdebug;
+#endif
+
+/* Token type.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     NAME = 258,
-     STRING_TOKEN = 259,
-     INTNUM = 260,
-     LONGINTNUM = 261,
-     APPROXNUM = 262,
-     OR = 263,
-     AND = 264,
-     NOT = 265,
-     COMPARISON = 266,
-     SHIFT_OP = 267,
-     UMINUS = 268,
-     SEMICOLON = 269,
-     LEFTBRACE = 270,
-     RIGHTBRACE = 271,
-     BY = 272,
-     AS = 273,
-     AGGR = 274,
-     FROM = 275,
-     INNER_JOIN = 276,
-     FILTER_JOIN = 277,
-     OUTER_JOIN = 278,
-     LEFT_OUTER_JOIN = 279,
-     RIGHT_OUTER_JOIN = 280,
-     GROUP = 281,
-     HAVING = 282,
-     IN = 283,
-     SELECT = 284,
-     WHERE = 285,
-     SUPERGROUP = 286,
-     CLEANING_WHEN = 287,
-     CLEANING_BY = 288,
-     CLOSING_WHEN = 289,
-     SUCH = 290,
-     THAT = 291,
-     CUBE = 292,
-     ROLLUP = 293,
-     GROUPING_SETS = 294,
-     TRUE_V = 295,
-     FALSE_V = 296,
-     TIMEVAL_L = 297,
-     HEX_L = 298,
-     LHEX_L = 299,
-     IP_L = 300,
-     IPV6_L = 301,
-     MERGE = 302,
-     SLACK = 303,
-     DEFINE_SEC = 304,
-     PARAM_SEC = 305,
-     PROTOCOL = 306,
-     TABLE = 307,
-     STREAM = 308,
-     FTA = 309,
-     UNPACK_FCNS = 310,
-     OPERATOR = 311,
-     OPERATOR_VIEW = 312,
-     FIELDS = 313,
-     SUBQUERIES = 314,
-     SELECTION_PUSHDOWN = 315
-   };
+  enum yytokentype
+  {
+    NAME = 258,
+    STRING_TOKEN = 259,
+    INTNUM = 260,
+    LONGINTNUM = 261,
+    APPROXNUM = 262,
+    OR = 263,
+    AND = 264,
+    NOT = 265,
+    COMPARISON = 266,
+    SHIFT_OP = 267,
+    UMINUS = 268,
+    SEMICOLON = 269,
+    LEFTBRACE = 270,
+    RIGHTBRACE = 271,
+    BY = 272,
+    AS = 273,
+    AGGR = 274,
+    FROM = 275,
+    INNER_JOIN = 276,
+    FILTER_JOIN = 277,
+    OUTER_JOIN = 278,
+    LEFT_OUTER_JOIN = 279,
+    RIGHT_OUTER_JOIN = 280,
+    GROUP = 281,
+    HAVING = 282,
+    IN = 283,
+    SELECT = 284,
+    WHERE = 285,
+    SUPERGROUP = 286,
+    CLEANING_WHEN = 287,
+    CLEANING_BY = 288,
+    CLOSING_WHEN = 289,
+    SUCH = 290,
+    THAT = 291,
+    CUBE = 292,
+    ROLLUP = 293,
+    GROUPING_SETS = 294,
+    TRUE_V = 295,
+    FALSE_V = 296,
+    TIMEVAL_L = 297,
+    HEX_L = 298,
+    LHEX_L = 299,
+    IP_L = 300,
+    IPV6_L = 301,
+    MERGE = 302,
+    SLACK = 303,
+    DEFINE_SEC = 304,
+    PARAM_SEC = 305,
+    PROTOCOL = 306,
+    TABLE = 307,
+    STREAM = 308,
+    FTA = 309,
+    UNPACK_FCNS = 310,
+    OPERATOR = 311,
+    OPERATOR_VIEW = 312,
+    FIELDS = 313,
+    SUBQUERIES = 314,
+    SELECTION_PUSHDOWN = 315
+  };
 #endif
-/* Tokens.  */
-#define NAME 258
-#define STRING_TOKEN 259
-#define INTNUM 260
-#define LONGINTNUM 261
-#define APPROXNUM 262
-#define OR 263
-#define AND 264
-#define NOT 265
-#define COMPARISON 266
-#define SHIFT_OP 267
-#define UMINUS 268
-#define SEMICOLON 269
-#define LEFTBRACE 270
-#define RIGHTBRACE 271
-#define BY 272
-#define AS 273
-#define AGGR 274
-#define FROM 275
-#define INNER_JOIN 276
-#define FILTER_JOIN 277
-#define OUTER_JOIN 278
-#define LEFT_OUTER_JOIN 279
-#define RIGHT_OUTER_JOIN 280
-#define GROUP 281
-#define HAVING 282
-#define IN 283
-#define SELECT 284
-#define WHERE 285
-#define SUPERGROUP 286
-#define CLEANING_WHEN 287
-#define CLEANING_BY 288
-#define CLOSING_WHEN 289
-#define SUCH 290
-#define THAT 291
-#define CUBE 292
-#define ROLLUP 293
-#define GROUPING_SETS 294
-#define TRUE_V 295
-#define FALSE_V 296
-#define TIMEVAL_L 297
-#define HEX_L 298
-#define LHEX_L 299
-#define IP_L 300
-#define IPV6_L 301
-#define MERGE 302
-#define SLACK 303
-#define DEFINE_SEC 304
-#define PARAM_SEC 305
-#define PROTOCOL 306
-#define TABLE 307
-#define STREAM 308
-#define FTA 309
-#define UNPACK_FCNS 310
-#define OPERATOR 311
-#define OPERATOR_VIEW 312
-#define FIELDS 313
-#define SUBQUERIES 314
-#define SELECTION_PUSHDOWN 315
-
-
-
 
+/* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 37 "fta.y"
+
+union YYSTYPE
 {
+#line 52 "fta.y" /* yacc.c:1909  */
+
        int intval;
        double floatval;
        char *strval;
@@ -208,14 +155,18 @@ typedef union YYSTYPE
        unpack_fcn      *ufcn;
        unpack_fcn_list *ufcnl;
 
-}
-/* Line 1529 of yacc.c.  */
-#line 214 "fta.tab.cc.h"
-       YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
+
+#line 160 "fta.tab.cc.h" /* yacc.c:1909  */
+};
+
+typedef union YYSTYPE YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
 #endif
 
+
 extern YYSTYPE FtaParserlval;
 
+int FtaParserparse (void);
+
+#endif /* !YY_FTAPARSER_FTA_TAB_CC_H_INCLUDED  */
index cab9546..18d8685 100644 (file)
@@ -570,8 +570,8 @@ table_list: table_def       {$$ = new table_list($1);}
        |       table_list table_def    {$$ = $1->append_table($2);}
        ;
 
-table_def:     PROTOCOL NAME  opt_singleparam_commalist opt_singleparam_commalist_bkt LEFTBRACE field_list RIGHTBRACE {
-                                       $$=new table_def($2,$3,$4, $6, PROTOCOL_SCHEMA); delete $6;}
+table_def:     PROTOCOL NAME   opt_param_commalist opt_singleparam_commalist_bkt LEFTBRACE field_list RIGHTBRACE {
+                                       $$=new table_def($2,$3,$4, $6, PROTOCOL_SCHEMA); delete $3; delete $6;}
        |               STREAM qname  opt_singleparam_commalist LEFTBRACE field_list RIGHTBRACE {
                                        $$=new table_def($2->c_str(),$3,NULL,$5, STREAM_SCHEMA); delete $5;}
        |               OPERATOR_VIEW NAME LEFTBRACE OPERATOR opt_param_commalist FIELDS LEFTBRACE field_list RIGHTBRACE SUBQUERIES LEFTBRACE subqueryspec_list RIGHTBRACE SELECTION_PUSHDOWN opt_param_commalist RIGHTBRACE {
index 8285d74..456153d 100644 (file)
@@ -334,6 +334,18 @@ string generate_host_tuple_unpack(table_def *td){
    return(nwords);
 }
 
+std::vector<string> split_string(const string &str, char sep){
+       char *instr = strdup(str.c_str());
+       char *words[1000];
+       int nwords = split_string(instr, sep, words, 1000);
+       vector<string> ret;
+       for(int i=0;i<nwords;++i){
+               ret.push_back(words[i]);
+       }
+       delete instr;
+       return ret;
+}
+
 //     For fast hashing
 string hash_nums[NRANDS] = {
 "12916008961267169387ull", "13447227858232756685ull",
index ba8e1a8..f23d1fa 100644 (file)
@@ -72,7 +72,7 @@ std::string generate_host_tuple_pack(table_def *td);
 std::string generate_host_tuple_unpack(table_def *td);
 
 int split_string(char *instr,char sep, char **words,int max_words);
-
+std::vector<string> split_string(const string &str, char sep);
 
 // # random numbers for hashing
 #define NRANDS 100
index 3b74acd..54e6c61 100644 (file)
@@ -71,6 +71,7 @@ string res_a, res_v;
                vals[nm].push_back(val);
        }
 
+// Add in more consistency checks
        int iface_t::finalize(string &errs){
                string tag ="ERROR in interface starting at line "+int_to_string(lineno)+", ";
                string e;
@@ -114,6 +115,14 @@ string res_a, res_v;
                if(vals.count("host") == 0) return (string)"";
                return (vals["host"])[0];
        }
+       bool iface_t::has_multiple_schemas(){
+               if(vals.count("interfacetype") == 0) return true;
+               string iface_type = vals["interfacetype"][0];
+               if(iface_type=="GDAT" || iface_type=="CSV" || iface_type=="CSV2")
+                       return false;
+               return true;
+       }
 
 
        bool iface_t::eval_Contains(string prop, string val){
@@ -272,7 +281,7 @@ string res_a, res_v;
                        pr->get_lineno(), pr->get_charno(), pr->get_operator_type() );
                exit(1);
        case PRED_COMPARE:
-               fprintf(stderr,"INTERNAL ERROR in reparse_date::eval_pred, line %d, character %d, IN not supported. %d\n",
+               fprintf(stderr,"INTERNAL ERROR in reparse_date::eval_pred, line %d, character %d, comparison predicate not supported. %d\n",
                        pr->get_lineno(), pr->get_charno(), pr->get_operator_type() );
                exit(1);
        case PRED_UNARY_OP:
@@ -647,3 +656,39 @@ vector<string> ifq_t::get_iface_properties(string host_name, string basic_if_nam
        return rpd->get_properties(ifi[0]);
 
 }
+
+
+iface_t *ifq_t::get_interface(string host_name, string basic_if_name, int &err_no, string &err_str){
+       iface_t *retval = NULL;
+       err_no = 0;
+
+       char *cdat = strdup(basic_if_name.c_str());
+       int pos;
+       string virtual_iface = "0";
+       string iface_name = basic_if_name;
+       for(pos=strlen(cdat)-1;pos>=0 && isdigit(cdat[pos]);--pos);
+       if(pos>0 && cdat[pos] == 'X' && pos<=strlen(cdat)-2){
+               cdat[pos] = '\0';
+               virtual_iface = cdat+pos+1;
+               iface_name = cdat;
+       }
+       free(cdat);
+
+       if(rpd->failed()){
+               err_no = 1; err_str = "interface resource parse failed.";
+               return retval;
+       }
+
+       vector<int> ifi = rpd->get_ifaces_by_Name(host_name, iface_name);
+       if(ifi.size() == 0){
+               err_no = 1; err_str="interface not found.";
+               return retval;
+       }
+       if(ifi.size()>1){
+               err_no = 1; err_str="multiple interfaces found.";
+               return retval;
+       }
+
+       return rpd->get_interface(ifi[0]);
+
+}
index 6b35021..45a8fa4 100644 (file)
@@ -27,6 +27,9 @@ Copyright 2014 AT&T Intellectual Property
 
 
 //                     Represent an interface.
+//     TODO Add in some more consistency checks, beyond having an interface name
+//     TODO More intelligence about interfaces, e.g. the libraries to
+//             link to
 class iface_t{
 public:
        int lineno;
@@ -73,10 +76,15 @@ for(msvsi=vals.begin(); msvsi!=vals.end();++msvsi){
                return ret;
        }
 
+// Add in more consistency checks
        int finalize(std::string &errs);
+
        std::string to_string();
        std::string get_name();
        std::string get_host();
+       bool has_multiple_schemas();            // depends on InterfaceType
+       
+
        bool eval_Contains(std::string prop, std::string val);
        bool eval_Equals(std::string prop, std::string val);
        bool eval_Exists(std::string prop);
@@ -148,6 +156,11 @@ public:
        void new_iface(int l){
                curr_iface = new iface_t(l);
        };
+       iface_t *get_interface(int l){
+               return ifaces[l];
+       }
+
+
        void new_host(int l){
                curr_host = new gs_host_t(l);
        };
@@ -193,6 +206,7 @@ public:
        std::vector<std::pair<std::string,std::string> > eval(std::string qname, int &errnbr);
        std::vector<std::string> get_iface_vals(std::string host_name, std::string if_name, std::string property, int &errnbr, std::string &err_str);
        std::vector<std::string> get_iface_properties(std::string host_name, std::string basic_if_name, int &err_no, std::string &err_str);
+       iface_t *get_interface(std::string host_name, std::string basic_if_name, int &err_no, std::string &err_str);
 };
 
 
index c1ea6ed..3b20af3 100644 (file)
@@ -678,7 +678,7 @@ public:
        };
 
        std::string get_schema_name(){return schema_name;};
-       void set_schema_name(std::string n){schema_name=n;};
+       void set_schema_name(std::string n){schema_name=n;}; // DUPLICATE with set_shema
        std::string get_var_name(){return variable_name;};
        std::string get_interface(){return interface;};
        std::string get_machine(){return machine;};
index a9bc60c..7931b84 100644 (file)
@@ -259,11 +259,29 @@ int table_list::get_table_ref(string t){
 //                             and verify that all field unpacking functions
 //                             are listed in the schema.
 int table_list::unroll_tables(string &err){
+       int f, tref, p, t, ret=0, retval=0;
+
 //             First, verify there are no repeat field names in any
 //             of the tables.
+       set<string> found_names;
+       set<string> dup_names;
+       for(t=0;t<tbl_list.size();t++){
+               if(found_names.find(tbl_list[t]->get_tbl_name()) != found_names.end()){
+                       dup_names.insert(tbl_list[t]->get_tbl_name());
+               }else{
+                       found_names.insert(tbl_list[t]->get_tbl_name());
+               }
+       }
+       if(dup_names.size()>0){
+               fprintf(stderr, "Error, the schema has duplicate names:");
+               for(auto dit=dup_names.begin();dit!=dup_names.end(); ++dit)
+                       fprintf(stderr, " %s",(*dit).c_str());
+               fprintf(stderr, "\n");
+               retval = 1;
+       }
 
-       int f, tref, p, t, ret, retval;
 
+//             extrack unpack functions
        for(t=0;t<tbl_list.size();t++){
          if(tbl_list[t]->get_schema_type() == UNPACK_FCNS_SCHEMA){
                for(f=0;f<tbl_list[t]->ufcn_list.size();f++){
@@ -282,7 +300,7 @@ int table_list::unroll_tables(string &err){
 
 //                     every field has an access function
                if(tbl_list[t]->get_schema_type() == PROTOCOL_SCHEMA){
-                       retval = tbl_list[t]->verify_access_fcns(err);
+                       ret = tbl_list[t]->verify_access_fcns(err);
                        if(ret) retval = ret;
                }
 
@@ -405,6 +423,11 @@ int table_list::unroll_tables(string &err){
                                                err.append(").\n");
                                        }
                                }
+//                     and insert schema_ids
+                               set<int> s_schema_ids = tbl_list[root]->get_all_schema_ids();
+                               for(auto sit=s_schema_ids.begin(); sit!=s_schema_ids.end(); ++sit){
+                                       tbl_list[s]->add_to_all_schema_ids((*sit));
+                               }
 
 //                     s has one less predecessor.
                                n_pred[s]--;
index 3c009ba..45366a5 100644 (file)
@@ -326,6 +326,8 @@ private:
        param_list *base_tables;        // if PROTOCOL, the PROTOCOLS that
                                                                // this PROTOCOL inherits fields from.
        int schema_type;        // STREAM_SCHEMA, PROTOCOL_SCHEMA, OPERATOR_VIEW_SCHEMA
+       int schema_id;          // the id associated with the protocol
+       std::set<int> all_schema_ids;   // schema_id plus the inherited ones
 //             For operator_view tables
        param_list *op_properties;
        std::vector<subquery_spec *> qspec_list;
@@ -343,10 +345,26 @@ public:
 //             get the PROTOCOL-wide unpack functions.
        table_def(const char *name, param_list *plist, param_list *ufcn_l, field_entry_list *fel, int sch_t){
        int f;
-               if(plist == NULL)
+               schema_id = -1;
                        base_tables = new param_list();
-               else
-                       base_tables = plist;
+               if(plist != NULL){
+                       std::vector<std::string> pkeys = plist->get_key_vec();
+                       for(int p=0;p<pkeys.size();++p){
+                               std::string val = plist->val_of(pkeys[p]);
+                               if(val!=""){
+                                       if(pkeys[p] == "schema_id" || pkeys[p] == "schemaId"){
+                                               schema_id = atoi(val.c_str());
+                                               if(schema_id <= 0){
+                                                       fprintf(stderr,"Error, Protocol %s has a schema_id value of %d, must be larger than 0.\n",name, schema_id);
+                                                       exit(1);
+                                               }
+                                               all_schema_ids.insert(schema_id);
+                                       }
+                               }else{
+                                       base_tables->append(pkeys[p]);
+                               }
+                       }
+               }
                table_name =name;
                fields = fel->get_list();
                schema_type = sch_t;
@@ -416,6 +434,14 @@ public:
 
        int get_schema_type(){return schema_type;};
 
+       int get_schema_id(){return schema_id;};
+
+       std::set<int> get_all_schema_ids(){ return all_schema_ids;}
+       void add_to_all_schema_ids(int sid){
+               all_schema_ids.insert(sid);
+       }
+
+
        std::vector<subquery_spec *> get_subqueryspecs(){return qspec_list;};
 
        std::string to_string();
@@ -525,6 +551,10 @@ public:
                return(tbl_list[t]->get_schema_type());
        };
 
+       int get_schema_id(int t){
+               return(tbl_list[t]->get_schema_id());
+       };
+
        std::string get_op_prop(int t, std::string s){
                return(tbl_list[t]->get_op_prop(s));
        };
index c84edb9..718e7be 100644 (file)
@@ -103,11 +103,11 @@ mrg_qpn::mrg_qpn(filter_join_qpn *spx, std::string n_name, std::vector<std::stri
 //             into one or more query nodes (qp_node).
 //             Currently only one node is created, but some query
 //             fragments might create more than one query node,
-//             e.g. aggregation over a joim, or nested subqueries
-//             in the FROM clause (unless this is handles at parse tree
+//             e.g. aggregation over a join, or nested subqueries
+//             in the FROM clause (unless this is handled at parse tree
 //             analysis time).  At this stage, they will be linked
 //             by the names in the FROM clause.
-//             INVARIANT : if mroe than one query node is returned,
+//             INVARIANT : if more than one query node is returned,
 //             the last one represents the output of the query.
 vector<qp_node *> create_query_nodes(query_summary_class *qs,table_list *Schema){
 
@@ -5139,6 +5139,57 @@ table_def *join_eq_hash_qpn::get_fields(){
 }
 
 
+//-----------------------------------------------------------------
+//                     get output "keys"
+//                     This is a guess about the set of fields which are a key
+//                     Use as metadata output, e.g. in qtree.xml
+
+
+
+//             refs to GB attribtues are keys, if a SE is not a GB colref
+//             but refers to a GB colref (outside of an aggregation)
+//             then set partial_keys to true
+vector<string> sgah_qpn::get_tbl_keys(vector<string> &partial_keys){
+       vector<string> keys;
+
+       set<int> gref_set;
+       for(int i=0; i<gb_tbl.size();++i)
+               gref_set.insert(i);
+
+       for(int s=0;s<select_list.size();++s){
+               if(select_list[s]->se->is_gb()){
+                       keys.push_back(select_list[s]->name);
+               }else{
+                       if(contains_gb_se(select_list[s]->se, gref_set)){
+                               partial_keys.push_back(select_list[s]->name);
+                       }
+               }
+       }
+       return keys;
+}
+
+vector<string> rsgah_qpn::get_tbl_keys(vector<string> &partial_keys){
+       vector<string> keys;
+
+       set<int> gref_set;
+       for(int i=0; i<gb_tbl.size();++i)
+               gref_set.insert(i);
+
+       for(int s=0;s<select_list.size();++s){
+               if(select_list[s]->se->is_gb()){
+                       keys.push_back(select_list[s]->name);
+               }else{
+                       if(contains_gb_se(select_list[s]->se, gref_set)){
+                               partial_keys.push_back(select_list[s]->name);
+                       }
+               }
+       }
+       return keys;
+}
+
+
+
+
 
 //-----------------------------------------------------------------
 //                     get output tables
index 8c7d32a..3c7d3f4 100644 (file)
@@ -225,10 +225,13 @@ public:
 
 //             Each qp node must be able to return a description
 //             of the tuples it creates.
-//             TODO: the get_output_tls method should subsume the get_fields
+//             TODO: the get_output_tbls method should subsume the get_fields
 //                     method, but in fact it really just returns the
 //                     operator name.
   virtual table_def *get_fields() = 0; // Should be vector?
+//             get keys from the operator.  Currently, only works on group-by queries.
+//             partial_keys set to true if there is a suspicion that the list is partial.
+       virtual std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys) = 0;
 //             Get the from clause
   virtual std::vector<tablevar_t *> get_input_tbls() = 0;
 //             this is a confused function, it acutally return the output
@@ -296,6 +299,9 @@ public:
 //                     To be more explicit, use get_filter_preds
   virtual  std::vector<cnf_elem *> get_filter_clause() = 0;
 
+//             Add an extra predicate.  Currently only used for LFTAs.
+  virtual void append_to_where(cnf_elem *c) = 0;
+
   void add_predecessor(int i){predecessors.push_back(i);};
   void remove_predecessor(int i){
        std::vector<int>::iterator vi;
@@ -347,6 +353,11 @@ public:
                return ret;
        }
 
+  void append_to_where(cnf_elem *c){
+               where.push_back(c);
+       }
+
+
        void bind_to_schema(table_list *Schema);
        col_id_set get_colrefs(bool ext_fcns_only,table_list *Schema);
 
@@ -369,6 +380,11 @@ public:
     std::vector<handle_param_tbl_entry *> get_handle_param_tbl(ext_fcn_list *Ext_fcns);
 
        table_def *get_fields();
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -507,6 +523,11 @@ public:
                return ret;
        };
     std::vector<cnf_elem *> get_where_clause(){return where;};
+
+  void append_to_where(cnf_elem *c){
+               where.push_back(c);
+       }
+
     std::vector<cnf_elem *> get_filter_clause(){return where;};
     std::vector<cnf_elem *> get_having_clause(){return having;};
     gb_table *get_gb_tbl(){return &gb_tbl;};
@@ -516,6 +537,7 @@ public:
 
 //                             table which represents output tuple.
        table_def *get_fields();
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys);
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -690,6 +712,10 @@ public:
                return ret;
        };
     std::vector<cnf_elem *> get_where_clause(){return where;};
+  void append_to_where(cnf_elem *c){
+               where.push_back(c);
+       }
+
     std::vector<cnf_elem *> get_filter_clause(){return where;};
     std::vector<cnf_elem *> get_having_clause(){return having;};
     std::vector<cnf_elem *> get_closing_when_clause(){return closing_when;};
@@ -700,6 +726,8 @@ public:
 
 //                             table which represents output tuple.
        table_def *get_fields();
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys);
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -833,6 +861,12 @@ public:
        partn_def_t* partn_def;
 
 
+  void append_to_where(cnf_elem *c){
+               fprintf(stderr, "ERROR, append_to_where called on mrg_qpn, not supported, query %s.\n",  node_name.c_str());
+               exit(1);
+       }
+
+
 
        std::string node_type(){return("mrg_qpn");      };
     bool makes_transform(){return false;};
@@ -861,6 +895,11 @@ public:
     std::vector<handle_param_tbl_entry *> get_handle_param_tbl(ext_fcn_list *Ext_fcns);
 
        table_def *get_fields();
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -1315,6 +1354,12 @@ public:
                exit(1);
        }
 
+  void append_to_where(cnf_elem *c){
+               fprintf(stderr, "Error, append_to_where called on join_hash_qpn, not supported, query is %s\n",node_name.c_str());
+               exit(1);
+       }
+
+
        std::string to_query_string();
        std::string generate_functor(table_list *schema, ext_fcn_list *Ext_fcns, std::vector<bool> &needs_xform);
        std::string generate_functor_name();
@@ -1341,6 +1386,13 @@ public:
     std::vector<handle_param_tbl_entry *> get_handle_param_tbl(ext_fcn_list *Ext_fcns);
 
        table_def *get_fields();
+
+//             It might be feasible to find keys in an equijoin expression.
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -1541,6 +1593,10 @@ public:
                return ret;
        };
 //                     Used for LFTA only
+       void append_to_where(cnf_elem *c){
+               where.push_back(c);
+       }
+
     std::vector<cnf_elem *> get_where_clause(){return where;}
     std::vector<cnf_elem *> get_filter_clause(){return shared_pred;}
 
@@ -1548,6 +1604,12 @@ public:
     std::vector<handle_param_tbl_entry *> get_handle_param_tbl(ext_fcn_list *Ext_fcns);
 
        table_def *get_fields();
+//             It should be feasible to find keys in a filter join
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -1749,6 +1811,13 @@ public:
                return ret;
        }
 
+  void append_to_where(cnf_elem *c){
+               fprintf(stderr, "ERROR, append_to_where called on output_file_qpn, not supported, query %s.\n",  node_name.c_str());
+               exit(1);
+       }
+
+
+
        void bind_to_schema(table_list *Schema){}
        col_id_set get_colrefs(bool ext_fcns_only,table_list *Schema){
                col_id_set ret;
@@ -1781,6 +1850,14 @@ public:
                        fel->append_field(fields[i]);
                return new table_def(node_name.c_str(), NULL, NULL, fel, STREAM_SCHEMA);
        }
+
+//             TODO! either bypass the output operator in stream_query,
+//                     or propagate key information when the output operator is constructed.
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
@@ -1952,9 +2029,19 @@ public:
 
 //                             table which represents output tuple.
        table_def *get_fields();
+//                     TODO Key extraction should be feasible but I'll defer the issue.
+       std::vector<string> get_tbl_keys(std::vector<std::string> &partial_keys){
+               std::vector<string> ret;
+               return ret;
+       }
+
        std::vector<tablevar_t *> get_input_tbls();
        std::vector<tablevar_t *> get_output_tbls();
 
+  void append_to_where(cnf_elem *c){
+               where.push_back(c);
+       }
+
 
        sgahcwcb_qpn(){
        };
index aacf1b6..17d4293 100644 (file)
@@ -1850,6 +1850,10 @@ table_def *stream_query::get_output_tabledef(){
        return( query_plan[qhead]->get_fields() );
 }
 
+vector<string> stream_query::get_tbl_keys(vector<string> &partial_keys){
+       return query_plan[qhead]->get_tbl_keys(partial_keys);
+}
+
 
 
 //////////////////////////////////////////////////////////
index 075d143..ae4b31e 100644 (file)
@@ -36,7 +36,7 @@ public:
        std::vector<ospec_str *> output_specs;
        vector<qp_node *> output_operators;
 
-       int qhead;
+       int qhead;              // index of output operator
        std::vector<int> qtail;
 
        table_def *attributes;
@@ -129,6 +129,9 @@ public:
 
   table_def *get_output_tabledef();
 
+// get any inferred key definition, just a pass-through to the head _qpn method
+  std::vector<std::string> get_tbl_keys(std::vector<std::string> &partial_keys);
+
 //             Extract lfta components of the query
   std::vector<stream_query *> split_query(ext_fcn_list *Ext_fcns, table_list *Schema, bool &hfta_returned, ifq_t *ifdb, int n_virtual_ifaces, int hfta_parallelism, int hfta_idx);
 
index 4a1263f..091fafe 100644 (file)
@@ -555,11 +555,37 @@ int main(int argc, char **argv){
          }
          Schema = fta_parse_result->tables;
 
+//                     Ensure that all schema_ids, if set, are distinct.
+//  Obsolete? There is code elsewhere to ensure that schema IDs are
+//  distinct on a per-interface basis.
+/*
+         set<int> found_ids;
+         set<int> dup_ids;
+         for(int t=0;t<Schema->size();++t){
+               int sch_id = Schema->get_table(t)->get_schema_id();
+               if(sch_id> 0){
+                       if(found_ids.find(sch_id) != found_ids.end()){
+                               dup_ids.insert(sch_id);
+                       }else{
+                               found_ids.insert(sch_id);
+                       }
+               }
+               if(dup_ids.size()>0){
+                       fprintf(stderr, "Error, the schema has duplicate schema_ids:");
+                       for(auto dit=dup_ids.begin();dit!=dup_ids.end(); ++dit)
+                               fprintf(stderr," %d",(*dit));
+                       fprintf(stderr,"\n");
+                       exit(1);
+               }
+         }
+*/
+
+
 //                     Process schema field inheritance
          int retval;
          retval = Schema->unroll_tables(err_str);
          if(retval){
-               fprintf(stderr,"Error processing schema filed inheritance:\n %s\n", err_str.c_str() );
+               fprintf(stderr,"Error processing schema field inheritance:\n %s\n", err_str.c_str() );
                exit(1);
          }
        }else{
@@ -1625,11 +1651,11 @@ for(q=0;q<hfta_sets.size();++q){
 //                             TODO: separate building operators from spliting lftas,
 //                                     that will make optimizations such as predicate pushing easier.
        vector<stream_query *> lfta_list;
-
        stream_query *rootq;
-
     int qi,qj;
 
+       map<string, map<int, string> > schema_of_schemaid; // ensure that schema IDs are unique to an <interface, schema>
+
        for(qi=hfta_topsort.size()-1;qi>=0;--qi){
 
        int hfta_id = hfta_topsort[qi];
@@ -1862,21 +1888,101 @@ for(q=0;q<hfta_sets.size();++q){
 //                             Compute the number of LFTAs.
          int n_lfta = split_queries.size();
          if(hfta_returned) n_lfta--;
-
+//                             Check if a schemaId constraint needs to be inserted.
 
 //                             Process the LFTA components.
          for(l=0;l<n_lfta;++l){
           if(lfta_names.count(split_queries[l]->query_name) == 0){
 //                             Grab the lfta for global optimization.
                vector<tablevar_t *> tvec =  split_queries[l]->query_plan[0]->get_input_tbls();
-               string liface = tvec[0]->get_interface();
+               string liface = tvec[0]->get_interface();       // iface queries have been resolved
                string lmach = tvec[0]->get_machine();
+               string schema_name = tvec[0]->get_schema_name();
+               int schema_ref = tvec[0]->get_schema_ref();
                if (lmach == "")
                        lmach = hostname;
                interface_names.push_back(liface);
                machine_names.push_back(lmach);
 //printf("Machine is %s\n",lmach.c_str());
 
+//                             Check if a schemaId constraint needs to be inserted.
+               if(schema_ref<0){ // can result from some kinds of splits
+                       schema_ref = Schema->get_table_ref(schema_name);
+               }
+               int schema_id = Schema->get_schema_id(schema_ref);  // id associated with PROTOCOL
+               int errnum = 0;
+               string if_error;
+               iface_t *iface = ifaces_db-> get_interface(lmach, liface, errnum, if_error);
+               if(iface==NULL){
+                       fprintf(stderr,"Error looking up the interface %s on host %s: %s\n",liface.c_str(), lmach.c_str(), if_error.c_str());
+                       exit(1);
+               }       
+               if(iface->has_multiple_schemas()){
+                       if(schema_id<0){        // invalid schema_id
+                               fprintf(stderr,"Error, schema %s has no schema_id, but is sourced from multi-schema interface %s (ref'd in query %s)\n", schema_name.c_str(), liface.c_str(), split_queries[0]->query_name.c_str());
+                               exit(1);
+                       }
+                       vector<string> iface_schemas = iface->get_property("Schemas");
+                       if(iface_schemas.size()>0 && find(iface_schemas.begin(), iface_schemas.end(), schema_name) == iface_schemas.end()){
+                               fprintf(stderr,"Error, query %s references schema %s from interface %s, but this schema is not in this interface's Schemas list\n", split_queries[0]->query_name.c_str(), schema_name.c_str(), liface.c_str());
+                               exit(1);
+                       }
+// Ensure that in liface, schema_id is used for only one schema
+                       if(schema_of_schemaid.count(liface)==0){
+                               map<int, string> empty_map;
+                               schema_of_schemaid[liface] = empty_map;
+                       }
+                       if(schema_of_schemaid[liface].count(schema_id)==0){
+                               schema_of_schemaid[liface][schema_id] = schema_name;
+                       }else{
+                               if(schema_of_schemaid[liface][schema_id] != schema_name){
+                                       fprintf(stderr, "ERROR, For interface %s, schema id %d is used in schemas %s and %s\n", liface.c_str(), schema_id, schema_name.c_str(), schema_of_schemaid[liface][schema_id].c_str());
+                                       exit(1);
+                               }
+                       }
+               }else{  // single-schema interface
+                       schema_id = -1; // don't generate schema_id predicate
+                       vector<string> iface_schemas = iface->get_property("Schemas");
+                       if(iface_schemas.size()>0 && find(iface_schemas.begin(), iface_schemas.end(), schema_name) == iface_schemas.end()){
+                               fprintf(stderr,"Error, query %s references schema %s from interface %s, but this schema is not in this interface's Schemas list\n", split_queries[0]->query_name.c_str(), schema_name.c_str(), liface.c_str());
+                               exit(1);
+                       }
+                       if(iface_schemas.size()>1){
+                               fprintf(stderr, "ERROR, interface %s is a single-schema interface, but has %d elements in its Schemas list.\n", liface.c_str(), (int)iface_schemas.size());
+                               exit(1);
+                       }
+               }                       
+
+// If we need to check the schema_id, insert a predicate into the lfta.
+//      TODO not just schema_id, the full all_schema_ids set.
+               if(schema_id>=0){
+                       colref_t *schid_cr = new colref_t("schemaId");
+                       schid_cr->schema_ref = schema_ref;
+                       schid_cr->tablevar_ref = 0;
+                       scalarexp_t *schid_se = new scalarexp_t(schid_cr);
+                       data_type *schid_dt = new data_type("uint");
+                       schid_se->dt = schid_dt;
+
+                       string schid_str = int_to_string(schema_id);
+                       literal_t *schid_lit = new literal_t(schid_str.c_str(), LITERAL_INT);
+                       scalarexp_t *lit_se = new scalarexp_t(schid_lit);
+                       lit_se->dt = schid_dt;
+
+                       predicate_t *schid_pr = new predicate_t(schid_se, "=", lit_se);
+                       vector<cnf_elem *> clist;
+                       make_cnf_from_pr(schid_pr, clist);
+                       analyze_cnf(clist[0]);
+                       clist[0]->cost = 1;     // cheap one comparison
+// cnf built, now insert it.
+                       split_queries[l]->query_plan[0]->append_to_where(clist[0]);
+               }
+                       
+
+
+
+
+
+
 //                     Set the ht size from the recommendation, if there is one in the rec file
                if(lfta_htsize.count(split_queries[l]->query_name)>0){
                        split_queries[l]->query_plan[0]->set_definition("aggregate_slots",int_to_string(lfta_htsize[split_queries[l]->query_name]));
@@ -2121,17 +2227,26 @@ for(i=0;i<hfta_list.size();++i){                // query also has an HFTA component
                        hfta_namespace = hfta_list[i]->defines["namespace"];
                  if(hfta_list[i]->defines.count("Namespace")>0)
                        hfta_namespace = hfta_list[i]->defines["Namespace"];
-                 if(hfta_list[i]->defines.count("Namespace")>0)
-                       hfta_namespace = hfta_list[i]->defines["Namespace"];
+                 if(hfta_list[i]->defines.count("NAMESPACE")>0)
+                       hfta_namespace = hfta_list[i]->defines["NAMESPACE"];
 
                  if(field_verifier != NULL){
                        string warning_str;
                        if(hfta_comment == "")
                                warning_str += "\tcomment not found.\n";
-                       if(hfta_title == "")
-                               warning_str += "\ttitle not found.\n";
-                       if(hfta_namespace == "")
-                               warning_str += "\tnamespace not found.\n";
+
+// Obsolete stuff that Carsten wanted
+//                     if(hfta_title == "")
+//                             warning_str += "\ttitle not found.\n";
+//                     if(hfta_namespace == "")
+//                             warning_str += "\tnamespace not found.\n";
+
+// STOPPED HERE
+//     There is a get_tbl_keys method implemented for qp_nodes,
+//     integrate it into steam_query, then call it to find keys,
+//     and annotate feidls with their key-ness.
+//     If there is a "keys" proprty in the defines block, override anything returned
+//     from the automated analysis
 
                        vector<field_entry *> flds = hfta_list[i]->get_output_tabledef()->get_fields();
                        int fi;
@@ -2143,6 +2258,62 @@ for(i=0;i<hfta_list.size();++i){         // query also has an HFTA component
                                        hfta_list[i]->get_output_tabledef()->get_tbl_name().c_str(),warning_str.c_str());
                  }
 
+// Get the fields in this query
+                 vector<field_entry *> flds = hfta_list[i]->get_output_tabledef()->get_fields();
+
+// do key processing
+                 string hfta_keys_s = "";
+                 if(hfta_list[i]->defines.count("keys")>0)
+                       hfta_keys_s = hfta_list[i]->defines["keys"];
+                 if(hfta_list[i]->defines.count("Keys")>0)
+                       hfta_keys_s = hfta_list[i]->defines["Keys"];
+                 if(hfta_list[i]->defines.count("KEYS")>0)
+                       hfta_keys_s = hfta_list[i]->defines["KEYS"];
+                 string xtra_keys_s = "";
+                 if(hfta_list[i]->defines.count("extra_keys")>0)
+                       xtra_keys_s = hfta_list[i]->defines["extra_keys"];
+                 if(hfta_list[i]->defines.count("Extra_Keys")>0)
+                       xtra_keys_s = hfta_list[i]->defines["Extra_Keys"];
+                 if(hfta_list[i]->defines.count("EXTRA_KEYS")>0)
+                       xtra_keys_s = hfta_list[i]->defines["EXTRA_KEYS"];
+// get the keys
+                 vector<string> hfta_keys;
+                 vector<string> partial_keys;
+                 vector<string> xtra_keys;
+                 if(hfta_keys_s==""){
+                               hfta_keys = hfta_list[i]->get_tbl_keys(partial_keys);
+                               if(xtra_keys_s.size()>0){
+                                       xtra_keys = split_string(xtra_keys_s, ',');
+                               }
+                               for(int xi=0;xi<xtra_keys.size();++xi){
+                                       if(find(hfta_keys.begin(), hfta_keys.end(), xtra_keys[xi]) == hfta_keys.end()){
+                                               hfta_keys.push_back(xtra_keys[xi]);
+                                       }
+                               }
+                 }else{
+                               hfta_keys = split_string(hfta_keys_s, ',');
+                 }
+// validate that all of the keys exist in the output.
+//     (exit on error, as its a bad specificiation)
+                 vector<string> missing_keys;
+                 for(int ki=0;ki<hfta_keys.size(); ++ki){
+                       int fi;
+                       for(fi=0;fi<flds.size();++fi){
+                               if(hfta_keys[ki] == flds[fi]->get_name())
+                                       break;
+                       }
+                       if(fi==flds.size())
+                               missing_keys.push_back(hfta_keys[ki]);
+                 }
+                 if(missing_keys.size()>0){
+                       fprintf(stderr, "Error, HFTA stream %s has keys defined which aren't in the outputg:", hfta_list[i]->get_output_tabledef()->get_tbl_name().c_str());
+                       for(int hi=0; hi<missing_keys.size(); ++hi){
+                               fprintf(stderr," %s", missing_keys[hi].c_str());
+                       }
+                       fprintf(stderr,"\n");
+                       exit(1);
+                 }
+
                  fprintf(qtree_output,"\t<HFTA name='%s'>\n",hfta_list[i]->get_output_tabledef()->get_tbl_name().c_str());
                  if(hfta_comment != "")
                        fprintf(qtree_output,"\t\t<Description value='%s' />\n",hfta_comment.c_str());
@@ -2154,15 +2325,25 @@ for(i=0;i<hfta_list.size();++i){                // query also has an HFTA component
                  fprintf(qtree_output,"\t\t<Rate value='100' />\n");
 
 //                             write info about fields to qtree.xml
-                 vector<field_entry *> flds = hfta_list[i]->get_output_tabledef()->get_fields();
                  int fi;
                  for(fi=0;fi<flds.size();fi++){
                        fprintf(qtree_output,"\t\t<Field name='%s' pos='%d' type='%s' ",flds[fi]->get_name().c_str(), fi, flds[fi]->get_type().c_str());
                        if(flds[fi]->get_modifier_list()->size()){
-                               fprintf(qtree_output,"mods='%s' ", flds[fi]->get_modifier_list()->to_string().c_str());
+                               fprintf(qtree_output,"mods='%s'", flds[fi]->get_modifier_list()->to_string().c_str());
                        }
                        fprintf(qtree_output," />\n");
                  }
+// info about keys
+                 for(int hi=0;hi<hfta_keys.size();++hi){
+                       fprintf(qtree_output, "\t\t<Key value='%s'/>\n",hfta_keys[hi].c_str());
+                 }
+                 for(int hi=0;hi<partial_keys.size();++hi){
+                       fprintf(qtree_output, "\t\t<PartialKey value='%s'/>\n",partial_keys[hi].c_str());
+                 }
+                 for(int hi=0;hi<xtra_keys.size();++hi){
+                       fprintf(qtree_output, "\t\t<ExtraKey value='%s'/>\n",xtra_keys[hi].c_str());
+                 }
+
 
                  // extract liveness timeout from query definition
                  int liveness_timeout = atoi(hfta_list[i]->query_plan[hfta_list[i]->qhead]->get_val_of_def("liveness_timeout").c_str());
@@ -2470,8 +2651,9 @@ for(ssi_el=extra_external_libs.begin();ssi_el!=extra_external_libs.end();++ssi_e
 
                                // combine all values for the interface property using comma separator
                                vector<string> vals = ifaces_db->get_iface_vals(lmach,*sir,iface_properties[i],erri,err_str);
+                               lfta_val[lmach] += "\t\t\treturn \"";
                                for (int j = 0; j < vals.size(); ++j) {
-                                       lfta_val[lmach] += "\t\t\treturn \"" + vals[j];
+                                       lfta_val[lmach] +=  vals[j];
                                        if (j != vals.size()-1)
                                                lfta_val[lmach] += ",";
                                }
@@ -2599,10 +2781,11 @@ for(ssi_el=extra_external_libs.begin();ssi_el!=extra_external_libs.end();++ssi_e
                        string warning_str;
                        if(lfta_comment == "")
                                warning_str += "\tcomment not found.\n";
-                       if(lfta_title == "")
-                               warning_str += "\ttitle not found.\n";
-                       if(lfta_namespace == "")
-                               warning_str += "\tnamespace not found.\n";
+// Obsolete stuff that carsten wanted
+//                     if(lfta_title == "")
+//                             warning_str += "\ttitle not found.\n";
+//                     if(lfta_namespace == "")
+//                             warning_str += "\tnamespace not found.\n";
 
                        vector<field_entry *> flds = lfta_sq->get_output_tabledef()->get_fields();
                        int fi;
@@ -2774,6 +2957,9 @@ void generate_makefile(vector<string> &input_file_names, int nfiles,
        }
 
 //             Do we need to include protobuf libraries?
+//             TODO Move to the interface library: get the libraries to include 
+//             for an interface type
+
        bool use_proto = false;
        int erri;
        string err_str;