"Fossies" - the Fresh Open Source Software Archive

Member "cfitsio-4.0.0/eval_y.c" (20 May 2021, 287939 Bytes) of package /linux/misc/cfitsio-4.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "eval_y.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.49_vs_4.0.0.

    1 /* A Bison parser, made by GNU Bison 3.7.4.  */
    2 
    3 /* Bison implementation for Yacc-like parsers in C
    4 
    5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
    6    Inc.
    7 
    8    This program is free software: you can redistribute it and/or modify
    9    it under the terms of the GNU General Public License as published by
   10    the Free Software Foundation, either version 3 of the License, or
   11    (at your option) any later version.
   12 
   13    This program is distributed in the hope that it will be useful,
   14    but WITHOUT ANY WARRANTY; without even the implied warranty of
   15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16    GNU General Public License for more details.
   17 
   18    You should have received a copy of the GNU General Public License
   19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
   20 
   21 /* As a special exception, you may create a larger work that contains
   22    part or all of the Bison parser skeleton and distribute that work
   23    under terms of your choice, so long as that work isn't itself a
   24    parser generator using the skeleton or a modified version thereof
   25    as a parser skeleton.  Alternatively, if you modify or redistribute
   26    the parser skeleton itself, you may (at your option) remove this
   27    special exception, which will cause the skeleton and the resulting
   28    Bison output files to be licensed under the GNU General Public
   29    License without this special exception.
   30 
   31    This special exception was added by the Free Software Foundation in
   32    version 2.2 of Bison.  */
   33 
   34 /* C LALR(1) parser skeleton written by Richard Stallman, by
   35    simplifying the original so-called "semantic" parser.  */
   36 
   37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   38    especially those whose name start with FF_ or ff_.  They are
   39    private implementation details that can be changed or removed.  */
   40 
   41 /* All symbols defined below should begin with ff or FF, to avoid
   42    infringing on user name space.  This should be done even for local
   43    variables, as they might otherwise be expanded by user macros.
   44    There are some unavoidable exceptions within include files to
   45    define necessary library symbols; they are noted "INFRINGES ON
   46    USER NAME SPACE" below.  */
   47 
   48 /* Identify Bison output, and Bison version.  */
   49 #define FFBISON 30704
   50 
   51 /* Bison version string.  */
   52 #define FFBISON_VERSION "3.7.4"
   53 
   54 /* Skeleton name.  */
   55 #define FFSKELETON_NAME "yacc.c"
   56 
   57 /* Pure parsers.  */
   58 #define FFPURE 0
   59 
   60 /* Push parsers.  */
   61 #define FFPUSH 0
   62 
   63 /* Pull parsers.  */
   64 #define FFPULL 1
   65 
   66 
   67 
   68 
   69 /* First part of user prologue.  */
   70 #line 1 "eval.y"
   71 
   72 /************************************************************************/
   73 /*                                                                      */
   74 /*                       CFITSIO Lexical Parser                         */
   75 /*                                                                      */
   76 /* This file is one of 3 files containing code which parses an          */
   77 /* arithmetic expression and evaluates it in the context of an input    */
   78 /* FITS file table extension.  The CFITSIO lexical parser is divided    */
   79 /* into the following 3 parts/files: the CFITSIO "front-end",           */
   80 /* eval_f.c, contains the interface between the user/CFITSIO and the    */
   81 /* real core of the parser; the FLEX interpreter, eval_l.c, takes the   */
   82 /* input string and parses it into tokens and identifies the FITS       */
   83 /* information required to evaluate the expression (ie, keywords and    */
   84 /* columns); and, the BISON grammar and evaluation routines, eval_y.c,  */
   85 /* receives the FLEX output and determines and performs the actual      */
   86 /* operations.  The files eval_l.c and eval_y.c are produced from       */
   87 /* running flex and bison on the files eval.l and eval.y, respectively. */
   88 /* (flex and bison are available from any GNU archive: see www.gnu.org) */
   89 /*                                                                      */
   90 /* The grammar rules, rather than evaluating the expression in situ,    */
   91 /* builds a tree, or Nodal, structure mapping out the order of          */
   92 /* operations and expression dependencies.  This "compilation" process  */
   93 /* allows for much faster processing of multiple rows.  This technique  */
   94 /* was developed by Uwe Lammers of the XMM Science Analysis System,     */
   95 /* although the CFITSIO implementation is entirely code original.       */
   96 /*                                                                      */
   97 /*                                                                      */
   98 /* Modification History:                                                */
   99 /*                                                                      */
  100 /*   Kent Blackburn      c1992  Original parser code developed for the  */
  101 /*                              FTOOLS software package, in particular, */
  102 /*                              the fselect task.                       */
  103 /*   Kent Blackburn      c1995  BIT column support added                */
  104 /*   Peter D Wilson   Feb 1998  Vector column support added             */
  105 /*   Peter D Wilson   May 1998  Ported to CFITSIO library.  User        */
  106 /*                              interface routines written, in essence  */
  107 /*                              making fselect, fcalc, and maketime     */
  108 /*                              capabilities available to all tools     */
  109 /*                              via single function calls.              */
  110 /*   Peter D Wilson   Jun 1998  Major rewrite of parser core, so as to  */
  111 /*                              create a run-time evaluation tree,      */
  112 /*                              inspired by the work of Uwe Lammers,    */
  113 /*                              resulting in a speed increase of        */
  114 /*                              10-100 times.                           */
  115 /*   Peter D Wilson   Jul 1998  gtifilter(a,b,c,d) function added       */
  116 /*   Peter D Wilson   Aug 1998  regfilter(a,b,c,d) function added       */
  117 /*   Peter D Wilson   Jul 1999  Make parser fitsfile-independent,       */
  118 /*                              allowing a purely vector-based usage    */
  119 /*  Craig B Markwardt Jun 2004  Add MEDIAN() function                   */
  120 /*  Craig B Markwardt Jun 2004  Add SUM(), and MIN/MAX() for bit arrays */
  121 /*  Craig B Markwardt Jun 2004  Allow subscripting of nX bit arrays     */
  122 /*  Craig B Markwardt Jun 2004  Implement statistical functions         */
  123 /*                              NVALID(), AVERAGE(), and STDDEV()       */
  124 /*                              for integer and floating point vectors  */
  125 /*  Craig B Markwardt Jun 2004  Use NULL values for range errors instead*/
  126 /*                              of throwing a parse error               */
  127 /*  Craig B Markwardt Oct 2004  Add ACCUM() and SEQDIFF() functions     */
  128 /*  Craig B Markwardt Feb 2005  Add ANGSEP() function                   */
  129 /*  Craig B Markwardt Aug 2005  CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/
  130 /*                              functions now accept vector arguments   */
  131 /*  Craig B Markwardt Sum 2006  Add RANDOMN() and RANDOMP() functions   */
  132 /*  Craig B Markwardt Mar 2007  Allow arguments to RANDOM and RANDOMN to*/
  133 /*                              determine the output dimensions         */
  134 /*  Craig B Markwardt Aug 2009  Add substring STRMID() and string search*/
  135 /*                              STRSTR() functions; more overflow checks*/
  136 /*  Craig B Markwardt Dec 2019  Add bit/hex/oct literal strings and     */
  137 /*                              bitwise operatiosn between integers     */
  138 /*  Craig B Markwardt Mar 2021  Add SETNULL() function                  */
  139 /*                                                                      */
  140 /************************************************************************/
  141 
  142 #define  APPROX 1.0e-7
  143 #include "eval_defs.h"
  144 #include "region.h"
  145 #include <time.h>
  146 
  147 #include <stdlib.h>
  148 
  149 #ifndef alloca
  150 #define alloca malloc
  151 #endif
  152 
  153 /* Random number generators for various distributions */
  154 #include "simplerng.h"
  155 
  156    /*  Shrink the initial stack depth to keep local data <32K (mac limit)  */
  157    /*  yacc will allocate more space if needed, though.                    */
  158 #define  FFINITDEPTH   100
  159 
  160 /***************************************************************/
  161 /*  Replace Bison's BACKUP macro with one that fixes a bug --  */
  162 /*  must update state after popping the stack -- and allows    */
  163 /*  popping multiple terms at one time.                        */
  164 /***************************************************************/
  165 
  166 #define FFNEWBACKUP(token, value)                               \
  167    do                               \
  168      if (ffchar == FFEMPTY )                    \
  169        { ffchar = (token);                                      \
  170          memcpy( &fflval, &(value), sizeof(value) );            \
  171          ffchar1 = FFTRANSLATE (ffchar);            \
  172          while (fflen--) FFPOPSTACK;                \
  173          ffstate = *ffssp;                  \
  174          goto ffbackup;                     \
  175        }                            \
  176      else                           \
  177        { fferror ("syntax error: cannot back up"); FFERROR; }   \
  178    while (0)
  179 
  180 /***************************************************************/
  181 /*  Useful macros for accessing/testing Nodes                  */
  182 /***************************************************************/
  183 
  184 #define TEST(a)        if( (a)<0 ) FFERROR
  185 #define SIZE(a)        gParse.Nodes[ a ].value.nelem
  186 #define TYPE(a)        gParse.Nodes[ a ].type
  187 #define OPER(a)        gParse.Nodes[ a ].operation
  188 #define PROMOTE(a,b)   if( TYPE(a) > TYPE(b) )                  \
  189                           b = New_Unary( TYPE(a), 0, b );       \
  190                        else if( TYPE(a) < TYPE(b) )             \
  191                       a = New_Unary( TYPE(b), 0, a );
  192 
  193 /*****  Internal functions  *****/
  194 
  195 #ifdef __cplusplus
  196 extern "C" {
  197 #endif
  198 
  199 static int  Alloc_Node    ( void );
  200 static void Free_Last_Node( void );
  201 static void Evaluate_Node ( int thisNode );
  202 
  203 static int  New_Const ( int returnType, void *value, long len );
  204 static int  New_Column( int ColNum );
  205 static int  New_Offset( int ColNum, int offset );
  206 static int  New_Unary ( int returnType, int Op, int Node1 );
  207 static int  New_BinOp ( int returnType, int Node1, int Op, int Node2 );
  208 static int  New_Func  ( int returnType, funcOp Op, int nNodes,
  209             int Node1, int Node2, int Node3, int Node4, 
  210             int Node5, int Node6, int Node7 );
  211 static int  New_FuncSize( int returnType, funcOp Op, int nNodes,
  212             int Node1, int Node2, int Node3, int Node4, 
  213               int Node5, int Node6, int Node7, int Size);
  214 static int  New_Deref ( int Var,  int nDim,
  215             int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 );
  216 static int  New_GTI   ( funcOp Op, char *fname, int Node1, int Node2, char *start, char *stop );
  217 static int  New_REG   ( char *fname, int NodeX, int NodeY, char *colNames );
  218 static int  New_Vector( int subNode );
  219 static int  Close_Vec ( int vecNode );
  220 static int  Locate_Col( Node *this );
  221 static int  Test_Dims ( int Node1, int Node2 );
  222 static void Copy_Dims ( int Node1, int Node2 );
  223 
  224 static void Allocate_Ptrs( Node *this );
  225 static void Do_Unary     ( Node *this );
  226 static void Do_Offset    ( Node *this );
  227 static void Do_BinOp_bit ( Node *this );
  228 static void Do_BinOp_str ( Node *this );
  229 static void Do_BinOp_log ( Node *this );
  230 static void Do_BinOp_lng ( Node *this );
  231 static void Do_BinOp_dbl ( Node *this );
  232 static void Do_Func      ( Node *this );
  233 static void Do_Deref     ( Node *this );
  234 static void Do_GTI       ( Node *this );
  235 static void Do_GTI_Over  ( Node *this );
  236 static void Do_REG       ( Node *this );
  237 static void Do_Vector    ( Node *this );
  238 
  239 static long Search_GTI   ( double evtTime, long nGTI, double *start,
  240                double *stop, int ordered, long *nextGTI );
  241 static double GTI_Over(double evtStart, double evtStop,
  242                long nGTI, double *start, double *stop,
  243                long *gtiout);
  244 
  245 static char  saobox (double xcen, double ycen, double xwid, double ywid,
  246              double rot,  double xcol, double ycol);
  247 static char  ellipse(double xcen, double ycen, double xrad, double yrad,
  248              double rot, double xcol, double ycol);
  249 static char  circle (double xcen, double ycen, double rad,
  250              double xcol, double ycol);
  251 static char  bnear  (double x, double y, double tolerance);
  252 static char  bitcmp (char *bitstrm1, char *bitstrm2);
  253 static char  bitlgte(char *bits1, int oper, char *bits2);
  254 
  255 static void  bitand(char *result, char *bitstrm1, char *bitstrm2);
  256 static void  bitor (char *result, char *bitstrm1, char *bitstrm2);
  257 static void  bitnot(char *result, char *bits);
  258 static int cstrmid(char *dest_str, int dest_len,
  259            char *src_str,  int src_len, int pos);
  260 
  261 static void  fferror(char *msg);
  262 
  263 #ifdef __cplusplus
  264     }
  265 #endif
  266 
  267 
  268 #line 269 "y.tab.c"
  269 
  270 # ifndef FF_CAST
  271 #  ifdef __cplusplus
  272 #   define FF_CAST(Type, Val) static_cast<Type> (Val)
  273 #   define FF_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
  274 #  else
  275 #   define FF_CAST(Type, Val) ((Type) (Val))
  276 #   define FF_REINTERPRET_CAST(Type, Val) ((Type) (Val))
  277 #  endif
  278 # endif
  279 # ifndef FF_NULLPTR
  280 #  if defined __cplusplus
  281 #   if 201103L <= __cplusplus
  282 #    define FF_NULLPTR nullptr
  283 #   else
  284 #    define FF_NULLPTR 0
  285 #   endif
  286 #  else
  287 #   define FF_NULLPTR ((void*)0)
  288 #  endif
  289 # endif
  290 
  291 /* Use api.header.include to #include this header
  292    instead of duplicating it here.  */
  293 #ifndef FF_FF_Y_TAB_H_INCLUDED
  294 # define FF_FF_Y_TAB_H_INCLUDED
  295 /* Debug traces.  */
  296 #ifndef FFDEBUG
  297 # define FFDEBUG 0
  298 #endif
  299 #if FFDEBUG
  300 extern int ffdebug;
  301 #endif
  302 
  303 /* Token kinds.  */
  304 #ifndef FFTOKENTYPE
  305 # define FFTOKENTYPE
  306   enum fftokentype
  307   {
  308     FFEMPTY = -2,
  309     FFEOF = 0,                     /* "end of file"  */
  310     FFerror = 256,                 /* error  */
  311     FFUNDEF = 257,                 /* "invalid token"  */
  312     BOOLEAN = 258,                 /* BOOLEAN  */
  313     LONG = 259,                    /* LONG  */
  314     DOUBLE = 260,                  /* DOUBLE  */
  315     STRING = 261,                  /* STRING  */
  316     BITSTR = 262,                  /* BITSTR  */
  317     FUNCTION = 263,                /* FUNCTION  */
  318     BFUNCTION = 264,               /* BFUNCTION  */
  319     IFUNCTION = 265,               /* IFUNCTION  */
  320     GTIFILTER = 266,               /* GTIFILTER  */
  321     GTIOVERLAP = 267,              /* GTIOVERLAP  */
  322     REGFILTER = 268,               /* REGFILTER  */
  323     COLUMN = 269,                  /* COLUMN  */
  324     BCOLUMN = 270,                 /* BCOLUMN  */
  325     SCOLUMN = 271,                 /* SCOLUMN  */
  326     BITCOL = 272,                  /* BITCOL  */
  327     ROWREF = 273,                  /* ROWREF  */
  328     NULLREF = 274,                 /* NULLREF  */
  329     SNULLREF = 275,                /* SNULLREF  */
  330     OR = 276,                      /* OR  */
  331     AND = 277,                     /* AND  */
  332     EQ = 278,                      /* EQ  */
  333     NE = 279,                      /* NE  */
  334     GT = 280,                      /* GT  */
  335     LT = 281,                      /* LT  */
  336     LTE = 282,                     /* LTE  */
  337     GTE = 283,                     /* GTE  */
  338     XOR = 284,                     /* XOR  */
  339     POWER = 285,                   /* POWER  */
  340     NOT = 286,                     /* NOT  */
  341     INTCAST = 287,                 /* INTCAST  */
  342     FLTCAST = 288,                 /* FLTCAST  */
  343     UMINUS = 289,                  /* UMINUS  */
  344     ACCUM = 290,                   /* ACCUM  */
  345     DIFF = 291                     /* DIFF  */
  346   };
  347   typedef enum fftokentype fftoken_kind_t;
  348 #endif
  349 /* Token kinds.  */
  350 #define FFEMPTY -2
  351 #define FFEOF 0
  352 #define FFerror 256
  353 #define FFUNDEF 257
  354 #define BOOLEAN 258
  355 #define LONG 259
  356 #define DOUBLE 260
  357 #define STRING 261
  358 #define BITSTR 262
  359 #define FUNCTION 263
  360 #define BFUNCTION 264
  361 #define IFUNCTION 265
  362 #define GTIFILTER 266
  363 #define GTIOVERLAP 267
  364 #define REGFILTER 268
  365 #define COLUMN 269
  366 #define BCOLUMN 270
  367 #define SCOLUMN 271
  368 #define BITCOL 272
  369 #define ROWREF 273
  370 #define NULLREF 274
  371 #define SNULLREF 275
  372 #define OR 276
  373 #define AND 277
  374 #define EQ 278
  375 #define NE 279
  376 #define GT 280
  377 #define LT 281
  378 #define LTE 282
  379 #define GTE 283
  380 #define XOR 284
  381 #define POWER 285
  382 #define NOT 286
  383 #define INTCAST 287
  384 #define FLTCAST 288
  385 #define UMINUS 289
  386 #define ACCUM 290
  387 #define DIFF 291
  388 
  389 /* Value type.  */
  390 #if ! defined FFSTYPE && ! defined FFSTYPE_IS_DECLARED
  391 union FFSTYPE
  392 {
  393 #line 199 "eval.y"
  394 
  395     int    Node;        /* Index of Node */
  396     double dbl;         /* real value    */
  397     long   lng;         /* integer value */
  398     char   log;         /* logical value */
  399     char   str[MAX_STRLEN];    /* string value  */
  400 
  401 #line 402 "y.tab.c"
  402 
  403 };
  404 typedef union FFSTYPE FFSTYPE;
  405 # define FFSTYPE_IS_TRIVIAL 1
  406 # define FFSTYPE_IS_DECLARED 1
  407 #endif
  408 
  409 
  410 extern FFSTYPE fflval;
  411 
  412 int ffparse (void);
  413 
  414 #endif /* !FF_FF_Y_TAB_H_INCLUDED  */
  415 /* Symbol kind.  */
  416 enum ffsymbol_kind_t
  417 {
  418   FFSYMBOL_FFEMPTY = -2,
  419   FFSYMBOL_FFEOF = 0,                      /* "end of file"  */
  420   FFSYMBOL_FFerror = 1,                    /* error  */
  421   FFSYMBOL_FFUNDEF = 2,                    /* "invalid token"  */
  422   FFSYMBOL_BOOLEAN = 3,                    /* BOOLEAN  */
  423   FFSYMBOL_LONG = 4,                       /* LONG  */
  424   FFSYMBOL_DOUBLE = 5,                     /* DOUBLE  */
  425   FFSYMBOL_STRING = 6,                     /* STRING  */
  426   FFSYMBOL_BITSTR = 7,                     /* BITSTR  */
  427   FFSYMBOL_FUNCTION = 8,                   /* FUNCTION  */
  428   FFSYMBOL_BFUNCTION = 9,                  /* BFUNCTION  */
  429   FFSYMBOL_IFUNCTION = 10,                 /* IFUNCTION  */
  430   FFSYMBOL_GTIFILTER = 11,                 /* GTIFILTER  */
  431   FFSYMBOL_GTIOVERLAP = 12,                /* GTIOVERLAP  */
  432   FFSYMBOL_REGFILTER = 13,                 /* REGFILTER  */
  433   FFSYMBOL_COLUMN = 14,                    /* COLUMN  */
  434   FFSYMBOL_BCOLUMN = 15,                   /* BCOLUMN  */
  435   FFSYMBOL_SCOLUMN = 16,                   /* SCOLUMN  */
  436   FFSYMBOL_BITCOL = 17,                    /* BITCOL  */
  437   FFSYMBOL_ROWREF = 18,                    /* ROWREF  */
  438   FFSYMBOL_NULLREF = 19,                   /* NULLREF  */
  439   FFSYMBOL_SNULLREF = 20,                  /* SNULLREF  */
  440   FFSYMBOL_21_ = 21,                       /* ','  */
  441   FFSYMBOL_22_ = 22,                       /* '='  */
  442   FFSYMBOL_23_ = 23,                       /* ':'  */
  443   FFSYMBOL_24_ = 24,                       /* '{'  */
  444   FFSYMBOL_25_ = 25,                       /* '}'  */
  445   FFSYMBOL_26_ = 26,                       /* '?'  */
  446   FFSYMBOL_OR = 27,                        /* OR  */
  447   FFSYMBOL_AND = 28,                       /* AND  */
  448   FFSYMBOL_EQ = 29,                        /* EQ  */
  449   FFSYMBOL_NE = 30,                        /* NE  */
  450   FFSYMBOL_31_ = 31,                       /* '~'  */
  451   FFSYMBOL_GT = 32,                        /* GT  */
  452   FFSYMBOL_LT = 33,                        /* LT  */
  453   FFSYMBOL_LTE = 34,                       /* LTE  */
  454   FFSYMBOL_GTE = 35,                       /* GTE  */
  455   FFSYMBOL_36_ = 36,                       /* '+'  */
  456   FFSYMBOL_37_ = 37,                       /* '-'  */
  457   FFSYMBOL_38_ = 38,                       /* '%'  */
  458   FFSYMBOL_39_ = 39,                       /* '*'  */
  459   FFSYMBOL_40_ = 40,                       /* '/'  */
  460   FFSYMBOL_41_ = 41,                       /* '|'  */
  461   FFSYMBOL_42_ = 42,                       /* '&'  */
  462   FFSYMBOL_XOR = 43,                       /* XOR  */
  463   FFSYMBOL_POWER = 44,                     /* POWER  */
  464   FFSYMBOL_NOT = 45,                       /* NOT  */
  465   FFSYMBOL_INTCAST = 46,                   /* INTCAST  */
  466   FFSYMBOL_FLTCAST = 47,                   /* FLTCAST  */
  467   FFSYMBOL_UMINUS = 48,                    /* UMINUS  */
  468   FFSYMBOL_49_ = 49,                       /* '['  */
  469   FFSYMBOL_ACCUM = 50,                     /* ACCUM  */
  470   FFSYMBOL_DIFF = 51,                      /* DIFF  */
  471   FFSYMBOL_52_n_ = 52,                     /* '\n'  */
  472   FFSYMBOL_53_ = 53,                       /* ']'  */
  473   FFSYMBOL_54_ = 54,                       /* '('  */
  474   FFSYMBOL_55_ = 55,                       /* ')'  */
  475   FFSYMBOL_FFACCEPT = 56,                  /* $accept  */
  476   FFSYMBOL_lines = 57,                     /* lines  */
  477   FFSYMBOL_line = 58,                      /* line  */
  478   FFSYMBOL_bvector = 59,                   /* bvector  */
  479   FFSYMBOL_vector = 60,                    /* vector  */
  480   FFSYMBOL_expr = 61,                      /* expr  */
  481   FFSYMBOL_bexpr = 62,                     /* bexpr  */
  482   FFSYMBOL_bits = 63,                      /* bits  */
  483   FFSYMBOL_sexpr = 64                      /* sexpr  */
  484 };
  485 typedef enum ffsymbol_kind_t ffsymbol_kind_t;
  486 
  487 
  488 
  489 
  490 #ifdef short
  491 # undef short
  492 #endif
  493 
  494 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
  495    <limits.h> and (if available) <stdint.h> are included
  496    so that the code can choose integer types of a good width.  */
  497 
  498 #ifndef __PTRDIFF_MAX__
  499 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
  500 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  501 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
  502 #  define FF_STDINT_H
  503 # endif
  504 #endif
  505 
  506 /* Narrow types that promote to a signed type and that can represent a
  507    signed or unsigned integer of at least N bits.  In tables they can
  508    save space and decrease cache pressure.  Promoting to a signed type
  509    helps avoid bugs in integer arithmetic.  */
  510 
  511 #ifdef __INT_LEAST8_MAX__
  512 typedef __INT_LEAST8_TYPE__ fftype_int8;
  513 #elif defined FF_STDINT_H
  514 typedef int_least8_t fftype_int8;
  515 #else
  516 typedef signed char fftype_int8;
  517 #endif
  518 
  519 #ifdef __INT_LEAST16_MAX__
  520 typedef __INT_LEAST16_TYPE__ fftype_int16;
  521 #elif defined FF_STDINT_H
  522 typedef int_least16_t fftype_int16;
  523 #else
  524 typedef short fftype_int16;
  525 #endif
  526 
  527 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
  528 typedef __UINT_LEAST8_TYPE__ fftype_uint8;
  529 #elif (!defined __UINT_LEAST8_MAX__ && defined FF_STDINT_H \
  530        && UINT_LEAST8_MAX <= INT_MAX)
  531 typedef uint_least8_t fftype_uint8;
  532 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
  533 typedef unsigned char fftype_uint8;
  534 #else
  535 typedef short fftype_uint8;
  536 #endif
  537 
  538 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
  539 typedef __UINT_LEAST16_TYPE__ fftype_uint16;
  540 #elif (!defined __UINT_LEAST16_MAX__ && defined FF_STDINT_H \
  541        && UINT_LEAST16_MAX <= INT_MAX)
  542 typedef uint_least16_t fftype_uint16;
  543 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
  544 typedef unsigned short fftype_uint16;
  545 #else
  546 typedef int fftype_uint16;
  547 #endif
  548 
  549 #ifndef FFPTRDIFF_T
  550 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
  551 #  define FFPTRDIFF_T __PTRDIFF_TYPE__
  552 #  define FFPTRDIFF_MAXIMUM __PTRDIFF_MAX__
  553 # elif defined PTRDIFF_MAX
  554 #  ifndef ptrdiff_t
  555 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  556 #  endif
  557 #  define FFPTRDIFF_T ptrdiff_t
  558 #  define FFPTRDIFF_MAXIMUM PTRDIFF_MAX
  559 # else
  560 #  define FFPTRDIFF_T long
  561 #  define FFPTRDIFF_MAXIMUM LONG_MAX
  562 # endif
  563 #endif
  564 
  565 #ifndef FFSIZE_T
  566 # ifdef __SIZE_TYPE__
  567 #  define FFSIZE_T __SIZE_TYPE__
  568 # elif defined size_t
  569 #  define FFSIZE_T size_t
  570 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  571 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  572 #  define FFSIZE_T size_t
  573 # else
  574 #  define FFSIZE_T unsigned
  575 # endif
  576 #endif
  577 
  578 #define FFSIZE_MAXIMUM                                  \
  579   FF_CAST (FFPTRDIFF_T,                                 \
  580            (FFPTRDIFF_MAXIMUM < FF_CAST (FFSIZE_T, -1)  \
  581             ? FFPTRDIFF_MAXIMUM                         \
  582             : FF_CAST (FFSIZE_T, -1)))
  583 
  584 #define FFSIZEOF(X) FF_CAST (FFPTRDIFF_T, sizeof (X))
  585 
  586 
  587 /* Stored state numbers (used for stacks). */
  588 typedef fftype_int16 ff_state_t;
  589 
  590 /* State numbers in computations.  */
  591 typedef int ff_state_fast_t;
  592 
  593 #ifndef FF_
  594 # if defined FFENABLE_NLS && FFENABLE_NLS
  595 #  if ENABLE_NLS
  596 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  597 #   define FF_(Msgid) dgettext ("bison-runtime", Msgid)
  598 #  endif
  599 # endif
  600 # ifndef FF_
  601 #  define FF_(Msgid) Msgid
  602 # endif
  603 #endif
  604 
  605 
  606 #ifndef FF_ATTRIBUTE_PURE
  607 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
  608 #  define FF_ATTRIBUTE_PURE __attribute__ ((__pure__))
  609 # else
  610 #  define FF_ATTRIBUTE_PURE
  611 # endif
  612 #endif
  613 
  614 #ifndef FF_ATTRIBUTE_UNUSED
  615 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
  616 #  define FF_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
  617 # else
  618 #  define FF_ATTRIBUTE_UNUSED
  619 # endif
  620 #endif
  621 
  622 /* Suppress unused-variable warnings by "using" E.  */
  623 #if ! defined lint || defined __GNUC__
  624 # define FFUSE(E) ((void) (E))
  625 #else
  626 # define FFUSE(E) /* empty */
  627 #endif
  628 
  629 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  630 /* Suppress an incorrect diagnostic about fflval being uninitialized.  */
  631 # define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
  632     _Pragma ("GCC diagnostic push")                                     \
  633     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
  634     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  635 # define FF_IGNORE_MAYBE_UNINITIALIZED_END      \
  636     _Pragma ("GCC diagnostic pop")
  637 #else
  638 # define FF_INITIAL_VALUE(Value) Value
  639 #endif
  640 #ifndef FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  641 # define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  642 # define FF_IGNORE_MAYBE_UNINITIALIZED_END
  643 #endif
  644 #ifndef FF_INITIAL_VALUE
  645 # define FF_INITIAL_VALUE(Value) /* Nothing. */
  646 #endif
  647 
  648 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
  649 # define FF_IGNORE_USELESS_CAST_BEGIN                          \
  650     _Pragma ("GCC diagnostic push")                            \
  651     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
  652 # define FF_IGNORE_USELESS_CAST_END            \
  653     _Pragma ("GCC diagnostic pop")
  654 #endif
  655 #ifndef FF_IGNORE_USELESS_CAST_BEGIN
  656 # define FF_IGNORE_USELESS_CAST_BEGIN
  657 # define FF_IGNORE_USELESS_CAST_END
  658 #endif
  659 
  660 
  661 #define FF_ASSERT(E) ((void) (0 && (E)))
  662 
  663 #if !defined ffoverflow
  664 
  665 /* The parser invokes alloca or malloc; define the necessary symbols.  */
  666 
  667 # ifdef FFSTACK_USE_ALLOCA
  668 #  if FFSTACK_USE_ALLOCA
  669 #   ifdef __GNUC__
  670 #    define FFSTACK_ALLOC __builtin_alloca
  671 #   elif defined __BUILTIN_VA_ARG_INCR
  672 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  673 #   elif defined _AIX
  674 #    define FFSTACK_ALLOC __alloca
  675 #   elif defined _MSC_VER
  676 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  677 #    define alloca _alloca
  678 #   else
  679 #    define FFSTACK_ALLOC alloca
  680 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  681 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  682       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
  683 #     ifndef EXIT_SUCCESS
  684 #      define EXIT_SUCCESS 0
  685 #     endif
  686 #    endif
  687 #   endif
  688 #  endif
  689 # endif
  690 
  691 # ifdef FFSTACK_ALLOC
  692    /* Pacify GCC's 'empty if-body' warning.  */
  693 #  define FFSTACK_FREE(Ptr) do { /* empty */; } while (0)
  694 #  ifndef FFSTACK_ALLOC_MAXIMUM
  695     /* The OS might guarantee only one guard page at the bottom of the stack,
  696        and a page size can be as small as 4096 bytes.  So we cannot safely
  697        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
  698        to allow for a few compiler-allocated temporary stack slots.  */
  699 #   define FFSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  700 #  endif
  701 # else
  702 #  define FFSTACK_ALLOC FFMALLOC
  703 #  define FFSTACK_FREE FFFREE
  704 #  ifndef FFSTACK_ALLOC_MAXIMUM
  705 #   define FFSTACK_ALLOC_MAXIMUM FFSIZE_MAXIMUM
  706 #  endif
  707 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
  708        && ! ((defined FFMALLOC || defined malloc) \
  709              && (defined FFFREE || defined free)))
  710 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  711 #   ifndef EXIT_SUCCESS
  712 #    define EXIT_SUCCESS 0
  713 #   endif
  714 #  endif
  715 #  ifndef FFMALLOC
  716 #   define FFMALLOC malloc
  717 #   if ! defined malloc && ! defined EXIT_SUCCESS
  718 void *malloc (FFSIZE_T); /* INFRINGES ON USER NAME SPACE */
  719 #   endif
  720 #  endif
  721 #  ifndef FFFREE
  722 #   define FFFREE free
  723 #   if ! defined free && ! defined EXIT_SUCCESS
  724 void free (void *); /* INFRINGES ON USER NAME SPACE */
  725 #   endif
  726 #  endif
  727 # endif
  728 #endif /* !defined ffoverflow */
  729 
  730 #if (! defined ffoverflow \
  731      && (! defined __cplusplus \
  732          || (defined FFSTYPE_IS_TRIVIAL && FFSTYPE_IS_TRIVIAL)))
  733 
  734 /* A type that is properly aligned for any stack member.  */
  735 union ffalloc
  736 {
  737   ff_state_t ffss_alloc;
  738   FFSTYPE ffvs_alloc;
  739 };
  740 
  741 /* The size of the maximum gap between one aligned stack and the next.  */
  742 # define FFSTACK_GAP_MAXIMUM (FFSIZEOF (union ffalloc) - 1)
  743 
  744 /* The size of an array large to enough to hold all stacks, each with
  745    N elements.  */
  746 # define FFSTACK_BYTES(N) \
  747      ((N) * (FFSIZEOF (ff_state_t) + FFSIZEOF (FFSTYPE)) \
  748       + FFSTACK_GAP_MAXIMUM)
  749 
  750 # define FFCOPY_NEEDED 1
  751 
  752 /* Relocate STACK from its old location to the new one.  The
  753    local variables FFSIZE and FFSTACKSIZE give the old and new number of
  754    elements in the stack, and FFPTR gives the new location of the
  755    stack.  Advance FFPTR to a properly aligned location for the next
  756    stack.  */
  757 # define FFSTACK_RELOCATE(Stack_alloc, Stack)                           \
  758     do                                                                  \
  759       {                                                                 \
  760         FFPTRDIFF_T ffnewbytes;                                         \
  761         FFCOPY (&ffptr->Stack_alloc, Stack, ffsize);                    \
  762         Stack = &ffptr->Stack_alloc;                                    \
  763         ffnewbytes = ffstacksize * FFSIZEOF (*Stack) + FFSTACK_GAP_MAXIMUM; \
  764         ffptr += ffnewbytes / FFSIZEOF (*ffptr);                        \
  765       }                                                                 \
  766     while (0)
  767 
  768 #endif
  769 
  770 #if defined FFCOPY_NEEDED && FFCOPY_NEEDED
  771 /* Copy COUNT objects from SRC to DST.  The source and destination do
  772    not overlap.  */
  773 # ifndef FFCOPY
  774 #  if defined __GNUC__ && 1 < __GNUC__
  775 #   define FFCOPY(Dst, Src, Count) \
  776       __builtin_memcpy (Dst, Src, FF_CAST (FFSIZE_T, (Count)) * sizeof (*(Src)))
  777 #  else
  778 #   define FFCOPY(Dst, Src, Count)              \
  779       do                                        \
  780         {                                       \
  781           FFPTRDIFF_T ffi;                      \
  782           for (ffi = 0; ffi < (Count); ffi++)   \
  783             (Dst)[ffi] = (Src)[ffi];            \
  784         }                                       \
  785       while (0)
  786 #  endif
  787 # endif
  788 #endif /* !FFCOPY_NEEDED */
  789 
  790 /* FFFINAL -- State number of the termination state.  */
  791 #define FFFINAL  2
  792 /* FFLAST -- Last index in FFTABLE.  */
  793 #define FFLAST   1725
  794 
  795 /* FFNTOKENS -- Number of terminals.  */
  796 #define FFNTOKENS  56
  797 /* FFNNTS -- Number of nonterminals.  */
  798 #define FFNNTS  9
  799 /* FFNRULES -- Number of rules.  */
  800 #define FFNRULES  130
  801 /* FFNSTATES -- Number of states.  */
  802 #define FFNSTATES  308
  803 
  804 /* FFMAXUTOK -- Last valid token kind.  */
  805 #define FFMAXUTOK   291
  806 
  807 
  808 /* FFTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
  809    as returned by fflex, with out-of-bounds checking.  */
  810 #define FFTRANSLATE(FFX)                                \
  811   (0 <= (FFX) && (FFX) <= FFMAXUTOK                     \
  812    ? FF_CAST (ffsymbol_kind_t, fftranslate[FFX])        \
  813    : FFSYMBOL_FFUNDEF)
  814 
  815 /* FFTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  816    as returned by fflex.  */
  817 static const fftype_int8 fftranslate[] =
  818 {
  819        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  820       52,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  821        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  822        2,     2,     2,     2,     2,     2,     2,    38,    42,     2,
  823       54,    55,    39,    36,    21,    37,     2,    40,     2,     2,
  824        2,     2,     2,     2,     2,     2,     2,     2,    23,     2,
  825        2,    22,     2,    26,     2,     2,     2,     2,     2,     2,
  826        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  827        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  828        2,    49,     2,    53,     2,     2,     2,     2,     2,     2,
  829        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  830        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  831        2,     2,     2,    24,    41,    25,    31,     2,     2,     2,
  832        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  833        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  834        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  835        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  836        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  837        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  838        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  839        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  840        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  841        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  842        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  843        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  844        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
  845        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
  846       15,    16,    17,    18,    19,    20,    27,    28,    29,    30,
  847       32,    33,    34,    35,    43,    44,    45,    46,    47,    48,
  848       50,    51
  849 };
  850 
  851 #if FFDEBUG
  852   /* FFRLINE[FFN] -- Source line where rule number FFN was defined.  */
  853 static const fftype_int16 ffrline[] =
  854 {
  855        0,   252,   252,   253,   256,   257,   263,   269,   275,   281,
  856      284,   286,   299,   301,   314,   325,   339,   343,   347,   351,
  857      353,   362,   365,   368,   377,   379,   381,   383,   385,   387,
  858      390,   394,   396,   398,   400,   409,   411,   413,   416,   419,
  859      422,   425,   428,   437,   446,   455,   458,   460,   462,   464,
  860      468,   472,   491,   510,   529,   540,   554,   566,   597,   692,
  861      700,   761,   785,   787,   789,   791,   793,   795,   797,   799,
  862      801,   805,   807,   809,   818,   821,   824,   827,   830,   833,
  863      836,   839,   842,   845,   848,   851,   854,   857,   860,   863,
  864      866,   869,   872,   875,   877,   879,   881,   884,   891,   908,
  865      921,   934,   945,   961,   985,  1013,  1050,  1054,  1058,  1061,
  866     1066,  1069,  1074,  1078,  1081,  1085,  1087,  1089,  1091,  1093,
  867     1095,  1097,  1101,  1104,  1106,  1115,  1117,  1119,  1128,  1147,
  868     1166
  869 };
  870 #endif
  871 
  872 /** Accessing symbol of state STATE.  */
  873 #define FF_ACCESSING_SYMBOL(State) FF_CAST (ffsymbol_kind_t, ffstos[State])
  874 
  875 #if FFDEBUG || 0
  876 /* The user-facing name of the symbol whose (internal) number is
  877    FFSYMBOL.  No bounds checking.  */
  878 static const char *ffsymbol_name (ffsymbol_kind_t ffsymbol) FF_ATTRIBUTE_UNUSED;
  879 
  880 /* FFTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  881    First, the terminals, then, starting at FFNTOKENS, nonterminals.  */
  882 static const char *const fftname[] =
  883 {
  884   "\"end of file\"", "error", "\"invalid token\"", "BOOLEAN", "LONG",
  885   "DOUBLE", "STRING", "BITSTR", "FUNCTION", "BFUNCTION", "IFUNCTION",
  886   "GTIFILTER", "GTIOVERLAP", "REGFILTER", "COLUMN", "BCOLUMN", "SCOLUMN",
  887   "BITCOL", "ROWREF", "NULLREF", "SNULLREF", "','", "'='", "':'", "'{'",
  888   "'}'", "'?'", "OR", "AND", "EQ", "NE", "'~'", "GT", "LT", "LTE", "GTE",
  889   "'+'", "'-'", "'%'", "'*'", "'/'", "'|'", "'&'", "XOR", "POWER", "NOT",
  890   "INTCAST", "FLTCAST", "UMINUS", "'['", "ACCUM", "DIFF", "'\\n'", "']'",
  891   "'('", "')'", "$accept", "lines", "line", "bvector", "vector", "expr",
  892   "bexpr", "bits", "sexpr", FF_NULLPTR
  893 };
  894 
  895 static const char *
  896 ffsymbol_name (ffsymbol_kind_t ffsymbol)
  897 {
  898   return fftname[ffsymbol];
  899 }
  900 #endif
  901 
  902 #ifdef FFPRINT
  903 /* FFTOKNUM[NUM] -- (External) token number corresponding to the
  904    (internal) symbol number NUM (which must be that of a token).  */
  905 static const fftype_int16 fftoknum[] =
  906 {
  907        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
  908      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
  909      275,    44,    61,    58,   123,   125,    63,   276,   277,   278,
  910      279,   126,   280,   281,   282,   283,    43,    45,    37,    42,
  911       47,   124,    38,   284,   285,   286,   287,   288,   289,    91,
  912      290,   291,    10,    93,    40,    41
  913 };
  914 #endif
  915 
  916 #define FFPACT_NINF (-40)
  917 
  918 #define ffpact_value_is_default(Yyn) \
  919   ((Yyn) == FFPACT_NINF)
  920 
  921 #define FFTABLE_NINF (-1)
  922 
  923 #define fftable_value_is_error(Yyn) \
  924   0
  925 
  926   /* FFPACT[STATE-NUM] -- Index in FFTABLE of the portion describing
  927      STATE-NUM.  */
  928 static const fftype_int16 ffpact[] =
  929 {
  930      -40,   337,   -40,   -39,   -40,   -40,   -40,   -40,   -40,   389,
  931      442,   442,    -5,    21,    29,    17,    25,    44,    45,   -40,
  932      -40,   -40,   442,   442,   442,   442,   442,   442,   -40,   442,
  933      -40,   -15,    19,  1159,   443,  1584,  1605,   -40,   -40,   276,
  934      -10,   330,   133,   469,   144,  1647,   248,  1526,   209,  1689,
  935      -19,   -40,    49,   -18,   442,   442,   442,   442,  1526,   209,
  936      294,    -6,    -6,    24,    26,    -6,    24,    -6,    24,   671,
  937     1186,   382,  1544,   442,   -40,   442,   -40,   442,   442,   442,
  938      442,   442,   442,   442,   442,   442,   442,   442,   442,   442,
  939      442,   442,   442,   442,   442,   -40,   442,   442,   442,   442,
  940      442,   442,   442,   -40,    -3,    -3,    -3,    -3,    -3,    -3,
  941       -3,    -3,    -3,   442,   -40,   442,   442,   442,   442,   442,
  942      442,   442,   -40,   442,   -40,   442,   -40,   -40,   442,   -40,
  943      442,   -40,   -40,   -40,   442,   442,   -40,   442,   442,   -40,
  944     1388,  1411,  1434,  1457,   -40,   -40,   -40,   -40,  1526,   209,
  945     1526,   209,  1480,  1665,  1665,  1665,    22,    22,    22,    22,
  946      203,   203,   203,   148,    24,   148,   -37,   -37,   -37,   -37,
  947      784,  1503,  1558,  1619,    18,    69,   -34,   -34,   148,   809,
  948       -3,    -3,   111,   111,   111,   111,   111,   111,   -11,    26,
  949       26,   834,   406,   406,    58,    58,    58,    58,   -40,   498,
  950     1191,  1221,  1560,  1245,  1576,   527,  1269,  1293,   -40,   -40,
  951      -40,   -40,   442,   442,   -40,   442,   442,   442,   442,   -40,
  952       26,    68,   442,   -40,   442,   -40,   -40,   442,   -40,   442,
  953      -40,    90,   -40,   442,   442,  1629,   859,  1629,   209,  1629,
  954      209,   294,   884,   909,  1317,   699,   556,    76,   585,   614,
  955      442,   -40,   442,   -40,   442,   -40,   442,   -40,   442,   -40,
  956       96,    97,   -40,    99,   -40,   934,   959,   984,   727,  1341,
  957       51,    92,    56,   442,   -40,   442,   -40,   442,   -40,   -40,
  958      442,   -40,   108,   -40,  1009,  1034,  1059,   643,    65,   442,
  959      -40,   442,   -40,   442,   -40,   442,   -40,   -40,  1084,  1109,
  960     1134,  1365,   -40,   -40,   -40,   442,   755,   -40
  961 };
  962 
  963   /* FFDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  964      Performed when FFTABLE does not specify something else to do.  Zero
  965      means the default is an error.  */
  966 static const fftype_uint8 ffdefact[] =
  967 {
  968        2,     0,     1,     0,    71,    31,    32,   122,    18,     0,
  969        0,     0,     0,     0,     0,    33,    72,   123,    19,    35,
  970       36,   125,     0,     0,     0,     0,     0,     0,     4,     0,
  971        3,     0,     0,     0,     0,     0,     0,     9,    54,     0,
  972        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  973        0,   106,     0,     0,     0,     0,     0,     0,    12,    10,
  974        0,    46,    47,   120,    29,    67,    68,    69,    70,     0,
  975        0,     0,     0,     0,    17,     0,    16,     0,     0,     0,
  976        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  977        0,     0,     0,     0,     0,     5,     0,     0,     0,     0,
  978        0,     0,     0,     6,     0,     0,     0,     0,     0,     0,
  979        0,     0,     0,     0,     8,     0,     0,     0,     0,     0,
  980        0,     0,     7,     0,    58,     0,    55,    57,     0,    56,
  981        0,    99,   100,   101,     0,     0,   107,     0,     0,   112,
  982        0,     0,     0,     0,    48,   121,    30,   126,    15,    11,
  983       13,    14,     0,    85,    86,    84,    80,    81,    83,    82,
  984       38,    39,    37,    40,    49,    41,    43,    42,    44,    45,
  985        0,     0,     0,     0,    94,    93,    95,    96,    50,     0,
  986        0,     0,    74,    75,    78,    76,    77,    79,    23,    22,
  987       21,     0,    87,    88,    89,    91,    92,    90,   127,     0,
  988        0,     0,     0,     0,     0,     0,     0,     0,    34,    73,
  989      124,    20,     0,     0,    62,     0,     0,     0,     0,   115,
  990       29,     0,     0,    24,     0,    60,   102,     0,   129,     0,
  991       59,     0,   108,     0,     0,    97,     0,    51,    53,    52,
  992       98,   128,     0,     0,     0,     0,     0,     0,     0,     0,
  993        0,    63,     0,   116,     0,    25,     0,   130,     0,   103,
  994        0,     0,   110,     0,   113,     0,     0,     0,     0,     0,
  995        0,     0,     0,     0,    64,     0,   117,     0,    26,    61,
  996        0,   109,     0,   114,     0,     0,     0,     0,     0,     0,
  997       65,     0,   118,     0,    27,     0,   104,   111,     0,     0,
  998        0,     0,    66,   119,    28,     0,     0,   105
  999 };
 1000 
 1001   /* FFPGOTO[NTERM-NUM].  */
 1002 static const fftype_int16 ffpgoto[] =
 1003 {
 1004      -40,   -40,   -40,   -40,   -40,    -1,   106,   155,    23
 1005 };
 1006 
 1007   /* FFDEFGOTO[NTERM-NUM].  */
 1008 static const fftype_int8 ffdefgoto[] =
 1009 {
 1010       -1,     1,    30,    31,    32,    47,    48,    45,    60
 1011 };
 1012 
 1013   /* FFTABLE[FFPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
 1014      positive, shift that token.  If negative, reduce the rule whose
 1015      number is the opposite.  If FFTABLE_NINF, syntax error.  */
 1016 static const fftype_int16 fftable[] =
 1017 {
 1018       33,    50,   135,   138,     8,   101,    73,    93,    39,    43,
 1019       74,   125,    94,    37,    18,   102,    96,    97,    98,    99,
 1020      100,    58,    61,    62,    36,    65,    67,    52,    69,   101,
 1021      111,   112,    42,    46,    49,    53,   136,   139,   113,   102,
 1022       75,    54,   180,    94,    76,   126,    98,    99,   100,    55,
 1023       51,   181,    72,   140,   141,   142,   143,   101,    85,    86,
 1024       87,    88,    89,    90,    91,    92,    93,   102,    56,    57,
 1025      137,    94,   148,   102,   150,   113,   152,   153,   154,   155,
 1026      156,   157,   158,   159,   160,   161,   162,   163,   165,   166,
 1027      167,   168,   169,   170,   121,   171,   247,   260,    99,   100,
 1028      178,   179,   270,   271,   110,   272,   281,    34,   101,   111,
 1029      112,   283,   191,   282,   288,    40,    44,   113,   102,   173,
 1030      297,     0,   199,   146,     0,     0,     0,   201,    59,   203,
 1031        0,    63,    66,    68,   205,    70,   206,   207,   192,   193,
 1032      194,   195,   196,   197,   198,     0,     0,   110,     0,     0,
 1033        0,   202,   111,   112,   128,     0,    35,   204,     0,     0,
 1034      113,     0,   115,   116,    41,   117,   118,   119,   120,   121,
 1035       96,    97,    98,    99,   100,     0,     0,     0,     0,   149,
 1036       64,   151,     0,   101,    71,     0,     0,     0,   129,    90,
 1037       91,    92,    93,   102,   164,     0,     0,    94,     0,   132,
 1038        0,     0,   172,   174,   175,   176,   177,     0,     0,     0,
 1039        0,   235,   236,     0,   237,   239,     0,   242,     0,     0,
 1040        0,   243,     0,   244,     0,     0,   245,     0,   246,     0,
 1041        0,   200,   248,   249,     0,    96,    97,    98,    99,   100,
 1042      241,     0,    88,    89,    90,    91,    92,    93,   101,   265,
 1043        0,   266,    94,   267,     0,   268,     0,   269,   102,   182,
 1044      183,   184,   185,   186,   187,   188,   189,   190,     0,     0,
 1045        0,     0,   284,     0,   285,     0,   286,   115,   116,   287,
 1046      117,   118,   119,   120,   121,     0,     0,     0,   298,     0,
 1047      299,     0,   300,     0,   301,     0,     0,   123,    77,     0,
 1048        0,     0,     0,   133,   306,    78,    79,    80,    81,    82,
 1049       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
 1050       93,   238,   240,   115,   116,    94,   117,   118,   119,   120,
 1051      121,   124,     0,     0,     0,   220,   221,     2,     3,     0,
 1052        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
 1053       14,    15,    16,    17,    18,    19,    20,    21,     0,   104,
 1054      105,    22,   106,   107,   108,   109,   110,     0,     0,     0,
 1055        0,   111,   112,    23,    24,     0,     0,     0,     0,   113,
 1056        0,     0,    25,    26,    27,   127,     0,     0,     0,    28,
 1057        0,    29,     4,     5,     6,     7,     8,     9,    10,    11,
 1058       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
 1059        0,   104,   105,    22,   106,   107,   108,   109,   110,     0,
 1060        0,     0,     0,   111,   112,    23,    24,     0,     0,     0,
 1061        0,   113,     0,     0,    25,    26,    27,   146,   117,   118,
 1062      119,   120,   121,    29,    38,     4,     5,     6,     7,     8,
 1063        9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
 1064       19,    20,    21,     0,     0,     0,    22,     0,     0,    96,
 1065       97,    98,    99,   100,     0,     0,     0,     0,    23,    24,
 1066        0,     0,   101,     0,     0,     0,     0,    25,    26,    27,
 1067      130,    77,   102,     0,     0,   103,    29,     0,    78,    79,
 1068       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1069       90,    91,    92,    93,     0,     0,     0,     0,    94,   224,
 1070       77,     0,     0,     0,   131,     0,     0,    78,    79,    80,
 1071       81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
 1072       91,    92,    93,     0,     0,     0,     0,    94,   231,    77,
 1073        0,     0,     0,   225,     0,     0,    78,    79,    80,    81,
 1074       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
 1075       92,    93,     0,     0,     0,     0,    94,   258,    77,     0,
 1076        0,     0,   232,     0,     0,    78,    79,    80,    81,    82,
 1077       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
 1078       93,     0,     0,     0,     0,    94,   261,    77,     0,     0,
 1079        0,   259,     0,     0,    78,    79,    80,    81,    82,    83,
 1080       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
 1081        0,     0,     0,     0,    94,   263,    77,     0,     0,     0,
 1082      262,     0,     0,    78,    79,    80,    81,    82,    83,    84,
 1083       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1084        0,     0,     0,    94,   295,    77,     0,     0,     0,   264,
 1085        0,     0,    78,    79,    80,    81,    82,    83,    84,    85,
 1086       86,    87,    88,    89,    90,    91,    92,    93,     0,     0,
 1087        0,     0,    94,    77,     0,     0,     0,     0,   296,     0,
 1088       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
 1089       88,    89,    90,    91,    92,    93,     0,     0,     0,     0,
 1090       94,    77,     0,     0,     0,     0,   144,     0,    78,    79,
 1091       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1092       90,    91,    92,    93,     0,     0,     0,     0,    94,    77,
 1093        0,     0,     0,     0,   257,     0,    78,    79,    80,    81,
 1094       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
 1095       92,    93,     0,     0,     0,     0,    94,    77,     0,     0,
 1096        0,     0,   279,     0,    78,    79,    80,    81,    82,    83,
 1097       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
 1098        0,     0,     0,     0,    94,   213,    77,     0,     0,     0,
 1099      307,     0,     0,    78,    79,    80,    81,    82,    83,    84,
 1100       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1101      218,    77,     0,    94,     0,     0,     0,   214,    78,    79,
 1102       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1103       90,    91,    92,    93,     0,   222,    77,     0,    94,     0,
 1104        0,     0,   219,    78,    79,    80,    81,    82,    83,    84,
 1105       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1106      250,    77,     0,    94,     0,     0,     0,   223,    78,    79,
 1107       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1108       90,    91,    92,    93,     0,   252,    77,     0,    94,     0,
 1109        0,     0,   251,    78,    79,    80,    81,    82,    83,    84,
 1110       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1111      254,    77,     0,    94,     0,     0,     0,   253,    78,    79,
 1112       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1113       90,    91,    92,    93,     0,   273,    77,     0,    94,     0,
 1114        0,     0,   255,    78,    79,    80,    81,    82,    83,    84,
 1115       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1116      275,    77,     0,    94,     0,     0,     0,   274,    78,    79,
 1117       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1118       90,    91,    92,    93,     0,   277,    77,     0,    94,     0,
 1119        0,     0,   276,    78,    79,    80,    81,    82,    83,    84,
 1120       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1121      289,    77,     0,    94,     0,     0,     0,   278,    78,    79,
 1122       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1123       90,    91,    92,    93,     0,   291,    77,     0,    94,     0,
 1124        0,     0,   290,    78,    79,    80,    81,    82,    83,    84,
 1125       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1126      293,    77,     0,    94,     0,     0,     0,   292,    78,    79,
 1127       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1128       90,    91,    92,    93,     0,     0,    77,     0,    94,     0,
 1129        0,     0,   294,    78,    79,    80,    81,    82,    83,    84,
 1130       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1131        0,    77,     0,    94,     0,     0,     0,   302,    78,    79,
 1132       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1133       90,    91,    92,    93,     0,     0,    77,     0,    94,     0,
 1134        0,     0,   303,    78,    79,    80,    81,    82,    83,    84,
 1135       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
 1136        0,    77,     0,    94,     0,     0,     0,   304,    78,    79,
 1137       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1138       90,    91,    92,    93,     0,     0,     0,     0,    94,     0,
 1139        0,    95,    96,    97,    98,    99,   100,    96,    97,    98,
 1140       99,   100,     0,     0,     0,   101,     0,     0,     0,     0,
 1141      101,     0,     0,     0,     0,   102,     0,     0,     0,     0,
 1142      102,   145,   227,    77,     0,     0,   226,     0,     0,     0,
 1143       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
 1144       88,    89,    90,    91,    92,    93,   229,    77,     0,     0,
 1145       94,     0,     0,     0,    78,    79,    80,    81,    82,    83,
 1146       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
 1147      233,    77,     0,     0,    94,     0,     0,     0,    78,    79,
 1148       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1149       90,    91,    92,    93,   234,    77,     0,     0,    94,     0,
 1150        0,     0,    78,    79,    80,    81,    82,    83,    84,    85,
 1151       86,    87,    88,    89,    90,    91,    92,    93,   256,    77,
 1152        0,     0,    94,     0,     0,     0,    78,    79,    80,    81,
 1153       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
 1154       92,    93,   280,    77,     0,     0,    94,     0,     0,     0,
 1155       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
 1156       88,    89,    90,    91,    92,    93,   305,    77,     0,     0,
 1157       94,     0,     0,     0,    78,    79,    80,    81,    82,    83,
 1158       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
 1159       77,     0,     0,   208,    94,     0,     0,    78,    79,    80,
 1160       81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
 1161       91,    92,    93,    77,     0,     0,   209,    94,     0,     0,
 1162       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
 1163       88,    89,    90,    91,    92,    93,    77,     0,     0,   210,
 1164       94,     0,     0,    78,    79,    80,    81,    82,    83,    84,
 1165       85,    86,    87,    88,    89,    90,    91,    92,    93,    77,
 1166        0,     0,   211,    94,     0,     0,    78,    79,    80,    81,
 1167       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
 1168       92,    93,    77,   212,     0,     0,    94,     0,     0,    78,
 1169       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
 1170       89,    90,    91,    92,    93,    77,   215,     0,     0,    94,
 1171        0,     0,    78,    79,    80,    81,    82,    83,    84,    85,
 1172       86,    87,    88,    89,    90,    91,    92,    93,    77,     0,
 1173        0,     0,    94,     0,     0,    78,    79,    80,    81,    82,
 1174       83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
 1175       93,     0,     0,   115,   116,    94,   117,   118,   119,   120,
 1176      121,   216,     0,     0,    96,    97,    98,    99,   100,   115,
 1177      116,     0,   117,   118,   119,   120,   121,   101,     0,   147,
 1178        0,     0,     0,     0,     0,   115,   116,   102,   117,   118,
 1179      119,   120,   121,   104,   105,   228,   106,   107,   108,   109,
 1180      110,     0,     0,     0,     0,   111,   112,     0,     0,     0,
 1181        0,   230,     0,   113,   115,   116,   114,   117,   118,   119,
 1182      120,   121,   217,     0,     0,     0,     0,     0,   115,   116,
 1183        0,   117,   118,   119,   120,   121,     0,   122,    78,    79,
 1184       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
 1185       90,    91,    92,    93,     0,     0,   104,   105,    94,   106,
 1186      107,   108,   109,   110,     0,     0,     0,     0,   111,   112,
 1187        0,     0,     0,     0,     0,     0,   113,    81,    82,    83,
 1188       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
 1189      134,     0,     0,     0,    94,     0,     0,     0,   115,   116,
 1190        0,   117,   118,   119,   120,   121
 1191 };
 1192 
 1193 static const fftype_int16 ffcheck[] =
 1194 {
 1195        1,     6,    21,    21,     7,    39,    21,    44,     9,    10,
 1196       25,    21,    49,    52,    17,    49,    26,    27,    28,    29,
 1197       30,    22,    23,    24,     1,    26,    27,     6,    29,    39,
 1198       41,    42,     9,    10,    11,     6,    55,    55,    49,    49,
 1199       21,    24,    45,    49,    25,    55,    28,    29,    30,    24,
 1200       55,    54,    29,    54,    55,    56,    57,    39,    36,    37,
 1201       38,    39,    40,    41,    42,    43,    44,    49,    24,    24,
 1202       21,    49,    73,    49,    75,    49,    77,    78,    79,    80,
 1203       81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
 1204       91,    92,    93,    94,    36,    96,     6,    21,    29,    30,
 1205      101,   102,     6,     6,    36,     6,    55,     1,    39,    41,
 1206       42,    55,   113,    21,     6,     9,    10,    49,    49,    96,
 1207       55,    -1,   123,    55,    -1,    -1,    -1,   128,    22,   130,
 1208       -1,    25,    26,    27,   135,    29,   137,   138,   115,   116,
 1209      117,   118,   119,   120,   121,    -1,    -1,    36,    -1,    -1,
 1210       -1,   128,    41,    42,    21,    -1,     1,   134,    -1,    -1,
 1211       49,    -1,    29,    30,     9,    32,    33,    34,    35,    36,
 1212       26,    27,    28,    29,    30,    -1,    -1,    -1,    -1,    73,
 1213       25,    75,    -1,    39,    29,    -1,    -1,    -1,    55,    41,
 1214       42,    43,    44,    49,    88,    -1,    -1,    49,    -1,    55,
 1215       -1,    -1,    96,    97,    98,    99,   100,    -1,    -1,    -1,
 1216       -1,   212,   213,    -1,   215,   216,    -1,   218,    -1,    -1,
 1217       -1,   222,    -1,   224,    -1,    -1,   227,    -1,   229,    -1,
 1218       -1,   125,   233,   234,    -1,    26,    27,    28,    29,    30,
 1219      217,    -1,    39,    40,    41,    42,    43,    44,    39,   250,
 1220       -1,   252,    49,   254,    -1,   256,    -1,   258,    49,   104,
 1221      105,   106,   107,   108,   109,   110,   111,   112,    -1,    -1,
 1222       -1,    -1,   273,    -1,   275,    -1,   277,    29,    30,   280,
 1223       32,    33,    34,    35,    36,    -1,    -1,    -1,   289,    -1,
 1224      291,    -1,   293,    -1,   295,    -1,    -1,    21,    22,    -1,
 1225       -1,    -1,    -1,    55,   305,    29,    30,    31,    32,    33,
 1226       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
 1227       44,   215,   216,    29,    30,    49,    32,    33,    34,    35,
 1228       36,    55,    -1,    -1,    -1,   180,   181,     0,     1,    -1,
 1229        3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
 1230       13,    14,    15,    16,    17,    18,    19,    20,    -1,    29,
 1231       30,    24,    32,    33,    34,    35,    36,    -1,    -1,    -1,
 1232       -1,    41,    42,    36,    37,    -1,    -1,    -1,    -1,    49,
 1233       -1,    -1,    45,    46,    47,    55,    -1,    -1,    -1,    52,
 1234       -1,    54,     3,     4,     5,     6,     7,     8,     9,    10,
 1235       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
 1236       -1,    29,    30,    24,    32,    33,    34,    35,    36,    -1,
 1237       -1,    -1,    -1,    41,    42,    36,    37,    -1,    -1,    -1,
 1238       -1,    49,    -1,    -1,    45,    46,    47,    55,    32,    33,
 1239       34,    35,    36,    54,    55,     3,     4,     5,     6,     7,
 1240        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
 1241       18,    19,    20,    -1,    -1,    -1,    24,    -1,    -1,    26,
 1242       27,    28,    29,    30,    -1,    -1,    -1,    -1,    36,    37,
 1243       -1,    -1,    39,    -1,    -1,    -1,    -1,    45,    46,    47,
 1244       21,    22,    49,    -1,    -1,    52,    54,    -1,    29,    30,
 1245       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1246       41,    42,    43,    44,    -1,    -1,    -1,    -1,    49,    21,
 1247       22,    -1,    -1,    -1,    55,    -1,    -1,    29,    30,    31,
 1248       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
 1249       42,    43,    44,    -1,    -1,    -1,    -1,    49,    21,    22,
 1250       -1,    -1,    -1,    55,    -1,    -1,    29,    30,    31,    32,
 1251       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
 1252       43,    44,    -1,    -1,    -1,    -1,    49,    21,    22,    -1,
 1253       -1,    -1,    55,    -1,    -1,    29,    30,    31,    32,    33,
 1254       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
 1255       44,    -1,    -1,    -1,    -1,    49,    21,    22,    -1,    -1,
 1256       -1,    55,    -1,    -1,    29,    30,    31,    32,    33,    34,
 1257       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 1258       -1,    -1,    -1,    -1,    49,    21,    22,    -1,    -1,    -1,
 1259       55,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
 1260       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1261       -1,    -1,    -1,    49,    21,    22,    -1,    -1,    -1,    55,
 1262       -1,    -1,    29,    30,    31,    32,    33,    34,    35,    36,
 1263       37,    38,    39,    40,    41,    42,    43,    44,    -1,    -1,
 1264       -1,    -1,    49,    22,    -1,    -1,    -1,    -1,    55,    -1,
 1265       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
 1266       39,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
 1267       49,    22,    -1,    -1,    -1,    -1,    55,    -1,    29,    30,
 1268       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1269       41,    42,    43,    44,    -1,    -1,    -1,    -1,    49,    22,
 1270       -1,    -1,    -1,    -1,    55,    -1,    29,    30,    31,    32,
 1271       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
 1272       43,    44,    -1,    -1,    -1,    -1,    49,    22,    -1,    -1,
 1273       -1,    -1,    55,    -1,    29,    30,    31,    32,    33,    34,
 1274       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 1275       -1,    -1,    -1,    -1,    49,    21,    22,    -1,    -1,    -1,
 1276       55,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
 1277       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1278       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1279       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1280       41,    42,    43,    44,    -1,    21,    22,    -1,    49,    -1,
 1281       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1282       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1283       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1284       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1285       41,    42,    43,    44,    -1,    21,    22,    -1,    49,    -1,
 1286       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1287       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1288       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1289       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1290       41,    42,    43,    44,    -1,    21,    22,    -1,    49,    -1,
 1291       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1292       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1293       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1294       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1295       41,    42,    43,    44,    -1,    21,    22,    -1,    49,    -1,
 1296       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1297       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1298       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1299       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1300       41,    42,    43,    44,    -1,    21,    22,    -1,    49,    -1,
 1301       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1302       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1303       21,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1304       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1305       41,    42,    43,    44,    -1,    -1,    22,    -1,    49,    -1,
 1306       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1307       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1308       -1,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1309       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1310       41,    42,    43,    44,    -1,    -1,    22,    -1,    49,    -1,
 1311       -1,    -1,    53,    29,    30,    31,    32,    33,    34,    35,
 1312       36,    37,    38,    39,    40,    41,    42,    43,    44,    -1,
 1313       -1,    22,    -1,    49,    -1,    -1,    -1,    53,    29,    30,
 1314       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1315       41,    42,    43,    44,    -1,    -1,    -1,    -1,    49,    -1,
 1316       -1,    52,    26,    27,    28,    29,    30,    26,    27,    28,
 1317       29,    30,    -1,    -1,    -1,    39,    -1,    -1,    -1,    -1,
 1318       39,    -1,    -1,    -1,    -1,    49,    -1,    -1,    -1,    -1,
 1319       49,    55,    21,    22,    -1,    -1,    55,    -1,    -1,    -1,
 1320       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
 1321       39,    40,    41,    42,    43,    44,    21,    22,    -1,    -1,
 1322       49,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
 1323       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 1324       21,    22,    -1,    -1,    49,    -1,    -1,    -1,    29,    30,
 1325       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1326       41,    42,    43,    44,    21,    22,    -1,    -1,    49,    -1,
 1327       -1,    -1,    29,    30,    31,    32,    33,    34,    35,    36,
 1328       37,    38,    39,    40,    41,    42,    43,    44,    21,    22,
 1329       -1,    -1,    49,    -1,    -1,    -1,    29,    30,    31,    32,
 1330       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
 1331       43,    44,    21,    22,    -1,    -1,    49,    -1,    -1,    -1,
 1332       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
 1333       39,    40,    41,    42,    43,    44,    21,    22,    -1,    -1,
 1334       49,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
 1335       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 1336       22,    -1,    -1,    25,    49,    -1,    -1,    29,    30,    31,
 1337       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
 1338       42,    43,    44,    22,    -1,    -1,    25,    49,    -1,    -1,
 1339       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
 1340       39,    40,    41,    42,    43,    44,    22,    -1,    -1,    25,
 1341       49,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
 1342       36,    37,    38,    39,    40,    41,    42,    43,    44,    22,
 1343       -1,    -1,    25,    49,    -1,    -1,    29,    30,    31,    32,
 1344       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
 1345       43,    44,    22,    23,    -1,    -1,    49,    -1,    -1,    29,
 1346       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
 1347       40,    41,    42,    43,    44,    22,    23,    -1,    -1,    49,
 1348       -1,    -1,    29,    30,    31,    32,    33,    34,    35,    36,
 1349       37,    38,    39,    40,    41,    42,    43,    44,    22,    -1,
 1350       -1,    -1,    49,    -1,    -1,    29,    30,    31,    32,    33,
 1351       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
 1352       44,    -1,    -1,    29,    30,    49,    32,    33,    34,    35,
 1353       36,    23,    -1,    -1,    26,    27,    28,    29,    30,    29,
 1354       30,    -1,    32,    33,    34,    35,    36,    39,    -1,    55,
 1355       -1,    -1,    -1,    -1,    -1,    29,    30,    49,    32,    33,
 1356       34,    35,    36,    29,    30,    55,    32,    33,    34,    35,
 1357       36,    -1,    -1,    -1,    -1,    41,    42,    -1,    -1,    -1,
 1358       -1,    55,    -1,    49,    29,    30,    52,    32,    33,    34,
 1359       35,    36,    23,    -1,    -1,    -1,    -1,    -1,    29,    30,
 1360       -1,    32,    33,    34,    35,    36,    -1,    52,    29,    30,
 1361       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1362       41,    42,    43,    44,    -1,    -1,    29,    30,    49,    32,
 1363       33,    34,    35,    36,    -1,    -1,    -1,    -1,    41,    42,
 1364       -1,    -1,    -1,    -1,    -1,    -1,    49,    32,    33,    34,
 1365       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
 1366       21,    -1,    -1,    -1,    49,    -1,    -1,    -1,    29,    30,
 1367       -1,    32,    33,    34,    35,    36
 1368 };
 1369 
 1370   /* FFSTOS[STATE-NUM] -- The (internal number of the) accessing
 1371      symbol of state STATE-NUM.  */
 1372 static const fftype_int8 ffstos[] =
 1373 {
 1374        0,    57,     0,     1,     3,     4,     5,     6,     7,     8,
 1375        9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
 1376       19,    20,    24,    36,    37,    45,    46,    47,    52,    54,
 1377       58,    59,    60,    61,    62,    63,    64,    52,    55,    61,
 1378       62,    63,    64,    61,    62,    63,    64,    61,    62,    64,
 1379        6,    55,     6,     6,    24,    24,    24,    24,    61,    62,
 1380       64,    61,    61,    62,    63,    61,    62,    61,    62,    61,
 1381       62,    63,    64,    21,    25,    21,    25,    22,    29,    30,
 1382       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
 1383       41,    42,    43,    44,    49,    52,    26,    27,    28,    29,
 1384       30,    39,    49,    52,    29,    30,    32,    33,    34,    35,
 1385       36,    41,    42,    49,    52,    29,    30,    32,    33,    34,
 1386       35,    36,    52,    21,    55,    21,    55,    55,    21,    55,
 1387       21,    55,    55,    55,    21,    21,    55,    21,    21,    55,
 1388       61,    61,    61,    61,    55,    55,    55,    55,    61,    62,
 1389       61,    62,    61,    61,    61,    61,    61,    61,    61,    61,
 1390       61,    61,    61,    61,    62,    61,    61,    61,    61,    61,
 1391       61,    61,    62,    64,    62,    62,    62,    62,    61,    61,
 1392       45,    54,    63,    63,    63,    63,    63,    63,    63,    63,
 1393       63,    61,    64,    64,    64,    64,    64,    64,    64,    61,
 1394       62,    61,    64,    61,    64,    61,    61,    61,    25,    25,
 1395       25,    25,    23,    21,    53,    23,    23,    23,    21,    53,
 1396       63,    63,    21,    53,    21,    55,    55,    21,    55,    21,
 1397       55,    21,    55,    21,    21,    61,    61,    61,    62,    61,
 1398       62,    64,    61,    61,    61,    61,    61,     6,    61,    61,
 1399       21,    53,    21,    53,    21,    53,    21,    55,    21,    55,
 1400       21,    21,    55,    21,    55,    61,    61,    61,    61,    61,
 1401        6,     6,     6,    21,    53,    21,    53,    21,    53,    55,
 1402       21,    55,    21,    55,    61,    61,    61,    61,     6,    21,
 1403       53,    21,    53,    21,    53,    21,    55,    55,    61,    61,
 1404       61,    61,    53,    53,    53,    21,    61,    55
 1405 };
 1406 
 1407   /* FFR1[FFN] -- Symbol number of symbol that rule FFN derives.  */
 1408 static const fftype_int8 ffr1[] =
 1409 {
 1410        0,    56,    57,    57,    58,    58,    58,    58,    58,    58,
 1411       59,    59,    60,    60,    60,    60,    61,    62,    63,    63,
 1412       63,    63,    63,    63,    63,    63,    63,    63,    63,    63,
 1413       63,    61,    61,    61,    61,    61,    61,    61,    61,    61,
 1414       61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
 1415       61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
 1416       61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
 1417       61,    62,    62,    62,    62,    62,    62,    62,    62,    62,
 1418       62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
 1419       62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
 1420       62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
 1421       62,    62,    62,    62,    62,    62,    62,    62,    62,    62,
 1422       62,    62,    64,    64,    64,    64,    64,    64,    64,    64,
 1423       64
 1424 };
 1425 
 1426   /* FFR2[FFN] -- Number of symbols on the right hand side of rule FFN.  */
 1427 static const fftype_int8 ffr2[] =
 1428 {
 1429        0,     2,     0,     2,     1,     2,     2,     2,     2,     2,
 1430        2,     3,     2,     3,     3,     3,     2,     2,     1,     1,
 1431        4,     3,     3,     3,     4,     6,     8,    10,    12,     2,
 1432        3,     1,     1,     1,     4,     1,     1,     3,     3,     3,
 1433        3,     3,     3,     3,     3,     3,     2,     2,     3,     3,
 1434        3,     5,     5,     5,     2,     3,     3,     3,     3,     5,
 1435        5,     9,     4,     6,     8,    10,    12,     2,     2,     2,
 1436        2,     1,     1,     4,     3,     3,     3,     3,     3,     3,
 1437        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
 1438        3,     3,     3,     3,     3,     3,     3,     5,     5,     3,
 1439        3,     3,     5,     7,    11,    15,     2,     3,     5,     9,
 1440        7,    11,     3,     7,     9,     4,     6,     8,    10,    12,
 1441        2,     3,     1,     1,     4,     1,     3,     3,     5,     5,
 1442        7
 1443 };
 1444 
 1445 
 1446 enum { FFENOMEM = -2 };
 1447 
 1448 #define fferrok         (fferrstatus = 0)
 1449 #define ffclearin       (ffchar = FFEMPTY)
 1450 
 1451 #define FFACCEPT        goto ffacceptlab
 1452 #define FFABORT         goto ffabortlab
 1453 #define FFERROR         goto fferrorlab
 1454 
 1455 
 1456 #define FFRECOVERING()  (!!fferrstatus)
 1457 
 1458 #define FFBACKUP(Token, Value)                                    \
 1459   do                                                              \
 1460     if (ffchar == FFEMPTY)                                        \
 1461       {                                                           \
 1462         ffchar = (Token);                                         \
 1463         fflval = (Value);                                         \
 1464         FFPOPSTACK (fflen);                                       \
 1465         ffstate = *ffssp;                                         \
 1466         goto ffbackup;                                            \
 1467       }                                                           \
 1468     else                                                          \
 1469       {                                                           \
 1470         fferror (FF_("syntax error: cannot back up")); \
 1471         FFERROR;                                                  \
 1472       }                                                           \
 1473   while (0)
 1474 
 1475 /* Backward compatibility with an undocumented macro.
 1476    Use FFerror or FFUNDEF. */
 1477 #define FFERRCODE FFUNDEF
 1478 
 1479 
 1480 /* Enable debugging if requested.  */
 1481 #if FFDEBUG
 1482 
 1483 # ifndef FFFPRINTF
 1484 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 1485 #  define FFFPRINTF fprintf
 1486 # endif
 1487 
 1488 # define FFDPRINTF(Args)                        \
 1489 do {                                            \
 1490   if (ffdebug)                                  \
 1491     FFFPRINTF Args;                             \
 1492 } while (0)
 1493 
 1494 /* This macro is provided for backward compatibility. */
 1495 # ifndef FF_LOCATION_PRINT
 1496 #  define FF_LOCATION_PRINT(File, Loc) ((void) 0)
 1497 # endif
 1498 
 1499 
 1500 # define FF_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
 1501 do {                                                                      \
 1502   if (ffdebug)                                                            \
 1503     {                                                                     \
 1504       FFFPRINTF (stderr, "%s ", Title);                                   \
 1505       ff_symbol_print (stderr,                                            \
 1506                   Kind, Value); \
 1507       FFFPRINTF (stderr, "\n");                                           \
 1508     }                                                                     \
 1509 } while (0)
 1510 
 1511 
 1512 /*-----------------------------------.
 1513 | Print this symbol's value on FFO.  |
 1514 `-----------------------------------*/
 1515 
 1516 static void
 1517 ff_symbol_value_print (FILE *ffo,
 1518                        ffsymbol_kind_t ffkind, FFSTYPE const * const ffvaluep)
 1519 {
 1520   FILE *ffoutput = ffo;
 1521   FFUSE (ffoutput);
 1522   if (!ffvaluep)
 1523     return;
 1524 # ifdef FFPRINT
 1525   if (ffkind < FFNTOKENS)
 1526     FFPRINT (ffo, fftoknum[ffkind], *ffvaluep);
 1527 # endif
 1528   FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 1529   FFUSE (ffkind);
 1530   FF_IGNORE_MAYBE_UNINITIALIZED_END
 1531 }
 1532 
 1533 
 1534 /*---------------------------.
 1535 | Print this symbol on FFO.  |
 1536 `---------------------------*/
 1537 
 1538 static void
 1539 ff_symbol_print (FILE *ffo,
 1540                  ffsymbol_kind_t ffkind, FFSTYPE const * const ffvaluep)
 1541 {
 1542   FFFPRINTF (ffo, "%s %s (",
 1543              ffkind < FFNTOKENS ? "token" : "nterm", ffsymbol_name (ffkind));
 1544 
 1545   ff_symbol_value_print (ffo, ffkind, ffvaluep);
 1546   FFFPRINTF (ffo, ")");
 1547 }
 1548 
 1549 /*------------------------------------------------------------------.
 1550 | ff_stack_print -- Print the state stack from its BOTTOM up to its |
 1551 | TOP (included).                                                   |
 1552 `------------------------------------------------------------------*/
 1553 
 1554 static void
 1555 ff_stack_print (ff_state_t *ffbottom, ff_state_t *fftop)
 1556 {
 1557   FFFPRINTF (stderr, "Stack now");
 1558   for (; ffbottom <= fftop; ffbottom++)
 1559     {
 1560       int ffbot = *ffbottom;
 1561       FFFPRINTF (stderr, " %d", ffbot);
 1562     }
 1563   FFFPRINTF (stderr, "\n");
 1564 }
 1565 
 1566 # define FF_STACK_PRINT(Bottom, Top)                            \
 1567 do {                                                            \
 1568   if (ffdebug)                                                  \
 1569     ff_stack_print ((Bottom), (Top));                           \
 1570 } while (0)
 1571 
 1572 
 1573 /*------------------------------------------------.
 1574 | Report that the FFRULE is going to be reduced.  |
 1575 `------------------------------------------------*/
 1576 
 1577 static void
 1578 ff_reduce_print (ff_state_t *ffssp, FFSTYPE *ffvsp,
 1579                  int ffrule)
 1580 {
 1581   int fflno = ffrline[ffrule];
 1582   int ffnrhs = ffr2[ffrule];
 1583   int ffi;
 1584   FFFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
 1585              ffrule - 1, fflno);
 1586   /* The symbols being reduced.  */
 1587   for (ffi = 0; ffi < ffnrhs; ffi++)
 1588     {
 1589       FFFPRINTF (stderr, "   $%d = ", ffi + 1);
 1590       ff_symbol_print (stderr,
 1591                        FF_ACCESSING_SYMBOL (+ffssp[ffi + 1 - ffnrhs]),
 1592                        &ffvsp[(ffi + 1) - (ffnrhs)]);
 1593       FFFPRINTF (stderr, "\n");
 1594     }
 1595 }
 1596 
 1597 # define FF_REDUCE_PRINT(Rule)          \
 1598 do {                                    \
 1599   if (ffdebug)                          \
 1600     ff_reduce_print (ffssp, ffvsp, Rule); \
 1601 } while (0)
 1602 
 1603 /* Nonzero means print parse trace.  It is left uninitialized so that
 1604    multiple parsers can coexist.  */
 1605 int ffdebug;
 1606 #else /* !FFDEBUG */
 1607 # define FFDPRINTF(Args) ((void) 0)
 1608 # define FF_SYMBOL_PRINT(Title, Kind, Value, Location)
 1609 # define FF_STACK_PRINT(Bottom, Top)
 1610 # define FF_REDUCE_PRINT(Rule)
 1611 #endif /* !FFDEBUG */
 1612 
 1613 
 1614 /* FFINITDEPTH -- initial size of the parser's stacks.  */
 1615 #ifndef FFINITDEPTH
 1616 # define FFINITDEPTH 200
 1617 #endif
 1618 
 1619 /* FFMAXDEPTH -- maximum size the stacks can grow to (effective only
 1620    if the built-in stack extension method is used).
 1621 
 1622    Do not make this value too large; the results are undefined if
 1623    FFSTACK_ALLOC_MAXIMUM < FFSTACK_BYTES (FFMAXDEPTH)
 1624    evaluated with infinite-precision integer arithmetic.  */
 1625 
 1626 #ifndef FFMAXDEPTH
 1627 # define FFMAXDEPTH 10000
 1628 #endif
 1629 
 1630 
 1631 
 1632 
 1633 
 1634 
 1635 /*-----------------------------------------------.
 1636 | Release the memory associated to this symbol.  |
 1637 `-----------------------------------------------*/
 1638 
 1639 static void
 1640 ffdestruct (const char *ffmsg,
 1641             ffsymbol_kind_t ffkind, FFSTYPE *ffvaluep)
 1642 {
 1643   FFUSE (ffvaluep);
 1644   if (!ffmsg)
 1645     ffmsg = "Deleting";
 1646   FF_SYMBOL_PRINT (ffmsg, ffkind, ffvaluep, fflocationp);
 1647 
 1648   FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 1649   FFUSE (ffkind);
 1650   FF_IGNORE_MAYBE_UNINITIALIZED_END
 1651 }
 1652 
 1653 
 1654 /* Lookahead token kind.  */
 1655 int ffchar;
 1656 
 1657 /* The semantic value of the lookahead symbol.  */
 1658 FFSTYPE fflval;
 1659 /* Number of syntax errors so far.  */
 1660 int ffnerrs;
 1661 
 1662 
 1663 
 1664 
 1665 /*----------.
 1666 | ffparse.  |
 1667 `----------*/
 1668 
 1669 int
 1670 ffparse (void)
 1671 {
 1672     ff_state_fast_t ffstate = 0;
 1673     /* Number of tokens to shift before error messages enabled.  */
 1674     int fferrstatus = 0;
 1675 
 1676     /* Refer to the stacks through separate pointers, to allow ffoverflow
 1677        to reallocate them elsewhere.  */
 1678 
 1679     /* Their size.  */
 1680     FFPTRDIFF_T ffstacksize = FFINITDEPTH;
 1681 
 1682     /* The state stack: array, bottom, top.  */
 1683     ff_state_t ffssa[FFINITDEPTH];
 1684     ff_state_t *ffss = ffssa;
 1685     ff_state_t *ffssp = ffss;
 1686 
 1687     /* The semantic value stack: array, bottom, top.  */
 1688     FFSTYPE ffvsa[FFINITDEPTH];
 1689     FFSTYPE *ffvs = ffvsa;
 1690     FFSTYPE *ffvsp = ffvs;
 1691 
 1692   int ffn;
 1693   /* The return value of ffparse.  */
 1694   int ffresult;
 1695   /* Lookahead symbol kind.  */
 1696   ffsymbol_kind_t fftoken = FFSYMBOL_FFEMPTY;
 1697   /* The variables used to return semantic value and location from the
 1698      action routines.  */
 1699   FFSTYPE ffval;
 1700 
 1701 
 1702 
 1703 #define FFPOPSTACK(N)   (ffvsp -= (N), ffssp -= (N))
 1704 
 1705   /* The number of symbols on the RHS of the reduced rule.
 1706      Keep to zero when no symbol should be popped.  */
 1707   int fflen = 0;
 1708 
 1709   FFDPRINTF ((stderr, "Starting parse\n"));
 1710 
 1711   ffchar = FFEMPTY; /* Cause a token to be read.  */
 1712   goto ffsetstate;
 1713 
 1714 
 1715 /*------------------------------------------------------------.
 1716 | ffnewstate -- push a new state, which is found in ffstate.  |
 1717 `------------------------------------------------------------*/
 1718 ffnewstate:
 1719   /* In all cases, when you get here, the value and location stacks
 1720      have just been pushed.  So pushing a state here evens the stacks.  */
 1721   ffssp++;
 1722 
 1723 
 1724 /*--------------------------------------------------------------------.
 1725 | ffsetstate -- set current state (the top of the stack) to ffstate.  |
 1726 `--------------------------------------------------------------------*/
 1727 ffsetstate:
 1728   FFDPRINTF ((stderr, "Entering state %d\n", ffstate));
 1729   FF_ASSERT (0 <= ffstate && ffstate < FFNSTATES);
 1730   FF_IGNORE_USELESS_CAST_BEGIN
 1731   *ffssp = FF_CAST (ff_state_t, ffstate);
 1732   FF_IGNORE_USELESS_CAST_END
 1733   FF_STACK_PRINT (ffss, ffssp);
 1734 
 1735   if (ffss + ffstacksize - 1 <= ffssp)
 1736 #if !defined ffoverflow && !defined FFSTACK_RELOCATE
 1737     goto ffexhaustedlab;
 1738 #else
 1739     {
 1740       /* Get the current used size of the three stacks, in elements.  */
 1741       FFPTRDIFF_T ffsize = ffssp - ffss + 1;
 1742 
 1743 # if defined ffoverflow
 1744       {
 1745         /* Give user a chance to reallocate the stack.  Use copies of
 1746            these so that the &'s don't force the real ones into
 1747            memory.  */
 1748         ff_state_t *ffss1 = ffss;
 1749         FFSTYPE *ffvs1 = ffvs;
 1750 
 1751         /* Each stack pointer address is followed by the size of the
 1752            data in use in that stack, in bytes.  This used to be a
 1753            conditional around just the two extra args, but that might
 1754            be undefined if ffoverflow is a macro.  */
 1755         ffoverflow (FF_("memory exhausted"),
 1756                     &ffss1, ffsize * FFSIZEOF (*ffssp),
 1757                     &ffvs1, ffsize * FFSIZEOF (*ffvsp),
 1758                     &ffstacksize);
 1759         ffss = ffss1;
 1760         ffvs = ffvs1;
 1761       }
 1762 # else /* defined FFSTACK_RELOCATE */
 1763       /* Extend the stack our own way.  */
 1764       if (FFMAXDEPTH <= ffstacksize)
 1765         goto ffexhaustedlab;
 1766       ffstacksize *= 2;
 1767       if (FFMAXDEPTH < ffstacksize)
 1768         ffstacksize = FFMAXDEPTH;
 1769 
 1770       {
 1771         ff_state_t *ffss1 = ffss;
 1772         union ffalloc *ffptr =
 1773           FF_CAST (union ffalloc *,
 1774                    FFSTACK_ALLOC (FF_CAST (FFSIZE_T, FFSTACK_BYTES (ffstacksize))));
 1775         if (! ffptr)
 1776           goto ffexhaustedlab;
 1777         FFSTACK_RELOCATE (ffss_alloc, ffss);
 1778         FFSTACK_RELOCATE (ffvs_alloc, ffvs);
 1779 #  undef FFSTACK_RELOCATE
 1780         if (ffss1 != ffssa)
 1781           FFSTACK_FREE (ffss1);
 1782       }
 1783 # endif
 1784 
 1785       ffssp = ffss + ffsize - 1;
 1786       ffvsp = ffvs + ffsize - 1;
 1787 
 1788       FF_IGNORE_USELESS_CAST_BEGIN
 1789       FFDPRINTF ((stderr, "Stack size increased to %ld\n",
 1790                   FF_CAST (long, ffstacksize)));
 1791       FF_IGNORE_USELESS_CAST_END
 1792 
 1793       if (ffss + ffstacksize - 1 <= ffssp)
 1794         FFABORT;
 1795     }
 1796 #endif /* !defined ffoverflow && !defined FFSTACK_RELOCATE */
 1797 
 1798   if (ffstate == FFFINAL)
 1799     FFACCEPT;
 1800 
 1801   goto ffbackup;
 1802 
 1803 
 1804 /*-----------.
 1805 | ffbackup.  |
 1806 `-----------*/
 1807 ffbackup:
 1808   /* Do appropriate processing given the current state.  Read a
 1809      lookahead token if we need one and don't already have one.  */
 1810 
 1811   /* First try to decide what to do without reference to lookahead token.  */
 1812   ffn = ffpact[ffstate];
 1813   if (ffpact_value_is_default (ffn))
 1814     goto ffdefault;
 1815 
 1816   /* Not known => get a lookahead token if don't already have one.  */
 1817 
 1818   /* FFCHAR is either empty, or end-of-input, or a valid lookahead.  */
 1819   if (ffchar == FFEMPTY)
 1820     {
 1821       FFDPRINTF ((stderr, "Reading a token\n"));
 1822       ffchar = fflex ();
 1823     }
 1824 
 1825   if (ffchar <= FFEOF)
 1826     {
 1827       ffchar = FFEOF;
 1828       fftoken = FFSYMBOL_FFEOF;
 1829       FFDPRINTF ((stderr, "Now at end of input.\n"));
 1830     }
 1831   else if (ffchar == FFerror)
 1832     {
 1833       /* The scanner already issued an error message, process directly
 1834          to error recovery.  But do not keep the error token as
 1835          lookahead, it is too special and may lead us to an endless
 1836          loop in error recovery. */
 1837       ffchar = FFUNDEF;
 1838       fftoken = FFSYMBOL_FFerror;
 1839       goto fferrlab1;
 1840     }
 1841   else
 1842     {
 1843       fftoken = FFTRANSLATE (ffchar);
 1844       FF_SYMBOL_PRINT ("Next token is", fftoken, &fflval, &fflloc);
 1845     }
 1846 
 1847   /* If the proper action on seeing token FFTOKEN is to reduce or to
 1848      detect an error, take that action.  */
 1849   ffn += fftoken;
 1850   if (ffn < 0 || FFLAST < ffn || ffcheck[ffn] != fftoken)
 1851     goto ffdefault;
 1852   ffn = fftable[ffn];
 1853   if (ffn <= 0)
 1854     {
 1855       if (fftable_value_is_error (ffn))
 1856         goto fferrlab;
 1857       ffn = -ffn;
 1858       goto ffreduce;
 1859     }
 1860 
 1861   /* Count tokens shifted since error; after three, turn off error
 1862      status.  */
 1863   if (fferrstatus)
 1864     fferrstatus--;
 1865 
 1866   /* Shift the lookahead token.  */
 1867   FF_SYMBOL_PRINT ("Shifting", fftoken, &fflval, &fflloc);
 1868   ffstate = ffn;
 1869   FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 1870   *++ffvsp = fflval;
 1871   FF_IGNORE_MAYBE_UNINITIALIZED_END
 1872 
 1873   /* Discard the shifted token.  */
 1874   ffchar = FFEMPTY;
 1875   goto ffnewstate;
 1876 
 1877 
 1878 /*-----------------------------------------------------------.
 1879 | ffdefault -- do the default action for the current state.  |
 1880 `-----------------------------------------------------------*/
 1881 ffdefault:
 1882   ffn = ffdefact[ffstate];
 1883   if (ffn == 0)
 1884     goto fferrlab;
 1885   goto ffreduce;
 1886 
 1887 
 1888 /*-----------------------------.
 1889 | ffreduce -- do a reduction.  |
 1890 `-----------------------------*/
 1891 ffreduce:
 1892   /* ffn is the number of a rule to reduce with.  */
 1893   fflen = ffr2[ffn];
 1894 
 1895   /* If FFLEN is nonzero, implement the default value of the action:
 1896      '$$ = $1'.
 1897 
 1898      Otherwise, the following line sets FFVAL to garbage.
 1899      This behavior is undocumented and Bison
 1900      users should not rely upon it.  Assigning to FFVAL
 1901      unconditionally makes the parser a bit smaller, and it avoids a
 1902      GCC warning that FFVAL may be used uninitialized.  */
 1903   ffval = ffvsp[1-fflen];
 1904 
 1905 
 1906   FF_REDUCE_PRINT (ffn);
 1907   switch (ffn)
 1908     {
 1909   case 4: /* line: '\n'  */
 1910 #line 256 "eval.y"
 1911                      {}
 1912 #line 1913 "y.tab.c"
 1913     break;
 1914 
 1915   case 5: /* line: expr '\n'  */
 1916 #line 258 "eval.y"
 1917                 { if( (ffvsp[-1].Node)<0 ) {
 1918              fferror("Couldn't build node structure: out of memory?");
 1919              FFERROR;  }
 1920                   gParse.resultNode = (ffvsp[-1].Node);
 1921         }
 1922 #line 1923 "y.tab.c"
 1923     break;
 1924 
 1925   case 6: /* line: bexpr '\n'  */
 1926 #line 264 "eval.y"
 1927                 { if( (ffvsp[-1].Node)<0 ) {
 1928              fferror("Couldn't build node structure: out of memory?");
 1929              FFERROR;  }
 1930                   gParse.resultNode = (ffvsp[-1].Node);
 1931         }
 1932 #line 1933 "y.tab.c"
 1933     break;
 1934 
 1935   case 7: /* line: sexpr '\n'  */
 1936 #line 270 "eval.y"
 1937                 { if( (ffvsp[-1].Node)<0 ) {
 1938              fferror("Couldn't build node structure: out of memory?");
 1939              FFERROR;  } 
 1940                   gParse.resultNode = (ffvsp[-1].Node);
 1941         }
 1942 #line 1943 "y.tab.c"
 1943     break;
 1944 
 1945   case 8: /* line: bits '\n'  */
 1946 #line 276 "eval.y"
 1947                 { if( (ffvsp[-1].Node)<0 ) {
 1948              fferror("Couldn't build node structure: out of memory?");
 1949              FFERROR;  }
 1950                   gParse.resultNode = (ffvsp[-1].Node);
 1951         }
 1952 #line 1953 "y.tab.c"
 1953     break;
 1954 
 1955   case 9: /* line: error '\n'  */
 1956 #line 281 "eval.y"
 1957                      {  fferrok;  }
 1958 #line 1959 "y.tab.c"
 1959     break;
 1960 
 1961   case 10: /* bvector: '{' bexpr  */
 1962 #line 285 "eval.y"
 1963                 { (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node)); }
 1964 #line 1965 "y.tab.c"
 1965     break;
 1966 
 1967   case 11: /* bvector: bvector ',' bexpr  */
 1968 #line 287 "eval.y"
 1969                 {
 1970                   if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
 1971              (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvsp[-2].Node));
 1972              (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.Node));
 1973                   } else {
 1974                      (ffval.Node) = (ffvsp[-2].Node);
 1975                   }
 1976           gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)].nSubNodes++ ]
 1977              = (ffvsp[0].Node);
 1978                 }
 1979 #line 1980 "y.tab.c"
 1980     break;
 1981 
 1982   case 12: /* vector: '{' expr  */
 1983 #line 300 "eval.y"
 1984                 { (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node)); }
 1985 #line 1986 "y.tab.c"
 1986     break;
 1987 
 1988   case 13: /* vector: vector ',' expr  */
 1989 #line 302 "eval.y"
 1990                 {
 1991                   if( TYPE((ffvsp[-2].Node)) < TYPE((ffvsp[0].Node)) )
 1992                      TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node));
 1993                   if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
 1994              (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvsp[-2].Node));
 1995              (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.Node));
 1996                   } else {
 1997                      (ffval.Node) = (ffvsp[-2].Node);
 1998                   }
 1999           gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)].nSubNodes++ ]
 2000              = (ffvsp[0].Node);
 2001                 }
 2002 #line 2003 "y.tab.c"
 2003     break;
 2004 
 2005   case 14: /* vector: vector ',' bexpr  */
 2006 #line 315 "eval.y"
 2007                 {
 2008                   if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
 2009              (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvsp[-2].Node));
 2010              (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.Node));
 2011                   } else {
 2012                      (ffval.Node) = (ffvsp[-2].Node);
 2013                   }
 2014           gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)].nSubNodes++ ]
 2015              = (ffvsp[0].Node);
 2016                 }
 2017 #line 2018 "y.tab.c"
 2018     break;
 2019 
 2020   case 15: /* vector: bvector ',' expr  */
 2021 #line 326 "eval.y"
 2022                 {
 2023                   TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node));
 2024                   if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
 2025              (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvsp[-2].Node));
 2026              (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.Node));
 2027                   } else {
 2028                      (ffval.Node) = (ffvsp[-2].Node);
 2029                   }
 2030           gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)].nSubNodes++ ]
 2031              = (ffvsp[0].Node);
 2032                 }
 2033 #line 2034 "y.tab.c"
 2034     break;
 2035 
 2036   case 16: /* expr: vector '}'  */
 2037 #line 340 "eval.y"
 2038                 { (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node)); }
 2039 #line 2040 "y.tab.c"
 2040     break;
 2041 
 2042   case 17: /* bexpr: bvector '}'  */
 2043 #line 344 "eval.y"
 2044                 { (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node)); }
 2045 #line 2046 "y.tab.c"
 2046     break;
 2047 
 2048   case 18: /* bits: BITSTR  */
 2049 #line 348 "eval.y"
 2050                 {
 2051                   (ffval.Node) = New_Const( BITSTR, (ffvsp[0].str), strlen((ffvsp[0].str))+1 ); TEST((ffval.Node));
 2052           SIZE((ffval.Node)) = strlen((ffvsp[0].str)); }
 2053 #line 2054 "y.tab.c"
 2054     break;
 2055 
 2056   case 19: /* bits: BITCOL  */
 2057 #line 352 "eval.y"
 2058                 { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); }
 2059 #line 2060 "y.tab.c"
 2060     break;
 2061 
 2062   case 20: /* bits: BITCOL '{' expr '}'  */
 2063 #line 354 "eval.y"
 2064                 {
 2065                   if( TYPE((ffvsp[-1].Node)) != LONG
 2066               || OPER((ffvsp[-1].Node)) != CONST_OP ) {
 2067              fferror("Offset argument must be a constant integer");
 2068              FFERROR;
 2069           }
 2070                   (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ); TEST((ffval.Node));
 2071                 }
 2072 #line 2073 "y.tab.c"
 2073     break;
 2074 
 2075   case 21: /* bits: bits '&' bits  */
 2076 #line 363 "eval.y"
 2077                 { (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '&', (ffvsp[0].Node) ); TEST((ffval.Node));
 2078                   SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].Node)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) );  }
 2079 #line 2080 "y.tab.c"
 2080     break;
 2081 
 2082   case 22: /* bits: bits '|' bits  */
 2083 #line 366 "eval.y"
 2084                 { (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '|', (ffvsp[0].Node) ); TEST((ffval.Node));
 2085                   SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].Node)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) );  }
 2086 #line 2087 "y.tab.c"
 2087     break;
 2088 
 2089   case 23: /* bits: bits '+' bits  */
 2090 #line 369 "eval.y"
 2091                 { 
 2092           if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) {
 2093             fferror("Combined bit string size exceeds " MAX_STRLEN_S " bits");
 2094             FFERROR;
 2095           }
 2096           (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '+', (ffvsp[0].Node) ); TEST((ffval.Node));
 2097                   SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].Node)); 
 2098         }
 2099 #line 2100 "y.tab.c"
 2100     break;
 2101 
 2102   case 24: /* bits: bits '[' expr ']'  */
 2103 #line 378 "eval.y"
 2104                 { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node),  0,  0,  0,   0 ); TEST((ffval.Node)); }
 2105 #line 2106 "y.tab.c"
 2106     break;
 2107 
 2108   case 25: /* bits: bits '[' expr ',' expr ']'  */
 2109 #line 380 "eval.y"
 2110                 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1].Node),  0,  0,   0 ); TEST((ffval.Node)); }
 2111 #line 2112 "y.tab.c"
 2112     break;
 2113 
 2114   case 26: /* bits: bits '[' expr ',' expr ',' expr ']'  */
 2115 #line 382 "eval.y"
 2116                 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),  0,   0 ); TEST((ffval.Node)); }
 2117 #line 2118 "y.tab.c"
 2118     break;
 2119 
 2120   case 27: /* bits: bits '[' expr ',' expr ',' expr ',' expr ']'  */
 2121 #line 384 "eval.y"
 2122                 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),   0 ); TEST((ffval.Node)); }
 2123 #line 2124 "y.tab.c"
 2124     break;
 2125 
 2126   case 28: /* bits: bits '[' expr ',' expr ',' expr ',' expr ',' expr ']'  */
 2127 #line 386 "eval.y"
 2128                 { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.Node)); }
 2129 #line 2130 "y.tab.c"
 2130     break;
 2131 
 2132   case 29: /* bits: NOT bits  */
 2133 #line 388 "eval.y"
 2134                 { (ffval.Node) = New_Unary( BITSTR, NOT, (ffvsp[0].Node) ); TEST((ffval.Node));     }
 2135 #line 2136 "y.tab.c"
 2136     break;
 2137 
 2138   case 30: /* bits: '(' bits ')'  */
 2139 #line 391 "eval.y"
 2140                 { (ffval.Node) = (ffvsp[-1].Node); }
 2141 #line 2142 "y.tab.c"
 2142     break;
 2143 
 2144   case 31: /* expr: LONG  */
 2145 #line 395 "eval.y"
 2146                 { (ffval.Node) = New_Const( LONG,   &((ffvsp[0].lng)), sizeof(long)   ); TEST((ffval.Node)); }
 2147 #line 2148 "y.tab.c"
 2148     break;
 2149 
 2150   case 32: /* expr: DOUBLE  */
 2151 #line 397 "eval.y"
 2152                 { (ffval.Node) = New_Const( DOUBLE, &((ffvsp[0].dbl)), sizeof(double) ); TEST((ffval.Node)); }
 2153 #line 2154 "y.tab.c"
 2154     break;
 2155 
 2156   case 33: /* expr: COLUMN  */
 2157 #line 399 "eval.y"
 2158                 { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); }
 2159 #line 2160 "y.tab.c"
 2160     break;
 2161 
 2162   case 34: /* expr: COLUMN '{' expr '}'  */
 2163 #line 401 "eval.y"
 2164                 {
 2165                   if( TYPE((ffvsp[-1].Node)) != LONG
 2166               || OPER((ffvsp[-1].Node)) != CONST_OP ) {
 2167              fferror("Offset argument must be a constant integer");
 2168              FFERROR;
 2169           }
 2170                   (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ); TEST((ffval.Node));
 2171                 }
 2172 #line 2173 "y.tab.c"
 2173     break;
 2174 
 2175   case 35: /* expr: ROWREF  */
 2176 #line 410 "eval.y"
 2177                 { (ffval.Node) = New_Func( LONG, row_fct,  0, 0, 0, 0, 0, 0, 0, 0 ); }
 2178 #line 2179 "y.tab.c"
 2179     break;
 2180 
 2181   case 36: /* expr: NULLREF  */
 2182 #line 412 "eval.y"
 2183                 { (ffval.Node) = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); }
 2184 #line 2185 "y.tab.c"
 2185     break;
 2186 
 2187   case 37: /* expr: expr '%' expr  */
 2188 #line 414 "eval.y"
 2189                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '%', (ffvsp[0].Node) );
 2190           TEST((ffval.Node));                                                }
 2191 #line 2192 "y.tab.c"
 2192     break;
 2193 
 2194   case 38: /* expr: expr '+' expr  */
 2195 #line 417 "eval.y"
 2196                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '+', (ffvsp[0].Node) );
 2197           TEST((ffval.Node));                                                }
 2198 #line 2199 "y.tab.c"
 2199     break;
 2200 
 2201   case 39: /* expr: expr '-' expr  */
 2202 #line 420 "eval.y"
 2203                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '-', (ffvsp[0].Node) ); 
 2204           TEST((ffval.Node));                                                }
 2205 #line 2206 "y.tab.c"
 2206     break;
 2207 
 2208   case 40: /* expr: expr '*' expr  */
 2209 #line 423 "eval.y"
 2210                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '*', (ffvsp[0].Node) ); 
 2211           TEST((ffval.Node));                                                }
 2212 #line 2213 "y.tab.c"
 2213     break;
 2214 
 2215   case 41: /* expr: expr '/' expr  */
 2216 #line 426 "eval.y"
 2217                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '/', (ffvsp[0].Node) ); 
 2218           TEST((ffval.Node));                                                }
 2219 #line 2220 "y.tab.c"
 2220     break;
 2221 
 2222   case 42: /* expr: expr '&' expr  */
 2223 #line 429 "eval.y"
 2224                 { 
 2225                    if (TYPE((ffvsp[-2].Node)) != LONG ||
 2226                TYPE((ffvsp[0].Node)) != LONG) {
 2227                      fferror("Bitwise operations with incompatible types; only (bit OP bit) and (int OP int) are allowed");
 2228                       FFERROR;
 2229                    }
 2230                    (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '&', (ffvsp[0].Node) );
 2231                 }
 2232 #line 2233 "y.tab.c"
 2233     break;
 2234 
 2235   case 43: /* expr: expr '|' expr  */
 2236 #line 438 "eval.y"
 2237                 { 
 2238                    if (TYPE((ffvsp[-2].Node)) != LONG ||
 2239                TYPE((ffvsp[0].Node)) != LONG) {
 2240                      fferror("Bitwise operations with incompatible types; only (bit OP bit) and (int OP int) are allowed");
 2241                       FFERROR;
 2242                    }
 2243                    (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '|', (ffvsp[0].Node) );
 2244                 }
 2245 #line 2246 "y.tab.c"
 2246     break;
 2247 
 2248   case 44: /* expr: expr XOR expr  */
 2249 #line 447 "eval.y"
 2250                 { 
 2251                    if (TYPE((ffvsp[-2].Node)) != LONG ||
 2252                TYPE((ffvsp[0].Node)) != LONG) {
 2253                      fferror("Bitwise operations with incompatible types; only (bit OP bit) and (int OP int) are allowed");
 2254                       FFERROR;
 2255                    }
 2256                    (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '^', (ffvsp[0].Node) );
 2257                 }
 2258 #line 2259 "y.tab.c"
 2259     break;
 2260 
 2261   case 45: /* expr: expr POWER expr  */
 2262 #line 456 "eval.y"
 2263                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), POWER, (ffvsp[0].Node) );
 2264           TEST((ffval.Node));                                                }
 2265 #line 2266 "y.tab.c"
 2266     break;
 2267 
 2268   case 46: /* expr: '+' expr  */
 2269 #line 459 "eval.y"
 2270                 { (ffval.Node) = (ffvsp[0].Node); }
 2271 #line 2272 "y.tab.c"
 2272     break;
 2273 
 2274   case 47: /* expr: '-' expr  */
 2275 #line 461 "eval.y"
 2276                 { (ffval.Node) = New_Unary( TYPE((ffvsp[0].Node)), UMINUS, (ffvsp[0].Node) ); TEST((ffval.Node)); }
 2277 #line 2278 "y.tab.c"
 2278     break;
 2279 
 2280   case 48: /* expr: '(' expr ')'  */
 2281 #line 463 "eval.y"
 2282                 { (ffval.Node) = (ffvsp[-1].Node); }
 2283 #line 2284 "y.tab.c"
 2284     break;
 2285 
 2286   case 49: /* expr: expr '*' bexpr  */
 2287 #line 465 "eval.y"
 2288                 { (ffvsp[0].Node) = New_Unary( TYPE((ffvsp[-2].Node)), 0, (ffvsp[0].Node) );
 2289                   (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '*', (ffvsp[0].Node) ); 
 2290           TEST((ffval.Node));                                }
 2291 #line 2292 "y.tab.c"
 2292     break;
 2293 
 2294   case 50: /* expr: bexpr '*' expr  */
 2295 #line 469 "eval.y"
 2296                 { (ffvsp[-2].Node) = New_Unary( TYPE((ffvsp[0].Node)), 0, (ffvsp[-2].Node) );
 2297                   (ffval.Node) = New_BinOp( TYPE((ffvsp[0].Node)), (ffvsp[-2].Node), '*', (ffvsp[0].Node) );
 2298                   TEST((ffval.Node));                                }
 2299 #line 2300 "y.tab.c"
 2300     break;
 2301 
 2302   case 51: /* expr: bexpr '?' expr ':' expr  */
 2303 #line 473 "eval.y"
 2304                 {
 2305                   PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
 2306                   if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
 2307                      fferror("Incompatible dimensions in '?:' arguments");
 2308              FFERROR;
 2309                   }
 2310                   (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node), (ffvsp[0].Node), (ffvsp[-4].Node),
 2311                                  0, 0, 0, 0 );
 2312                   TEST((ffval.Node));
 2313                   if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) )  Copy_Dims((ffval.Node), (ffvsp[0].Node));
 2314                   TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
 2315                   if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
 2316                      fferror("Incompatible dimensions in '?:' condition");
 2317              FFERROR;
 2318                   }
 2319                   TYPE((ffvsp[-4].Node)) = BOOLEAN;
 2320                   if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-4].Node));
 2321                 }
 2322 #line 2323 "y.tab.c"
 2323     break;
 2324 
 2325   case 52: /* expr: bexpr '?' bexpr ':' expr  */
 2326 #line 492 "eval.y"
 2327                 {
 2328                   PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
 2329                   if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
 2330                      fferror("Incompatible dimensions in '?:' arguments");
 2331              FFERROR;
 2332                   }
 2333                   (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node), (ffvsp[0].Node), (ffvsp[-4].Node),
 2334                                  0, 0, 0, 0 );
 2335                   TEST((ffval.Node));
 2336                   if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) )  Copy_Dims((ffval.Node), (ffvsp[0].Node));
 2337                   TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
 2338                   if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
 2339                      fferror("Incompatible dimensions in '?:' condition");
 2340              FFERROR;
 2341                   }
 2342                   TYPE((ffvsp[-4].Node)) = BOOLEAN;
 2343                   if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-4].Node));
 2344                 }
 2345 #line 2346 "y.tab.c"
 2346     break;
 2347 
 2348   case 53: /* expr: bexpr '?' expr ':' bexpr  */
 2349 #line 511 "eval.y"
 2350                 {
 2351                   PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
 2352                   if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
 2353                      fferror("Incompatible dimensions in '?:' arguments");
 2354              FFERROR;
 2355                   }
 2356                   (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node), (ffvsp[0].Node), (ffvsp[-4].Node),
 2357                                  0, 0, 0, 0 );
 2358                   TEST((ffval.Node));
 2359                   if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) )  Copy_Dims((ffval.Node), (ffvsp[0].Node));
 2360                   TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
 2361                   if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
 2362                      fferror("Incompatible dimensions in '?:' condition");
 2363              FFERROR;
 2364                   }
 2365                   TYPE((ffvsp[-4].Node)) = BOOLEAN;
 2366                   if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-4].Node));
 2367                 }
 2368 #line 2369 "y.tab.c"
 2369     break;
 2370 
 2371   case 54: /* expr: FUNCTION ')'  */
 2372 #line 530 "eval.y"
 2373                 { if (FSTRCMP((ffvsp[-1].str),"RANDOM(") == 0) {  /* Scalar RANDOM() */
 2374                      (ffval.Node) = New_Func( DOUBLE, rnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 );
 2375           } else if (FSTRCMP((ffvsp[-1].str),"RANDOMN(") == 0) {/*Scalar RANDOMN()*/
 2376              (ffval.Node) = New_Func( DOUBLE, gasrnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 );
 2377                   } else {
 2378                      fferror("Function() not supported");
 2379              FFERROR;
 2380           }
 2381                   TEST((ffval.Node)); 
 2382                 }
 2383 #line 2384 "y.tab.c"
 2384     break;
 2385 
 2386   case 55: /* expr: FUNCTION bexpr ')'  */
 2387 #line 541 "eval.y"
 2388                 { if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) {
 2389              (ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2390                   } else if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
 2391                      (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ), sizeof(long) );
 2392                   } else if (FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) {
 2393             long zero = 0;
 2394             (ffval.Node) = New_BinOp( LONG , (ffvsp[-1].Node), ACCUM, New_Const( LONG, &zero, sizeof(zero) ));
 2395           } else {
 2396                      fferror("Function(bool) not supported");
 2397              FFERROR;
 2398           }
 2399                   TEST((ffval.Node)); 
 2400         }
 2401 #line 2402 "y.tab.c"
 2402     break;
 2403 
 2404   case 56: /* expr: FUNCTION sexpr ')'  */
 2405 #line 555 "eval.y"
 2406                 { if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
 2407                      (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ), sizeof(long) );
 2408           } else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) {
 2409              (ffval.Node) = New_Func( LONG, nonnull_fct, 1, (ffvsp[-1].Node),
 2410                     0, 0, 0, 0, 0, 0 );
 2411           } else {
 2412                      fferror("Function(str) not supported");
 2413              FFERROR;
 2414           }
 2415                   TEST((ffval.Node)); 
 2416         }
 2417 #line 2418 "y.tab.c"
 2418     break;
 2419 
 2420   case 57: /* expr: FUNCTION bits ')'  */
 2421 #line 567 "eval.y"
 2422                 { if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
 2423                      (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ), sizeof(long) );
 2424         } else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) { /* Bit arrays do not have NULL */
 2425                      (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ), sizeof(long) );
 2426         } else if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) {
 2427              (ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node),
 2428                     0, 0, 0, 0, 0, 0 );
 2429         } else if (FSTRCMP((ffvsp[-2].str),"MIN(") == 0) {
 2430              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)),  /* Force 1D result */
 2431                     min1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2432              /* Note: $2 is a vector so the result can never
 2433                 be a constant.  Therefore it will never be set
 2434                 inside New_Func(), and it is safe to set SIZE() */
 2435              SIZE((ffval.Node)) = 1;
 2436         } else if (FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) {
 2437             long zero = 0;
 2438             (ffval.Node) = New_BinOp( LONG , (ffvsp[-1].Node), ACCUM, New_Const( LONG, &zero, sizeof(zero) ));
 2439         } else if (FSTRCMP((ffvsp[-2].str),"MAX(") == 0) {
 2440              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)),  /* Force 1D result */
 2441                     max1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2442              /* Note: $2 is a vector so the result can never
 2443                 be a constant.  Therefore it will never be set
 2444                 inside New_Func(), and it is safe to set SIZE() */
 2445              SIZE((ffval.Node)) = 1;
 2446         } else {
 2447                      fferror("Function(bits) not supported");
 2448              FFERROR;
 2449           }
 2450                   TEST((ffval.Node)); 
 2451         }
 2452 #line 2453 "y.tab.c"
 2453     break;
 2454 
 2455   case 58: /* expr: FUNCTION expr ')'  */
 2456 #line 598 "eval.y"
 2457                 { if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0)
 2458              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), sum_fct, 1, (ffvsp[-1].Node),
 2459                     0, 0, 0, 0, 0, 0 );
 2460           else if (FSTRCMP((ffvsp[-2].str),"AVERAGE(") == 0)
 2461              (ffval.Node) = New_Func( DOUBLE, average_fct, 1, (ffvsp[-1].Node),
 2462                     0, 0, 0, 0, 0, 0 );
 2463           else if (FSTRCMP((ffvsp[-2].str),"STDDEV(") == 0)
 2464              (ffval.Node) = New_Func( DOUBLE, stddev_fct, 1, (ffvsp[-1].Node),
 2465                     0, 0, 0, 0, 0, 0 );
 2466           else if (FSTRCMP((ffvsp[-2].str),"MEDIAN(") == 0)
 2467              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), median_fct, 1, (ffvsp[-1].Node),
 2468                     0, 0, 0, 0, 0, 0 );
 2469           else if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0)
 2470                      (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ), sizeof(long) );
 2471           else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0)
 2472              (ffval.Node) = New_Func( LONG, nonnull_fct, 1, (ffvsp[-1].Node),
 2473                     0, 0, 0, 0, 0, 0 );
 2474           else if   ((FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) && (TYPE((ffvsp[-1].Node)) == LONG)) {
 2475             long zero = 0;
 2476             (ffval.Node) = New_BinOp( LONG ,   (ffvsp[-1].Node), ACCUM, New_Const( LONG,   &zero, sizeof(zero) ));
 2477           } else if ((FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) && (TYPE((ffvsp[-1].Node)) == DOUBLE)) {
 2478             double zero = 0;
 2479             (ffval.Node) = New_BinOp( DOUBLE , (ffvsp[-1].Node), ACCUM, New_Const( DOUBLE, &zero, sizeof(zero) ));
 2480           } else if ((FSTRCMP((ffvsp[-2].str),"SEQDIFF(") == 0) && (TYPE((ffvsp[-1].Node)) == LONG)) {
 2481             long zero = 0;
 2482             (ffval.Node) = New_BinOp( LONG ,   (ffvsp[-1].Node), DIFF, New_Const( LONG,   &zero, sizeof(zero) ));
 2483           } else if ((FSTRCMP((ffvsp[-2].str),"SEQDIFF(") == 0) && (TYPE((ffvsp[-1].Node)) == DOUBLE)) {
 2484             double zero = 0;
 2485             (ffval.Node) = New_BinOp( DOUBLE , (ffvsp[-1].Node), DIFF, New_Const( DOUBLE, &zero, sizeof(zero) ));
 2486           } else if (FSTRCMP((ffvsp[-2].str),"ABS(") == 0)
 2487              (ffval.Node) = New_Func( 0, abs_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2488           else if (FSTRCMP((ffvsp[-2].str),"MIN(") == 0)
 2489              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)),  /* Force 1D result */
 2490                     min1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2491           else if (FSTRCMP((ffvsp[-2].str),"MAX(") == 0)
 2492              (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)),  /* Force 1D result */
 2493                     max1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2494           else if (FSTRCMP((ffvsp[-2].str),"RANDOM(") == 0) { /* Vector RANDOM() */
 2495                      (ffval.Node) = New_Func( 0, rnd_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2496              TEST((ffval.Node));
 2497              TYPE((ffval.Node)) = DOUBLE;
 2498           } else if (FSTRCMP((ffvsp[-2].str),"RANDOMN(") == 0) {
 2499              (ffval.Node) = New_Func( 0, gasrnd_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2500              TEST((ffval.Node));
 2501              TYPE((ffval.Node)) = DOUBLE;
 2502                   } 
 2503           else {  /*  These all take DOUBLE arguments  */
 2504              if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_Unary( DOUBLE, 0, (ffvsp[-1].Node) );
 2505                      if (FSTRCMP((ffvsp[-2].str),"SIN(") == 0)
 2506             (ffval.Node) = New_Func( 0, sin_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2507              else if (FSTRCMP((ffvsp[-2].str),"COS(") == 0)
 2508             (ffval.Node) = New_Func( 0, cos_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2509              else if (FSTRCMP((ffvsp[-2].str),"TAN(") == 0)
 2510             (ffval.Node) = New_Func( 0, tan_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2511              else if (FSTRCMP((ffvsp[-2].str),"ARCSIN(") == 0
 2512                   || FSTRCMP((ffvsp[-2].str),"ASIN(") == 0)
 2513             (ffval.Node) = New_Func( 0, asin_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2514              else if (FSTRCMP((ffvsp[-2].str),"ARCCOS(") == 0
 2515                   || FSTRCMP((ffvsp[-2].str),"ACOS(") == 0)
 2516             (ffval.Node) = New_Func( 0, acos_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2517              else if (FSTRCMP((ffvsp[-2].str),"ARCTAN(") == 0
 2518                   || FSTRCMP((ffvsp[-2].str),"ATAN(") == 0)
 2519             (ffval.Node) = New_Func( 0, atan_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2520              else if (FSTRCMP((ffvsp[-2].str),"SINH(") == 0)
 2521             (ffval.Node) = New_Func( 0, sinh_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2522              else if (FSTRCMP((ffvsp[-2].str),"COSH(") == 0)
 2523             (ffval.Node) = New_Func( 0, cosh_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2524              else if (FSTRCMP((ffvsp[-2].str),"TANH(") == 0)
 2525             (ffval.Node) = New_Func( 0, tanh_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2526              else if (FSTRCMP((ffvsp[-2].str),"EXP(") == 0)
 2527             (ffval.Node) = New_Func( 0, exp_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2528              else if (FSTRCMP((ffvsp[-2].str),"LOG(") == 0)
 2529             (ffval.Node) = New_Func( 0, log_fct,  1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2530              else if (FSTRCMP((ffvsp[-2].str),"LOG10(") == 0)
 2531             (ffval.Node) = New_Func( 0, log10_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2532              else if (FSTRCMP((ffvsp[-2].str),"SQRT(") == 0)
 2533             (ffval.Node) = New_Func( 0, sqrt_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2534              else if (FSTRCMP((ffvsp[-2].str),"ROUND(") == 0)
 2535             (ffval.Node) = New_Func( 0, round_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2536              else if (FSTRCMP((ffvsp[-2].str),"FLOOR(") == 0)
 2537             (ffval.Node) = New_Func( 0, floor_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2538              else if (FSTRCMP((ffvsp[-2].str),"CEIL(") == 0)
 2539             (ffval.Node) = New_Func( 0, ceil_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
 2540              else if (FSTRCMP((ffvsp[-2].str),"RANDOMP(") == 0) {
 2541                (ffval.Node) = New_Func( 0, poirnd_fct, 1, (ffvsp[-1].Node), 
 2542                       0, 0, 0, 0, 0, 0 );
 2543                TYPE((ffval.Node)) = LONG;
 2544              } else {
 2545             fferror("Function(expr) not supported");
 2546             FFERROR;
 2547              }
 2548           }
 2549                   TEST((ffval.Node)); 
 2550                 }
 2551 #line 2552 "y.tab.c"
 2552     break;
 2553 
 2554   case 59: /* expr: IFUNCTION sexpr ',' sexpr ')'  */
 2555 #line 693 "eval.y"
 2556                 { 
 2557           if (FSTRCMP((ffvsp[-4].str),"STRSTR(") == 0) {
 2558             (ffval.Node) = New_Func( LONG, strpos_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 
 2559                    0, 0, 0, 0 );
 2560             TEST((ffval.Node));
 2561           }
 2562                 }
 2563 #line 2564 "y.tab.c"
 2564     break;
 2565 
 2566   case 60: /* expr: FUNCTION expr ',' expr ')'  */
 2567 #line 701 "eval.y"
 2568                 { 
 2569            if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
 2570               if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2571              PROMOTE((ffvsp[-3].Node),(ffvsp[-1].Node));
 2572              (ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0,
 2573                     0, 0, 0, 0 );
 2574              TEST((ffval.Node)); 
 2575               } else {
 2576              fferror("Dimensions of DEFNULL arguments "
 2577                  "are not compatible");
 2578              FFERROR;
 2579               }
 2580            } else if (FSTRCMP((ffvsp[-4].str),"ARCTAN2(") == 0) {
 2581              if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_Unary( DOUBLE, 0, (ffvsp[-3].Node) );
 2582              if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_Unary( DOUBLE, 0, (ffvsp[-1].Node) );
 2583              if( Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2584             (ffval.Node) = New_Func( 0, atan2_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0, 0, 0, 0 );
 2585             TEST((ffval.Node)); 
 2586             if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 2587              } else {
 2588             fferror("Dimensions of arctan2 arguments "
 2589                 "are not compatible");
 2590             FFERROR;
 2591              }
 2592            } else if (FSTRCMP((ffvsp[-4].str),"MIN(") == 0) {
 2593               PROMOTE( (ffvsp[-3].Node), (ffvsp[-1].Node) );
 2594               if( Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2595             (ffval.Node) = New_Func( 0, min2_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0, 0, 0, 0 );
 2596             TEST((ffval.Node));
 2597             if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 2598               } else {
 2599             fferror("Dimensions of min(a,b) arguments "
 2600                 "are not compatible");
 2601             FFERROR;
 2602               }
 2603            } else if (FSTRCMP((ffvsp[-4].str),"MAX(") == 0) {
 2604               PROMOTE( (ffvsp[-3].Node), (ffvsp[-1].Node) );
 2605               if( Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2606             (ffval.Node) = New_Func( 0, max2_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0, 0, 0, 0 );
 2607             TEST((ffval.Node));
 2608             if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 2609               } else {
 2610             fferror("Dimensions of max(a,b) arguments "
 2611                 "are not compatible");
 2612             FFERROR;
 2613               }
 2614            } else if (FSTRCMP((ffvsp[-4].str),"SETNULL(") == 0) {
 2615              if (OPER((ffvsp[-3].Node)) != CONST_OP
 2616              || SIZE((ffvsp[-3].Node)) != 1) {
 2617                fferror("SETNULL first argument must be a scalar constant");
 2618                FFERROR;
 2619              }
 2620              /* Make sure first arg is same type as second arg */
 2621              if ( TYPE((ffvsp[-3].Node)) != TYPE((ffvsp[-1].Node)) ) (ffvsp[-3].Node) = New_Unary( TYPE((ffvsp[-1].Node)), 0, (ffvsp[-3].Node) );
 2622              (ffval.Node) = New_Func( 0, setnull_fct, 2, (ffvsp[-1].Node), (ffvsp[-3].Node), 0, 0, 0, 0, 0 );
 2623            } else {
 2624               fferror("Function(expr,expr) not supported");
 2625               FFERROR;
 2626            }
 2627                 }
 2628 #line 2629 "y.tab.c"
 2629     break;
 2630 
 2631   case 61: /* expr: FUNCTION expr ',' expr ',' expr ',' expr ')'  */
 2632 #line 762 "eval.y"
 2633                 { 
 2634           if (FSTRCMP((ffvsp[-8].str),"ANGSEP(") == 0) {
 2635             if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_Unary( DOUBLE, 0, (ffvsp[-7].Node) );
 2636             if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_Unary( DOUBLE, 0, (ffvsp[-5].Node) );
 2637             if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_Unary( DOUBLE, 0, (ffvsp[-3].Node) );
 2638             if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_Unary( DOUBLE, 0, (ffvsp[-1].Node) );
 2639             if( Test_Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && 
 2640             Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2641               (ffval.Node) = New_Func( 0, angsep_fct, 4, (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),0,0,0 );
 2642               TEST((ffval.Node)); 
 2643               if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-5].Node));
 2644               if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-3].Node));
 2645               if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 2646             } else {
 2647               fferror("Dimensions of ANGSEP arguments "
 2648                   "are not compatible");
 2649               FFERROR;
 2650             }
 2651            } else {
 2652               fferror("Function(expr,expr,expr,expr) not supported");
 2653               FFERROR;
 2654            }
 2655                 }
 2656 #line 2657 "y.tab.c"
 2657     break;
 2658 
 2659   case 62: /* expr: expr '[' expr ']'  */
 2660 #line 786 "eval.y"
 2661                 { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node),  0,  0,  0,   0 ); TEST((ffval.Node)); }
 2662 #line 2663 "y.tab.c"
 2663     break;
 2664 
 2665   case 63: /* expr: expr '[' expr ',' expr ']'  */
 2666 #line 788 "eval.y"
 2667                 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1].Node),  0,  0,   0 ); TEST((ffval.Node)); }
 2668 #line 2669 "y.tab.c"
 2669     break;
 2670 
 2671   case 64: /* expr: expr '[' expr ',' expr ',' expr ']'  */
 2672 #line 790 "eval.y"
 2673                 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),  0,   0 ); TEST((ffval.Node)); }
 2674 #line 2675 "y.tab.c"
 2675     break;
 2676 
 2677   case 65: /* expr: expr '[' expr ',' expr ',' expr ',' expr ']'  */
 2678 #line 792 "eval.y"
 2679                 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),   0 ); TEST((ffval.Node)); }
 2680 #line 2681 "y.tab.c"
 2681     break;
 2682 
 2683   case 66: /* expr: expr '[' expr ',' expr ',' expr ',' expr ',' expr ']'  */
 2684 #line 794 "eval.y"
 2685                 { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.Node)); }
 2686 #line 2687 "y.tab.c"
 2687     break;
 2688 
 2689   case 67: /* expr: INTCAST expr  */
 2690 #line 796 "eval.y"
 2691                 { (ffval.Node) = New_Unary( LONG,   INTCAST, (ffvsp[0].Node) );  TEST((ffval.Node));  }
 2692 #line 2693 "y.tab.c"
 2693     break;
 2694 
 2695   case 68: /* expr: INTCAST bexpr  */
 2696 #line 798 "eval.y"
 2697                 { (ffval.Node) = New_Unary( LONG,   INTCAST, (ffvsp[0].Node) );  TEST((ffval.Node));  }
 2698 #line 2699 "y.tab.c"
 2699     break;
 2700 
 2701   case 69: /* expr: FLTCAST expr  */
 2702 #line 800 "eval.y"
 2703                 { (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) );  TEST((ffval.Node));  }
 2704 #line 2705 "y.tab.c"
 2705     break;
 2706 
 2707   case 70: /* expr: FLTCAST bexpr  */
 2708 #line 802 "eval.y"
 2709                 { (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) );  TEST((ffval.Node));  }
 2710 #line 2711 "y.tab.c"
 2711     break;
 2712 
 2713   case 71: /* bexpr: BOOLEAN  */
 2714 #line 806 "eval.y"
 2715                 { (ffval.Node) = New_Const( BOOLEAN, &((ffvsp[0].log)), sizeof(char) ); TEST((ffval.Node)); }
 2716 #line 2717 "y.tab.c"
 2717     break;
 2718 
 2719   case 72: /* bexpr: BCOLUMN  */
 2720 #line 808 "eval.y"
 2721                 { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); }
 2722 #line 2723 "y.tab.c"
 2723     break;
 2724 
 2725   case 73: /* bexpr: BCOLUMN '{' expr '}'  */
 2726 #line 810 "eval.y"
 2727                 {
 2728                   if( TYPE((ffvsp[-1].Node)) != LONG
 2729               || OPER((ffvsp[-1].Node)) != CONST_OP ) {
 2730              fferror("Offset argument must be a constant integer");
 2731              FFERROR;
 2732           }
 2733                   (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ); TEST((ffval.Node));
 2734                 }
 2735 #line 2736 "y.tab.c"
 2736     break;
 2737 
 2738   case 74: /* bexpr: bits EQ bits  */
 2739 #line 819 "eval.y"
 2740                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ,  (ffvsp[0].Node) ); TEST((ffval.Node));
 2741           SIZE((ffval.Node)) = 1;                                     }
 2742 #line 2743 "y.tab.c"
 2743     break;
 2744 
 2745   case 75: /* bexpr: bits NE bits  */
 2746 #line 822 "eval.y"
 2747                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE,  (ffvsp[0].Node) ); TEST((ffval.Node)); 
 2748           SIZE((ffval.Node)) = 1;                                     }
 2749 #line 2750 "y.tab.c"
 2750     break;
 2751 
 2752   case 76: /* bexpr: bits LT bits  */
 2753 #line 825 "eval.y"
 2754                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT,  (ffvsp[0].Node) ); TEST((ffval.Node)); 
 2755           SIZE((ffval.Node)) = 1;                                     }
 2756 #line 2757 "y.tab.c"
 2757     break;
 2758 
 2759   case 77: /* bexpr: bits LTE bits  */
 2760 #line 828 "eval.y"
 2761                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) ); TEST((ffval.Node)); 
 2762           SIZE((ffval.Node)) = 1;                                     }
 2763 #line 2764 "y.tab.c"
 2764     break;
 2765 
 2766   case 78: /* bexpr: bits GT bits  */
 2767 #line 831 "eval.y"
 2768                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT,  (ffvsp[0].Node) ); TEST((ffval.Node)); 
 2769           SIZE((ffval.Node)) = 1;                                     }
 2770 #line 2771 "y.tab.c"
 2771     break;
 2772 
 2773   case 79: /* bexpr: bits GTE bits  */
 2774 #line 834 "eval.y"
 2775                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) ); TEST((ffval.Node)); 
 2776           SIZE((ffval.Node)) = 1;                                     }
 2777 #line 2778 "y.tab.c"
 2778     break;
 2779 
 2780   case 80: /* bexpr: expr GT expr  */
 2781 #line 837 "eval.y"
 2782                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT,  (ffvsp[0].Node) );
 2783                   TEST((ffval.Node));                                               }
 2784 #line 2785 "y.tab.c"
 2785     break;
 2786 
 2787   case 81: /* bexpr: expr LT expr  */
 2788 #line 840 "eval.y"
 2789                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT,  (ffvsp[0].Node) );
 2790                   TEST((ffval.Node));                                               }
 2791 #line 2792 "y.tab.c"
 2792     break;
 2793 
 2794   case 82: /* bexpr: expr GTE expr  */
 2795 #line 843 "eval.y"
 2796                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) );
 2797                   TEST((ffval.Node));                                               }
 2798 #line 2799 "y.tab.c"
 2799     break;
 2800 
 2801   case 83: /* bexpr: expr LTE expr  */
 2802 #line 846 "eval.y"
 2803                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) );
 2804                   TEST((ffval.Node));                                               }
 2805 #line 2806 "y.tab.c"
 2806     break;
 2807 
 2808   case 84: /* bexpr: expr '~' expr  */
 2809 #line 849 "eval.y"
 2810                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), '~', (ffvsp[0].Node) );
 2811                   TEST((ffval.Node));                                               }
 2812 #line 2813 "y.tab.c"
 2813     break;
 2814 
 2815   case 85: /* bexpr: expr EQ expr  */
 2816 #line 852 "eval.y"
 2817                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ,  (ffvsp[0].Node) );
 2818                   TEST((ffval.Node));                                               }
 2819 #line 2820 "y.tab.c"
 2820     break;
 2821 
 2822   case 86: /* bexpr: expr NE expr  */
 2823 #line 855 "eval.y"
 2824                 { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE,  (ffvsp[0].Node) );
 2825                   TEST((ffval.Node));                                               }
 2826 #line 2827 "y.tab.c"
 2827     break;
 2828 
 2829   case 87: /* bexpr: sexpr EQ sexpr  */
 2830 #line 858 "eval.y"
 2831                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ,  (ffvsp[0].Node) ); TEST((ffval.Node));
 2832                   SIZE((ffval.Node)) = 1; }
 2833 #line 2834 "y.tab.c"
 2834     break;
 2835 
 2836   case 88: /* bexpr: sexpr NE sexpr  */
 2837 #line 861 "eval.y"
 2838                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE,  (ffvsp[0].Node) ); TEST((ffval.Node));
 2839                   SIZE((ffval.Node)) = 1; }
 2840 #line 2841 "y.tab.c"
 2841     break;
 2842 
 2843   case 89: /* bexpr: sexpr GT sexpr  */
 2844 #line 864 "eval.y"
 2845                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT,  (ffvsp[0].Node) ); TEST((ffval.Node));
 2846                   SIZE((ffval.Node)) = 1; }
 2847 #line 2848 "y.tab.c"
 2848     break;
 2849 
 2850   case 90: /* bexpr: sexpr GTE sexpr  */
 2851 #line 867 "eval.y"
 2852                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) ); TEST((ffval.Node));
 2853                   SIZE((ffval.Node)) = 1; }
 2854 #line 2855 "y.tab.c"
 2855     break;
 2856 
 2857   case 91: /* bexpr: sexpr LT sexpr  */
 2858 #line 870 "eval.y"
 2859                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT,  (ffvsp[0].Node) ); TEST((ffval.Node));
 2860                   SIZE((ffval.Node)) = 1; }
 2861 #line 2862 "y.tab.c"
 2862     break;
 2863 
 2864   case 92: /* bexpr: sexpr LTE sexpr  */
 2865 #line 873 "eval.y"
 2866                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) ); TEST((ffval.Node));
 2867                   SIZE((ffval.Node)) = 1; }
 2868 #line 2869 "y.tab.c"
 2869     break;
 2870 
 2871   case 93: /* bexpr: bexpr AND bexpr  */
 2872 #line 876 "eval.y"
 2873                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffvsp[0].Node) ); TEST((ffval.Node)); }
 2874 #line 2875 "y.tab.c"
 2875     break;
 2876 
 2877   case 94: /* bexpr: bexpr OR bexpr  */
 2878 #line 878 "eval.y"
 2879                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), OR,  (ffvsp[0].Node) ); TEST((ffval.Node)); }
 2880 #line 2881 "y.tab.c"
 2881     break;
 2882 
 2883   case 95: /* bexpr: bexpr EQ bexpr  */
 2884 #line 880 "eval.y"
 2885                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ,  (ffvsp[0].Node) ); TEST((ffval.Node)); }
 2886 #line 2887 "y.tab.c"
 2887     break;
 2888 
 2889   case 96: /* bexpr: bexpr NE bexpr  */
 2890 #line 882 "eval.y"
 2891                 { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE,  (ffvsp[0].Node) ); TEST((ffval.Node)); }
 2892 #line 2893 "y.tab.c"
 2893     break;
 2894 
 2895   case 97: /* bexpr: expr '=' expr ':' expr  */
 2896 #line 885 "eval.y"
 2897                 { PROMOTE((ffvsp[-4].Node),(ffvsp[-2].Node)); PROMOTE((ffvsp[-4].Node),(ffvsp[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
 2898           (ffvsp[-2].Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[-4].Node) );
 2899                   (ffvsp[0].Node) = New_BinOp( BOOLEAN, (ffvsp[-4].Node), LTE, (ffvsp[0].Node) );
 2900                   (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffvsp[0].Node) );
 2901                   TEST((ffval.Node));                                         }
 2902 #line 2903 "y.tab.c"
 2903     break;
 2904 
 2905   case 98: /* bexpr: bexpr '?' bexpr ':' bexpr  */
 2906 #line 892 "eval.y"
 2907                 {
 2908                   if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
 2909                      fferror("Incompatible dimensions in '?:' arguments");
 2910              FFERROR;
 2911                   }
 2912                   (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node), (ffvsp[0].Node), (ffvsp[-4].Node),
 2913                                  0, 0, 0, 0 );
 2914                   TEST((ffval.Node));
 2915                   if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) )  Copy_Dims((ffval.Node), (ffvsp[0].Node));
 2916                   if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
 2917                      fferror("Incompatible dimensions in '?:' condition");
 2918              FFERROR;
 2919                   }
 2920                   if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-4].Node));
 2921                 }
 2922 #line 2923 "y.tab.c"
 2923     break;
 2924 
 2925   case 99: /* bexpr: BFUNCTION expr ')'  */
 2926 #line 909 "eval.y"
 2927                 {
 2928            if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
 2929               (ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node), 0, 0,
 2930                      0, 0, 0, 0 );
 2931               TEST((ffval.Node)); 
 2932                       /* Use expression's size, but return BOOLEAN */
 2933               TYPE((ffval.Node)) = BOOLEAN;
 2934            } else {
 2935               fferror("Boolean Function(expr) not supported");
 2936               FFERROR;
 2937            }
 2938         }
 2939 #line 2940 "y.tab.c"
 2940     break;
 2941 
 2942   case 100: /* bexpr: BFUNCTION bexpr ')'  */
 2943 #line 922 "eval.y"
 2944                 {
 2945            if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
 2946               (ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node), 0, 0,
 2947                      0, 0, 0, 0 );
 2948               TEST((ffval.Node)); 
 2949                       /* Use expression's size, but return BOOLEAN */
 2950               TYPE((ffval.Node)) = BOOLEAN;
 2951            } else {
 2952               fferror("Boolean Function(expr) not supported");
 2953               FFERROR;
 2954            }
 2955         }
 2956 #line 2957 "y.tab.c"
 2957     break;
 2958 
 2959   case 101: /* bexpr: BFUNCTION sexpr ')'  */
 2960 #line 935 "eval.y"
 2961                 {
 2962            if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
 2963               (ffval.Node) = New_Func( BOOLEAN, isnull_fct, 1, (ffvsp[-1].Node), 0, 0,
 2964                      0, 0, 0, 0 );
 2965               TEST((ffval.Node)); 
 2966            } else {
 2967               fferror("Boolean Function(expr) not supported");
 2968               FFERROR;
 2969            }
 2970         }
 2971 #line 2972 "y.tab.c"
 2972     break;
 2973 
 2974   case 102: /* bexpr: FUNCTION bexpr ',' bexpr ')'  */
 2975 #line 946 "eval.y"
 2976                 {
 2977            if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
 2978               if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
 2979              (ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0,
 2980                     0, 0, 0, 0 );
 2981              TEST((ffval.Node)); 
 2982               } else {
 2983              fferror("Dimensions of DEFNULL arguments are not compatible");
 2984              FFERROR;
 2985               }
 2986            } else {
 2987               fferror("Boolean Function(expr,expr) not supported");
 2988               FFERROR;
 2989            }
 2990         }
 2991 #line 2992 "y.tab.c"
 2992     break;
 2993 
 2994   case 103: /* bexpr: BFUNCTION expr ',' expr ',' expr ')'  */
 2995 #line 962 "eval.y"
 2996                 {
 2997            if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_Unary( DOUBLE, 0, (ffvsp[-5].Node) );
 2998            if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_Unary( DOUBLE, 0, (ffvsp[-3].Node) );
 2999            if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_Unary( DOUBLE, 0, (ffvsp[-1].Node) );
 3000            if( ! (Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) {
 3001                fferror("Dimensions of NEAR arguments "
 3002                    "are not compatible");
 3003                FFERROR;
 3004            } else {
 3005              if (FSTRCMP((ffvsp[-6].str),"NEAR(") == 0) {
 3006                (ffval.Node) = New_Func( BOOLEAN, near_fct, 3, (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),
 3007                       0, 0, 0, 0 );
 3008              } else {
 3009                fferror("Boolean Function not supported");
 3010                FFERROR;
 3011              }
 3012              TEST((ffval.Node)); 
 3013 
 3014              if( SIZE((ffval.Node))<SIZE((ffvsp[-5].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-5].Node));
 3015              if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-3].Node));
 3016              if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 3017            }
 3018         }
 3019 #line 3020 "y.tab.c"
 3020     break;
 3021 
 3022   case 104: /* bexpr: BFUNCTION expr ',' expr ',' expr ',' expr ',' expr ')'  */
 3023 #line 986 "eval.y"
 3024                 {
 3025            if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_Unary( DOUBLE, 0, (ffvsp[-9].Node) );
 3026            if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_Unary( DOUBLE, 0, (ffvsp[-7].Node) );
 3027            if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_Unary( DOUBLE, 0, (ffvsp[-5].Node) );
 3028            if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_Unary( DOUBLE, 0, (ffvsp[-3].Node) );
 3029            if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Unary( DOUBLE, 0, (ffvsp[-1].Node));
 3030            if( ! (Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test_Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && 
 3031               Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) )) ) {
 3032              fferror("Dimensions of CIRCLE arguments "
 3033                  "are not compatible");
 3034              FFERROR;
 3035            } else {
 3036              if (FSTRCMP((ffvsp[-10].str),"CIRCLE(") == 0) {
 3037                (ffval.Node) = New_Func( BOOLEAN, circle_fct, 5, (ffvsp[-9].Node), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node),
 3038                       (ffvsp[-1].Node), 0, 0 );
 3039              } else {
 3040                fferror("Boolean Function not supported");
 3041                FFERROR;
 3042              }
 3043              TEST((ffval.Node)); 
 3044              if( SIZE((ffval.Node))<SIZE((ffvsp[-9].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-9].Node));
 3045              if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-7].Node));
 3046              if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-5].Node));
 3047              if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-3].Node));
 3048              if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 3049            }
 3050         }
 3051 #line 3052 "y.tab.c"
 3052     break;
 3053 
 3054   case 105: /* bexpr: BFUNCTION expr ',' expr ',' expr ',' expr ',' expr ',' expr ',' expr ')'  */
 3055 #line 1014 "eval.y"
 3056                 {
 3057            if( TYPE((ffvsp[-13].Node)) != DOUBLE ) (ffvsp[-13].Node) = New_Unary( DOUBLE, 0, (ffvsp[-13].Node) );
 3058            if( TYPE((ffvsp[-11].Node)) != DOUBLE ) (ffvsp[-11].Node) = New_Unary( DOUBLE, 0, (ffvsp[-11].Node) );
 3059            if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_Unary( DOUBLE, 0, (ffvsp[-9].Node) );
 3060            if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_Unary( DOUBLE, 0, (ffvsp[-7].Node) );
 3061            if( TYPE((ffvsp[-5].Node))!= DOUBLE ) (ffvsp[-5].Node)= New_Unary( DOUBLE, 0, (ffvsp[-5].Node));
 3062            if( TYPE((ffvsp[-3].Node))!= DOUBLE ) (ffvsp[-3].Node)= New_Unary( DOUBLE, 0, (ffvsp[-3].Node));
 3063            if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Unary( DOUBLE, 0, (ffvsp[-1].Node));
 3064            if( ! (Test_Dims( (ffvsp[-13].Node), (ffvsp[-11].Node) ) && Test_Dims( (ffvsp[-11].Node), (ffvsp[-9].Node) ) && 
 3065               Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test_Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) &&
 3066               Test_Dims((ffvsp[-5].Node),(ffvsp[-3].Node) ) && Test_Dims((ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) {
 3067              fferror("Dimensions of BOX or ELLIPSE arguments "
 3068                  "are not compatible");
 3069              FFERROR;
 3070            } else {
 3071              if (FSTRCMP((ffvsp[-14].str),"BOX(") == 0) {
 3072                (ffval.Node) = New_Func( BOOLEAN, box_fct, 7, (ffvsp[-13].Node), (ffvsp[-11].Node), (ffvsp[-9].Node), (ffvsp[-7].Node),
 3073                       (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) );
 3074              } else if (FSTRCMP((ffvsp[-14].str),"ELLIPSE(") == 0) {
 3075                (ffval.Node) = New_Func( BOOLEAN, elps_fct, 7, (ffvsp[-13].Node), (ffvsp[-11].Node), (ffvsp[-9].Node), (ffvsp[-7].Node),
 3076                       (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) );
 3077              } else {
 3078                fferror("SAO Image Function not supported");
 3079                FFERROR;
 3080              }
 3081              TEST((ffval.Node)); 
 3082              if( SIZE((ffval.Node))<SIZE((ffvsp[-13].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-13].Node));
 3083              if( SIZE((ffvsp[-13].Node))<SIZE((ffvsp[-11].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-11].Node));
 3084              if( SIZE((ffvsp[-11].Node))<SIZE((ffvsp[-9].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-9].Node));
 3085              if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) )  Copy_Dims((ffval.Node), (ffvsp[-7].Node));
 3086              if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-5].Node));
 3087              if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-3].Node));
 3088              if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dims((ffval.Node), (ffvsp[-1].Node));
 3089            }
 3090         }
 3091 #line 3092 "y.tab.c"
 3092     break;
 3093 
 3094   case 106: /* bexpr: GTIFILTER ')'  */
 3095 #line 1051 "eval.y"
 3096                 { /* Use defaults for all elements */
 3097            (ffval.Node) = New_GTI(gtifilt_fct,  "", -99, -99, "*START*", "*STOP*" );
 3098                    TEST((ffval.Node));                                        }
 3099 #line 3100 "y.tab.c"
 3100     break;
 3101 
 3102   case 107: /* bexpr: GTIFILTER STRING ')'  */
 3103 #line 1055 "eval.y"
 3104                 { /* Use defaults for all except filename */
 3105           (ffval.Node) = New_GTI(gtifilt_fct,  (ffvsp[-1].str), -99, -99, "*START*", "*STOP*" );
 3106                    TEST((ffval.Node));                                        }
 3107 #line 3108 "y.tab.c"
 3108     break;
 3109 
 3110   case 108: /* bexpr: GTIFILTER STRING ',' expr ')'  */
 3111 #line 1059 "eval.y"
 3112                 {  (ffval.Node) = New_GTI(gtifilt_fct,  (ffvsp[-3].str), (ffvsp[-1].Node), -99, "*START*", "*STOP*" );
 3113                    TEST((ffval.Node));                                        }
 3114 #line 3115 "y.tab.c"
 3115     break;
 3116 
 3117   case 109: /* bexpr: GTIFILTER STRING ',' expr ',' STRING ',' STRING ')'  */
 3118 #line 1062 "eval.y"
 3119                 {  (ffval.Node) = New_GTI(gtifilt_fct,  (ffvsp[-7].str), (ffvsp[-5].Node), -99, (ffvsp[-3].str), (ffvsp[-1].str) );
 3120                    TEST((ffval.Node));                                        }
 3121 #line 3122 "y.tab.c"
 3122     break;
 3123 
 3124   case 110: /* bexpr: GTIOVERLAP STRING ',' expr ',' expr ')'  */
 3125 #line 1067 "eval.y"
 3126                 {  (ffval.Node) = New_GTI(gtiover_fct,  (ffvsp[-5].str), (ffvsp[-3].Node), (ffvsp[-1].Node), "*START*", "*STOP*");
 3127                    TEST((ffval.Node));                                        }
 3128 #line 3129 "y.tab.c"
 3129     break;
 3130 
 3131   case 111: /* bexpr: GTIOVERLAP STRING ',' expr ',' expr ',' STRING ',' STRING ')'  */
 3132 #line 1070 "eval.y"
 3133                 {  (ffval.Node) = New_GTI(gtiover_fct,  (ffvsp[-9].str), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].str), (ffvsp[-1].str) );
 3134                    TEST((ffval.Node));                                        }
 3135 #line 3136 "y.tab.c"
 3136     break;
 3137 
 3138   case 112: /* bexpr: REGFILTER STRING ')'  */
 3139 #line 1075 "eval.y"
 3140                 { /* Use defaults for all except filename */
 3141                    (ffval.Node) = New_REG( (ffvsp[-1].str), -99, -99, "" );
 3142                    TEST((ffval.Node));                                        }
 3143 #line 3144 "y.tab.c"
 3144     break;
 3145 
 3146   case 113: /* bexpr: REGFILTER STRING ',' expr ',' expr ')'  */
 3147 #line 1079 "eval.y"
 3148                 {  (ffval.Node) = New_REG( (ffvsp[-5].str), (ffvsp[-3].Node), (ffvsp[-1].Node), "" );
 3149                    TEST((ffval.Node));                                        }
 3150 #line 3151 "y.tab.c"
 3151     break;
 3152 
 3153   case 114: /* bexpr: REGFILTER STRING ',' expr ',' expr ',' STRING ')'  */
 3154 #line 1082 "eval.y"
 3155                 {  (ffval.Node) = New_REG( (ffvsp[-7].str), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].str) );
 3156                    TEST((ffval.Node));                                        }
 3157 #line 3158 "y.tab.c"
 3158     break;
 3159 
 3160   case 115: /* bexpr: bexpr '[' expr ']'  */
 3161 #line 1086 "eval.y"
 3162                 { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node),  0,  0,  0,   0 ); TEST((ffval.Node)); }
 3163 #line 3164 "y.tab.c"
 3164     break;
 3165 
 3166   case 116: /* bexpr: bexpr '[' expr ',' expr ']'  */
 3167 #line 1088 "eval.y"
 3168                 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1].Node),  0,  0,   0 ); TEST((ffval.Node)); }
 3169 #line 3170 "y.tab.c"
 3170     break;
 3171 
 3172   case 117: /* bexpr: bexpr '[' expr ',' expr ',' expr ']'  */
 3173 #line 1090 "eval.y"
 3174                 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),  0,   0 ); TEST((ffval.Node)); }
 3175 #line 3176 "y.tab.c"
 3176     break;
 3177 
 3178   case 118: /* bexpr: bexpr '[' expr ',' expr ',' expr ',' expr ']'  */
 3179 #line 1092 "eval.y"
 3180                 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),   0 ); TEST((ffval.Node)); }
 3181 #line 3182 "y.tab.c"
 3182     break;
 3183 
 3184   case 119: /* bexpr: bexpr '[' expr ',' expr ',' expr ',' expr ',' expr ']'  */
 3185 #line 1094 "eval.y"
 3186                 { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.Node)); }
 3187 #line 3188 "y.tab.c"
 3188     break;
 3189 
 3190   case 120: /* bexpr: NOT bexpr  */
 3191 #line 1096 "eval.y"
 3192                 { (ffval.Node) = New_Unary( BOOLEAN, NOT, (ffvsp[0].Node) ); TEST((ffval.Node)); }
 3193 #line 3194 "y.tab.c"
 3194     break;
 3195 
 3196   case 121: /* bexpr: '(' bexpr ')'  */
 3197 #line 1098 "eval.y"
 3198                 { (ffval.Node) = (ffvsp[-1].Node); }
 3199 #line 3200 "y.tab.c"
 3200     break;
 3201 
 3202   case 122: /* sexpr: STRING  */
 3203 #line 1102 "eval.y"
 3204                 { (ffval.Node) = New_Const( STRING, (ffvsp[0].str), strlen((ffvsp[0].str))+1 ); TEST((ffval.Node));
 3205                   SIZE((ffval.Node)) = strlen((ffvsp[0].str)); }
 3206 #line 3207 "y.tab.c"
 3207     break;
 3208 
 3209   case 123: /* sexpr: SCOLUMN  */
 3210 #line 1105 "eval.y"
 3211                 { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); }
 3212 #line 3213 "y.tab.c"
 3213     break;
 3214 
 3215   case 124: /* sexpr: SCOLUMN '{' expr '}'  */
 3216 #line 1107 "eval.y"
 3217                 {
 3218                   if( TYPE((ffvsp[-1].Node)) != LONG
 3219               || OPER((ffvsp[-1].Node)) != CONST_OP ) {
 3220              fferror("Offset argument must be a constant integer");
 3221              FFERROR;
 3222           }
 3223                   (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ); TEST((ffval.Node));
 3224                 }
 3225 #line 3226 "y.tab.c"
 3226     break;
 3227 
 3228   case 125: /* sexpr: SNULLREF  */
 3229 #line 1116 "eval.y"
 3230                 { (ffval.Node) = New_Func( STRING, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); }
 3231 #line 3232 "y.tab.c"
 3232     break;
 3233 
 3234   case 126: /* sexpr: '(' sexpr ')'  */
 3235 #line 1118 "eval.y"
 3236                 { (ffval.Node) = (ffvsp[-1].Node); }
 3237 #line 3238 "y.tab.c"
 3238     break;
 3239 
 3240   case 127: /* sexpr: sexpr '+' sexpr  */
 3241 #line 1120 "eval.y"
 3242                 { 
 3243           if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) {
 3244             fferror("Combined string size exceeds " MAX_STRLEN_S " characters");
 3245             FFERROR;
 3246           }
 3247           (ffval.Node) = New_BinOp( STRING, (ffvsp[-2].Node), '+', (ffvsp[0].Node) );  TEST((ffval.Node));
 3248           SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].Node));
 3249         }
 3250 #line 3251 "y.tab.c"
 3251     break;
 3252 
 3253   case 128: /* sexpr: bexpr '?' sexpr ':' sexpr  */
 3254 #line 1129 "eval.y"
 3255                 {
 3256           int outSize;
 3257                   if( SIZE((ffvsp[-4].Node))!=1 ) {
 3258                      fferror("Cannot have a vector string column");
 3259              FFERROR;
 3260                   }
 3261           /* Since the output can be calculated now, as a constant
 3262              scalar, we must precalculate the output size, in
 3263              order to avoid an overflow. */
 3264           outSize = SIZE((ffvsp[-2].Node));
 3265           if (SIZE((ffvsp[0].Node)) > outSize) outSize = SIZE((ffvsp[0].Node));
 3266                   (ffval.Node) = New_FuncSize( 0, ifthenelse_fct, 3, (ffvsp[-2].Node), (ffvsp[0].Node), (ffvsp[-4].Node),
 3267                      0, 0, 0, 0, outSize);
 3268           
 3269                   TEST((ffval.Node));
 3270                   if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) )  Copy_Dims((ffval.Node), (ffvsp[0].Node));
 3271                 }
 3272 #line 3273 "y.tab.c"
 3273     break;
 3274 
 3275   case 129: /* sexpr: FUNCTION sexpr ',' sexpr ')'  */
 3276 #line 1148 "eval.y"
 3277                 { 
 3278           if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
 3279              int outSize;
 3280              /* Since the output can be calculated now, as a constant
 3281             scalar, we must precalculate the output size, in
 3282             order to avoid an overflow. */
 3283              outSize = SIZE((ffvsp[-3].Node));
 3284              if (SIZE((ffvsp[-1].Node)) > outSize) outSize = SIZE((ffvsp[-1].Node));
 3285              
 3286              (ffval.Node) = New_FuncSize( 0, defnull_fct, 2, (ffvsp[-3].Node), (ffvsp[-1].Node), 0,
 3287                     0, 0, 0, 0, outSize );
 3288              TEST((ffval.Node)); 
 3289              if( SIZE((ffvsp[-1].Node))>SIZE((ffvsp[-3].Node)) ) SIZE((ffval.Node)) = SIZE((ffvsp[-1].Node));
 3290           } else {
 3291              fferror("Function(string,string) not supported");
 3292              FFERROR;
 3293           }
 3294         }
 3295 #line 3296 "y.tab.c"
 3296     break;
 3297 
 3298   case 130: /* sexpr: FUNCTION sexpr ',' expr ',' expr ')'  */
 3299 #line 1167 "eval.y"
 3300                 { 
 3301           if (FSTRCMP((ffvsp[-6].str),"STRMID(") == 0) {
 3302             int len;
 3303             if( TYPE((ffvsp[-3].Node)) != LONG || SIZE((ffvsp[-3].Node)) != 1 ||
 3304             TYPE((ffvsp[-1].Node)) != LONG || SIZE((ffvsp[-1].Node)) != 1) {
 3305               fferror("When using STRMID(S,P,N), P and N must be integers (and not vector columns)");
 3306               FFERROR;
 3307             }
 3308             if (OPER((ffvsp[-1].Node)) == CONST_OP) {
 3309               /* Constant value: use that directly */
 3310               len = (gParse.Nodes[(ffvsp[-1].Node)].value.data.lng);
 3311             } else {
 3312               /* Variable value: use the maximum possible (from $2) */
 3313               len = SIZE((ffvsp[-5].Node));
 3314             }
 3315             if (len <= 0 || len >= MAX_STRLEN) {
 3316               fferror("STRMID(S,P,N), N must be 1-" MAX_STRLEN_S);
 3317               FFERROR;
 3318             }
 3319             (ffval.Node) = New_FuncSize( 0, strmid_fct, 3, (ffvsp[-5].Node), (ffvsp[-3].Node),(ffvsp[-1].Node),0,0,0,0,len);
 3320             TEST((ffval.Node));
 3321           } else {
 3322              fferror("Function(string,expr,expr) not supported");
 3323              FFERROR;
 3324           }
 3325         }
 3326 #line 3327 "y.tab.c"
 3327     break;
 3328 
 3329 
 3330 #line 3331 "y.tab.c"
 3331