"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "eval_y.c" between
cfitsio-3.49.tar.gz and cfitsio-4.0.0.tar.gz

About: CFITSIO is a library of C and Fortran subroutines for reading and writing data files in the FITS (Flexible Image Transport System) data format.

eval_y.c  (cfitsio-3.49):eval_y.c  (cfitsio-4.0.0)
/* A Bison parser, made by GNU Bison 3.0.5. */ /* A Bison parser, made by GNU Bison 3.7.4. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 36 skipping to change at line 37
special exception, which will cause the skeleton and the resulting special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public Bison output files to be licensed under the GNU General Public
License without this special exception. License without this special exception.
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by /* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */ simplifying the original so-called "semantic" parser. */
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
especially those whose name start with FF_ or ff_. They are
private implementation details that can be changed or removed. */
/* All symbols defined below should begin with ff or FF, to avoid /* All symbols defined below should begin with ff or FF, to avoid
infringing on user name space. This should be done even for local infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros. variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */ USER NAME SPACE" below. */
/* Identify Bison output. */ /* Identify Bison output, and Bison version. */
#define FFBISON 1 #define FFBISON 30704
/* Bison version. */ /* Bison version string. */
#define FFBISON_VERSION "3.0.5" #define FFBISON_VERSION "3.7.4"
/* Skeleton name. */ /* Skeleton name. */
#define FFSKELETON_NAME "yacc.c" #define FFSKELETON_NAME "yacc.c"
/* Pure parsers. */ /* Pure parsers. */
#define FFPURE 0 #define FFPURE 0
/* Push parsers. */ /* Push parsers. */
#define FFPUSH 0 #define FFPUSH 0
/* Pull parsers. */ /* Pull parsers. */
#define FFPULL 1 #define FFPULL 1
/* Copy the first part of user declarations. */ /* First part of user prologue. */
#line 1 "eval.y" /* yacc.c:339 */ #line 1 "eval.y"
/************************************************************************/ /************************************************************************/
/* */ /* */
/* CFITSIO Lexical Parser */ /* CFITSIO Lexical Parser */
/* */ /* */
/* This file is one of 3 files containing code which parses an */ /* This file is one of 3 files containing code which parses an */
/* arithmetic expression and evaluates it in the context of an input */ /* arithmetic expression and evaluates it in the context of an input */
/* FITS file table extension. The CFITSIO lexical parser is divided */ /* FITS file table extension. The CFITSIO lexical parser is divided */
/* into the following 3 parts/files: the CFITSIO "front-end", */ /* into the following 3 parts/files: the CFITSIO "front-end", */
/* eval_f.c, contains the interface between the user/CFITSIO and the */ /* eval_f.c, contains the interface between the user/CFITSIO and the */
skipping to change at line 128 skipping to change at line 133
/* of throwing a parse error */ /* of throwing a parse error */
/* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */ /* Craig B Markwardt Oct 2004 Add ACCUM() and SEQDIFF() functions */
/* Craig B Markwardt Feb 2005 Add ANGSEP() function */ /* Craig B Markwardt Feb 2005 Add ANGSEP() function */
/* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/ /* Craig B Markwardt Aug 2005 CIRCLE, BOX, ELLIPSE, NEAR and REGFILTER*/
/* functions now accept vector arguments */ /* functions now accept vector arguments */
/* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */ /* Craig B Markwardt Sum 2006 Add RANDOMN() and RANDOMP() functions */
/* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/ /* Craig B Markwardt Mar 2007 Allow arguments to RANDOM and RANDOMN to*/
/* determine the output dimensions */ /* determine the output dimensions */
/* Craig B Markwardt Aug 2009 Add substring STRMID() and string search*/ /* Craig B Markwardt Aug 2009 Add substring STRMID() and string search*/
/* STRSTR() functions; more overflow checks*/ /* STRSTR() functions; more overflow checks*/
/* Craig B Markwardt Dec 2019 Add bit/hex/oct literal strings and */
/* bitwise operatiosn between integers */
/* Craig B Markwardt Mar 2021 Add SETNULL() function */
/* */ /* */
/************************************************************************/ /************************************************************************/
#define APPROX 1.0e-7 #define APPROX 1.0e-7
#include "eval_defs.h" #include "eval_defs.h"
#include "region.h" #include "region.h"
#include <time.h> #include <time.h>
#include <stdlib.h> #include <stdlib.h>
skipping to change at line 205 skipping to change at line 213
static int New_Unary ( int returnType, int Op, int Node1 ); static int New_Unary ( int returnType, int Op, int Node1 );
static int New_BinOp ( int returnType, int Node1, int Op, int Node2 ); static int New_BinOp ( int returnType, int Node1, int Op, int Node2 );
static int New_Func ( int returnType, funcOp Op, int nNodes, static int New_Func ( int returnType, funcOp Op, int nNodes,
int Node1, int Node2, int Node3, int Node4, int Node1, int Node2, int Node3, int Node4,
int Node5, int Node6, int Node7 ); int Node5, int Node6, int Node7 );
static int New_FuncSize( int returnType, funcOp Op, int nNodes, static int New_FuncSize( int returnType, funcOp Op, int nNodes,
int Node1, int Node2, int Node3, int Node4, int Node1, int Node2, int Node3, int Node4,
int Node5, int Node6, int Node7, int Size); int Node5, int Node6, int Node7, int Size);
static int New_Deref ( int Var, int nDim, static int New_Deref ( int Var, int nDim,
int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 ); int Dim1, int Dim2, int Dim3, int Dim4, int Dim5 );
static int New_GTI ( char *fname, int Node1, char *start, char *stop ); static int New_GTI ( funcOp Op, char *fname, int Node1, int Node2, char *star t, char *stop );
static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames ); static int New_REG ( char *fname, int NodeX, int NodeY, char *colNames );
static int New_Vector( int subNode ); static int New_Vector( int subNode );
static int Close_Vec ( int vecNode ); static int Close_Vec ( int vecNode );
static int Locate_Col( Node *this ); static int Locate_Col( Node *this );
static int Test_Dims ( int Node1, int Node2 ); static int Test_Dims ( int Node1, int Node2 );
static void Copy_Dims ( int Node1, int Node2 ); static void Copy_Dims ( int Node1, int Node2 );
static void Allocate_Ptrs( Node *this ); static void Allocate_Ptrs( Node *this );
static void Do_Unary ( Node *this ); static void Do_Unary ( Node *this );
static void Do_Offset ( Node *this ); static void Do_Offset ( Node *this );
static void Do_BinOp_bit ( Node *this ); static void Do_BinOp_bit ( Node *this );
static void Do_BinOp_str ( Node *this ); static void Do_BinOp_str ( Node *this );
static void Do_BinOp_log ( Node *this ); static void Do_BinOp_log ( Node *this );
static void Do_BinOp_lng ( Node *this ); static void Do_BinOp_lng ( Node *this );
static void Do_BinOp_dbl ( Node *this ); static void Do_BinOp_dbl ( Node *this );
static void Do_Func ( Node *this ); static void Do_Func ( Node *this );
static void Do_Deref ( Node *this ); static void Do_Deref ( Node *this );
static void Do_GTI ( Node *this ); static void Do_GTI ( Node *this );
static void Do_GTI_Over ( Node *this );
static void Do_REG ( Node *this ); static void Do_REG ( Node *this );
static void Do_Vector ( Node *this ); static void Do_Vector ( Node *this );
static long Search_GTI ( double evtTime, long nGTI, double *start, static long Search_GTI ( double evtTime, long nGTI, double *start,
double *stop, int ordered ); double *stop, int ordered, long *nextGTI );
static double GTI_Over(double evtStart, double evtStop,
long nGTI, double *start, double *stop,
long *gtiout);
static char saobox (double xcen, double ycen, double xwid, double ywid, static char saobox (double xcen, double ycen, double xwid, double ywid,
double rot, double xcol, double ycol); double rot, double xcol, double ycol);
static char ellipse(double xcen, double ycen, double xrad, double yrad, static char ellipse(double xcen, double ycen, double xrad, double yrad,
double rot, double xcol, double ycol); double rot, double xcol, double ycol);
static char circle (double xcen, double ycen, double rad, static char circle (double xcen, double ycen, double rad,
double xcol, double ycol); double xcol, double ycol);
static char bnear (double x, double y, double tolerance); static char bnear (double x, double y, double tolerance);
static char bitcmp (char *bitstrm1, char *bitstrm2); static char bitcmp (char *bitstrm1, char *bitstrm2);
static char bitlgte(char *bits1, int oper, char *bits2); static char bitlgte(char *bits1, int oper, char *bits2);
skipping to change at line 252 skipping to change at line 264
static void bitnot(char *result, char *bits); static void bitnot(char *result, char *bits);
static int cstrmid(char *dest_str, int dest_len, static int cstrmid(char *dest_str, int dest_len,
char *src_str, int src_len, int pos); char *src_str, int src_len, int pos);
static void fferror(char *msg); static void fferror(char *msg);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#line 257 "y.tab.c" /* yacc.c:339 */ #line 269 "y.tab.c"
# ifndef FF_CAST
# ifdef __cplusplus
# define FF_CAST(Type, Val) static_cast<Type> (Val)
# define FF_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
# else
# define FF_CAST(Type, Val) ((Type) (Val))
# define FF_REINTERPRET_CAST(Type, Val) ((Type) (Val))
# endif
# endif
# ifndef FF_NULLPTR # ifndef FF_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus # if defined __cplusplus
# define FF_NULLPTR nullptr # if 201103L <= __cplusplus
# define FF_NULLPTR nullptr
# else
# define FF_NULLPTR 0
# endif
# else # else
# define FF_NULLPTR 0 # define FF_NULLPTR ((void*)0)
# endif # endif
# endif # endif
/* Enabling verbose error messages. */ /* Use api.header.include to #include this header
#ifdef FFERROR_VERBOSE instead of duplicating it here. */
# undef FFERROR_VERBOSE
# define FFERROR_VERBOSE 1
#else
# define FFERROR_VERBOSE 0
#endif
/* In a future release of Bison, this section will be replaced
by #include "y.tab.h". */
#ifndef FF_FF_Y_TAB_H_INCLUDED #ifndef FF_FF_Y_TAB_H_INCLUDED
# define FF_FF_Y_TAB_H_INCLUDED # define FF_FF_Y_TAB_H_INCLUDED
/* Debug traces. */ /* Debug traces. */
#ifndef FFDEBUG #ifndef FFDEBUG
# define FFDEBUG 0 # define FFDEBUG 0
#endif #endif
#if FFDEBUG #if FFDEBUG
extern int ffdebug; extern int ffdebug;
#endif #endif
/* Token type. */ /* Token kinds. */
#ifndef FFTOKENTYPE #ifndef FFTOKENTYPE
# define FFTOKENTYPE # define FFTOKENTYPE
enum fftokentype enum fftokentype
{ {
BOOLEAN = 258, FFEMPTY = -2,
LONG = 259, FFEOF = 0, /* "end of file" */
DOUBLE = 260, FFerror = 256, /* error */
STRING = 261, FFUNDEF = 257, /* "invalid token" */
BITSTR = 262, BOOLEAN = 258, /* BOOLEAN */
FUNCTION = 263, LONG = 259, /* LONG */
BFUNCTION = 264, DOUBLE = 260, /* DOUBLE */
IFUNCTION = 265, STRING = 261, /* STRING */
GTIFILTER = 266, BITSTR = 262, /* BITSTR */
REGFILTER = 267, FUNCTION = 263, /* FUNCTION */
COLUMN = 268, BFUNCTION = 264, /* BFUNCTION */
BCOLUMN = 269, IFUNCTION = 265, /* IFUNCTION */
SCOLUMN = 270, GTIFILTER = 266, /* GTIFILTER */
BITCOL = 271, GTIOVERLAP = 267, /* GTIOVERLAP */
ROWREF = 272, REGFILTER = 268, /* REGFILTER */
NULLREF = 273, COLUMN = 269, /* COLUMN */
SNULLREF = 274, BCOLUMN = 270, /* BCOLUMN */
OR = 275, SCOLUMN = 271, /* SCOLUMN */
AND = 276, BITCOL = 272, /* BITCOL */
EQ = 277, ROWREF = 273, /* ROWREF */
NE = 278, NULLREF = 274, /* NULLREF */
GT = 279, SNULLREF = 275, /* SNULLREF */
LT = 280, OR = 276, /* OR */
LTE = 281, AND = 277, /* AND */
GTE = 282, EQ = 278, /* EQ */
XOR = 283, NE = 279, /* NE */
POWER = 284, GT = 280, /* GT */
NOT = 285, LT = 281, /* LT */
INTCAST = 286, LTE = 282, /* LTE */
FLTCAST = 287, GTE = 283, /* GTE */
UMINUS = 288, XOR = 284, /* XOR */
ACCUM = 289, POWER = 285, /* POWER */
DIFF = 290 NOT = 286, /* NOT */
INTCAST = 287, /* INTCAST */
FLTCAST = 288, /* FLTCAST */
UMINUS = 289, /* UMINUS */
ACCUM = 290, /* ACCUM */
DIFF = 291 /* DIFF */
}; };
typedef enum fftokentype fftoken_kind_t;
#endif #endif
/* Tokens. */ /* Token kinds. */
#define FFEMPTY -2
#define FFEOF 0
#define FFerror 256
#define FFUNDEF 257
#define BOOLEAN 258 #define BOOLEAN 258
#define LONG 259 #define LONG 259
#define DOUBLE 260 #define DOUBLE 260
#define STRING 261 #define STRING 261
#define BITSTR 262 #define BITSTR 262
#define FUNCTION 263 #define FUNCTION 263
#define BFUNCTION 264 #define BFUNCTION 264
#define IFUNCTION 265 #define IFUNCTION 265
#define GTIFILTER 266 #define GTIFILTER 266
#define REGFILTER 267 #define GTIOVERLAP 267
#define COLUMN 268 #define REGFILTER 268
#define BCOLUMN 269 #define COLUMN 269
#define SCOLUMN 270 #define BCOLUMN 270
#define BITCOL 271 #define SCOLUMN 271
#define ROWREF 272 #define BITCOL 272
#define NULLREF 273 #define ROWREF 273
#define SNULLREF 274 #define NULLREF 274
#define OR 275 #define SNULLREF 275
#define AND 276 #define OR 276
#define EQ 277 #define AND 277
#define NE 278 #define EQ 278
#define GT 279 #define NE 279
#define LT 280 #define GT 280
#define LTE 281 #define LT 281
#define GTE 282 #define LTE 282
#define XOR 283 #define GTE 283
#define POWER 284 #define XOR 284
#define NOT 285 #define POWER 285
#define INTCAST 286 #define NOT 286
#define FLTCAST 287 #define INTCAST 287
#define UMINUS 288 #define FLTCAST 288
#define ACCUM 289 #define UMINUS 289
#define DIFF 290 #define ACCUM 290
#define DIFF 291
/* Value type. */ /* Value type. */
#if ! defined FFSTYPE && ! defined FFSTYPE_IS_DECLARED #if ! defined FFSTYPE && ! defined FFSTYPE_IS_DECLARED
union FFSTYPE union FFSTYPE
{ {
#line 192 "eval.y" /* yacc.c:355 */ #line 199 "eval.y"
int Node; /* Index of Node */ int Node; /* Index of Node */
double dbl; /* real value */ double dbl; /* real value */
long lng; /* integer value */ long lng; /* integer value */
char log; /* logical value */ char log; /* logical value */
char str[MAX_STRLEN]; /* string value */ char str[MAX_STRLEN]; /* string value */
#line 375 "y.tab.c" /* yacc.c:355 */ #line 402 "y.tab.c"
};
};
typedef union FFSTYPE FFSTYPE; typedef union FFSTYPE FFSTYPE;
# define FFSTYPE_IS_TRIVIAL 1 # define FFSTYPE_IS_TRIVIAL 1
# define FFSTYPE_IS_DECLARED 1 # define FFSTYPE_IS_DECLARED 1
#endif #endif
extern FFSTYPE fflval; extern FFSTYPE fflval;
int ffparse (void); int ffparse (void);
#endif /* !FF_FF_Y_TAB_H_INCLUDED */ #endif /* !FF_FF_Y_TAB_H_INCLUDED */
/* Symbol kind. */
/* Copy the second part of user declarations. */ enum ffsymbol_kind_t
{
#line 392 "y.tab.c" /* yacc.c:358 */ FFSYMBOL_FFEMPTY = -2,
FFSYMBOL_FFEOF = 0, /* "end of file" */
FFSYMBOL_FFerror = 1, /* error */
FFSYMBOL_FFUNDEF = 2, /* "invalid token" */
FFSYMBOL_BOOLEAN = 3, /* BOOLEAN */
FFSYMBOL_LONG = 4, /* LONG */
FFSYMBOL_DOUBLE = 5, /* DOUBLE */
FFSYMBOL_STRING = 6, /* STRING */
FFSYMBOL_BITSTR = 7, /* BITSTR */
FFSYMBOL_FUNCTION = 8, /* FUNCTION */
FFSYMBOL_BFUNCTION = 9, /* BFUNCTION */
FFSYMBOL_IFUNCTION = 10, /* IFUNCTION */
FFSYMBOL_GTIFILTER = 11, /* GTIFILTER */
FFSYMBOL_GTIOVERLAP = 12, /* GTIOVERLAP */
FFSYMBOL_REGFILTER = 13, /* REGFILTER */
FFSYMBOL_COLUMN = 14, /* COLUMN */
FFSYMBOL_BCOLUMN = 15, /* BCOLUMN */
FFSYMBOL_SCOLUMN = 16, /* SCOLUMN */
FFSYMBOL_BITCOL = 17, /* BITCOL */
FFSYMBOL_ROWREF = 18, /* ROWREF */
FFSYMBOL_NULLREF = 19, /* NULLREF */
FFSYMBOL_SNULLREF = 20, /* SNULLREF */
FFSYMBOL_21_ = 21, /* ',' */
FFSYMBOL_22_ = 22, /* '=' */
FFSYMBOL_23_ = 23, /* ':' */
FFSYMBOL_24_ = 24, /* '{' */
FFSYMBOL_25_ = 25, /* '}' */
FFSYMBOL_26_ = 26, /* '?' */
FFSYMBOL_OR = 27, /* OR */
FFSYMBOL_AND = 28, /* AND */
FFSYMBOL_EQ = 29, /* EQ */
FFSYMBOL_NE = 30, /* NE */
FFSYMBOL_31_ = 31, /* '~' */
FFSYMBOL_GT = 32, /* GT */
FFSYMBOL_LT = 33, /* LT */
FFSYMBOL_LTE = 34, /* LTE */
FFSYMBOL_GTE = 35, /* GTE */
FFSYMBOL_36_ = 36, /* '+' */
FFSYMBOL_37_ = 37, /* '-' */
FFSYMBOL_38_ = 38, /* '%' */
FFSYMBOL_39_ = 39, /* '*' */
FFSYMBOL_40_ = 40, /* '/' */
FFSYMBOL_41_ = 41, /* '|' */
FFSYMBOL_42_ = 42, /* '&' */
FFSYMBOL_XOR = 43, /* XOR */
FFSYMBOL_POWER = 44, /* POWER */
FFSYMBOL_NOT = 45, /* NOT */
FFSYMBOL_INTCAST = 46, /* INTCAST */
FFSYMBOL_FLTCAST = 47, /* FLTCAST */
FFSYMBOL_UMINUS = 48, /* UMINUS */
FFSYMBOL_49_ = 49, /* '[' */
FFSYMBOL_ACCUM = 50, /* ACCUM */
FFSYMBOL_DIFF = 51, /* DIFF */
FFSYMBOL_52_n_ = 52, /* '\n' */
FFSYMBOL_53_ = 53, /* ']' */
FFSYMBOL_54_ = 54, /* '(' */
FFSYMBOL_55_ = 55, /* ')' */
FFSYMBOL_FFACCEPT = 56, /* $accept */
FFSYMBOL_lines = 57, /* lines */
FFSYMBOL_line = 58, /* line */
FFSYMBOL_bvector = 59, /* bvector */
FFSYMBOL_vector = 60, /* vector */
FFSYMBOL_expr = 61, /* expr */
FFSYMBOL_bexpr = 62, /* bexpr */
FFSYMBOL_bits = 63, /* bits */
FFSYMBOL_sexpr = 64 /* sexpr */
};
typedef enum ffsymbol_kind_t ffsymbol_kind_t;
#ifdef short #ifdef short
# undef short # undef short
#endif #endif
#ifdef FFTYPE_UINT8 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
typedef FFTYPE_UINT8 fftype_uint8; <limits.h> and (if available) <stdint.h> are included
#else so that the code can choose integer types of a good width. */
typedef unsigned char fftype_uint8;
#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
# define FF_STDINT_H
# endif
#endif #endif
#ifdef FFTYPE_INT8 /* Narrow types that promote to a signed type and that can represent a
typedef FFTYPE_INT8 fftype_int8; signed or unsigned integer of at least N bits. In tables they can
save space and decrease cache pressure. Promoting to a signed type
helps avoid bugs in integer arithmetic. */
#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ fftype_int8;
#elif defined FF_STDINT_H
typedef int_least8_t fftype_int8;
#else #else
typedef signed char fftype_int8; typedef signed char fftype_int8;
#endif #endif
#ifdef FFTYPE_UINT16 #ifdef __INT_LEAST16_MAX__
typedef FFTYPE_UINT16 fftype_uint16; typedef __INT_LEAST16_TYPE__ fftype_int16;
#elif defined FF_STDINT_H
typedef int_least16_t fftype_int16;
#else
typedef short fftype_int16;
#endif
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ fftype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined FF_STDINT_H \
&& UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t fftype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char fftype_uint8;
#else #else
typedef unsigned short int fftype_uint16; typedef short fftype_uint8;
#endif #endif
#ifdef FFTYPE_INT16 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef FFTYPE_INT16 fftype_int16; typedef __UINT_LEAST16_TYPE__ fftype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined FF_STDINT_H \
&& UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t fftype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short fftype_uint16;
#else #else
typedef short int fftype_int16; typedef int fftype_uint16;
#endif
#ifndef FFPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
# define FFPTRDIFF_T __PTRDIFF_TYPE__
# define FFPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
# ifndef ptrdiff_t
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define FFPTRDIFF_T ptrdiff_t
# define FFPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
# define FFPTRDIFF_T long
# define FFPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif #endif
#ifndef FFSIZE_T #ifndef FFSIZE_T
# ifdef __SIZE_TYPE__ # ifdef __SIZE_TYPE__
# define FFSIZE_T __SIZE_TYPE__ # define FFSIZE_T __SIZE_TYPE__
# elif defined size_t # elif defined size_t
# define FFSIZE_T size_t # define FFSIZE_T size_t
# elif ! defined FFSIZE_T # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define FFSIZE_T size_t # define FFSIZE_T size_t
# else # else
# define FFSIZE_T unsigned int # define FFSIZE_T unsigned
# endif # endif
#endif #endif
#define FFSIZE_MAXIMUM ((FFSIZE_T) -1) #define FFSIZE_MAXIMUM \
FF_CAST (FFPTRDIFF_T, \
(FFPTRDIFF_MAXIMUM < FF_CAST (FFSIZE_T, -1) \
? FFPTRDIFF_MAXIMUM \
: FF_CAST (FFSIZE_T, -1)))
#define FFSIZEOF(X) FF_CAST (FFPTRDIFF_T, sizeof (X))
/* Stored state numbers (used for stacks). */
typedef fftype_int16 ff_state_t;
/* State numbers in computations. */
typedef int ff_state_fast_t;
#ifndef FF_ #ifndef FF_
# if defined FFENABLE_NLS && FFENABLE_NLS # if defined FFENABLE_NLS && FFENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define FF_(Msgid) dgettext ("bison-runtime", Msgid) # define FF_(Msgid) dgettext ("bison-runtime", Msgid)
# endif # endif
# endif # endif
# ifndef FF_ # ifndef FF_
# define FF_(Msgid) Msgid # define FF_(Msgid) Msgid
# endif # endif
#endif #endif
#ifndef FF_ATTRIBUTE #ifndef FF_ATTRIBUTE_PURE
# if (defined __GNUC__ \ # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ # define FF_ATTRIBUTE_PURE __attribute__ ((__pure__))
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
# define FF_ATTRIBUTE(Spec) __attribute__(Spec)
# else # else
# define FF_ATTRIBUTE(Spec) /* empty */ # define FF_ATTRIBUTE_PURE
# endif # endif
#endif #endif
#ifndef FF_ATTRIBUTE_PURE
# define FF_ATTRIBUTE_PURE FF_ATTRIBUTE ((__pure__))
#endif
#ifndef FF_ATTRIBUTE_UNUSED #ifndef FF_ATTRIBUTE_UNUSED
# define FF_ATTRIBUTE_UNUSED FF_ATTRIBUTE ((__unused__)) # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#endif # define FF_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#if !defined _Noreturn \
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# else # else
# define _Noreturn FF_ATTRIBUTE ((__noreturn__)) # define FF_ATTRIBUTE_UNUSED
# endif # endif
#endif #endif
/* Suppress unused-variable warnings by "using" E. */ /* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__ #if ! defined lint || defined __GNUC__
# define FFUSE(E) ((void) (E)) # define FFUSE(E) ((void) (E))
#else #else
# define FFUSE(E) /* empty */ # define FFUSE(E) /* empty */
#endif #endif
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR_ _
/* Suppress an incorrect diagnostic about fflval being uninitialized. */ /* Suppress an incorrect diagnostic about fflval being uninitialized. */
# define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ # define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define FF_IGNORE_MAYBE_UNINITIALIZED_END \ # define FF_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop") _Pragma ("GCC diagnostic pop")
#else #else
# define FF_INITIAL_VALUE(Value) Value # define FF_INITIAL_VALUE(Value) Value
#endif #endif
#ifndef FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN #ifndef FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define FF_IGNORE_MAYBE_UNINITIALIZED_END # define FF_IGNORE_MAYBE_UNINITIALIZED_END
#endif #endif
#ifndef FF_INITIAL_VALUE #ifndef FF_INITIAL_VALUE
# define FF_INITIAL_VALUE(Value) /* Nothing. */ # define FF_INITIAL_VALUE(Value) /* Nothing. */
#endif #endif
#if ! defined ffoverflow || FFERROR_VERBOSE #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define FF_IGNORE_USELESS_CAST_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define FF_IGNORE_USELESS_CAST_END \
_Pragma ("GCC diagnostic pop")
#endif
#ifndef FF_IGNORE_USELESS_CAST_BEGIN
# define FF_IGNORE_USELESS_CAST_BEGIN
# define FF_IGNORE_USELESS_CAST_END
#endif
#define FF_ASSERT(E) ((void) (0 && (E)))
#if !defined ffoverflow
/* The parser invokes alloca or malloc; define the necessary symbols. */ /* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef FFSTACK_USE_ALLOCA # ifdef FFSTACK_USE_ALLOCA
# if FFSTACK_USE_ALLOCA # if FFSTACK_USE_ALLOCA
# ifdef __GNUC__ # ifdef __GNUC__
# define FFSTACK_ALLOC __builtin_alloca # define FFSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR # elif defined __BUILTIN_VA_ARG_INCR
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX # elif defined _AIX
skipping to change at line 561 skipping to change at line 717
void *malloc (FFSIZE_T); /* INFRINGES ON USER NAME SPACE */ void *malloc (FFSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef FFFREE # ifndef FFFREE
# define FFFREE free # define FFFREE free
# if ! defined free && ! defined EXIT_SUCCESS # if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# endif # endif
#endif /* ! defined ffoverflow || FFERROR_VERBOSE */ #endif /* !defined ffoverflow */
#if (! defined ffoverflow \ #if (! defined ffoverflow \
&& (! defined __cplusplus \ && (! defined __cplusplus \
|| (defined FFSTYPE_IS_TRIVIAL && FFSTYPE_IS_TRIVIAL))) || (defined FFSTYPE_IS_TRIVIAL && FFSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */ /* A type that is properly aligned for any stack member. */
union ffalloc union ffalloc
{ {
fftype_int16 ffss_alloc; ff_state_t ffss_alloc;
FFSTYPE ffvs_alloc; FFSTYPE ffvs_alloc;
}; };
/* The size of the maximum gap between one aligned stack and the next. */ /* The size of the maximum gap between one aligned stack and the next. */
# define FFSTACK_GAP_MAXIMUM (sizeof (union ffalloc) - 1) # define FFSTACK_GAP_MAXIMUM (FFSIZEOF (union ffalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with /* The size of an array large to enough to hold all stacks, each with
N elements. */ N elements. */
# define FFSTACK_BYTES(N) \ # define FFSTACK_BYTES(N) \
((N) * (sizeof (fftype_int16) + sizeof (FFSTYPE)) \ ((N) * (FFSIZEOF (ff_state_t) + FFSIZEOF (FFSTYPE)) \
+ FFSTACK_GAP_MAXIMUM) + FFSTACK_GAP_MAXIMUM)
# define FFCOPY_NEEDED 1 # define FFCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The /* Relocate STACK from its old location to the new one. The
local variables FFSIZE and FFSTACKSIZE give the old and new number of local variables FFSIZE and FFSTACKSIZE give the old and new number of
elements in the stack, and FFPTR gives the new location of the elements in the stack, and FFPTR gives the new location of the
stack. Advance FFPTR to a properly aligned location for the next stack. Advance FFPTR to a properly aligned location for the next
stack. */ stack. */
# define FFSTACK_RELOCATE(Stack_alloc, Stack) \ # define FFSTACK_RELOCATE(Stack_alloc, Stack) \
do \ do \
{ \ { \
FFSIZE_T ffnewbytes; \ FFPTRDIFF_T ffnewbytes; \
FFCOPY (&ffptr->Stack_alloc, Stack, ffsize); \ FFCOPY (&ffptr->Stack_alloc, Stack, ffsize); \
Stack = &ffptr->Stack_alloc; \ Stack = &ffptr->Stack_alloc; \
ffnewbytes = ffstacksize * sizeof (*Stack) + FFSTACK_GAP_MAXIMUM; \ ffnewbytes = ffstacksize * FFSIZEOF (*Stack) + FFSTACK_GAP_MAXIMUM; \
ffptr += ffnewbytes / sizeof (*ffptr); \ ffptr += ffnewbytes / FFSIZEOF (*ffptr); \
} \ } \
while (0) while (0)
#endif #endif
#if defined FFCOPY_NEEDED && FFCOPY_NEEDED #if defined FFCOPY_NEEDED && FFCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do /* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */ not overlap. */
# ifndef FFCOPY # ifndef FFCOPY
# if defined __GNUC__ && 1 < __GNUC__ # if defined __GNUC__ && 1 < __GNUC__
# define FFCOPY(Dst, Src, Count) \ # define FFCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) __builtin_memcpy (Dst, Src, FF_CAST (FFSIZE_T, (Count)) * sizeof (*(Src)))
# else # else
# define FFCOPY(Dst, Src, Count) \ # define FFCOPY(Dst, Src, Count) \
do \ do \
{ \ { \
FFSIZE_T ffi; \ FFPTRDIFF_T ffi; \
for (ffi = 0; ffi < (Count); ffi++) \ for (ffi = 0; ffi < (Count); ffi++) \
(Dst)[ffi] = (Src)[ffi]; \ (Dst)[ffi] = (Src)[ffi]; \
} \ } \
while (0) while (0)
# endif # endif
# endif # endif
#endif /* !FFCOPY_NEEDED */ #endif /* !FFCOPY_NEEDED */
/* FFFINAL -- State number of the termination state. */ /* FFFINAL -- State number of the termination state. */
#define FFFINAL 2 #define FFFINAL 2
/* FFLAST -- Last index in FFTABLE. */ /* FFLAST -- Last index in FFTABLE. */
#define FFLAST 1630 #define FFLAST 1725
/* FFNTOKENS -- Number of terminals. */ /* FFNTOKENS -- Number of terminals. */
#define FFNTOKENS 55 #define FFNTOKENS 56
/* FFNNTS -- Number of nonterminals. */ /* FFNNTS -- Number of nonterminals. */
#define FFNNTS 9 #define FFNNTS 9
/* FFNRULES -- Number of rules. */ /* FFNRULES -- Number of rules. */
#define FFNRULES 128 #define FFNRULES 130
/* FFNSTATES -- Number of states. */ /* FFNSTATES -- Number of states. */
#define FFNSTATES 296 #define FFNSTATES 308
/* FFTRANSLATE[FFX] -- Symbol number corresponding to FFX as returned /* FFMAXUTOK -- Last valid token kind. */
by fflex, with out-of-bounds checking. */ #define FFMAXUTOK 291
#define FFUNDEFTOK 2
#define FFMAXUTOK 290
#define FFTRANSLATE(FFX) \ /* FFTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
((unsigned int) (FFX) <= FFMAXUTOK ? fftranslate[FFX] : FFUNDEFTOK) as returned by fflex, with out-of-bounds checking. */
#define FFTRANSLATE(FFX) \
(0 <= (FFX) && (FFX) <= FFMAXUTOK \
? FF_CAST (ffsymbol_kind_t, fftranslate[FFX]) \
: FFSYMBOL_FFUNDEF)
/* FFTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM /* FFTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by fflex, without out-of-bounds checking. */ as returned by fflex. */
static const fftype_uint8 fftranslate[] = static const fftype_int8 fftranslate[] =
{ {
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 52, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 37, 41, 2, 2, 2, 2, 2, 2, 2, 2, 38, 42, 2,
53, 54, 38, 35, 20, 36, 2, 39, 2, 2, 54, 55, 39, 36, 21, 37, 2, 40, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 2,
2, 21, 2, 25, 2, 2, 2, 2, 2, 2, 2, 22, 2, 26, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 48, 2, 52, 2, 2, 2, 2, 2, 2, 2, 49, 2, 53, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 23, 40, 24, 30, 2, 2, 2, 2, 2, 2, 24, 41, 25, 31, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 26, 27, 28, 29, 31, 15, 16, 17, 18, 19, 20, 27, 28, 29, 30,
32, 33, 34, 42, 43, 44, 45, 46, 47, 49, 32, 33, 34, 35, 43, 44, 45, 46, 47, 48,
50 50, 51
}; };
#if FFDEBUG #if FFDEBUG
/* FFRLINE[FFN] -- Source line where rule number FFN was defined. */ /* FFRLINE[FFN] -- Source line where rule number FFN was defined. */
static const fftype_uint16 ffrline[] = static const fftype_int16 ffrline[] =
{ {
0, 244, 244, 245, 248, 249, 255, 261, 267, 273, 0, 252, 252, 253, 256, 257, 263, 269, 275, 281,
276, 278, 291, 293, 306, 317, 331, 335, 339, 343, 284, 286, 299, 301, 314, 325, 339, 343, 347, 351,
345, 354, 357, 360, 369, 371, 373, 375, 377, 379, 353, 362, 365, 368, 377, 379, 381, 383, 385, 387,
382, 386, 388, 390, 392, 401, 403, 405, 408, 411, 390, 394, 396, 398, 400, 409, 411, 413, 416, 419,
414, 417, 420, 429, 438, 447, 450, 452, 454, 456, 422, 425, 428, 437, 446, 455, 458, 460, 462, 464,
460, 464, 483, 502, 521, 532, 546, 558, 589, 684, 468, 472, 491, 510, 529, 540, 554, 566, 597, 692,
692, 754, 778, 780, 782, 784, 786, 788, 790, 792, 700, 761, 785, 787, 789, 791, 793, 795, 797, 799,
794, 798, 800, 802, 811, 814, 817, 820, 823, 826, 801, 805, 807, 809, 818, 821, 824, 827, 830, 833,
829, 832, 835, 838, 841, 844, 847, 850, 853, 856, 836, 839, 842, 845, 848, 851, 854, 857, 860, 863,
859, 862, 865, 868, 870, 872, 874, 877, 884, 901, 866, 869, 872, 875, 877, 879, 881, 884, 891, 908,
914, 927, 938, 954, 978, 1006, 1043, 1047, 1051, 1054, 921, 934, 945, 961, 985, 1013, 1050, 1054, 1058, 1061,
1058, 1062, 1065, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1066, 1069, 1074, 1078, 1081, 1085, 1087, 1089, 1091, 1093,
1085, 1088, 1090, 1099, 1101, 1103, 1112, 1131, 1150 1095, 1097, 1101, 1104, 1106, 1115, 1117, 1119, 1128, 1147,
1166
}; };
#endif #endif
#if FFDEBUG || FFERROR_VERBOSE || 0 /** Accessing symbol of state STATE. */
#define FF_ACCESSING_SYMBOL(State) FF_CAST (ffsymbol_kind_t, ffstos[State])
#if FFDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
FFSYMBOL. No bounds checking. */
static const char *ffsymbol_name (ffsymbol_kind_t ffsymbol) FF_ATTRIBUTE_UNUSED;
/* FFTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* FFTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at FFNTOKENS, nonterminals. */ First, the terminals, then, starting at FFNTOKENS, nonterminals. */
static const char *const fftname[] = static const char *const fftname[] =
{ {
"$end", "error", "$undefined", "BOOLEAN", "LONG", "DOUBLE", "STRING", "\"end of file\"", "error", "\"invalid token\"", "BOOLEAN", "LONG",
"BITSTR", "FUNCTION", "BFUNCTION", "IFUNCTION", "GTIFILTER", "REGFILTER", "DOUBLE", "STRING", "BITSTR", "FUNCTION", "BFUNCTION", "IFUNCTION",
"COLUMN", "BCOLUMN", "SCOLUMN", "BITCOL", "ROWREF", "NULLREF", "GTIFILTER", "GTIOVERLAP", "REGFILTER", "COLUMN", "BCOLUMN", "SCOLUMN",
"SNULLREF", "','", "'='", "':'", "'{'", "'}'", "'?'", "OR", "AND", "EQ", "BITCOL", "ROWREF", "NULLREF", "SNULLREF", "','", "'='", "':'", "'{'",
"NE", "'~'", "GT", "LT", "LTE", "GTE", "'+'", "'-'", "'%'", "'*'", "'/'", "'}'", "'?'", "OR", "AND", "EQ", "NE", "'~'", "GT", "LT", "LTE", "GTE",
"'|'", "'&'", "XOR", "POWER", "NOT", "INTCAST", "FLTCAST", "UMINUS", "'+'", "'-'", "'%'", "'*'", "'/'", "'|'", "'&'", "XOR", "POWER", "NOT",
"'['", "ACCUM", "DIFF", "'\\n'", "']'", "'('", "')'", "$accept", "lines", "INTCAST", "FLTCAST", "UMINUS", "'['", "ACCUM", "DIFF", "'\\n'", "']'",
"line", "bvector", "vector", "expr", "bexpr", "bits", "sexpr", FF_NULLPTR "'('", "')'", "$accept", "lines", "line", "bvector", "vector", "expr",
"bexpr", "bits", "sexpr", FF_NULLPTR
}; };
static const char *
ffsymbol_name (ffsymbol_kind_t ffsymbol)
{
return fftname[ffsymbol];
}
#endif #endif
# ifdef FFPRINT #ifdef FFPRINT
/* FFTOKNUM[NUM] -- (External) token number corresponding to the /* FFTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */ (internal) symbol number NUM (which must be that of a token). */
static const fftype_uint16 fftoknum[] = static const fftype_int16 fftoknum[] =
{ {
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
44, 61, 58, 123, 125, 63, 275, 276, 277, 278, 275, 44, 61, 58, 123, 125, 63, 276, 277, 278,
126, 279, 280, 281, 282, 43, 45, 37, 42, 47, 279, 126, 280, 281, 282, 283, 43, 45, 37, 42,
124, 38, 283, 284, 285, 286, 287, 288, 91, 289, 47, 124, 38, 284, 285, 286, 287, 288, 289, 91,
290, 10, 93, 40, 41 290, 291, 10, 93, 40, 41
}; };
# endif #endif
#define FFPACT_NINF -50 #define FFPACT_NINF (-40)
#define ffpact_value_is_default(Yystate) \ #define ffpact_value_is_default(Yyn) \
(!!((Yystate) == (-50))) ((Yyn) == FFPACT_NINF)
#define FFTABLE_NINF -1 #define FFTABLE_NINF (-1)
#define fftable_value_is_error(Yytable_value) \ #define fftable_value_is_error(Yyn) \
0 0
/* FFPACT[STATE-NUM] -- Index in FFTABLE of the portion describing /* FFPACT[STATE-NUM] -- Index in FFTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
static const fftype_int16 ffpact[] = static const fftype_int16 ffpact[] =
{ {
-50, 306, -50, -49, -50, -50, -50, -50, -50, 357, -40, 337, -40, -39, -40, -40, -40, -40, -40, 389,
409, 409, -5, -2, -18, 5, 6, 34, -50, -50, 442, 442, -5, 21, 29, 17, 25, 44, 45, -40,
-50, 409, 409, 409, 409, 409, 409, -50, 409, -50, -40, -40, 442, 442, 442, 442, 442, 442, -40, 442,
49, 87, 1126, 246, 1484, -17, -50, -50, 436, 10, -40, -15, 19, 1159, 443, 1584, 1605, -40, -40, 276,
350, 164, 465, 17, 1550, 302, 1431, 1511, 1513, -14, -10, 330, 133, 469, 144, 1647, 248, 1526, 209, 1689,
-50, -13, 409, 409, 409, 409, 1431, 1511, 1522, -22, -19, -40, 49, -18, 442, 442, 442, 442, 1526, 209,
-22, 18, 44, -22, 18, -22, 18, 638, 117, 1449, 294, -6, -6, 24, 26, -6, 24, -6, 24, 671,
405, 409, -50, 409, -50, 409, 409, 409, 409, 409, 1186, 382, 1544, 442, -40, 442, -40, 442, 442, 442,
409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
409, 409, 409, -50, 409, 409, 409, 409, 409, 409, 442, 442, 442, 442, 442, -40, 442, 442, 442, 442,
409, -50, 3, 3, 3, 3, 3, 3, 3, 3, 442, 442, 442, -40, -3, -3, -3, -3, -3, -3,
3, 409, -50, 409, 409, 409, 409, 409, 409, 409, -3, -3, -3, 442, -40, 442, 442, 442, 442, 442,
-50, 409, -50, 409, -50, -50, 409, -50, 409, -50, 442, 442, -40, 442, -40, 442, -40, -40, 442, -40,
-50, -50, 409, 409, -50, 409, -50, 1293, 1316, 1339, 442, -40, -40, -40, 442, 442, -40, 442, 442, -40,
1362, -50, -50, -50, -50, 1431, 1511, 1431, 1511, 1385, 1388, 1411, 1434, 1457, -40, -40, -40, -40, 1526, 209,
1568, 1568, 1568, 1582, 1582, 1582, 1582, 305, 305, 305, 1526, 209, 1480, 1665, 1665, 1665, 22, 22, 22, 22,
19, 18, 19, 20, 20, 20, 20, 751, 1408, 260, 203, 203, 203, 148, 24, 148, -37, -37, -37, -37,
205, 129, 67, -35, -35, 19, 776, 3, 3, 112, 784, 1503, 1558, 1619, 18, 69, -34, -34, 148, 809,
112, 112, 112, 112, 112, 60, 44, 44, 801, 268, -3, -3, 111, 111, 111, 111, 111, 111, -11, 26,
268, 62, 62, 62, 62, -50, 494, 177, 1150, 1467, 26, 834, 406, 406, 58, 58, 58, 58, -40, 498,
1174, 1476, 523, 1198, -50, -50, -50, -50, 409, 409, 1191, 1221, 1560, 1245, 1576, 527, 1269, 1293, -40, -40,
-50, 409, 409, 409, 409, -50, 44, 128, 409, -50, -40, -40, 442, 442, -40, 442, 442, 442, 442, -40,
409, -50, -50, 409, -50, 409, -50, 98, -50, 409, 26, 68, 442, -40, 442, -40, -40, 442, -40, 442,
1532, 826, 1532, 1511, 1532, 1511, 1522, 851, 876, 1222, -40, 90, -40, 442, 442, 1629, 859, 1629, 209, 1629,
666, 552, 86, 581, 409, -50, 409, -50, 409, -50, 209, 294, 884, 909, 1317, 699, 556, 76, 585, 614,
409, -50, 409, -50, 103, 106, -50, 901, 926, 951, 442, -40, 442, -40, 442, -40, 442, -40, 442, -40,
694, 1246, 59, 68, 409, -50, 409, -50, 409, -50, 96, 97, -40, 99, -40, 934, 959, 984, 727, 1341,
-50, 409, -50, -50, 976, 1001, 1026, 610, 409, -50, 51, 92, 56, 442, -40, 442, -40, 442, -40, -40,
409, -50, 409, -50, 409, -50, 1051, 1076, 1101, 1270, 442, -40, 108, -40, 1009, 1034, 1059, 643, 65, 442,
-50, -50, -50, 409, 722, -50 -40, 442, -40, 442, -40, 442, -40, -40, 1084, 1109,
1134, 1365, -40, -40, -40, 442, 755, -40
}; };
/* FFDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. /* FFDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when FFTABLE does not specify something else to do. Zero Performed when FFTABLE does not specify something else to do. Zero
means the default is an error. */ means the default is an error. */
static const fftype_uint8 ffdefact[] = static const fftype_uint8 ffdefact[] =
{ {
2, 0, 1, 0, 71, 31, 32, 120, 18, 0, 2, 0, 1, 0, 71, 31, 32, 122, 18, 0,
0, 0, 0, 0, 33, 72, 121, 19, 35, 36, 0, 0, 0, 0, 0, 33, 72, 123, 19, 35,
123, 0, 0, 0, 0, 0, 0, 4, 0, 3, 36, 125, 0, 0, 0, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0, 9, 54, 0, 0, 3, 0, 0, 0, 0, 0, 0, 9, 54, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
106, 0, 0, 0, 0, 0, 12, 10, 0, 46, 0, 106, 0, 0, 0, 0, 0, 0, 12, 10,
47, 118, 29, 67, 68, 69, 70, 0, 0, 0, 0, 46, 47, 120, 29, 67, 68, 69, 70, 0,
0, 0, 17, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
7, 0, 58, 0, 55, 57, 0, 56, 0, 99, 0, 0, 7, 0, 58, 0, 55, 57, 0, 56,
100, 101, 0, 0, 107, 0, 110, 0, 0, 0, 0, 99, 100, 101, 0, 0, 107, 0, 0, 112,
0, 48, 119, 30, 124, 15, 11, 13, 14, 0, 0, 0, 0, 0, 48, 121, 30, 126, 15, 11,
85, 86, 84, 80, 81, 83, 82, 38, 39, 37, 13, 14, 0, 85, 86, 84, 80, 81, 83, 82,
40, 49, 41, 43, 42, 44, 45, 0, 0, 0, 38, 39, 37, 40, 49, 41, 43, 42, 44, 45,
0, 94, 93, 95, 96, 50, 0, 0, 0, 74, 0, 0, 0, 0, 94, 93, 95, 96, 50, 0,
75, 78, 76, 77, 79, 23, 22, 21, 0, 87, 0, 0, 74, 75, 78, 76, 77, 79, 23, 22,
88, 89, 91, 92, 90, 125, 0, 0, 0, 0, 21, 0, 87, 88, 89, 91, 92, 90, 127, 0,
0, 0, 0, 0, 34, 73, 122, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 73,
62, 0, 0, 0, 0, 113, 29, 0, 0, 24, 124, 20, 0, 0, 62, 0, 0, 0, 0, 115,
0, 60, 102, 0, 127, 0, 59, 0, 108, 0, 29, 0, 0, 24, 0, 60, 102, 0, 129, 0,
97, 0, 51, 53, 52, 98, 126, 0, 0, 0, 59, 0, 108, 0, 0, 97, 0, 51, 53, 52,
0, 0, 0, 0, 0, 63, 0, 114, 0, 25, 98, 128, 0, 0, 0, 0, 0, 0, 0, 0,
0, 128, 0, 103, 0, 0, 111, 0, 0, 0, 0, 63, 0, 116, 0, 25, 0, 130, 0, 103,
0, 0, 0, 0, 0, 64, 0, 115, 0, 26, 0, 0, 110, 0, 113, 0, 0, 0, 0, 0,
61, 0, 109, 112, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 64, 0, 117, 0, 26, 61,
0, 116, 0, 27, 0, 104, 0, 0, 0, 0, 0, 109, 0, 114, 0, 0, 0, 0, 0, 0,
66, 117, 28, 0, 0, 105 65, 0, 118, 0, 27, 0, 104, 111, 0, 0,
0, 0, 66, 119, 28, 0, 0, 105
}; };
/* FFPGOTO[NTERM-NUM]. */ /* FFPGOTO[NTERM-NUM]. */
static const fftype_int16 ffpgoto[] = static const fftype_int16 ffpgoto[] =
{ {
-50, -50, -50, -50, -50, -1, 93, 150, 22 -40, -40, -40, -40, -40, -1, 106, 155, 23
}; };
/* FFDEFGOTO[NTERM-NUM]. */ /* FFDEFGOTO[NTERM-NUM]. */
static const fftype_int8 ffdefgoto[] = static const fftype_int8 ffdefgoto[] =
{ {
-1, 1, 29, 30, 31, 46, 47, 44, 58 -1, 1, 30, 31, 32, 47, 48, 45, 60
}; };
/* FFTABLE[FFPACT[STATE-NUM]] -- What to do in state STATE-NUM. If /* FFTABLE[FFPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose positive, shift that token. If negative, reduce the rule whose
number is the opposite. If FFTABLE_NINF, syntax error. */ number is the opposite. If FFTABLE_NINF, syntax error. */
static const fftype_uint16 fftable[] = static const fftype_int16 fftable[] =
{ {
32, 49, 36, 99, 51, 52, 133, 135, 38, 42, 33, 50, 135, 138, 8, 101, 73, 93, 39, 43,
8, 113, 114, 100, 115, 116, 117, 118, 119, 17, 74, 125, 94, 37, 18, 102, 96, 97, 98, 99,
56, 59, 60, 35, 63, 65, 92, 67, 53, 54, 100, 58, 61, 62, 36, 65, 67, 52, 69, 101,
123, 41, 45, 48, 120, 94, 95, 96, 97, 98, 111, 112, 42, 46, 49, 53, 136, 139, 113, 102,
134, 136, 94, 95, 96, 97, 98, 177, 99, 50, 75, 54, 180, 94, 76, 126, 98, 99, 100, 55,
70, 137, 138, 139, 140, 99, 178, 55, 100, 88, 51, 181, 72, 140, 141, 142, 143, 101, 85, 86,
89, 90, 91, 91, 124, 100, 100, 92, 92, 71, 87, 88, 89, 90, 91, 92, 93, 102, 56, 57,
145, 130, 147, 72, 149, 150, 151, 152, 153, 154, 137, 94, 148, 102, 150, 113, 152, 153, 154, 155,
155, 156, 157, 158, 159, 160, 162, 163, 164, 165, 156, 157, 158, 159, 160, 161, 162, 163, 165, 166,
166, 167, 111, 168, 33, 97, 98, 119, 175, 176, 167, 168, 169, 170, 121, 171, 247, 260, 99, 100,
109, 110, 39, 43, 242, 99, 254, 73, 111, 262, 178, 179, 270, 271, 110, 272, 281, 34, 101, 111,
188, 74, 263, 272, 57, 100, 170, 61, 64, 66, 112, 283, 191, 282, 288, 40, 44, 113, 102, 173,
196, 68, 273, 0, 0, 198, 0, 200, 0, 0, 297, 0, 199, 146, 0, 0, 0, 201, 59, 203,
0, 0, 202, 0, 203, 189, 190, 191, 192, 193, 0, 63, 66, 68, 205, 70, 206, 207, 192, 193,
194, 195, 94, 95, 96, 97, 98, 108, 199, 0, 194, 195, 196, 197, 198, 0, 0, 110, 0, 0,
0, 34, 109, 110, 201, 99, 96, 97, 98, 40, 0, 202, 111, 112, 128, 0, 35, 204, 0, 0,
111, 0, 0, 108, 146, 100, 148, 99, 109, 110, 113, 0, 115, 116, 41, 117, 118, 119, 120, 121,
0, 142, 0, 0, 62, 0, 111, 100, 69, 161, 96, 97, 98, 99, 100, 0, 0, 0, 0, 149,
0, 0, 143, 0, 126, 0, 0, 169, 171, 172, 64, 151, 0, 101, 71, 0, 0, 0, 129, 90,
173, 174, 113, 114, 0, 115, 116, 117, 118, 119, 91, 92, 93, 102, 164, 0, 0, 94, 0, 132,
0, 0, 94, 95, 96, 97, 98, 230, 231, 0, 0, 0, 172, 174, 175, 176, 177, 0, 0, 0,
232, 234, 0, 237, 0, 99, 197, 238, 127, 239, 0, 235, 236, 0, 237, 239, 0, 242, 0, 0,
0, 0, 240, 0, 241, 100, 0, 213, 243, 0, 0, 243, 0, 244, 0, 0, 245, 0, 246, 0,
0, 222, 0, 113, 114, 236, 115, 116, 117, 118, 0, 200, 248, 249, 0, 96, 97, 98, 99, 100,
119, 0, 0, 257, 0, 258, 0, 259, 0, 260, 241, 0, 88, 89, 90, 91, 92, 93, 101, 265,
0, 261, 179, 180, 181, 182, 183, 184, 185, 186, 0, 266, 94, 267, 0, 268, 0, 269, 102, 182,
187, 0, 0, 274, 0, 275, 0, 276, 0, 0, 183, 184, 185, 186, 187, 188, 189, 190, 0, 0,
277, 94, 95, 96, 97, 98, 0, 286, 0, 287, 0, 0, 284, 0, 285, 0, 286, 115, 116, 287,
0, 288, 212, 289, 99, 94, 95, 96, 97, 98, 117, 118, 119, 120, 121, 0, 0, 0, 298, 0,
0, 0, 294, 0, 100, 0, 0, 101, 99, 115, 299, 0, 300, 0, 301, 0, 0, 123, 77, 0,
116, 117, 118, 119, 233, 235, 2, 3, 100, 4, 0, 0, 0, 133, 306, 78, 79, 80, 81, 82,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
15, 16, 17, 18, 19, 20, 0, 216, 217, 21, 93, 238, 240, 115, 116, 94, 117, 118, 119, 120,
113, 114, 0, 115, 116, 117, 118, 119, 0, 0, 121, 124, 0, 0, 0, 220, 221, 2, 3, 0,
0, 22, 23, 86, 87, 88, 89, 90, 91, 0,
24, 25, 26, 92, 0, 0, 131, 27, 0, 28,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 0, 102, 103, 14, 15, 16, 17, 18, 19, 20, 21, 0, 104,
21, 104, 105, 106, 107, 108, 0, 0, 0, 0, 105, 22, 106, 107, 108, 109, 110, 0, 0, 0,
109, 110, 22, 23, 0, 0, 0, 0, 111, 0, 0, 111, 112, 23, 24, 0, 0, 0, 0, 113,
0, 24, 25, 26, 125, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 127, 0, 0, 0, 28,
28, 37, 4, 5, 6, 7, 8, 9, 10, 11, 0, 29, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
0, 0, 21, 113, 114, 0, 115, 116, 117, 118, 0, 104, 105, 22, 106, 107, 108, 109, 110, 0,
119, 0, 0, 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, 111, 112, 23, 24, 0, 0, 0,
0, 0, 0, 24, 25, 26, 121, 75, 0, 144, 0, 113, 0, 0, 25, 26, 27, 146, 117, 118,
0, 0, 28, 0, 76, 77, 78, 79, 80, 81, 119, 120, 121, 29, 38, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 0, 0, 0, 22, 0, 0, 96,
97, 98, 99, 100, 0, 0, 0, 0, 23, 24,
0, 0, 101, 0, 0, 0, 0, 25, 26, 27,
130, 77, 102, 0, 0, 103, 29, 0, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 0, 0, 0, 94, 224,
77, 0, 0, 0, 131, 0, 0, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 0, 0, 0, 0, 94, 231, 77,
0, 0, 0, 225, 0, 0, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 0, 0, 0, 92, 128, 75, 0, 0, 0, 92, 93, 0, 0, 0, 0, 94, 258, 77, 0,
122, 0, 0, 76, 77, 78, 79, 80, 81, 82, 0, 0, 232, 0, 0, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
0, 0, 0, 92, 220, 75, 0, 0, 0, 129, 93, 0, 0, 0, 0, 94, 261, 77, 0, 0,
0, 0, 76, 77, 78, 79, 80, 81, 82, 83, 0, 259, 0, 0, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
0, 0, 92, 227, 75, 0, 0, 0, 221, 0, 0, 0, 0, 0, 94, 263, 77, 0, 0, 0,
0, 76, 77, 78, 79, 80, 81, 82, 83, 84, 262, 0, 0, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 0, 0, 0, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
0, 92, 252, 75, 0, 0, 0, 228, 0, 0, 0, 0, 0, 94, 295, 77, 0, 0, 0, 264,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 0, 0, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 0, 0, 0, 0, 86, 87, 88, 89, 90, 91, 92, 93, 0, 0,
92, 255, 75, 0, 0, 0, 253, 0, 0, 76, 0, 0, 94, 77, 0, 0, 0, 0, 296, 0,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 0, 0, 0, 0, 92,
284, 75, 0, 0, 0, 256, 0, 0, 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 0, 0, 0, 0, 92, 75, 88, 89, 90, 91, 92, 93, 0, 0, 0, 0,
0, 0, 0, 0, 285, 0, 76, 77, 78, 79, 94, 77, 0, 0, 0, 0, 144, 0, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 0, 0, 0, 0, 92, 75, 0, 0, 90, 91, 92, 93, 0, 0, 0, 0, 94, 77,
0, 0, 141, 0, 76, 77, 78, 79, 80, 81, 0, 0, 0, 0, 257, 0, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 0, 0, 0, 92, 75, 0, 0, 0, 0,
251, 0, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 0, 0,
0, 0, 92, 75, 0, 0, 0, 0, 270, 0,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 0, 0, 0, 0,
92, 209, 75, 0, 0, 0, 295, 0, 0, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 0, 214, 75, 0, 92,
0, 0, 0, 210, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 218, 75, 0, 92, 0, 0, 0, 215, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 0, 244, 75, 0, 92,
0, 0, 0, 219, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 246, 75, 0, 92, 0, 0, 0, 245, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 0, 248, 75, 0, 92,
0, 0, 0, 247, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 264, 75, 0, 92, 0, 0, 0, 249, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
87, 88, 89, 90, 91, 0, 266, 75, 0, 92,
0, 0, 0, 265, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
0, 268, 75, 0, 92, 0, 0, 0, 267, 76, 92, 93, 0, 0, 0, 0, 94, 77, 0, 0,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 279, 0, 78, 79, 80, 81, 82, 83,
87, 88, 89, 90, 91, 0, 278, 75, 0, 92, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
0, 0, 0, 269, 76, 77, 78, 79, 80, 81, 0, 0, 0, 0, 94, 213, 77, 0, 0, 0,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 307, 0, 0, 78, 79, 80, 81, 82, 83, 84,
0, 280, 75, 0, 92, 0, 0, 0, 279, 76, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 218, 77, 0, 94, 0, 0, 0, 214, 78, 79,
87, 88, 89, 90, 91, 0, 282, 75, 0, 92, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
0, 0, 0, 281, 76, 77, 78, 79, 80, 81, 90, 91, 92, 93, 0, 222, 77, 0, 94, 0,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 219, 78, 79, 80, 81, 82, 83, 84,
0, 0, 75, 0, 92, 0, 0, 0, 283, 76, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 250, 77, 0, 94, 0, 0, 0, 223, 78, 79,
87, 88, 89, 90, 91, 0, 0, 75, 0, 92, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
0, 0, 0, 290, 76, 77, 78, 79, 80, 81, 90, 91, 92, 93, 0, 252, 77, 0, 94, 0,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 251, 78, 79, 80, 81, 82, 83, 84,
0, 0, 75, 0, 92, 0, 0, 0, 291, 76, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 254, 77, 0, 94, 0, 0, 0, 253, 78, 79,
87, 88, 89, 90, 91, 0, 0, 75, 0, 92, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
0, 0, 0, 292, 76, 77, 78, 79, 80, 81, 90, 91, 92, 93, 0, 273, 77, 0, 94, 0,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 255, 78, 79, 80, 81, 82, 83, 84,
223, 75, 0, 0, 92, 0, 0, 93, 76, 77, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
275, 77, 0, 94, 0, 0, 0, 274, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 277, 77, 0, 94, 0,
0, 0, 276, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
289, 77, 0, 94, 0, 0, 0, 278, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 291, 77, 0, 94, 0,
0, 0, 290, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
293, 77, 0, 94, 0, 0, 0, 292, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 0, 77, 0, 94, 0,
0, 0, 294, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
0, 77, 0, 94, 0, 0, 0, 302, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 0, 77, 0, 94, 0,
0, 0, 303, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 0,
0, 77, 0, 94, 0, 0, 0, 304, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 0, 0, 0, 0, 94, 0,
0, 95, 96, 97, 98, 99, 100, 96, 97, 98,
99, 100, 0, 0, 0, 101, 0, 0, 0, 0,
101, 0, 0, 0, 0, 102, 0, 0, 0, 0,
102, 145, 227, 77, 0, 0, 226, 0, 0, 0,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 225, 75, 0, 0, 92, 0, 88, 89, 90, 91, 92, 93, 229, 77, 0, 0,
0, 0, 76, 77, 78, 79, 80, 81, 82, 83, 94, 0, 0, 0, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 229, 75, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
0, 0, 92, 0, 0, 0, 76, 77, 78, 79, 233, 77, 0, 0, 94, 0, 0, 0, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 250, 75, 0, 0, 92, 0, 0, 0, 90, 91, 92, 93, 234, 77, 0, 0, 94, 0,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 0, 0, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 271, 75, 0, 0, 86, 87, 88, 89, 90, 91, 92, 93, 256, 77,
92, 0, 0, 0, 76, 77, 78, 79, 80, 81, 0, 0, 94, 0, 0, 0, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
293, 75, 0, 0, 92, 0, 0, 0, 76, 77, 92, 93, 280, 77, 0, 0, 94, 0, 0, 0,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 92, 93, 305, 77, 0, 0,
94, 0, 0, 0, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
77, 0, 0, 208, 94, 0, 0, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 77, 0, 0, 209, 94, 0, 0,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 75, 0, 0, 204, 92, 0, 88, 89, 90, 91, 92, 93, 77, 0, 0, 210,
0, 76, 77, 78, 79, 80, 81, 82, 83, 84, 94, 0, 0, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 75, 0, 0, 85, 86, 87, 88, 89, 90, 91, 92, 93, 77,
205, 92, 0, 0, 76, 77, 78, 79, 80, 81, 0, 0, 211, 94, 0, 0, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
75, 0, 0, 206, 92, 0, 0, 76, 77, 78, 92, 93, 77, 212, 0, 0, 94, 0, 0, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
89, 90, 91, 75, 0, 0, 207, 92, 0, 0, 89, 90, 91, 92, 93, 77, 215, 0, 0, 94,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 0, 0, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 75, 208, 0, 0, 86, 87, 88, 89, 90, 91, 92, 93, 77, 0,
92, 0, 0, 76, 77, 78, 79, 80, 81, 82, 0, 0, 94, 0, 0, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 75, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
211, 0, 0, 92, 0, 0, 76, 77, 78, 79, 93, 0, 0, 115, 116, 94, 117, 118, 119, 120,
121, 216, 0, 0, 96, 97, 98, 99, 100, 115,
116, 0, 117, 118, 119, 120, 121, 101, 0, 147,
0, 0, 0, 0, 0, 115, 116, 102, 117, 118,
119, 120, 121, 104, 105, 228, 106, 107, 108, 109,
110, 0, 0, 0, 0, 111, 112, 0, 0, 0,
0, 230, 0, 113, 115, 116, 114, 117, 118, 119,
120, 121, 217, 0, 0, 0, 0, 0, 115, 116,
0, 117, 118, 119, 120, 121, 0, 122, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 75, 0, 0, 0, 92, 0, 0, 76, 90, 91, 92, 93, 0, 0, 104, 105, 94, 106,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 107, 108, 109, 110, 0, 0, 0, 0, 111, 112,
87, 88, 89, 90, 91, 0, 0, 102, 103, 92, 0, 0, 0, 0, 0, 0, 113, 81, 82, 83,
104, 105, 106, 107, 108, 0, 0, 0, 0, 109, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
110, 0, 0, 0, 0, 113, 114, 111, 115, 116, 134, 0, 0, 0, 94, 0, 0, 0, 115, 116,
117, 118, 119, 143, 113, 114, 0, 115, 116, 117, 0, 117, 118, 119, 120, 121
118, 119, 102, 103, 0, 104, 105, 106, 107, 108,
0, 224, 0, 0, 109, 110, 0, 0, 0, 0,
226, 0, 111, 132, 0, 112, 94, 95, 96, 97,
98, 113, 114, 0, 115, 116, 117, 118, 119, 99,
113, 114, 0, 115, 116, 117, 118, 119, 0, 100,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 0, 0, 102, 103,
92, 104, 105, 106, 107, 108, 0, 0, 0, 0,
109, 110, 0, 0, 0, 0, 0, 0, 111, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 0, 0, 0, 0, 92, 83, 84, 85,
86, 87, 88, 89, 90, 91, 0, 0, 0, 0,
92
}; };
static const fftype_int16 ffcheck[] = static const fftype_int16 ffcheck[] =
{ {
1, 6, 51, 38, 6, 23, 20, 20, 9, 10, 1, 6, 21, 21, 7, 39, 21, 44, 9, 10,
7, 28, 29, 48, 31, 32, 33, 34, 35, 16, 25, 21, 49, 52, 17, 49, 26, 27, 28, 29,
21, 22, 23, 1, 25, 26, 48, 28, 23, 23, 30, 22, 23, 24, 1, 26, 27, 6, 29, 39,
20, 9, 10, 11, 51, 25, 26, 27, 28, 29, 41, 42, 9, 10, 11, 6, 55, 55, 49, 49,
54, 54, 25, 26, 27, 28, 29, 44, 38, 54, 21, 24, 45, 49, 25, 55, 28, 29, 30, 24,
28, 52, 53, 54, 55, 38, 53, 23, 48, 40, 55, 54, 29, 54, 55, 56, 57, 39, 36, 37,
41, 42, 43, 43, 54, 48, 48, 48, 48, 20, 38, 39, 40, 41, 42, 43, 44, 49, 24, 24,
71, 54, 73, 24, 75, 76, 77, 78, 79, 80, 21, 49, 73, 49, 75, 49, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 48, 94, 1, 28, 29, 35, 99, 100, 91, 92, 93, 94, 36, 96, 6, 21, 29, 30,
40, 41, 9, 10, 6, 38, 20, 20, 48, 6, 101, 102, 6, 6, 36, 6, 55, 1, 39, 41,
111, 24, 6, 54, 21, 48, 94, 24, 25, 26, 42, 55, 113, 21, 6, 9, 10, 49, 49, 96,
121, 28, 54, -1, -1, 126, -1, 128, -1, -1, 55, -1, 123, 55, -1, -1, -1, 128, 22, 130,
-1, -1, 133, -1, 135, 113, 114, 115, 116, 117, -1, 25, 26, 27, 135, 29, 137, 138, 115, 116,
118, 119, 25, 26, 27, 28, 29, 35, 126, -1, 117, 118, 119, 120, 121, -1, -1, 36, -1, -1,
-1, 1, 40, 41, 132, 38, 27, 28, 29, 9, -1, 128, 41, 42, 21, -1, 1, 134, -1, -1,
48, -1, -1, 35, 71, 48, 73, 38, 40, 41, 49, -1, 29, 30, 9, 32, 33, 34, 35, 36,
-1, 54, -1, -1, 24, -1, 48, 48, 28, 86, 26, 27, 28, 29, 30, -1, -1, -1, -1, 73,
-1, -1, 54, -1, 20, -1, -1, 94, 95, 96, 25, 75, -1, 39, 29, -1, -1, -1, 55, 41,
97, 98, 28, 29, -1, 31, 32, 33, 34, 35, 42, 43, 44, 49, 88, -1, -1, 49, -1, 55,
-1, -1, 25, 26, 27, 28, 29, 208, 209, -1, -1, -1, 96, 97, 98, 99, 100, -1, -1, -1,
211, 212, -1, 214, -1, 38, 123, 218, 54, 220, -1, 212, 213, -1, 215, 216, -1, 218, -1, -1,
-1, -1, 223, -1, 225, 48, -1, 22, 229, -1, -1, 222, -1, 224, -1, -1, 227, -1, 229, -1,
-1, 54, -1, 28, 29, 213, 31, 32, 33, 34, -1, 125, 233, 234, -1, 26, 27, 28, 29, 30,
35, -1, -1, 244, -1, 246, -1, 248, -1, 250, 217, -1, 39, 40, 41, 42, 43, 44, 39, 250,
-1, 252, 102, 103, 104, 105, 106, 107, 108, 109, -1, 252, 49, 254, -1, 256, -1, 258, 49, 104,
110, -1, -1, 264, -1, 266, -1, 268, -1, -1, 105, 106, 107, 108, 109, 110, 111, 112, -1, -1,
271, 25, 26, 27, 28, 29, -1, 278, -1, 280, -1, -1, 273, -1, 275, -1, 277, 29, 30, 280,
-1, 282, 22, 284, 38, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, -1, -1, -1, 289, -1,
-1, -1, 293, -1, 48, -1, -1, 51, 38, 31, 291, -1, 293, -1, 295, -1, -1, 21, 22, -1,
32, 33, 34, 35, 211, 212, 0, 1, 48, 3, -1, -1, -1, 55, 305, 29, 30, 31, 32, 33,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, -1, 177, 178, 23,
28, 29, -1, 31, 32, 33, 34, 35, -1, -1,
-1, 35, 36, 38, 39, 40, 41, 42, 43, -1,
44, 45, 46, 48, -1, -1, 54, 51, -1, 53,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, -1, 28, 29,
23, 31, 32, 33, 34, 35, -1, -1, -1, -1,
40, 41, 35, 36, -1, -1, -1, -1, 48, -1,
-1, 44, 45, 46, 54, -1, -1, -1, -1, -1,
53, 54, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
-1, -1, 23, 28, 29, -1, 31, 32, 33, 34,
35, -1, -1, -1, 35, 36, -1, -1, -1, -1,
-1, -1, -1, 44, 45, 46, 20, 21, -1, 54,
-1, -1, 53, -1, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
-1, -1, -1, -1, 48, 20, 21, -1, -1, -1, 44, 215, 216, 29, 30, 49, 32, 33, 34, 35,
54, -1, -1, 28, 29, 30, 31, 32, 33, 34, 36, 55, -1, -1, -1, 180, 181, 0, 1, -1,
35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
-1, -1, -1, 48, 20, 21, -1, -1, -1, 54, 13, 14, 15, 16, 17, 18, 19, 20, -1, 29,
-1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 30, 24, 32, 33, 34, 35, 36, -1, -1, -1,
36, 37, 38, 39, 40, 41, 42, 43, -1, -1, -1, 41, 42, 36, 37, -1, -1, -1, -1, 49,
-1, -1, 48, 20, 21, -1, -1, -1, 54, -1, -1, -1, 45, 46, 47, 55, -1, -1, -1, 52,
-1, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 54, 3, 4, 5, 6, 7, 8, 9, 10,
37, 38, 39, 40, 41, 42, 43, -1, -1, -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
-1, 48, 20, 21, -1, -1, -1, 54, -1, -1, -1, 29, 30, 24, 32, 33, 34, 35, 36, -1,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, -1, -1, -1, 41, 42, 36, 37, -1, -1, -1,
38, 39, 40, 41, 42, 43, -1, -1, -1, -1, -1, 49, -1, -1, 45, 46, 47, 55, 32, 33,
48, 20, 21, -1, -1, -1, 54, -1, -1, 28, 34, 35, 36, 54, 55, 3, 4, 5, 6, 7,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
39, 40, 41, 42, 43, -1, -1, -1, -1, 48, 18, 19, 20, -1, -1, -1, 24, -1, -1, 26,
20, 21, -1, -1, -1, 54, -1, -1, 28, 29, 27, 28, 29, 30, -1, -1, -1, -1, 36, 37,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 39, -1, -1, -1, -1, 45, 46, 47,
40, 41, 42, 43, -1, -1, -1, -1, 48, 21, 21, 22, 49, -1, -1, 52, 54, -1, 29, 30,
-1, -1, -1, -1, 54, -1, 28, 29, 30, 31, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, -1, -1, -1, 49, 21,
22, -1, -1, -1, 55, -1, -1, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, -1, -1, -1, -1, 48, 21, -1, -1, 42, 43, 44, -1, -1, -1, -1, 49, 21, 22,
-1, -1, 54, -1, 28, 29, 30, 31, 32, 33, -1, -1, -1, 55, -1, -1, 29, 30, 31, 32,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
-1, -1, -1, -1, 48, 21, -1, -1, -1, -1, 43, 44, -1, -1, -1, -1, 49, 21, 22, -1,
54, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, 55, -1, -1, 29, 30, 31, 32, 33,
36, 37, 38, 39, 40, 41, 42, 43, -1, -1,
-1, -1, 48, 21, -1, -1, -1, -1, 54, -1,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, -1, -1, -1, -1,
48, 20, 21, -1, -1, -1, 54, -1, -1, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
-1, 20, 21, -1, 48, -1, -1, -1, 52, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
-1, 20, 21, -1, 48, -1, -1, -1, 52, 28, 44, -1, -1, -1, -1, 49, 21, 22, -1, -1,
-1, 55, -1, -1, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
-1, -1, -1, -1, 49, 21, 22, -1, -1, -1,
55, -1, -1, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
-1, -1, -1, 49, 21, 22, -1, -1, -1, 55,
-1, -1, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, -1, -1,
-1, -1, 49, 22, -1, -1, -1, -1, 55, -1,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48, 39, 40, 41, 42, 43, 44, -1, -1, -1, -1,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 49, 22, -1, -1, -1, -1, 55, -1, 29, 30,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-1, 20, 21, -1, 48, -1, -1, -1, 52, 28, 41, 42, 43, 44, -1, -1, -1, -1, 49, 22,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, -1, -1, -1, 55, -1, 29, 30, 31, 32,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 43, 44, -1, -1, -1, -1, 49, 22, -1, -1,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, -1, 55, -1, 29, 30, 31, 32, 33, 34,
-1, 20, 21, -1, 48, -1, -1, -1, 52, 28, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, -1, -1, -1, -1, 49, 21, 22, -1, -1, -1,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48, 55, -1, -1, 29, 30, 31, 32, 33, 34, 35,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
-1, 20, 21, -1, 48, -1, -1, -1, 52, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, -1, 21, 22, -1, 49, -1,
39, 40, 41, 42, 43, -1, 20, 21, -1, 48, -1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
-1, -1, 21, -1, 48, -1, -1, -1, 52, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, 21, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, 21, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, 21, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, 21, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
21, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, -1, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
-1, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, -1, 22, -1, 49, -1,
-1, -1, 53, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, -1,
-1, 22, -1, 49, -1, -1, -1, 53, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, -1, -1, -1, -1, 49, -1,
-1, 52, 26, 27, 28, 29, 30, 26, 27, 28,
29, 30, -1, -1, -1, 39, -1, -1, -1, -1,
39, -1, -1, -1, -1, 49, -1, -1, -1, -1,
49, 55, 21, 22, -1, -1, 55, -1, -1, -1,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, -1, 21, -1, 48, 39, 40, 41, 42, 43, 44, 21, 22, -1, -1,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 49, -1, -1, -1, 29, 30, 31, 32, 33, 34,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
-1, -1, 21, -1, 48, -1, -1, -1, 52, 28, 21, 22, -1, -1, 49, -1, -1, -1, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 21, 22, -1, -1, 49, -1,
-1, -1, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 21, 22,
-1, -1, 49, -1, -1, -1, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 21, 22, -1, -1, 49, -1, -1, -1,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, -1, 21, -1, 48, 39, 40, 41, 42, 43, 44, 21, 22, -1, -1,
-1, -1, -1, 52, 28, 29, 30, 31, 32, 33, 49, -1, -1, -1, 29, 30, 31, 32, 33, 34,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
20, 21, -1, -1, 48, -1, -1, 51, 28, 29, 22, -1, -1, 25, 49, -1, -1, 29, 30, 31,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 20, 21, -1, -1, 48, -1,
-1, -1, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 20, 21,
-1, -1, 48, -1, -1, -1, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 20, 21, -1, -1, 48, -1, -1, -1, 42, 43, 44, 22, -1, -1, 25, 49, -1, -1,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
38, 39, 40, 41, 42, 43, 20, 21, -1, -1, 39, 40, 41, 42, 43, 44, 22, -1, -1, 25,
48, -1, -1, -1, 28, 29, 30, 31, 32, 33, 49, -1, -1, 29, 30, 31, 32, 33, 34, 35,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 36, 37, 38, 39, 40, 41, 42, 43, 44, 22,
20, 21, -1, -1, 48, -1, -1, -1, 28, 29, -1, -1, 25, 49, -1, -1, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 22, 23, -1, -1, 49, -1, -1, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 21, -1, -1, 24, 48, -1, 40, 41, 42, 43, 44, 22, 23, -1, -1, 49,
-1, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 21, -1, -1, 37, 38, 39, 40, 41, 42, 43, 44, 22, -1,
24, 48, -1, -1, 28, 29, 30, 31, 32, 33, -1, -1, 49, -1, -1, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
21, -1, -1, 24, 48, -1, -1, 28, 29, 30, 44, -1, -1, 29, 30, 49, 32, 33, 34, 35,
36, 23, -1, -1, 26, 27, 28, 29, 30, 29,
30, -1, 32, 33, 34, 35, 36, 39, -1, 55,
-1, -1, -1, -1, -1, 29, 30, 49, 32, 33,
34, 35, 36, 29, 30, 55, 32, 33, 34, 35,
36, -1, -1, -1, -1, 41, 42, -1, -1, -1,
-1, 55, -1, 49, 29, 30, 52, 32, 33, 34,
35, 36, 23, -1, -1, -1, -1, -1, 29, 30,
-1, 32, 33, 34, 35, 36, -1, 52, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 21, -1, -1, 24, 48, -1, -1, 41, 42, 43, 44, -1, -1, 29, 30, 49, 32,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 33, 34, 35, 36, -1, -1, -1, -1, 41, 42,
38, 39, 40, 41, 42, 43, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, 49, 32, 33, 34,
48, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
35, 36, 37, 38, 39, 40, 41, 42, 43, 21, 21, -1, -1, -1, 49, -1, -1, -1, 29, 30,
22, -1, -1, 48, -1, -1, 28, 29, 30, 31, -1, 32, 33, 34, 35, 36
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 21, -1, -1, -1, 48, -1, -1, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, -1, -1, 28, 29, 48,
31, 32, 33, 34, 35, -1, -1, -1, -1, 40,
41, -1, -1, -1, -1, 28, 29, 48, 31, 32,
33, 34, 35, 54, 28, 29, -1, 31, 32, 33,
34, 35, 28, 29, -1, 31, 32, 33, 34, 35,
-1, 54, -1, -1, 40, 41, -1, -1, -1, -1,
54, -1, 48, 20, -1, 51, 25, 26, 27, 28,
29, 28, 29, -1, 31, 32, 33, 34, 35, 38,
28, 29, -1, 31, 32, 33, 34, 35, -1, 48,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, -1, -1, 28, 29,
48, 31, 32, 33, 34, 35, -1, -1, -1, -1,
40, 41, -1, -1, -1, -1, -1, -1, 48, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, -1, -1, -1, -1, 48, 35, 36, 37,
38, 39, 40, 41, 42, 43, -1, -1, -1, -1,
48
}; };
/* FFSTOS[STATE-NUM] -- The (internal number of the) accessing /* FFSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */ symbol of state STATE-NUM. */
static const fftype_uint8 ffstos[] = static const fftype_int8 ffstos[] =
{ {
0, 56, 0, 1, 3, 4, 5, 6, 7, 8, 0, 57, 0, 1, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 23, 35, 36, 44, 45, 46, 51, 53, 57, 19, 20, 24, 36, 37, 45, 46, 47, 52, 54,
58, 59, 60, 61, 62, 63, 51, 54, 60, 61, 58, 59, 60, 61, 62, 63, 64, 52, 55, 61,
62, 63, 60, 61, 62, 63, 60, 61, 63, 6, 62, 63, 64, 61, 62, 63, 64, 61, 62, 64,
54, 6, 23, 23, 23, 23, 60, 61, 63, 60, 6, 55, 6, 6, 24, 24, 24, 24, 61, 62,
60, 61, 62, 60, 61, 60, 61, 60, 61, 62, 64, 61, 61, 62, 63, 61, 62, 61, 62, 61,
63, 20, 24, 20, 24, 21, 28, 29, 30, 31, 62, 63, 64, 21, 25, 21, 25, 22, 29, 30,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
42, 43, 48, 51, 25, 26, 27, 28, 29, 38, 41, 42, 43, 44, 49, 52, 26, 27, 28, 29,
48, 51, 28, 29, 31, 32, 33, 34, 35, 40, 30, 39, 49, 52, 29, 30, 32, 33, 34, 35,
41, 48, 51, 28, 29, 31, 32, 33, 34, 35, 36, 41, 42, 49, 52, 29, 30, 32, 33, 34,
51, 20, 54, 20, 54, 54, 20, 54, 20, 54, 35, 36, 52, 21, 55, 21, 55, 55, 21, 55,
54, 54, 20, 20, 54, 20, 54, 60, 60, 60, 21, 55, 55, 55, 21, 21, 55, 21, 21, 55,
60, 54, 54, 54, 54, 60, 61, 60, 61, 60, 61, 61, 61, 61, 55, 55, 55, 55, 61, 62,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 62, 61, 61, 61, 61, 61, 61, 61, 61,
60, 61, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, 61, 61, 61, 61, 61,
63, 61, 61, 61, 61, 60, 60, 44, 53, 62, 61, 61, 62, 64, 62, 62, 62, 62, 61, 61,
62, 62, 62, 62, 62, 62, 62, 62, 60, 63, 45, 54, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 60, 61, 60, 63, 63, 61, 64, 64, 64, 64, 64, 64, 64, 61,
60, 63, 60, 60, 24, 24, 24, 24, 22, 20, 62, 61, 64, 61, 64, 61, 61, 61, 25, 25,
52, 22, 22, 22, 20, 52, 62, 62, 20, 52, 25, 25, 23, 21, 53, 23, 23, 23, 21, 53,
20, 54, 54, 20, 54, 20, 54, 20, 54, 20, 63, 63, 21, 53, 21, 55, 55, 21, 55, 21,
60, 60, 60, 61, 60, 61, 63, 60, 60, 60, 55, 21, 55, 21, 21, 61, 61, 61, 62, 61,
60, 60, 6, 60, 20, 52, 20, 52, 20, 52, 62, 64, 61, 61, 61, 61, 61, 6, 61, 61,
20, 54, 20, 54, 20, 20, 54, 60, 60, 60, 21, 53, 21, 53, 21, 53, 21, 55, 21, 55,
60, 60, 6, 6, 20, 52, 20, 52, 20, 52, 21, 21, 55, 21, 55, 61, 61, 61, 61, 61,
54, 20, 54, 54, 60, 60, 60, 60, 20, 52, 6, 6, 6, 21, 53, 21, 53, 21, 53, 55,
20, 52, 20, 52, 20, 54, 60, 60, 60, 60, 21, 55, 21, 55, 61, 61, 61, 61, 6, 21,
52, 52, 52, 20, 60, 54 53, 21, 53, 21, 53, 21, 55, 55, 61, 61,
61, 61, 53, 53, 53, 21, 61, 55
}; };
/* FFR1[FFN] -- Symbol number of symbol that rule FFN derives. */ /* FFR1[FFN] -- Symbol number of symbol that rule FFN derives. */
static const fftype_uint8 ffr1[] = static const fftype_int8 ffr1[] =
{ {
0, 55, 56, 56, 57, 57, 57, 57, 57, 57, 0, 56, 57, 57, 58, 58, 58, 58, 58, 58,
58, 58, 59, 59, 59, 59, 60, 61, 62, 62, 59, 59, 60, 60, 60, 60, 61, 62, 63, 63,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
62, 60, 60, 60, 60, 60, 60, 60, 60, 60, 63, 61, 61, 61, 61, 61, 61, 61, 61, 61,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
63, 63, 63, 63, 63, 63, 63, 63, 63 61, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 64, 64, 64, 64, 64, 64, 64, 64,
64
}; };
/* FFR2[FFN] -- Number of symbols on the right hand side of rule FFN. */ /* FFR2[FFN] -- Number of symbols on the right hand side of rule FFN. */
static const fftype_uint8 ffr2[] = static const fftype_int8 ffr2[] =
{ {
0, 2, 0, 2, 1, 2, 2, 2, 2, 2, 0, 2, 0, 2, 1, 2, 2, 2, 2, 2,
2, 3, 2, 3, 3, 3, 2, 2, 1, 1, 2, 3, 2, 3, 3, 3, 2, 2, 1, 1,
4, 3, 3, 3, 4, 6, 8, 10, 12, 2, 4, 3, 3, 3, 4, 6, 8, 10, 12, 2,
3, 1, 1, 1, 4, 1, 1, 3, 3, 3, 3, 1, 1, 1, 4, 1, 1, 3, 3, 3,
3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3,
3, 5, 5, 5, 2, 3, 3, 3, 3, 5, 3, 5, 5, 5, 2, 3, 3, 3, 3, 5,
5, 9, 4, 6, 8, 10, 12, 2, 2, 2, 5, 9, 4, 6, 8, 10, 12, 2, 2, 2,
2, 1, 1, 4, 3, 3, 3, 3, 3, 3, 2, 1, 1, 4, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3,
3, 3, 5, 7, 11, 15, 2, 3, 5, 9, 3, 3, 5, 7, 11, 15, 2, 3, 5, 9,
3, 7, 9, 4, 6, 8, 10, 12, 2, 3, 7, 11, 3, 7, 9, 4, 6, 8, 10, 12,
1, 1, 4, 1, 3, 3, 5, 5, 7 2, 3, 1, 1, 4, 1, 3, 3, 5, 5,
7
}; };
enum { FFENOMEM = -2 };
#define fferrok (fferrstatus = 0) #define fferrok (fferrstatus = 0)
#define ffclearin (ffchar = FFEMPTY) #define ffclearin (ffchar = FFEMPTY)
#define FFEMPTY (-2)
#define FFEOF 0
#define FFACCEPT goto ffacceptlab #define FFACCEPT goto ffacceptlab
#define FFABORT goto ffabortlab #define FFABORT goto ffabortlab
#define FFERROR goto fferrorlab #define FFERROR goto fferrorlab
#define FFRECOVERING() (!!fferrstatus) #define FFRECOVERING() (!!fferrstatus)
#define FFBACKUP(Token, Value) \ #define FFBACKUP(Token, Value) \
do \ do \
if (ffchar == FFEMPTY) \ if (ffchar == FFEMPTY) \
{ \ { \
ffchar = (Token); \ ffchar = (Token); \
fflval = (Value); \ fflval = (Value); \
FFPOPSTACK (fflen); \ FFPOPSTACK (fflen); \
ffstate = *ffssp; \ ffstate = *ffssp; \
goto ffbackup; \ goto ffbackup; \
} \ } \
else \ else \
{ \ { \
fferror (FF_("syntax error: cannot back up")); \ fferror (FF_("syntax error: cannot back up")); \
FFERROR; \ FFERROR; \
} \ } \
while (0) while (0)
/* Error token number */ /* Backward compatibility with an undocumented macro.
#define FFTERROR 1 Use FFerror or FFUNDEF. */
#define FFERRCODE 256 #define FFERRCODE FFUNDEF
/* Enable debugging if requested. */ /* Enable debugging if requested. */
#if FFDEBUG #if FFDEBUG
# ifndef FFFPRINTF # ifndef FFFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define FFFPRINTF fprintf # define FFFPRINTF fprintf
# endif # endif
# define FFDPRINTF(Args) \ # define FFDPRINTF(Args) \
do { \ do { \
if (ffdebug) \ if (ffdebug) \
FFFPRINTF Args; \ FFFPRINTF Args; \
} while (0) } while (0)
/* This macro is provided for backward compatibility. */ /* This macro is provided for backward compatibility. */
#ifndef FF_LOCATION_PRINT # ifndef FF_LOCATION_PRINT
# define FF_LOCATION_PRINT(File, Loc) ((void) 0) # define FF_LOCATION_PRINT(File, Loc) ((void) 0)
#endif # endif
# define FF_SYMBOL_PRINT(Title, Type, Value, Location) \ # define FF_SYMBOL_PRINT(Title, Kind, Value, Location) \
do { \ do { \
if (ffdebug) \ if (ffdebug) \
{ \ { \
FFFPRINTF (stderr, "%s ", Title); \ FFFPRINTF (stderr, "%s ", Title); \
ff_symbol_print (stderr, \ ff_symbol_print (stderr, \
Type, Value); \ Kind, Value); \
FFFPRINTF (stderr, "\n"); \ FFFPRINTF (stderr, "\n"); \
} \ } \
} while (0) } while (0)
/*----------------------------------------. /*-----------------------------------.
| Print this symbol's value on FFOUTPUT. | | Print this symbol's value on FFO. |
`----------------------------------------*/ `-----------------------------------*/
static void static void
ff_symbol_value_print (FILE *ffoutput, int fftype, FFSTYPE const * const ffvalue ff_symbol_value_print (FILE *ffo,
p) ffsymbol_kind_t ffkind, FFSTYPE const * const ffvaluep)
{ {
FILE *ffo = ffoutput; FILE *ffoutput = ffo;
FFUSE (ffo); FFUSE (ffoutput);
if (!ffvaluep) if (!ffvaluep)
return; return;
# ifdef FFPRINT # ifdef FFPRINT
if (fftype < FFNTOKENS) if (ffkind < FFNTOKENS)
FFPRINT (ffoutput, fftoknum[fftype], *ffvaluep); FFPRINT (ffo, fftoknum[ffkind], *ffvaluep);
# endif # endif
FFUSE (fftype); FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
FFUSE (ffkind);
FF_IGNORE_MAYBE_UNINITIALIZED_END
} }
/*--------------------------------. /*---------------------------.
| Print this symbol on FFOUTPUT. | | Print this symbol on FFO. |
`--------------------------------*/ `---------------------------*/
static void static void
ff_symbol_print (FILE *ffoutput, int fftype, FFSTYPE const * const ffvaluep) ff_symbol_print (FILE *ffo,
ffsymbol_kind_t ffkind, FFSTYPE const * const ffvaluep)
{ {
FFFPRINTF (ffoutput, "%s %s (", FFFPRINTF (ffo, "%s %s (",
fftype < FFNTOKENS ? "token" : "nterm", fftname[fftype]); ffkind < FFNTOKENS ? "token" : "nterm", ffsymbol_name (ffkind));
ff_symbol_value_print (ffoutput, fftype, ffvaluep); ff_symbol_value_print (ffo, ffkind, ffvaluep);
FFFPRINTF (ffoutput, ")"); FFFPRINTF (ffo, ")");
} }
/*------------------------------------------------------------------. /*------------------------------------------------------------------.
| ff_stack_print -- Print the state stack from its BOTTOM up to its | | ff_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). | | TOP (included). |
`------------------------------------------------------------------*/ `------------------------------------------------------------------*/
static void static void
ff_stack_print (fftype_int16 *ffbottom, fftype_int16 *fftop) ff_stack_print (ff_state_t *ffbottom, ff_state_t *fftop)
{ {
FFFPRINTF (stderr, "Stack now"); FFFPRINTF (stderr, "Stack now");
for (; ffbottom <= fftop; ffbottom++) for (; ffbottom <= fftop; ffbottom++)
{ {
int ffbot = *ffbottom; int ffbot = *ffbottom;
FFFPRINTF (stderr, " %d", ffbot); FFFPRINTF (stderr, " %d", ffbot);
} }
FFFPRINTF (stderr, "\n"); FFFPRINTF (stderr, "\n");
} }
skipping to change at line 1359 skipping to change at line 1559
do { \ do { \
if (ffdebug) \ if (ffdebug) \
ff_stack_print ((Bottom), (Top)); \ ff_stack_print ((Bottom), (Top)); \
} while (0) } while (0)
/*------------------------------------------------. /*------------------------------------------------.
| Report that the FFRULE is going to be reduced. | | Report that the FFRULE is going to be reduced. |
`------------------------------------------------*/ `------------------------------------------------*/
static void static void
ff_reduce_print (fftype_int16 *ffssp, FFSTYPE *ffvsp, int ffrule) ff_reduce_print (ff_state_t *ffssp, FFSTYPE *ffvsp,
int ffrule)
{ {
unsigned long int fflno = ffrline[ffrule]; int fflno = ffrline[ffrule];
int ffnrhs = ffr2[ffrule]; int ffnrhs = ffr2[ffrule];
int ffi; int ffi;
FFFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", FFFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
ffrule - 1, fflno); ffrule - 1, fflno);
/* The symbols being reduced. */ /* The symbols being reduced. */
for (ffi = 0; ffi < ffnrhs; ffi++) for (ffi = 0; ffi < ffnrhs; ffi++)
{ {
FFFPRINTF (stderr, " $%d = ", ffi + 1); FFFPRINTF (stderr, " $%d = ", ffi + 1);
ff_symbol_print (stderr, ff_symbol_print (stderr,
ffstos[ffssp[ffi + 1 - ffnrhs]], FF_ACCESSING_SYMBOL (+ffssp[ffi + 1 - ffnrhs]),
&(ffvsp[(ffi + 1) - (ffnrhs)]) &ffvsp[(ffi + 1) - (ffnrhs)]);
);
FFFPRINTF (stderr, "\n"); FFFPRINTF (stderr, "\n");
} }
} }
# define FF_REDUCE_PRINT(Rule) \ # define FF_REDUCE_PRINT(Rule) \
do { \ do { \
if (ffdebug) \ if (ffdebug) \
ff_reduce_print (ffssp, ffvsp, Rule); \ ff_reduce_print (ffssp, ffvsp, Rule); \
} while (0) } while (0)
/* Nonzero means print parse trace. It is left uninitialized so that /* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */ multiple parsers can coexist. */
int ffdebug; int ffdebug;
#else /* !FFDEBUG */ #else /* !FFDEBUG */
# define FFDPRINTF(Args) # define FFDPRINTF(Args) ((void) 0)
# define FF_SYMBOL_PRINT(Title, Type, Value, Location) # define FF_SYMBOL_PRINT(Title, Kind, Value, Location)
# define FF_STACK_PRINT(Bottom, Top) # define FF_STACK_PRINT(Bottom, Top)
# define FF_REDUCE_PRINT(Rule) # define FF_REDUCE_PRINT(Rule)
#endif /* !FFDEBUG */ #endif /* !FFDEBUG */
/* FFINITDEPTH -- initial size of the parser's stacks. */ /* FFINITDEPTH -- initial size of the parser's stacks. */
#ifndef FFINITDEPTH #ifndef FFINITDEPTH
# define FFINITDEPTH 200 # define FFINITDEPTH 200
#endif #endif
/* FFMAXDEPTH -- maximum size the stacks can grow to (effective only /* FFMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used). if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if Do not make this value too large; the results are undefined if
FFSTACK_ALLOC_MAXIMUM < FFSTACK_BYTES (FFMAXDEPTH) FFSTACK_ALLOC_MAXIMUM < FFSTACK_BYTES (FFMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */ evaluated with infinite-precision integer arithmetic. */
#ifndef FFMAXDEPTH #ifndef FFMAXDEPTH
# define FFMAXDEPTH 10000 # define FFMAXDEPTH 10000
#endif #endif
#if FFERROR_VERBOSE
# ifndef ffstrlen
# if defined __GLIBC__ && defined _STRING_H
# define ffstrlen strlen
# else
/* Return the length of FFSTR. */
static FFSIZE_T
ffstrlen (const char *ffstr)
{
FFSIZE_T fflen;
for (fflen = 0; ffstr[fflen]; fflen++)
continue;
return fflen;
}
# endif
# endif
# ifndef ffstpcpy
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define ffstpcpy stpcpy
# else
/* Copy FFSRC to FFDEST, returning the address of the terminating '\0' in
FFDEST. */
static char *
ffstpcpy (char *ffdest, const char *ffsrc)
{
char *ffd = ffdest;
const char *ffs = ffsrc;
while ((*ffd++ = *ffs++) != '\0')
continue;
return ffd - 1;
}
# endif
# endif
# ifndef fftnamerr
/* Copy to FFRES the contents of FFSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for fferror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). FFSTR is taken from fftname. If FFRES is
null, do not copy; instead, return the length of what the result
would have been. */
static FFSIZE_T
fftnamerr (char *ffres, const char *ffstr)
{
if (*ffstr == '"')
{
FFSIZE_T ffn = 0;
char const *ffp = ffstr;
for (;;)
switch (*++ffp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++ffp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (ffres)
ffres[ffn] = *ffp;
ffn++;
break;
case '"':
if (ffres)
ffres[ffn] = '\0';
return ffn;
}
do_not_strip_quotes: ;
}
if (! ffres)
return ffstrlen (ffstr);
return ffstpcpy (ffres, ffstr) - ffres;
}
# endif
/* Copy into *FFMSG, which is of size *FFMSG_ALLOC, an error message
about the unexpected token FFTOKEN for the state stack whose top is
FFSSP.
Return 0 if *FFMSG was successfully written. Return 1 if *FFMSG is
not large enough to hold the message. In that case, also set
*FFMSG_ALLOC to the required number of bytes. Return 2 if the
required number of bytes is too large to store. */
static int
ffsyntax_error (FFSIZE_T *ffmsg_alloc, char **ffmsg,
fftype_int16 *ffssp, int fftoken)
{
FFSIZE_T ffsize0 = fftnamerr (FF_NULLPTR, fftname[fftoken]);
FFSIZE_T ffsize = ffsize0;
enum { FFERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *ffformat = FF_NULLPTR;
/* Arguments of ffformat. */
char const *ffarg[FFERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
"expected"). */
int ffcount = 0;
/* There are many possibilities here to consider:
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in ffchar) is if
this state is a consistent state with a default action. Thus,
detecting the absence of a lookahead is sufficient to determine
that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is a
consistent state with a default action. There might have been a
previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated ffchar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (fftoken != FFEMPTY)
{
int ffn = ffpact[*ffssp];
ffarg[ffcount++] = fftname[fftoken];
if (!ffpact_value_is_default (ffn))
{
/* Start FFX at -FFN if negative to avoid negative indexes in
FFCHECK. In other words, skip the first -FFN actions for
this state because they are default actions. */
int ffxbegin = ffn < 0 ? -ffn : 0;
/* Stay within bounds of both ffcheck and fftname. */
int ffchecklim = FFLAST - ffn + 1;
int ffxend = ffchecklim < FFNTOKENS ? ffchecklim : FFNTOKENS;
int ffx;
for (ffx = ffxbegin; ffx < ffxend; ++ffx)
if (ffcheck[ffx + ffn] == ffx && ffx != FFTERROR
&& !fftable_value_is_error (fftable[ffx + ffn]))
{
if (ffcount == FFERROR_VERBOSE_ARGS_MAXIMUM)
{
ffcount = 1;
ffsize = ffsize0;
break;
}
ffarg[ffcount++] = fftname[ffx];
{
FFSIZE_T ffsize1 = ffsize + fftnamerr (FF_NULLPTR, fftname[ffx
]);
if (! (ffsize <= ffsize1
&& ffsize1 <= FFSTACK_ALLOC_MAXIMUM))
return 2;
ffsize = ffsize1;
}
}
}
}
switch (ffcount)
{
# define FFCASE_(N, S) \
case N: \
ffformat = S; \
break
default: /* Avoid compiler warnings. */
FFCASE_(0, FF_("syntax error"));
FFCASE_(1, FF_("syntax error, unexpected %s"));
FFCASE_(2, FF_("syntax error, unexpected %s, expecting %s"));
FFCASE_(3, FF_("syntax error, unexpected %s, expecting %s or %s"));
FFCASE_(4, FF_("syntax error, unexpected %s, expecting %s or %s or %s"));
FFCASE_(5, FF_("syntax error, unexpected %s, expecting %s or %s or %s or %
s"));
# undef FFCASE_
}
{
FFSIZE_T ffsize1 = ffsize + ffstrlen (ffformat);
if (! (ffsize <= ffsize1 && ffsize1 <= FFSTACK_ALLOC_MAXIMUM))
return 2;
ffsize = ffsize1;
}
if (*ffmsg_alloc < ffsize)
{
*ffmsg_alloc = 2 * ffsize;
if (! (ffsize <= *ffmsg_alloc
&& *ffmsg_alloc <= FFSTACK_ALLOC_MAXIMUM))
*ffmsg_alloc = FFSTACK_ALLOC_MAXIMUM;
return 1;
}
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
{
char *ffp = *ffmsg;
int ffi = 0;
while ((*ffp = *ffformat) != '\0')
if (*ffp == '%' && ffformat[1] == 's' && ffi < ffcount)
{
ffp += fftnamerr (ffp, ffarg[ffi++]);
ffformat += 2;
}
else
{
ffp++;
ffformat++;
}
}
return 0;
}
#endif /* FFERROR_VERBOSE */
/*-----------------------------------------------. /*-----------------------------------------------.
| Release the memory associated to this symbol. | | Release the memory associated to this symbol. |
`-----------------------------------------------*/ `-----------------------------------------------*/
static void static void
ffdestruct (const char *ffmsg, int fftype, FFSTYPE *ffvaluep) ffdestruct (const char *ffmsg,
ffsymbol_kind_t ffkind, FFSTYPE *ffvaluep)
{ {
FFUSE (ffvaluep); FFUSE (ffvaluep);
if (!ffmsg) if (!ffmsg)
ffmsg = "Deleting"; ffmsg = "Deleting";
FF_SYMBOL_PRINT (ffmsg, fftype, ffvaluep, fflocationp); FF_SYMBOL_PRINT (ffmsg, ffkind, ffvaluep, fflocationp);
FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
FFUSE (fftype); FFUSE (ffkind);
FF_IGNORE_MAYBE_UNINITIALIZED_END FF_IGNORE_MAYBE_UNINITIALIZED_END
} }
/* The lookahead symbol. */ /* Lookahead token kind. */
int ffchar; int ffchar;
/* The semantic value of the lookahead symbol. */ /* The semantic value of the lookahead symbol. */
FFSTYPE fflval; FFSTYPE fflval;
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int ffnerrs; int ffnerrs;
/*----------. /*----------.
| ffparse. | | ffparse. |
`----------*/ `----------*/
int int
ffparse (void) ffparse (void)
{ {
int ffstate; ff_state_fast_t ffstate = 0;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int fferrstatus; int fferrstatus = 0;
/* The stacks and their tools:
'ffss': related to states.
'ffvs': related to semantic values.
Refer to the stacks through separate pointers, to allow ffoverflow /* Refer to the stacks through separate pointers, to allow ffoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
/* The state stack. */ /* Their size. */
fftype_int16 ffssa[FFINITDEPTH]; FFPTRDIFF_T ffstacksize = FFINITDEPTH;
fftype_int16 *ffss;
fftype_int16 *ffssp;
/* The semantic value stack. */ /* The state stack: array, bottom, top. */
FFSTYPE ffvsa[FFINITDEPTH]; ff_state_t ffssa[FFINITDEPTH];
FFSTYPE *ffvs; ff_state_t *ffss = ffssa;
FFSTYPE *ffvsp; ff_state_t *ffssp = ffss;
FFSIZE_T ffstacksize; /* The semantic value stack: array, bottom, top. */
FFSTYPE ffvsa[FFINITDEPTH];
FFSTYPE *ffvs = ffvsa;
FFSTYPE *ffvsp = ffvs;
int ffn; int ffn;
/* The return value of ffparse. */
int ffresult; int ffresult;
/* Lookahead token as an internal (translated) token number. */ /* Lookahead symbol kind. */
int fftoken = 0; ffsymbol_kind_t fftoken = FFSYMBOL_FFEMPTY;
/* The variables used to return semantic value and location from the /* The variables used to return semantic value and location from the
action routines. */ action routines. */
FFSTYPE ffval; FFSTYPE ffval;
#if FFERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char ffmsgbuf[128];
char *ffmsg = ffmsgbuf;
FFSIZE_T ffmsg_alloc = sizeof ffmsgbuf;
#endif
#define FFPOPSTACK(N) (ffvsp -= (N), ffssp -= (N)) #define FFPOPSTACK(N) (ffvsp -= (N), ffssp -= (N))
/* The number of symbols on the RHS of the reduced rule. /* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */ Keep to zero when no symbol should be popped. */
int fflen = 0; int fflen = 0;
ffssp = ffss = ffssa;
ffvsp = ffvs = ffvsa;
ffstacksize = FFINITDEPTH;
FFDPRINTF ((stderr, "Starting parse\n")); FFDPRINTF ((stderr, "Starting parse\n"));
ffstate = 0;
fferrstatus = 0;
ffnerrs = 0;
ffchar = FFEMPTY; /* Cause a token to be read. */ ffchar = FFEMPTY; /* Cause a token to be read. */
goto ffsetstate; goto ffsetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
| ffnewstate -- Push a new state, which is found in ffstate. | | ffnewstate -- push a new state, which is found in ffstate. |
`------------------------------------------------------------*/ `------------------------------------------------------------*/
ffnewstate: ffnewstate:
/* In all cases, when you get here, the value and location stacks /* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */ have just been pushed. So pushing a state here evens the stacks. */
ffssp++; ffssp++;
ffsetstate: /*--------------------------------------------------------------------.
*ffssp = ffstate; | ffsetstate -- set current state (the top of the stack) to ffstate. |
`--------------------------------------------------------------------*/
ffsetstate:
FFDPRINTF ((stderr, "Entering state %d\n", ffstate));
FF_ASSERT (0 <= ffstate && ffstate < FFNSTATES);
FF_IGNORE_USELESS_CAST_BEGIN
*ffssp = FF_CAST (ff_state_t, ffstate);
FF_IGNORE_USELESS_CAST_END
FF_STACK_PRINT (ffss, ffssp);
if (ffss + ffstacksize - 1 <= ffssp) if (ffss + ffstacksize - 1 <= ffssp)
#if !defined ffoverflow && !defined FFSTACK_RELOCATE
goto ffexhaustedlab;
#else
{ {
/* Get the current used size of the three stacks, in elements. */ /* Get the current used size of the three stacks, in elements. */
FFSIZE_T ffsize = ffssp - ffss + 1; FFPTRDIFF_T ffsize = ffssp - ffss + 1;
#ifdef ffoverflow # if defined ffoverflow
{ {
/* Give user a chance to reallocate the stack. Use copies of /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into these so that the &'s don't force the real ones into
memory. */ memory. */
ff_state_t *ffss1 = ffss;
FFSTYPE *ffvs1 = ffvs; FFSTYPE *ffvs1 = ffvs;
fftype_int16 *ffss1 = ffss;
/* Each stack pointer address is followed by the size of the /* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
be undefined if ffoverflow is a macro. */ be undefined if ffoverflow is a macro. */
ffoverflow (FF_("memory exhausted"), ffoverflow (FF_("memory exhausted"),
&ffss1, ffsize * sizeof (*ffssp), &ffss1, ffsize * FFSIZEOF (*ffssp),
&ffvs1, ffsize * sizeof (*ffvsp), &ffvs1, ffsize * FFSIZEOF (*ffvsp),
&ffstacksize); &ffstacksize);
ffss = ffss1; ffss = ffss1;
ffvs = ffvs1; ffvs = ffvs1;
} }
#else /* no ffoverflow */ # else /* defined FFSTACK_RELOCATE */
# ifndef FFSTACK_RELOCATE
goto ffexhaustedlab;
# else
/* Extend the stack our own way. */ /* Extend the stack our own way. */
if (FFMAXDEPTH <= ffstacksize) if (FFMAXDEPTH <= ffstacksize)
goto ffexhaustedlab; goto ffexhaustedlab;
ffstacksize *= 2; ffstacksize *= 2;
if (FFMAXDEPTH < ffstacksize) if (FFMAXDEPTH < ffstacksize)
ffstacksize = FFMAXDEPTH; ffstacksize = FFMAXDEPTH;
{ {
fftype_int16 *ffss1 = ffss; ff_state_t *ffss1 = ffss;
union ffalloc *ffptr = union ffalloc *ffptr =
(union ffalloc *) FFSTACK_ALLOC (FFSTACK_BYTES (ffstacksize)); FF_CAST (union ffalloc *,
FFSTACK_ALLOC (FF_CAST (FFSIZE_T, FFSTACK_BYTES (ffstacksize)
)));
if (! ffptr) if (! ffptr)
goto ffexhaustedlab; goto ffexhaustedlab;
FFSTACK_RELOCATE (ffss_alloc, ffss); FFSTACK_RELOCATE (ffss_alloc, ffss);
FFSTACK_RELOCATE (ffvs_alloc, ffvs); FFSTACK_RELOCATE (ffvs_alloc, ffvs);
# undef FFSTACK_RELOCATE # undef FFSTACK_RELOCATE
if (ffss1 != ffssa) if (ffss1 != ffssa)
FFSTACK_FREE (ffss1); FFSTACK_FREE (ffss1);
} }
# endif # endif
#endif /* no ffoverflow */
ffssp = ffss + ffsize - 1; ffssp = ffss + ffsize - 1;
ffvsp = ffvs + ffsize - 1; ffvsp = ffvs + ffsize - 1;
FFDPRINTF ((stderr, "Stack size increased to %lu\n", FF_IGNORE_USELESS_CAST_BEGIN
(unsigned long int) ffstacksize)); FFDPRINTF ((stderr, "Stack size increased to %ld\n",
FF_CAST (long, ffstacksize)));
FF_IGNORE_USELESS_CAST_END
if (ffss + ffstacksize - 1 <= ffssp) if (ffss + ffstacksize - 1 <= ffssp)
FFABORT; FFABORT;
} }
#endif /* !defined ffoverflow && !defined FFSTACK_RELOCATE */
FFDPRINTF ((stderr, "Entering state %d\n", ffstate));
if (ffstate == FFFINAL) if (ffstate == FFFINAL)
FFACCEPT; FFACCEPT;
goto ffbackup; goto ffbackup;
/*-----------. /*-----------.
| ffbackup. | | ffbackup. |
`-----------*/ `-----------*/
ffbackup: ffbackup:
/* Do appropriate processing given the current state. Read a /* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */ lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to lookahead token. */
ffn = ffpact[ffstate]; ffn = ffpact[ffstate];
if (ffpact_value_is_default (ffn)) if (ffpact_value_is_default (ffn))
goto ffdefault; goto ffdefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a lookahead token if don't already have one. */
/* FFCHAR is either FFEMPTY or FFEOF or a valid lookahead symbol. */ /* FFCHAR is either empty, or end-of-input, or a valid lookahead. */
if (ffchar == FFEMPTY) if (ffchar == FFEMPTY)
{ {
FFDPRINTF ((stderr, "Reading a token: ")); FFDPRINTF ((stderr, "Reading a token\n"));
ffchar = fflex (); ffchar = fflex ();
} }
if (ffchar <= FFEOF) if (ffchar <= FFEOF)
{ {
ffchar = fftoken = FFEOF; ffchar = FFEOF;
fftoken = FFSYMBOL_FFEOF;
FFDPRINTF ((stderr, "Now at end of input.\n")); FFDPRINTF ((stderr, "Now at end of input.\n"));
} }
else if (ffchar == FFerror)
{
/* The scanner already issued an error message, process directly
to error recovery. But do not keep the error token as
lookahead, it is too special and may lead us to an endless
loop in error recovery. */
ffchar = FFUNDEF;
fftoken = FFSYMBOL_FFerror;
goto fferrlab1;
}
else else
{ {
fftoken = FFTRANSLATE (ffchar); fftoken = FFTRANSLATE (ffchar);
FF_SYMBOL_PRINT ("Next token is", fftoken, &fflval, &fflloc); FF_SYMBOL_PRINT ("Next token is", fftoken, &fflval, &fflloc);
} }
/* If the proper action on seeing token FFTOKEN is to reduce or to /* If the proper action on seeing token FFTOKEN is to reduce or to
detect an error, take that action. */ detect an error, take that action. */
ffn += fftoken; ffn += fftoken;
if (ffn < 0 || FFLAST < ffn || ffcheck[ffn] != fftoken) if (ffn < 0 || FFLAST < ffn || ffcheck[ffn] != fftoken)
skipping to change at line 1854 skipping to change at line 1834
goto ffreduce; goto ffreduce;
} }
/* Count tokens shifted since error; after three, turn off error /* Count tokens shifted since error; after three, turn off error
status. */ status. */
if (fferrstatus) if (fferrstatus)
fferrstatus--; fferrstatus--;
/* Shift the lookahead token. */ /* Shift the lookahead token. */
FF_SYMBOL_PRINT ("Shifting", fftoken, &fflval, &fflloc); FF_SYMBOL_PRINT ("Shifting", fftoken, &fflval, &fflloc);
/* Discard the shifted token. */
ffchar = FFEMPTY;
ffstate = ffn; ffstate = ffn;
FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++ffvsp = fflval; *++ffvsp = fflval;
FF_IGNORE_MAYBE_UNINITIALIZED_END FF_IGNORE_MAYBE_UNINITIALIZED_END
/* Discard the shifted token. */
ffchar = FFEMPTY;
goto ffnewstate; goto ffnewstate;
/*-----------------------------------------------------------. /*-----------------------------------------------------------.
| ffdefault -- do the default action for the current state. | | ffdefault -- do the default action for the current state. |
`-----------------------------------------------------------*/ `-----------------------------------------------------------*/
ffdefault: ffdefault:
ffn = ffdefact[ffstate]; ffn = ffdefact[ffstate];
if (ffn == 0) if (ffn == 0)
goto fferrlab; goto fferrlab;
goto ffreduce; goto ffreduce;
/*-----------------------------. /*-----------------------------.
| ffreduce -- Do a reduction. | | ffreduce -- do a reduction. |
`-----------------------------*/ `-----------------------------*/
ffreduce: ffreduce:
/* ffn is the number of a rule to reduce with. */ /* ffn is the number of a rule to reduce with. */
fflen = ffr2[ffn]; fflen = ffr2[ffn];
/* If FFLEN is nonzero, implement the default value of the action: /* If FFLEN is nonzero, implement the default value of the action:
'$$ = $1'. '$$ = $1'.
Otherwise, the following line sets FFVAL to garbage. Otherwise, the following line sets FFVAL to garbage.
This behavior is undocumented and Bison This behavior is undocumented and Bison
users should not rely upon it. Assigning to FFVAL users should not rely upon it. Assigning to FFVAL
unconditionally makes the parser a bit smaller, and it avoids a unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that FFVAL may be used uninitialized. */ GCC warning that FFVAL may be used uninitialized. */
ffval = ffvsp[1-fflen]; ffval = ffvsp[1-fflen];
FF_REDUCE_PRINT (ffn); FF_REDUCE_PRINT (ffn);
switch (ffn) switch (ffn)
{ {
case 4: case 4: /* line: '\n' */
#line 248 "eval.y" /* yacc.c:1648 */ #line 256 "eval.y"
{} {}
#line 1922 "y.tab.c" /* yacc.c:1648 */ #line 1913 "y.tab.c"
break; break;
case 5: case 5: /* line: expr '\n' */
#line 250 "eval.y" /* yacc.c:1648 */ #line 258 "eval.y"
{ if( (ffvsp[-1].Node)<0 ) { { if( (ffvsp[-1].Node)<0 ) {
fferror("Couldn't build node structure: out of memory?"); fferror("Couldn't build node structure: out of memory?");
FFERROR; } FFERROR; }
gParse.resultNode = (ffvsp[-1].Node); gParse.resultNode = (ffvsp[-1].Node);
} }
#line 1932 "y.tab.c" /* yacc.c:1648 */ #line 1923 "y.tab.c"
break; break;
case 6: case 6: /* line: bexpr '\n' */
#line 256 "eval.y" /* yacc.c:1648 */ #line 264 "eval.y"
{ if( (ffvsp[-1].Node)<0 ) { { if( (ffvsp[-1].Node)<0 ) {
fferror("Couldn't build node structure: out of memory?"); fferror("Couldn't build node structure: out of memory?");
FFERROR; } FFERROR; }
gParse.resultNode = (ffvsp[-1].Node); gParse.resultNode = (ffvsp[-1].Node);
} }
#line 1942 "y.tab.c" /* yacc.c:1648 */ #line 1933 "y.tab.c"
break; break;
case 7: case 7: /* line: sexpr '\n' */
#line 262 "eval.y" /* yacc.c:1648 */ #line 270 "eval.y"
{ if( (ffvsp[-1].Node)<0 ) { { if( (ffvsp[-1].Node)<0 ) {
fferror("Couldn't build node structure: out of memory?"); fferror("Couldn't build node structure: out of memory?");
FFERROR; } FFERROR; }
gParse.resultNode = (ffvsp[-1].Node); gParse.resultNode = (ffvsp[-1].Node);
} }
#line 1952 "y.tab.c" /* yacc.c:1648 */ #line 1943 "y.tab.c"
break; break;
case 8: case 8: /* line: bits '\n' */
#line 268 "eval.y" /* yacc.c:1648 */ #line 276 "eval.y"
{ if( (ffvsp[-1].Node)<0 ) { { if( (ffvsp[-1].Node)<0 ) {
fferror("Couldn't build node structure: out of memory?"); fferror("Couldn't build node structure: out of memory?");
FFERROR; } FFERROR; }
gParse.resultNode = (ffvsp[-1].Node); gParse.resultNode = (ffvsp[-1].Node);
} }
#line 1962 "y.tab.c" /* yacc.c:1648 */ #line 1953 "y.tab.c"
break; break;
case 9: case 9: /* line: error '\n' */
#line 273 "eval.y" /* yacc.c:1648 */ #line 281 "eval.y"
{ fferrok; } { fferrok; }
#line 1968 "y.tab.c" /* yacc.c:1648 */ #line 1959 "y.tab.c"
break; break;
case 10: case 10: /* bvector: '{' bexpr */
#line 277 "eval.y" /* yacc.c:1648 */ #line 285 "eval.y"
{ (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node)); } { (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node
#line 1974 "y.tab.c" /* yacc.c:1648 */ )); }
#line 1965 "y.tab.c"
break; break;
case 11: case 11: /* bvector: bvector ',' bexpr */
#line 279 "eval.y" /* yacc.c:1648 */ #line 287 "eval.y"
{ {
if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) { if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
(ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node)); (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node));
(ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode)); (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode));
} else { } else {
(ffval.Node) = (ffvsp[-2].Node); (ffval.Node) = (ffvsp[-2].Node);
} }
gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ] gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ]
= (ffvsp[0].Node); = (ffvsp[0].Node);
} }
#line 1989 "y.tab.c" /* yacc.c:1648 */ #line 1980 "y.tab.c"
break; break;
case 12: case 12: /* vector: '{' expr */
#line 292 "eval.y" /* yacc.c:1648 */ #line 300 "eval.y"
{ (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node)); } { (ffval.Node) = New_Vector( (ffvsp[0].Node) ); TEST((ffval.Node
#line 1995 "y.tab.c" /* yacc.c:1648 */ )); }
#line 1986 "y.tab.c"
break; break;
case 13: case 13: /* vector: vector ',' expr */
#line 294 "eval.y" /* yacc.c:1648 */ #line 302 "eval.y"
{ {
if( TYPE((ffvsp[-2].Node)) < TYPE((ffvsp[0].Node)) ) if( TYPE((ffvsp[-2].Node)) < TYPE((ffvsp[0].Node)) )
TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node)); TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node));
if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) { if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
(ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node)); (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node));
(ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode)); (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode));
} else { } else {
(ffval.Node) = (ffvsp[-2].Node); (ffval.Node) = (ffvsp[-2].Node);
} }
gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ] gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ]
= (ffvsp[0].Node); = (ffvsp[0].Node);
} }
#line 2012 "y.tab.c" /* yacc.c:1648 */ #line 2003 "y.tab.c"
break; break;
case 14: case 14: /* vector: vector ',' bexpr */
#line 307 "eval.y" /* yacc.c:1648 */ #line 315 "eval.y"
{ {
if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) { if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
(ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node)); (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node));
(ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode)); (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode));
} else { } else {
(ffval.Node) = (ffvsp[-2].Node); (ffval.Node) = (ffvsp[-2].Node);
} }
gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ] gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ]
= (ffvsp[0].Node); = (ffvsp[0].Node);
} }
#line 2027 "y.tab.c" /* yacc.c:1648 */ #line 2018 "y.tab.c"
break; break;
case 15: case 15: /* vector: bvector ',' expr */
#line 318 "eval.y" /* yacc.c:1648 */ #line 326 "eval.y"
{ {
TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node)); TYPE((ffvsp[-2].Node)) = TYPE((ffvsp[0].Node));
if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) { if( gParse.Nodes[(ffvsp[-2].Node)].nSubNodes >= MAXSUBS ) {
(ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node)); (ffvsp[-2].Node) = Close_Vec( (ffvsp[-2].Node) ); TEST((ffvs p[-2].Node));
(ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode)); (ffval.Node) = New_Vector( (ffvsp[-2].Node) ); TEST((ffval.N ode));
} else { } else {
(ffval.Node) = (ffvsp[-2].Node); (ffval.Node) = (ffvsp[-2].Node);
} }
gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ] gParse.Nodes[(ffval.Node)].SubNodes[ gParse.Nodes[(ffval.Node)] .nSubNodes++ ]
= (ffvsp[0].Node); = (ffvsp[0].Node);
} }
#line 2043 "y.tab.c" /* yacc.c:1648 */ #line 2034 "y.tab.c"
break; break;
case 16: case 16: /* expr: vector '}' */
#line 332 "eval.y" /* yacc.c:1648 */ #line 340 "eval.y"
{ (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node)); } { (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node
#line 2049 "y.tab.c" /* yacc.c:1648 */ )); }
#line 2040 "y.tab.c"
break; break;
case 17: case 17: /* bexpr: bvector '}' */
#line 336 "eval.y" /* yacc.c:1648 */ #line 344 "eval.y"
{ (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node)); } { (ffval.Node) = Close_Vec( (ffvsp[-1].Node) ); TEST((ffval.Node
#line 2055 "y.tab.c" /* yacc.c:1648 */ )); }
#line 2046 "y.tab.c"
break; break;
case 18: case 18: /* bits: BITSTR */
#line 340 "eval.y" /* yacc.c:1648 */ #line 348 "eval.y"
{ {
(ffval.Node) = New_Const( BITSTR, (ffvsp[0].str), strlen((ffvs p[0].str))+1 ); TEST((ffval.Node)); (ffval.Node) = New_Const( BITSTR, (ffvsp[0].str), strlen((ffvs p[0].str))+1 ); TEST((ffval.Node));
SIZE((ffval.Node)) = strlen((ffvsp[0].str)); } SIZE((ffval.Node)) = strlen((ffvsp[0].str)); }
#line 2063 "y.tab.c" /* yacc.c:1648 */ #line 2054 "y.tab.c"
break; break;
case 19: case 19: /* bits: BITCOL */
#line 344 "eval.y" /* yacc.c:1648 */ #line 352 "eval.y"
{ (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); } { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)
#line 2069 "y.tab.c" /* yacc.c:1648 */ ); }
#line 2060 "y.tab.c"
break; break;
case 20: case 20: /* bits: BITCOL '{' expr '}' */
#line 346 "eval.y" /* yacc.c:1648 */ #line 354 "eval.y"
{ {
if( TYPE((ffvsp[-1].Node)) != LONG if( TYPE((ffvsp[-1].Node)) != LONG
|| OPER((ffvsp[-1].Node)) != CONST_OP ) { || OPER((ffvsp[-1].Node)) != CONST_OP ) {
fferror("Offset argument must be a constant integer"); fferror("Offset argument must be a constant integer");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node)); (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node));
} }
#line 2082 "y.tab.c" /* yacc.c:1648 */ #line 2073 "y.tab.c"
break; break;
case 21: case 21: /* bits: bits '&' bits */
#line 355 "eval.y" /* yacc.c:1648 */ #line 363 "eval.y"
{ (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '&', (ffvsp[0].Node) ) { (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '&', (ffvs
; TEST((ffval.Node)); p[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].N ode)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) ); } SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].N ode)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) ); }
#line 2089 "y.tab.c" /* yacc.c:1648 */ #line 2080 "y.tab.c"
break; break;
case 22: case 22: /* bits: bits '|' bits */
#line 358 "eval.y" /* yacc.c:1648 */ #line 366 "eval.y"
{ (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '|', (ffvsp[0].Node) ) { (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '|', (ffvs
; TEST((ffval.Node)); p[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].N ode)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) ); } SIZE((ffval.Node)) = ( SIZE((ffvsp[-2].Node))>SIZE((ffvsp[0].N ode)) ? SIZE((ffvsp[-2].Node)) : SIZE((ffvsp[0].Node)) ); }
#line 2096 "y.tab.c" /* yacc.c:1648 */ #line 2087 "y.tab.c"
break; break;
case 23: case 23: /* bits: bits '+' bits */
#line 361 "eval.y" /* yacc.c:1648 */ #line 369 "eval.y"
{ {
if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) { if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) {
fferror("Combined bit string size exceeds " MAX_STRLEN_S " bi ts"); fferror("Combined bit string size exceeds " MAX_STRLEN_S " bi ts");
FFERROR; FFERROR;
} }
(ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '+', (ffvsp [0].Node) ); TEST((ffval.Node)); (ffval.Node) = New_BinOp( BITSTR, (ffvsp[-2].Node), '+', (ffvsp [0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].N ode)); SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].N ode));
} }
#line 2109 "y.tab.c" /* yacc.c:1648 */ #line 2100 "y.tab.c"
break; break;
case 24: case 24: /* bits: bits '[' expr ']' */
#line 370 "eval.y" /* yacc.c:1648 */ #line 378 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node), 0, 0, { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node
0, 0 ); TEST((ffval.Node)); } ), 0, 0, 0, 0 ); TEST((ffval.Node)); }
#line 2115 "y.tab.c" /* yacc.c:1648 */ #line 2106 "y.tab.c"
break; break;
case 25: case 25: /* bits: bits '[' expr ',' expr ']' */
#line 372 "eval.y" /* yacc.c:1648 */ #line 380 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node
].Node), 0, 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-1].Node), 0, 0, 0 ); TEST((ffval.Node)); }
#line 2121 "y.tab.c" /* yacc.c:1648 */ #line 2112 "y.tab.c"
break; break;
case 26: case 26: /* bits: bits '[' expr ',' expr ',' expr ']' */
#line 374 "eval.y" /* yacc.c:1648 */ #line 382 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node
].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); }
#line 2127 "y.tab.c" /* yacc.c:1648 */ #line 2118 "y.tab.c"
break; break;
case 27: case 27: /* bits: bits '[' expr ',' expr ',' expr ',' expr ']' */
#line 376 "eval.y" /* yacc.c:1648 */ #line 384 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node
].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node)); } ), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node
#line 2133 "y.tab.c" /* yacc.c:1648 */ )); }
#line 2124 "y.tab.c"
break; break;
case 28: case 28: /* bits: bits '[' expr ',' expr ',' expr ',' expr ',' expr ']' */
#line 378 "eval.y" /* yacc.c:1648 */ #line 386 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[- { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Nod
7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.No e), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TE
de)); } ST((ffval.Node)); }
#line 2139 "y.tab.c" /* yacc.c:1648 */ #line 2130 "y.tab.c"
break; break;
case 29: case 29: /* bits: NOT bits */
#line 380 "eval.y" /* yacc.c:1648 */ #line 388 "eval.y"
{ (ffval.Node) = New_Unary( BITSTR, NOT, (ffvsp[0].Node) ); TEST((ffval.Node { (ffval.Node) = New_Unary( BITSTR, NOT, (ffvsp[0].Node) ); TEST
)); } ((ffval.Node)); }
#line 2145 "y.tab.c" /* yacc.c:1648 */ #line 2136 "y.tab.c"
break; break;
case 30: case 30: /* bits: '(' bits ')' */
#line 383 "eval.y" /* yacc.c:1648 */ #line 391 "eval.y"
{ (ffval.Node) = (ffvsp[-1].Node); } { (ffval.Node) = (ffvsp[-1].Node); }
#line 2151 "y.tab.c" /* yacc.c:1648 */ #line 2142 "y.tab.c"
break; break;
case 31: case 31: /* expr: LONG */
#line 387 "eval.y" /* yacc.c:1648 */ #line 395 "eval.y"
{ (ffval.Node) = New_Const( LONG, &((ffvsp[0].lng)), sizeof(long) ); TES { (ffval.Node) = New_Const( LONG, &((ffvsp[0].lng)), sizeof(lo
T((ffval.Node)); } ng) ); TEST((ffval.Node)); }
#line 2157 "y.tab.c" /* yacc.c:1648 */ #line 2148 "y.tab.c"
break; break;
case 32: case 32: /* expr: DOUBLE */
#line 389 "eval.y" /* yacc.c:1648 */ #line 397 "eval.y"
{ (ffval.Node) = New_Const( DOUBLE, &((ffvsp[0].dbl)), sizeof(double) ); TES { (ffval.Node) = New_Const( DOUBLE, &((ffvsp[0].dbl)), sizeof(do
T((ffval.Node)); } uble) ); TEST((ffval.Node)); }
#line 2163 "y.tab.c" /* yacc.c:1648 */ #line 2154 "y.tab.c"
break; break;
case 33: case 33: /* expr: COLUMN */
#line 391 "eval.y" /* yacc.c:1648 */ #line 399 "eval.y"
{ (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); } { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)
#line 2169 "y.tab.c" /* yacc.c:1648 */ ); }
#line 2160 "y.tab.c"
break; break;
case 34: case 34: /* expr: COLUMN '{' expr '}' */
#line 393 "eval.y" /* yacc.c:1648 */ #line 401 "eval.y"
{ {
if( TYPE((ffvsp[-1].Node)) != LONG if( TYPE((ffvsp[-1].Node)) != LONG
|| OPER((ffvsp[-1].Node)) != CONST_OP ) { || OPER((ffvsp[-1].Node)) != CONST_OP ) {
fferror("Offset argument must be a constant integer"); fferror("Offset argument must be a constant integer");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node)); (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node));
} }
#line 2182 "y.tab.c" /* yacc.c:1648 */ #line 2173 "y.tab.c"
break; break;
case 35: case 35: /* expr: ROWREF */
#line 402 "eval.y" /* yacc.c:1648 */ #line 410 "eval.y"
{ (ffval.Node) = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } { (ffval.Node) = New_Func( LONG, row_fct, 0, 0, 0, 0, 0, 0, 0,
#line 2188 "y.tab.c" /* yacc.c:1648 */ 0 ); }
#line 2179 "y.tab.c"
break; break;
case 36: case 36: /* expr: NULLREF */
#line 404 "eval.y" /* yacc.c:1648 */ #line 412 "eval.y"
{ (ffval.Node) = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } { (ffval.Node) = New_Func( LONG, null_fct, 0, 0, 0, 0, 0, 0, 0,
#line 2194 "y.tab.c" /* yacc.c:1648 */ 0 ); }
#line 2185 "y.tab.c"
break; break;
case 37: case 37: /* expr: expr '%' expr */
#line 406 "eval.y" /* yacc.c:1648 */ #line 414 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), '%', (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '%', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2201 "y.tab.c" /* yacc.c:1648 */ #line 2192 "y.tab.c"
break; break;
case 38: case 38: /* expr: expr '+' expr */
#line 409 "eval.y" /* yacc.c:1648 */ #line 417 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), '+', (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '+', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2208 "y.tab.c" /* yacc.c:1648 */ #line 2199 "y.tab.c"
break; break;
case 39: case 39: /* expr: expr '-' expr */
#line 412 "eval.y" /* yacc.c:1648 */ #line 420 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), '-', (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '-', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2215 "y.tab.c" /* yacc.c:1648 */ #line 2206 "y.tab.c"
break; break;
case 40: case 40: /* expr: expr '*' expr */
#line 415 "eval.y" /* yacc.c:1648 */ #line 423 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), '*', (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '*', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2222 "y.tab.c" /* yacc.c:1648 */ #line 2213 "y.tab.c"
break; break;
case 41: case 41: /* expr: expr '/' expr */
#line 418 "eval.y" /* yacc.c:1648 */ #line 426 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), '/', (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), '/', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2229 "y.tab.c" /* yacc.c:1648 */ #line 2220 "y.tab.c"
break; break;
case 42: case 42: /* expr: expr '&' expr */
#line 421 "eval.y" /* yacc.c:1648 */ #line 429 "eval.y"
{ {
if (TYPE((ffvsp[-2].Node)) != LONG || if (TYPE((ffvsp[-2].Node)) != LONG ||
TYPE((ffvsp[0].Node)) != LONG) { TYPE((ffvsp[0].Node)) != LONG) {
fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed"); fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed");
FFERROR; FFERROR;
} }
(ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '&', (ffvsp[0].Node) ); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '&', (ffvsp[0].Node) );
} }
#line 2242 "y.tab.c" /* yacc.c:1648 */ #line 2233 "y.tab.c"
break; break;
case 43: case 43: /* expr: expr '|' expr */
#line 430 "eval.y" /* yacc.c:1648 */ #line 438 "eval.y"
{ {
if (TYPE((ffvsp[-2].Node)) != LONG || if (TYPE((ffvsp[-2].Node)) != LONG ||
TYPE((ffvsp[0].Node)) != LONG) { TYPE((ffvsp[0].Node)) != LONG) {
fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed"); fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed");
FFERROR; FFERROR;
} }
(ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '|', (ffvsp[0].Node) ); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '|', (ffvsp[0].Node) );
} }
#line 2255 "y.tab.c" /* yacc.c:1648 */ #line 2246 "y.tab.c"
break; break;
case 44: case 44: /* expr: expr XOR expr */
#line 439 "eval.y" /* yacc.c:1648 */ #line 447 "eval.y"
{ {
if (TYPE((ffvsp[-2].Node)) != LONG || if (TYPE((ffvsp[-2].Node)) != LONG ||
TYPE((ffvsp[0].Node)) != LONG) { TYPE((ffvsp[0].Node)) != LONG) {
fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed"); fferror("Bitwise operations with incompatible types; only ( bit OP bit) and (int OP int) are allowed");
FFERROR; FFERROR;
} }
(ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '^', (ffvsp[0].Node) ); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2]. Node), '^', (ffvsp[0].Node) );
} }
#line 2268 "y.tab.c" /* yacc.c:1648 */ #line 2259 "y.tab.c"
break; break;
case 45: case 45: /* expr: expr POWER expr */
#line 448 "eval.y" /* yacc.c:1648 */ #line 456 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( TYPE( { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
(ffvsp[-2].Node)), (ffvsp[-2].Node), POWER, (ffvsp[0].Node) ); BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].Node), POWER, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2275 "y.tab.c" /* yacc.c:1648 */ #line 2266 "y.tab.c"
break; break;
case 46: case 46: /* expr: '+' expr */
#line 451 "eval.y" /* yacc.c:1648 */ #line 459 "eval.y"
{ (ffval.Node) = (ffvsp[0].Node); } { (ffval.Node) = (ffvsp[0].Node); }
#line 2281 "y.tab.c" /* yacc.c:1648 */ #line 2272 "y.tab.c"
break; break;
case 47: case 47: /* expr: '-' expr */
#line 453 "eval.y" /* yacc.c:1648 */ #line 461 "eval.y"
{ (ffval.Node) = New_Unary( TYPE((ffvsp[0].Node)), UMINUS, (ffvsp[0].Node) ) { (ffval.Node) = New_Unary( TYPE((ffvsp[0].Node)), UMINUS, (ffvs
; TEST((ffval.Node)); } p[0].Node) ); TEST((ffval.Node)); }
#line 2287 "y.tab.c" /* yacc.c:1648 */ #line 2278 "y.tab.c"
break; break;
case 48: case 48: /* expr: '(' expr ')' */
#line 455 "eval.y" /* yacc.c:1648 */ #line 463 "eval.y"
{ (ffval.Node) = (ffvsp[-1].Node); } { (ffval.Node) = (ffvsp[-1].Node); }
#line 2293 "y.tab.c" /* yacc.c:1648 */ #line 2284 "y.tab.c"
break; break;
case 49: case 49: /* expr: expr '*' bexpr */
#line 457 "eval.y" /* yacc.c:1648 */ #line 465 "eval.y"
{ (ffvsp[0].Node) = New_Unary( TYPE((ffvsp[-2].Node)), 0, (ffvsp[0].Node) ); { (ffvsp[0].Node) = New_Unary( TYPE((ffvsp[-2].Node)), 0, (ffvsp
[0].Node) );
(ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].N ode), '*', (ffvsp[0].Node) ); (ffval.Node) = New_BinOp( TYPE((ffvsp[-2].Node)), (ffvsp[-2].N ode), '*', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2301 "y.tab.c" /* yacc.c:1648 */ #line 2292 "y.tab.c"
break; break;
case 50: case 50: /* expr: bexpr '*' expr */
#line 461 "eval.y" /* yacc.c:1648 */ #line 469 "eval.y"
{ (ffvsp[-2].Node) = New_Unary( TYPE((ffvsp[0].Node)), 0, (ffvsp[-2].Node) ) { (ffvsp[-2].Node) = New_Unary( TYPE((ffvsp[0].Node)), 0, (ffvsp
; [-2].Node) );
(ffval.Node) = New_BinOp( TYPE((ffvsp[0].Node)), (ffvsp[-2].No de), '*', (ffvsp[0].Node) ); (ffval.Node) = New_BinOp( TYPE((ffvsp[0].Node)), (ffvsp[-2].No de), '*', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2309 "y.tab.c" /* yacc.c:1648 */ #line 2300 "y.tab.c"
break; break;
case 51: case 51: /* expr: bexpr '?' expr ':' expr */
#line 465 "eval.y" /* yacc.c:1648 */ #line 473 "eval.y"
{ {
PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) { if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
fferror("Incompatible dimensions in '?:' arguments"); fferror("Incompatible dimensions in '?:' arguments");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node), (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node),
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node)); if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node));
TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node)); TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) { if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
fferror("Incompatible dimensions in '?:' condition"); fferror("Incompatible dimensions in '?:' condition");
FFERROR; FFERROR;
} }
TYPE((ffvsp[-4].Node)) = BOOLEAN; TYPE((ffvsp[-4].Node)) = BOOLEAN;
if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node));
} }
#line 2332 "y.tab.c" /* yacc.c:1648 */ #line 2323 "y.tab.c"
break; break;
case 52: case 52: /* expr: bexpr '?' bexpr ':' expr */
#line 484 "eval.y" /* yacc.c:1648 */ #line 492 "eval.y"
{ {
PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) { if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
fferror("Incompatible dimensions in '?:' arguments"); fferror("Incompatible dimensions in '?:' arguments");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node), (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node),
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node)); if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node));
TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node)); TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) { if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
fferror("Incompatible dimensions in '?:' condition"); fferror("Incompatible dimensions in '?:' condition");
FFERROR; FFERROR;
} }
TYPE((ffvsp[-4].Node)) = BOOLEAN; TYPE((ffvsp[-4].Node)) = BOOLEAN;
if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node));
} }
#line 2355 "y.tab.c" /* yacc.c:1648 */ #line 2346 "y.tab.c"
break; break;
case 53: case 53: /* expr: bexpr '?' expr ':' bexpr */
#line 503 "eval.y" /* yacc.c:1648 */ #line 511 "eval.y"
{ {
PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) { if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
fferror("Incompatible dimensions in '?:' arguments"); fferror("Incompatible dimensions in '?:' arguments");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node), (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node),
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node)); if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node));
TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node)); TYPE((ffvsp[-4].Node)) = TYPE((ffvsp[-2].Node));
if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) { if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
fferror("Incompatible dimensions in '?:' condition"); fferror("Incompatible dimensions in '?:' condition");
FFERROR; FFERROR;
} }
TYPE((ffvsp[-4].Node)) = BOOLEAN; TYPE((ffvsp[-4].Node)) = BOOLEAN;
if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node));
} }
#line 2378 "y.tab.c" /* yacc.c:1648 */ #line 2369 "y.tab.c"
break; break;
case 54: case 54: /* expr: FUNCTION ')' */
#line 522 "eval.y" /* yacc.c:1648 */ #line 530 "eval.y"
{ if (FSTRCMP((ffvsp[-1].str),"RANDOM(") == 0) { /* Scalar RANDOM() */ { if (FSTRCMP((ffvsp[-1].str),"RANDOM(") == 0) { /* Scalar RAND
OM() */
(ffval.Node) = New_Func( DOUBLE, rnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); (ffval.Node) = New_Func( DOUBLE, rnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 );
} else if (FSTRCMP((ffvsp[-1].str),"RANDOMN(") == 0) {/*Scalar RANDOMN()*/ } else if (FSTRCMP((ffvsp[-1].str),"RANDOMN(") == 0) {/*Scalar RANDOMN()*/
(ffval.Node) = New_Func( DOUBLE, gasrnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); (ffval.Node) = New_Func( DOUBLE, gasrnd_fct, 0, 0, 0, 0, 0, 0, 0, 0 );
} else { } else {
fferror("Function() not supported"); fferror("Function() not supported");
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
} }
#line 2393 "y.tab.c" /* yacc.c:1648 */ #line 2384 "y.tab.c"
break; break;
case 55: case 55: /* expr: FUNCTION bexpr ')' */
#line 533 "eval.y" /* yacc.c:1648 */ #line 541 "eval.y"
{ if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) { { if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) {
(ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 ); (ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
} else if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) { } else if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
(ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) ); (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) );
} else if (FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) { } else if (FSTRCMP((ffvsp[-2].str),"ACCUM(") == 0) {
long zero = 0; long zero = 0;
(ffval.Node) = New_BinOp( LONG , (ffvsp[-1].Node), ACCUM, New _Const( LONG, &zero, sizeof(zero) )); (ffval.Node) = New_BinOp( LONG , (ffvsp[-1].Node), ACCUM, New _Const( LONG, &zero, sizeof(zero) ));
} else { } else {
fferror("Function(bool) not supported"); fferror("Function(bool) not supported");
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
} }
#line 2411 "y.tab.c" /* yacc.c:1648 */ #line 2402 "y.tab.c"
break; break;
case 56: case 56: /* expr: FUNCTION sexpr ')' */
#line 547 "eval.y" /* yacc.c:1648 */ #line 555 "eval.y"
{ if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) { { if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
(ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) ); (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) );
} else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) { } else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) {
(ffval.Node) = New_Func( LONG, nonnull_fct, 1, (ffvsp[-1].No de), (ffval.Node) = New_Func( LONG, nonnull_fct, 1, (ffvsp[-1].No de),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
} else { } else {
fferror("Function(str) not supported"); fferror("Function(str) not supported");
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
} }
#line 2427 "y.tab.c" /* yacc.c:1648 */ #line 2418 "y.tab.c"
break; break;
case 57: case 57: /* expr: FUNCTION bits ')' */
#line 559 "eval.y" /* yacc.c:1648 */ #line 567 "eval.y"
{ if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) { { if (FSTRCMP((ffvsp[-2].str),"NELEM(") == 0) {
(ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) ); (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) );
} else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) { /* Bit arra ys do not have NULL */ } else if (FSTRCMP((ffvsp[-2].str),"NVALID(") == 0) { /* Bit arra ys do not have NULL */
(ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) ); (ffval.Node) = New_Const( LONG, &( SIZE((ffvsp[-1].Node)) ) , sizeof(long) );
} else if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) { } else if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) {
(ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node), (ffval.Node) = New_Func( LONG, sum_fct, 1, (ffvsp[-1].Node),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
} else if (FSTRCMP((ffvsp[-2].str),"MIN(") == 0) { } else if (FSTRCMP((ffvsp[-2].str),"MIN(") == 0) {
(ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), /* Force 1 D result */ (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), /* Force 1 D result */
min1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 ); min1_fct, 1, (ffvsp[-1].Node), 0, 0, 0, 0, 0, 0 );
/* Note: $2 is a vector so the result can never /* Note: $2 is a vector so the result can never
skipping to change at line 2437 skipping to change at line 2415
/* Note: $2 is a vector so the result can never /* Note: $2 is a vector so the result can never
be a constant. Therefore it will never be set be a constant. Therefore it will never be set
inside New_Func(), and it is safe to set SIZE() */ inside New_Func(), and it is safe to set SIZE() */
SIZE((ffval.Node)) = 1; SIZE((ffval.Node)) = 1;
} else { } else {
fferror("Function(bits) not supported"); fferror("Function(bits) not supported");
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
} }
#line 2462 "y.tab.c" /* yacc.c:1648 */ #line 2453 "y.tab.c"
break; break;
case 58: case 58: /* expr: FUNCTION expr ')' */
#line 590 "eval.y" /* yacc.c:1648 */ #line 598 "eval.y"
{ if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0) { if (FSTRCMP((ffvsp[-2].str),"SUM(") == 0)
(ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), sum_fct, 1, (ffvsp[-1].Node), (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), sum_fct, 1, (ffvsp[-1].Node),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
else if (FSTRCMP((ffvsp[-2].str),"AVERAGE(") == 0) else if (FSTRCMP((ffvsp[-2].str),"AVERAGE(") == 0)
(ffval.Node) = New_Func( DOUBLE, average_fct, 1, (ffvsp[-1]. Node), (ffval.Node) = New_Func( DOUBLE, average_fct, 1, (ffvsp[-1]. Node),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
else if (FSTRCMP((ffvsp[-2].str),"STDDEV(") == 0) else if (FSTRCMP((ffvsp[-2].str),"STDDEV(") == 0)
(ffval.Node) = New_Func( DOUBLE, stddev_fct, 1, (ffvsp[-1].N ode), (ffval.Node) = New_Func( DOUBLE, stddev_fct, 1, (ffvsp[-1].N ode),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
else if (FSTRCMP((ffvsp[-2].str),"MEDIAN(") == 0) else if (FSTRCMP((ffvsp[-2].str),"MEDIAN(") == 0)
(ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), median_fct, 1, (ffvsp[-1].Node), (ffval.Node) = New_Func( TYPE((ffvsp[-1].Node)), median_fct, 1, (ffvsp[-1].Node),
skipping to change at line 2536 skipping to change at line 2514
(ffval.Node) = New_Func( 0, poirnd_fct, 1, (ffvsp[-1].Node ), (ffval.Node) = New_Func( 0, poirnd_fct, 1, (ffvsp[-1].Node ),
0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0 );
TYPE((ffval.Node)) = LONG; TYPE((ffval.Node)) = LONG;
} else { } else {
fferror("Function(expr) not supported"); fferror("Function(expr) not supported");
FFERROR; FFERROR;
} }
} }
TEST((ffval.Node)); TEST((ffval.Node));
} }
#line 2561 "y.tab.c" /* yacc.c:1648 */ #line 2552 "y.tab.c"
break; break;
case 59: case 59: /* expr: IFUNCTION sexpr ',' sexpr ')' */
#line 685 "eval.y" /* yacc.c:1648 */ #line 693 "eval.y"
{ {
if (FSTRCMP((ffvsp[-4].str),"STRSTR(") == 0) { if (FSTRCMP((ffvsp[-4].str),"STRSTR(") == 0) {
(ffval.Node) = New_Func( LONG, strpos_fct, 2, (ffvsp[-3].Node ), (ffvsp[-1].Node), 0, (ffval.Node) = New_Func( LONG, strpos_fct, 2, (ffvsp[-3].Node ), (ffvsp[-1].Node), 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
} }
} }
#line 2573 "y.tab.c" /* yacc.c:1648 */ #line 2564 "y.tab.c"
break; break;
case 60: case 60: /* expr: FUNCTION expr ',' expr ')' */
#line 693 "eval.y" /* yacc.c:1648 */ #line 701 "eval.y"
{ {
if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) { if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_ Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) { if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_ Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
PROMOTE((ffvsp[-3].Node),(ffvsp[-1].Node)); PROMOTE((ffvsp[-3].Node),(ffvsp[-1].Node));
(ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0, (ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
} else { } else {
fferror("Dimensions of DEFNULL arguments " fferror("Dimensions of DEFNULL arguments "
"are not compatible"); "are not compatible");
FFERROR; FFERROR;
skipping to change at line 2599 skipping to change at line 2577
PROMOTE( (ffvsp[-3].Node), (ffvsp[-1].Node) ); PROMOTE( (ffvsp[-3].Node), (ffvsp[-1].Node) );
if( Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) { if( Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
(ffval.Node) = New_Func( 0, max2_fct, 2, (ffvsp[-3].Node) , (ffvsp[-1].Node), 0, 0, 0, 0, 0 ); (ffval.Node) = New_Func( 0, max2_fct, 2, (ffvsp[-3].Node) , (ffvsp[-1].Node), 0, 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_ Dims((ffval.Node), (ffvsp[-1].Node)); if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_ Dims((ffval.Node), (ffvsp[-1].Node));
} else { } else {
fferror("Dimensions of max(a,b) arguments " fferror("Dimensions of max(a,b) arguments "
"are not compatible"); "are not compatible");
FFERROR; FFERROR;
} }
#if 0 } else if (FSTRCMP((ffvsp[-4].str),"SETNULL(") == 0) {
} else if (FSTRCMP((ffvsp[-4].str),"STRSTR(") == 0) { if (OPER((ffvsp[-3].Node)) != CONST_OP
if( TYPE((ffvsp[-3].Node)) != STRING || TYPE((ffvsp[-1].Node || SIZE((ffvsp[-3].Node)) != 1) {
)) != STRING) { fferror("SETNULL first argument must be a scalar constant"
fferror("Arguments to strstr(s,r) must be strings"); );
FFERROR; FFERROR;
} }
(ffval.Node) = New_Func( LONG, strpos_fct, 2, (ffvsp[-3].Nod /* Make sure first arg is same type as second arg */
e), (ffvsp[-1].Node), 0, if ( TYPE((ffvsp[-3].Node)) != TYPE((ffvsp[-1].Node)) ) (ffv
0, 0, 0, 0 ); sp[-3].Node) = New_Unary( TYPE((ffvsp[-1].Node)), 0, (ffvsp[-3].Node) );
TEST((ffval.Node)); (ffval.Node) = New_Func( 0, setnull_fct, 2, (ffvsp[-1].Node)
#endif , (ffvsp[-3].Node), 0, 0, 0, 0, 0 );
} else { } else {
fferror("Function(expr,expr) not supported"); fferror("Function(expr,expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 2639 "y.tab.c" /* yacc.c:1648 */ #line 2629 "y.tab.c"
break; break;
case 61: case 61: /* expr: FUNCTION expr ',' expr ',' expr ',' expr ')' */
#line 755 "eval.y" /* yacc.c:1648 */ #line 762 "eval.y"
{ {
if (FSTRCMP((ffvsp[-8].str),"ANGSEP(") == 0) { if (FSTRCMP((ffvsp[-8].str),"ANGSEP(") == 0) {
if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New _Unary( DOUBLE, 0, (ffvsp[-7].Node) ); if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New _Unary( DOUBLE, 0, (ffvsp[-7].Node) );
if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New _Unary( DOUBLE, 0, (ffvsp[-5].Node) ); if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New _Unary( DOUBLE, 0, (ffvsp[-5].Node) );
if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New _Unary( DOUBLE, 0, (ffvsp[-3].Node) ); if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New _Unary( DOUBLE, 0, (ffvsp[-3].Node) );
if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New _Unary( DOUBLE, 0, (ffvsp[-1].Node) ); if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New _Unary( DOUBLE, 0, (ffvsp[-1].Node) );
if( Test_Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && Test_D ims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && if( Test_Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && Test_D ims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) &&
Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) { Test_Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
(ffval.Node) = New_Func( 0, angsep_fct, 4, (ffvsp[-7].Node) , (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),0,0,0 ); (ffval.Node) = New_Func( 0, angsep_fct, 4, (ffvsp[-7].Node) , (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node),0,0,0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-5].Node)); if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-5].Node));
skipping to change at line 2642 skipping to change at line 2619
} else { } else {
fferror("Dimensions of ANGSEP arguments " fferror("Dimensions of ANGSEP arguments "
"are not compatible"); "are not compatible");
FFERROR; FFERROR;
} }
} else { } else {
fferror("Function(expr,expr,expr,expr) not supported"); fferror("Function(expr,expr,expr,expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 2667 "y.tab.c" /* yacc.c:1648 */ #line 2657 "y.tab.c"
break; break;
case 62: case 62: /* expr: expr '[' expr ']' */
#line 779 "eval.y" /* yacc.c:1648 */ #line 786 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node), 0, 0, { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node
0, 0 ); TEST((ffval.Node)); } ), 0, 0, 0, 0 ); TEST((ffval.Node)); }
#line 2673 "y.tab.c" /* yacc.c:1648 */ #line 2663 "y.tab.c"
break; break;
case 63: case 63: /* expr: expr '[' expr ',' expr ']' */
#line 781 "eval.y" /* yacc.c:1648 */ #line 788 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node
].Node), 0, 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-1].Node), 0, 0, 0 ); TEST((ffval.Node)); }
#line 2679 "y.tab.c" /* yacc.c:1648 */ #line 2669 "y.tab.c"
break; break;
case 64: case 64: /* expr: expr '[' expr ',' expr ',' expr ']' */
#line 783 "eval.y" /* yacc.c:1648 */ #line 790 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node
].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); }
#line 2685 "y.tab.c" /* yacc.c:1648 */ #line 2675 "y.tab.c"
break; break;
case 65: case 65: /* expr: expr '[' expr ',' expr ',' expr ',' expr ']' */
#line 785 "eval.y" /* yacc.c:1648 */ #line 792 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node
].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node)); } ), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node
#line 2691 "y.tab.c" /* yacc.c:1648 */ )); }
#line 2681 "y.tab.c"
break; break;
case 66: case 66: /* expr: expr '[' expr ',' expr ',' expr ',' expr ',' expr ']' */
#line 787 "eval.y" /* yacc.c:1648 */ #line 794 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[- { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Nod
7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.No e), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TE
de)); } ST((ffval.Node)); }
#line 2697 "y.tab.c" /* yacc.c:1648 */ #line 2687 "y.tab.c"
break; break;
case 67: case 67: /* expr: INTCAST expr */
#line 789 "eval.y" /* yacc.c:1648 */ #line 796 "eval.y"
{ (ffval.Node) = New_Unary( LONG, INTCAST, (ffvsp[0].Node) ); TEST((ffval { (ffval.Node) = New_Unary( LONG, INTCAST, (ffvsp[0].Node) );
.Node)); } TEST((ffval.Node)); }
#line 2703 "y.tab.c" /* yacc.c:1648 */ #line 2693 "y.tab.c"
break; break;
case 68: case 68: /* expr: INTCAST bexpr */
#line 791 "eval.y" /* yacc.c:1648 */ #line 798 "eval.y"
{ (ffval.Node) = New_Unary( LONG, INTCAST, (ffvsp[0].Node) ); TEST((ffval { (ffval.Node) = New_Unary( LONG, INTCAST, (ffvsp[0].Node) );
.Node)); } TEST((ffval.Node)); }
#line 2709 "y.tab.c" /* yacc.c:1648 */ #line 2699 "y.tab.c"
break; break;
case 69: case 69: /* expr: FLTCAST expr */
#line 793 "eval.y" /* yacc.c:1648 */ #line 800 "eval.y"
{ (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) ); TEST((ffval { (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) );
.Node)); } TEST((ffval.Node)); }
#line 2715 "y.tab.c" /* yacc.c:1648 */ #line 2705 "y.tab.c"
break; break;
case 70: case 70: /* expr: FLTCAST bexpr */
#line 795 "eval.y" /* yacc.c:1648 */ #line 802 "eval.y"
{ (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) ); TEST((ffval { (ffval.Node) = New_Unary( DOUBLE, FLTCAST, (ffvsp[0].Node) );
.Node)); } TEST((ffval.Node)); }
#line 2721 "y.tab.c" /* yacc.c:1648 */ #line 2711 "y.tab.c"
break; break;
case 71: case 71: /* bexpr: BOOLEAN */
#line 799 "eval.y" /* yacc.c:1648 */ #line 806 "eval.y"
{ (ffval.Node) = New_Const( BOOLEAN, &((ffvsp[0].log)), sizeof(char) ); TEST { (ffval.Node) = New_Const( BOOLEAN, &((ffvsp[0].log)), sizeof(c
((ffval.Node)); } har) ); TEST((ffval.Node)); }
#line 2727 "y.tab.c" /* yacc.c:1648 */ #line 2717 "y.tab.c"
break; break;
case 72: case 72: /* bexpr: BCOLUMN */
#line 801 "eval.y" /* yacc.c:1648 */ #line 808 "eval.y"
{ (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); } { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)
#line 2733 "y.tab.c" /* yacc.c:1648 */ ); }
#line 2723 "y.tab.c"
break; break;
case 73: case 73: /* bexpr: BCOLUMN '{' expr '}' */
#line 803 "eval.y" /* yacc.c:1648 */ #line 810 "eval.y"
{ {
if( TYPE((ffvsp[-1].Node)) != LONG if( TYPE((ffvsp[-1].Node)) != LONG
|| OPER((ffvsp[-1].Node)) != CONST_OP ) { || OPER((ffvsp[-1].Node)) != CONST_OP ) {
fferror("Offset argument must be a constant integer"); fferror("Offset argument must be a constant integer");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node)); (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node));
} }
#line 2746 "y.tab.c" /* yacc.c:1648 */ #line 2736 "y.tab.c"
break; break;
case 74: case 74: /* bexpr: bits EQ bits */
#line 812 "eval.y" /* yacc.c:1648 */ #line 819 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2753 "y.tab.c" /* yacc.c:1648 */ #line 2743 "y.tab.c"
break; break;
case 75: case 75: /* bexpr: bits NE bits */
#line 815 "eval.y" /* yacc.c:1648 */ #line 822 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2760 "y.tab.c" /* yacc.c:1648 */ #line 2750 "y.tab.c"
break; break;
case 76: case 76: /* bexpr: bits LT bits */
#line 818 "eval.y" /* yacc.c:1648 */ #line 825 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2767 "y.tab.c" /* yacc.c:1648 */ #line 2757 "y.tab.c"
break; break;
case 77: case 77: /* bexpr: bits LTE bits */
#line 821 "eval.y" /* yacc.c:1648 */ #line 828 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2774 "y.tab.c" /* yacc.c:1648 */ #line 2764 "y.tab.c"
break; break;
case 78: case 78: /* bexpr: bits GT bits */
#line 824 "eval.y" /* yacc.c:1648 */ #line 831 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2781 "y.tab.c" /* yacc.c:1648 */ #line 2771 "y.tab.c"
break; break;
case 79: case 79: /* bexpr: bits GTE bits */
#line 827 "eval.y" /* yacc.c:1648 */ #line 834 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2788 "y.tab.c" /* yacc.c:1648 */ #line 2778 "y.tab.c"
break; break;
case 80: case 80: /* bexpr: expr GT expr */
#line 830 "eval.y" /* yacc.c:1648 */ #line 837 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), GT, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), GT, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2795 "y.tab.c" /* yacc.c:1648 */ #line 2785 "y.tab.c"
break; break;
case 81: case 81: /* bexpr: expr LT expr */
#line 833 "eval.y" /* yacc.c:1648 */ #line 840 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), LT, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), LT, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2802 "y.tab.c" /* yacc.c:1648 */ #line 2792 "y.tab.c"
break; break;
case 82: case 82: /* bexpr: expr GTE expr */
#line 836 "eval.y" /* yacc.c:1648 */ #line 843 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2809 "y.tab.c" /* yacc.c:1648 */ #line 2799 "y.tab.c"
break; break;
case 83: case 83: /* bexpr: expr LTE expr */
#line 839 "eval.y" /* yacc.c:1648 */ #line 846 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2816 "y.tab.c" /* yacc.c:1648 */ #line 2806 "y.tab.c"
break; break;
case 84: case 84: /* bexpr: expr '~' expr */
#line 842 "eval.y" /* yacc.c:1648 */ #line 849 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), '~', (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), '~', (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2823 "y.tab.c" /* yacc.c:1648 */ #line 2813 "y.tab.c"
break; break;
case 85: case 85: /* bexpr: expr EQ expr */
#line 845 "eval.y" /* yacc.c:1648 */ #line 852 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), EQ, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2830 "y.tab.c" /* yacc.c:1648 */ #line 2820 "y.tab.c"
break; break;
case 86: case 86: /* bexpr: expr NE expr */
#line 848 "eval.y" /* yacc.c:1648 */ #line 855 "eval.y"
{ PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_BinOp( BOOLE { PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); (ffval.Node) = New_
AN, (ffvsp[-2].Node), NE, (ffvsp[0].Node) ); BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffvsp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2837 "y.tab.c" /* yacc.c:1648 */ #line 2827 "y.tab.c"
break; break;
case 87: case 87: /* bexpr: sexpr EQ sexpr */
#line 851 "eval.y" /* yacc.c:1648 */ #line 858 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2844 "y.tab.c" /* yacc.c:1648 */ #line 2834 "y.tab.c"
break; break;
case 88: case 88: /* bexpr: sexpr NE sexpr */
#line 854 "eval.y" /* yacc.c:1648 */ #line 861 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2851 "y.tab.c" /* yacc.c:1648 */ #line 2841 "y.tab.c"
break; break;
case 89: case 89: /* bexpr: sexpr GT sexpr */
#line 857 "eval.y" /* yacc.c:1648 */ #line 864 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GT, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2858 "y.tab.c" /* yacc.c:1648 */ #line 2848 "y.tab.c"
break; break;
case 90: case 90: /* bexpr: sexpr GTE sexpr */
#line 860 "eval.y" /* yacc.c:1648 */ #line 867 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), GTE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2865 "y.tab.c" /* yacc.c:1648 */ #line 2855 "y.tab.c"
break; break;
case 91: case 91: /* bexpr: sexpr LT sexpr */
#line 863 "eval.y" /* yacc.c:1648 */ #line 870 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LT, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2872 "y.tab.c" /* yacc.c:1648 */ #line 2862 "y.tab.c"
break; break;
case 92: case 92: /* bexpr: sexpr LTE sexpr */
#line 866 "eval.y" /* yacc.c:1648 */ #line 873 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, (ffv
); TEST((ffval.Node)); sp[0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = 1; } SIZE((ffval.Node)) = 1; }
#line 2879 "y.tab.c" /* yacc.c:1648 */ #line 2869 "y.tab.c"
break; break;
case 93: case 93: /* bexpr: bexpr AND bexpr */
#line 869 "eval.y" /* yacc.c:1648 */ #line 876 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffv
); TEST((ffval.Node)); } sp[0].Node) ); TEST((ffval.Node)); }
#line 2885 "y.tab.c" /* yacc.c:1648 */ #line 2875 "y.tab.c"
break; break;
case 94: case 94: /* bexpr: bexpr OR bexpr */
#line 871 "eval.y" /* yacc.c:1648 */ #line 878 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), OR, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), OR, (ffv
); TEST((ffval.Node)); } sp[0].Node) ); TEST((ffval.Node)); }
#line 2891 "y.tab.c" /* yacc.c:1648 */ #line 2881 "y.tab.c"
break; break;
case 95: case 95: /* bexpr: bexpr EQ bexpr */
#line 873 "eval.y" /* yacc.c:1648 */ #line 880 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), EQ, (ffv
); TEST((ffval.Node)); } sp[0].Node) ); TEST((ffval.Node)); }
#line 2897 "y.tab.c" /* yacc.c:1648 */ #line 2887 "y.tab.c"
break; break;
case 96: case 96: /* bexpr: bexpr NE bexpr */
#line 875 "eval.y" /* yacc.c:1648 */ #line 882 "eval.y"
{ (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffvsp[0].Node) { (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), NE, (ffv
); TEST((ffval.Node)); } sp[0].Node) ); TEST((ffval.Node)); }
#line 2903 "y.tab.c" /* yacc.c:1648 */ #line 2893 "y.tab.c"
break; break;
case 97: case 97: /* bexpr: expr '=' expr ':' expr */
#line 878 "eval.y" /* yacc.c:1648 */ #line 885 "eval.y"
{ PROMOTE((ffvsp[-4].Node),(ffvsp[-2].Node)); PROMOTE((ffvsp[-4].Node),(ffvs { PROMOTE((ffvsp[-4].Node),(ffvsp[-2].Node)); PROMOTE((ffvsp[-4]
p[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node)); .Node),(ffvsp[0].Node)); PROMOTE((ffvsp[-2].Node),(ffvsp[0].Node));
(ffvsp[-2].Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, ( ffvsp[-4].Node) ); (ffvsp[-2].Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), LTE, ( ffvsp[-4].Node) );
(ffvsp[0].Node) = New_BinOp( BOOLEAN, (ffvsp[-4].Node), LTE, ( ffvsp[0].Node) ); (ffvsp[0].Node) = New_BinOp( BOOLEAN, (ffvsp[-4].Node), LTE, ( ffvsp[0].Node) );
(ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffv sp[0].Node) ); (ffval.Node) = New_BinOp( BOOLEAN, (ffvsp[-2].Node), AND, (ffv sp[0].Node) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 2913 "y.tab.c" /* yacc.c:1648 */ #line 2903 "y.tab.c"
break; break;
case 98: case 98: /* bexpr: bexpr '?' bexpr ':' bexpr */
#line 885 "eval.y" /* yacc.c:1648 */ #line 892 "eval.y"
{ {
if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) { if( ! Test_Dims((ffvsp[-2].Node),(ffvsp[0].Node)) ) {
fferror("Incompatible dimensions in '?:' arguments"); fferror("Incompatible dimensions in '?:' arguments");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node), (ffval.Node) = New_Func( 0, ifthenelse_fct, 3, (ffvsp[-2].Node ), (ffvsp[0].Node), (ffvsp[-4].Node),
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node)); if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node));
if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) { if( ! Test_Dims((ffvsp[-4].Node),(ffval.Node)) ) {
fferror("Incompatible dimensions in '?:' condition"); fferror("Incompatible dimensions in '?:' condition");
FFERROR; FFERROR;
} }
if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-4].Node)) ) Copy_Dims((ff val.Node), (ffvsp[-4].Node));
} }
#line 2933 "y.tab.c" /* yacc.c:1648 */ #line 2923 "y.tab.c"
break; break;
case 99: case 99: /* bexpr: BFUNCTION expr ')' */
#line 902 "eval.y" /* yacc.c:1648 */ #line 909 "eval.y"
{ {
if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) { if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
(ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node) , 0, 0, (ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node) , 0, 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
/* Use expression's size, but return BOOLEAN */ /* Use expression's size, but return BOOLEAN */
TYPE((ffval.Node)) = BOOLEAN; TYPE((ffval.Node)) = BOOLEAN;
} else { } else {
fferror("Boolean Function(expr) not supported"); fferror("Boolean Function(expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 2950 "y.tab.c" /* yacc.c:1648 */ #line 2940 "y.tab.c"
break; break;
case 100: case 100: /* bexpr: BFUNCTION bexpr ')' */
#line 915 "eval.y" /* yacc.c:1648 */ #line 922 "eval.y"
{ {
if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) { if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
(ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node) , 0, 0, (ffval.Node) = New_Func( 0, isnull_fct, 1, (ffvsp[-1].Node) , 0, 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
/* Use expression's size, but return BOOLEAN */ /* Use expression's size, but return BOOLEAN */
TYPE((ffval.Node)) = BOOLEAN; TYPE((ffval.Node)) = BOOLEAN;
} else { } else {
fferror("Boolean Function(expr) not supported"); fferror("Boolean Function(expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 2967 "y.tab.c" /* yacc.c:1648 */ #line 2957 "y.tab.c"
break; break;
case 101: case 101: /* bexpr: BFUNCTION sexpr ')' */
#line 928 "eval.y" /* yacc.c:1648 */ #line 935 "eval.y"
{ {
if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) { if (FSTRCMP((ffvsp[-2].str),"ISNULL(") == 0) {
(ffval.Node) = New_Func( BOOLEAN, isnull_fct, 1, (ffvsp[-1] .Node), 0, 0, (ffval.Node) = New_Func( BOOLEAN, isnull_fct, 1, (ffvsp[-1] .Node), 0, 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
} else { } else {
fferror("Boolean Function(expr) not supported"); fferror("Boolean Function(expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 2982 "y.tab.c" /* yacc.c:1648 */ #line 2972 "y.tab.c"
break; break;
case 102: case 102: /* bexpr: FUNCTION bexpr ',' bexpr ')' */
#line 939 "eval.y" /* yacc.c:1648 */ #line 946 "eval.y"
{ {
if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) { if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_ Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) { if( SIZE((ffvsp[-3].Node))>=SIZE((ffvsp[-1].Node)) && Test_ Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) {
(ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0, (ffval.Node) = New_Func( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0,
0, 0, 0, 0 ); 0, 0, 0, 0 );
TEST((ffval.Node)); TEST((ffval.Node));
} else { } else {
fferror("Dimensions of DEFNULL arguments are not compati ble"); fferror("Dimensions of DEFNULL arguments are not compati ble");
FFERROR; FFERROR;
} }
} else { } else {
fferror("Boolean Function(expr,expr) not supported"); fferror("Boolean Function(expr,expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 3002 "y.tab.c" /* yacc.c:1648 */ #line 2992 "y.tab.c"
break; break;
case 103: case 103: /* bexpr: BFUNCTION expr ',' expr ',' expr ')' */
#line 955 "eval.y" /* yacc.c:1648 */ #line 962 "eval.y"
{ {
if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-5].Node) ); if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-5].Node) );
if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-3].Node) ); if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-3].Node) );
if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-1].Node) ); if( TYPE((ffvsp[-1].Node)) != DOUBLE ) (ffvsp[-1].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-1].Node) );
if( ! (Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test _Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) { if( ! (Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test _Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) {
fferror("Dimensions of NEAR arguments " fferror("Dimensions of NEAR arguments "
"are not compatible"); "are not compatible");
FFERROR; FFERROR;
} else { } else {
if (FSTRCMP((ffvsp[-6].str),"NEAR(") == 0) { if (FSTRCMP((ffvsp[-6].str),"NEAR(") == 0) {
(ffval.Node) = New_Func( BOOLEAN, near_fct, 3, (ffvsp[-5]. Node), (ffvsp[-3].Node), (ffvsp[-1].Node), (ffval.Node) = New_Func( BOOLEAN, near_fct, 3, (ffvsp[-5]. Node), (ffvsp[-3].Node), (ffvsp[-1].Node),
skipping to change at line 3005 skipping to change at line 2982
fferror("Boolean Function not supported"); fferror("Boolean Function not supported");
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffval.Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dims(( ffval.Node), (ffvsp[-5].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dims(( ffval.Node), (ffvsp[-5].Node));
if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-3].Node)); if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-3].Node));
if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-1].Node)); if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-1].Node));
} }
} }
#line 3030 "y.tab.c" /* yacc.c:1648 */ #line 3020 "y.tab.c"
break; break;
case 104: case 104: /* bexpr: BFUNCTION expr ',' expr ',' expr ',' expr ',' expr ')' */
#line 979 "eval.y" /* yacc.c:1648 */ #line 986 "eval.y"
{ {
if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-9].Node) ); if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-9].Node) );
if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-7].Node) ); if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-7].Node) );
if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-5].Node) ); if( TYPE((ffvsp[-5].Node)) != DOUBLE ) (ffvsp[-5].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-5].Node) );
if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-3].Node) ); if( TYPE((ffvsp[-3].Node)) != DOUBLE ) (ffvsp[-3].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-3].Node) );
if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-1].Node)); if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-1].Node));
if( ! (Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test _Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && if( ! (Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test _Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) &&
Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test _Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) )) ) { Test_Dims( (ffvsp[-5].Node), (ffvsp[-3].Node) ) && Test _Dims( (ffvsp[-3].Node), (ffvsp[-1].Node) )) ) {
fferror("Dimensions of CIRCLE arguments " fferror("Dimensions of CIRCLE arguments "
"are not compatible"); "are not compatible");
FFERROR; FFERROR;
skipping to change at line 3037 skipping to change at line 3014
FFERROR; FFERROR;
} }
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffval.Node))<SIZE((ffvsp[-9].Node)) ) Copy_Dims(( ffval.Node), (ffvsp[-9].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-9].Node)) ) Copy_Dims(( ffval.Node), (ffvsp[-9].Node));
if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-7].Node)); if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-7].Node));
if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-5].Node)); if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-5].Node));
if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-3].Node)); if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-3].Node));
if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-1].Node)); if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-1].Node));
} }
} }
#line 3062 "y.tab.c" /* yacc.c:1648 */ #line 3052 "y.tab.c"
break; break;
case 105: case 105: /* bexpr: BFUNCTION expr ',' expr ',' expr ',' expr ',' expr ',' exp
#line 1007 "eval.y" /* yacc.c:1648 */ r ',' expr ')' */
{ #line 1014 "eval.y"
{
if( TYPE((ffvsp[-13].Node)) != DOUBLE ) (ffvsp[-13].Node) = Ne w_Unary( DOUBLE, 0, (ffvsp[-13].Node) ); if( TYPE((ffvsp[-13].Node)) != DOUBLE ) (ffvsp[-13].Node) = Ne w_Unary( DOUBLE, 0, (ffvsp[-13].Node) );
if( TYPE((ffvsp[-11].Node)) != DOUBLE ) (ffvsp[-11].Node) = Ne w_Unary( DOUBLE, 0, (ffvsp[-11].Node) ); if( TYPE((ffvsp[-11].Node)) != DOUBLE ) (ffvsp[-11].Node) = Ne w_Unary( DOUBLE, 0, (ffvsp[-11].Node) );
if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-9].Node) ); if( TYPE((ffvsp[-9].Node)) != DOUBLE ) (ffvsp[-9].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-9].Node) );
if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-7].Node) ); if( TYPE((ffvsp[-7].Node)) != DOUBLE ) (ffvsp[-7].Node) = New_ Unary( DOUBLE, 0, (ffvsp[-7].Node) );
if( TYPE((ffvsp[-5].Node))!= DOUBLE ) (ffvsp[-5].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-5].Node)); if( TYPE((ffvsp[-5].Node))!= DOUBLE ) (ffvsp[-5].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-5].Node));
if( TYPE((ffvsp[-3].Node))!= DOUBLE ) (ffvsp[-3].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-3].Node)); if( TYPE((ffvsp[-3].Node))!= DOUBLE ) (ffvsp[-3].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-3].Node));
if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-1].Node)); if( TYPE((ffvsp[-1].Node))!= DOUBLE ) (ffvsp[-1].Node)= New_Un ary( DOUBLE, 0, (ffvsp[-1].Node));
if( ! (Test_Dims( (ffvsp[-13].Node), (ffvsp[-11].Node) ) && Te st_Dims( (ffvsp[-11].Node), (ffvsp[-9].Node) ) && if( ! (Test_Dims( (ffvsp[-13].Node), (ffvsp[-11].Node) ) && Te st_Dims( (ffvsp[-11].Node), (ffvsp[-9].Node) ) &&
Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test _Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) && Test_Dims( (ffvsp[-9].Node), (ffvsp[-7].Node) ) && Test _Dims( (ffvsp[-7].Node), (ffvsp[-5].Node) ) &&
Test_Dims((ffvsp[-5].Node),(ffvsp[-3].Node) ) && Test_D ims((ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) { Test_Dims((ffvsp[-5].Node),(ffvsp[-3].Node) ) && Test_D ims((ffvsp[-3].Node), (ffvsp[-1].Node) ) ) ) {
skipping to change at line 3077 skipping to change at line 3054
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffval.Node))<SIZE((ffvsp[-13].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[-13].Node)); if( SIZE((ffval.Node))<SIZE((ffvsp[-13].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[-13].Node));
if( SIZE((ffvsp[-13].Node))<SIZE((ffvsp[-11].Node)) ) Copy_ Dims((ffval.Node), (ffvsp[-11].Node)); if( SIZE((ffvsp[-13].Node))<SIZE((ffvsp[-11].Node)) ) Copy_ Dims((ffval.Node), (ffvsp[-11].Node));
if( SIZE((ffvsp[-11].Node))<SIZE((ffvsp[-9].Node)) ) Copy_D ims((ffval.Node), (ffvsp[-9].Node)); if( SIZE((ffvsp[-11].Node))<SIZE((ffvsp[-9].Node)) ) Copy_D ims((ffval.Node), (ffvsp[-9].Node));
if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-7].Node)); if( SIZE((ffvsp[-9].Node))<SIZE((ffvsp[-7].Node)) ) Copy_Di ms((ffval.Node), (ffvsp[-7].Node));
if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-5].Node)); if( SIZE((ffvsp[-7].Node))<SIZE((ffvsp[-5].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-5].Node));
if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-3].Node)); if( SIZE((ffvsp[-5].Node))<SIZE((ffvsp[-3].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-3].Node));
if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-1].Node)); if( SIZE((ffvsp[-3].Node))<SIZE((ffvsp[-1].Node)) ) Copy_Dim s((ffval.Node), (ffvsp[-1].Node));
} }
} }
#line 3102 "y.tab.c" /* yacc.c:1648 */ #line 3092 "y.tab.c"
break; break;
case 106: case 106: /* bexpr: GTIFILTER ')' */
#line 1044 "eval.y" /* yacc.c:1648 */ #line 1051 "eval.y"
{ /* Use defaults for all elements */ { /* Use defaults for all elements */
(ffval.Node) = New_GTI( "", -99, "*START*", "*STOP*" ); (ffval.Node) = New_GTI(gtifilt_fct, "", -99, -99, "*START*",
"*STOP*" );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3110 "y.tab.c" /* yacc.c:1648 */ #line 3100 "y.tab.c"
break; break;
case 107: case 107: /* bexpr: GTIFILTER STRING ')' */
#line 1048 "eval.y" /* yacc.c:1648 */ #line 1055 "eval.y"
{ /* Use defaults for all except filename */ { /* Use defaults for all except filename */
(ffval.Node) = New_GTI( (ffvsp[-1].str), -99, "*START*", "*ST (ffval.Node) = New_GTI(gtifilt_fct, (ffvsp[-1].str), -99, -99,
OP*" ); "*START*", "*STOP*" );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3118 "y.tab.c" /* yacc.c:1648 */ #line 3108 "y.tab.c"
break; break;
case 108: case 108: /* bexpr: GTIFILTER STRING ',' expr ')' */
#line 1052 "eval.y" /* yacc.c:1648 */ #line 1059 "eval.y"
{ (ffval.Node) = New_GTI( (ffvsp[-3].str), (ffvsp[-1].Node), "*START*", "*S { (ffval.Node) = New_GTI(gtifilt_fct, (ffvsp[-3].str), (ffvsp[
TOP*" ); -1].Node), -99, "*START*", "*STOP*" );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3125 "y.tab.c" /* yacc.c:1648 */ #line 3115 "y.tab.c"
break; break;
case 109: case 109: /* bexpr: GTIFILTER STRING ',' expr ',' STRING ',' STRING ')' */
#line 1055 "eval.y" /* yacc.c:1648 */ #line 1062 "eval.y"
{ (ffval.Node) = New_GTI( (ffvsp[-7].str), (ffvsp[-5].Node), (ffvsp[-3].str { (ffval.Node) = New_GTI(gtifilt_fct, (ffvsp[-7].str), (ffvsp[
), (ffvsp[-1].str) ); -5].Node), -99, (ffvsp[-3].str), (ffvsp[-1].str) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3132 "y.tab.c" /* yacc.c:1648 */ #line 3122 "y.tab.c"
break; break;
case 110: case 110: /* bexpr: GTIOVERLAP STRING ',' expr ',' expr ')' */
#line 1059 "eval.y" /* yacc.c:1648 */ #line 1067 "eval.y"
{ /* Use defaults for all except filename */ { (ffval.Node) = New_GTI(gtiover_fct, (ffvsp[-5].str), (ffvsp[
-3].Node), (ffvsp[-1].Node), "*START*", "*STOP*");
TEST((ffval.Node)); }
#line 3129 "y.tab.c"
break;
case 111: /* bexpr: GTIOVERLAP STRING ',' expr ',' expr ',' STRING ',' STRING
')' */
#line 1070 "eval.y"
{ (ffval.Node) = New_GTI(gtiover_fct, (ffvsp[-9].str), (ffvsp[
-7].Node), (ffvsp[-5].Node), (ffvsp[-3].str), (ffvsp[-1].str) );
TEST((ffval.Node)); }
#line 3136 "y.tab.c"
break;
case 112: /* bexpr: REGFILTER STRING ')' */
#line 1075 "eval.y"
{ /* Use defaults for all except filename */
(ffval.Node) = New_REG( (ffvsp[-1].str), -99, -99, "" ); (ffval.Node) = New_REG( (ffvsp[-1].str), -99, -99, "" );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3140 "y.tab.c" /* yacc.c:1648 */ #line 3144 "y.tab.c"
break; break;
case 111: case 113: /* bexpr: REGFILTER STRING ',' expr ',' expr ')' */
#line 1063 "eval.y" /* yacc.c:1648 */ #line 1079 "eval.y"
{ (ffval.Node) = New_REG( (ffvsp[-5].str), (ffvsp[-3].Node), (ffvsp[-1].Nod { (ffval.Node) = New_REG( (ffvsp[-5].str), (ffvsp[-3].Node), (f
e), "" ); fvsp[-1].Node), "" );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3147 "y.tab.c" /* yacc.c:1648 */ #line 3151 "y.tab.c"
break; break;
case 112: case 114: /* bexpr: REGFILTER STRING ',' expr ',' expr ',' STRING ')' */
#line 1066 "eval.y" /* yacc.c:1648 */ #line 1082 "eval.y"
{ (ffval.Node) = New_REG( (ffvsp[-7].str), (ffvsp[-5].Node), (ffvsp[-3].Nod { (ffval.Node) = New_REG( (ffvsp[-7].str), (ffvsp[-5].Node), (f
e), (ffvsp[-1].str) ); fvsp[-3].Node), (ffvsp[-1].str) );
TEST((ffval.Node)); } TEST((ffval.Node)); }
#line 3154 "y.tab.c" /* yacc.c:1648 */ #line 3158 "y.tab.c"
break; break;
case 113: case 115: /* bexpr: bexpr '[' expr ']' */
#line 1070 "eval.y" /* yacc.c:1648 */ #line 1086 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node), 0, 0, { (ffval.Node) = New_Deref( (ffvsp[-3].Node), 1, (ffvsp[-1].Node
0, 0 ); TEST((ffval.Node)); } ), 0, 0, 0, 0 ); TEST((ffval.Node)); }
#line 3160 "y.tab.c" /* yacc.c:1648 */ #line 3164 "y.tab.c"
break; break;
case 114: case 116: /* bexpr: bexpr '[' expr ',' expr ']' */
#line 1072 "eval.y" /* yacc.c:1648 */ #line 1088 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node), (ffvsp[-1 { (ffval.Node) = New_Deref( (ffvsp[-5].Node), 2, (ffvsp[-3].Node
].Node), 0, 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-1].Node), 0, 0, 0 ); TEST((ffval.Node)); }
#line 3166 "y.tab.c" /* yacc.c:1648 */ #line 3170 "y.tab.c"
break; break;
case 115: case 117: /* bexpr: bexpr '[' expr ',' expr ',' expr ']' */
#line 1074 "eval.y" /* yacc.c:1648 */ #line 1090 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node), (ffvsp[-3 { (ffval.Node) = New_Deref( (ffvsp[-7].Node), 3, (ffvsp[-5].Node
].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); } ), (ffvsp[-3].Node), (ffvsp[-1].Node), 0, 0 ); TEST((ffval.Node)); }
#line 3172 "y.tab.c" /* yacc.c:1648 */ #line 3176 "y.tab.c"
break; break;
case 116: case 118: /* bexpr: bexpr '[' expr ',' expr ',' expr ',' expr ']' */
#line 1076 "eval.y" /* yacc.c:1648 */ #line 1092 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node), (ffvsp[-5 { (ffval.Node) = New_Deref( (ffvsp[-9].Node), 4, (ffvsp[-7].Node
].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node)); } ), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node), 0 ); TEST((ffval.Node
#line 3178 "y.tab.c" /* yacc.c:1648 */ )); }
#line 3182 "y.tab.c"
break; break;
case 117: case 119: /* bexpr: bexpr '[' expr ',' expr ',' expr ',' expr ',' expr ']' */
#line 1078 "eval.y" /* yacc.c:1648 */ #line 1094 "eval.y"
{ (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Node), (ffvsp[- { (ffval.Node) = New_Deref( (ffvsp[-11].Node), 5, (ffvsp[-9].Nod
7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TEST((ffval.No e), (ffvsp[-7].Node), (ffvsp[-5].Node), (ffvsp[-3].Node), (ffvsp[-1].Node) ); TE
de)); } ST((ffval.Node)); }
#line 3184 "y.tab.c" /* yacc.c:1648 */ #line 3188 "y.tab.c"
break; break;
case 118: case 120: /* bexpr: NOT bexpr */
#line 1080 "eval.y" /* yacc.c:1648 */ #line 1096 "eval.y"
{ (ffval.Node) = New_Unary( BOOLEAN, NOT, (ffvsp[0].Node) ); TEST((ffval.Nod { (ffval.Node) = New_Unary( BOOLEAN, NOT, (ffvsp[0].Node) ); TES
e)); } T((ffval.Node)); }
#line 3190 "y.tab.c" /* yacc.c:1648 */ #line 3194 "y.tab.c"
break; break;
case 119: case 121: /* bexpr: '(' bexpr ')' */
#line 1082 "eval.y" /* yacc.c:1648 */ #line 1098 "eval.y"
{ (ffval.Node) = (ffvsp[-1].Node); } { (ffval.Node) = (ffvsp[-1].Node); }
#line 3196 "y.tab.c" /* yacc.c:1648 */ #line 3200 "y.tab.c"
break; break;
case 120: case 122: /* sexpr: STRING */
#line 1086 "eval.y" /* yacc.c:1648 */ #line 1102 "eval.y"
{ (ffval.Node) = New_Const( STRING, (ffvsp[0].str), strlen((ffvsp[0].str))+1 { (ffval.Node) = New_Const( STRING, (ffvsp[0].str), strlen((ffvs
); TEST((ffval.Node)); p[0].str))+1 ); TEST((ffval.Node));
SIZE((ffval.Node)) = strlen((ffvsp[0].str)); } SIZE((ffval.Node)) = strlen((ffvsp[0].str)); }
#line 3203 "y.tab.c" /* yacc.c:1648 */ #line 3207 "y.tab.c"
break; break;
case 121: case 123: /* sexpr: SCOLUMN */
#line 1089 "eval.y" /* yacc.c:1648 */ #line 1105 "eval.y"
{ (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)); } { (ffval.Node) = New_Column( (ffvsp[0].lng) ); TEST((ffval.Node)
#line 3209 "y.tab.c" /* yacc.c:1648 */ ); }
#line 3213 "y.tab.c"
break; break;
case 122: case 124: /* sexpr: SCOLUMN '{' expr '}' */
#line 1091 "eval.y" /* yacc.c:1648 */ #line 1107 "eval.y"
{ {
if( TYPE((ffvsp[-1].Node)) != LONG if( TYPE((ffvsp[-1].Node)) != LONG
|| OPER((ffvsp[-1].Node)) != CONST_OP ) { || OPER((ffvsp[-1].Node)) != CONST_OP ) {
fferror("Offset argument must be a constant integer"); fferror("Offset argument must be a constant integer");
FFERROR; FFERROR;
} }
(ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node)); (ffval.Node) = New_Offset( (ffvsp[-3].lng), (ffvsp[-1].Node) ) ; TEST((ffval.Node));
} }
#line 3222 "y.tab.c" /* yacc.c:1648 */ #line 3226 "y.tab.c"
break; break;
case 123: case 125: /* sexpr: SNULLREF */
#line 1100 "eval.y" /* yacc.c:1648 */ #line 1116 "eval.y"
{ (ffval.Node) = New_Func( STRING, null_fct, 0, 0, 0, 0, 0, 0, 0, 0 ); } { (ffval.Node) = New_Func( STRING, null_fct, 0, 0, 0, 0, 0, 0, 0
#line 3228 "y.tab.c" /* yacc.c:1648 */ , 0 ); }
#line 3232 "y.tab.c"
break; break;
case 124: case 126: /* sexpr: '(' sexpr ')' */
#line 1102 "eval.y" /* yacc.c:1648 */ #line 1118 "eval.y"
{ (ffval.Node) = (ffvsp[-1].Node); } { (ffval.Node) = (ffvsp[-1].Node); }
#line 3234 "y.tab.c" /* yacc.c:1648 */ #line 3238 "y.tab.c"
break; break;
case 125: case 127: /* sexpr: sexpr '+' sexpr */
#line 1104 "eval.y" /* yacc.c:1648 */ #line 1120 "eval.y"
{ {
if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) { if (SIZE((ffvsp[-2].Node))+SIZE((ffvsp[0].Node)) >= MAX_STRLEN) {
fferror("Combined string size exceeds " MAX_STRLEN_S " charac ters"); fferror("Combined string size exceeds " MAX_STRLEN_S " charac ters");
FFERROR; FFERROR;
} }
(ffval.Node) = New_BinOp( STRING, (ffvsp[-2].Node), '+', (ffvsp [0].Node) ); TEST((ffval.Node)); (ffval.Node) = New_BinOp( STRING, (ffvsp[-2].Node), '+', (ffvsp [0].Node) ); TEST((ffval.Node));
SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].No de)); SIZE((ffval.Node)) = SIZE((ffvsp[-2].Node)) + SIZE((ffvsp[0].No de));
} }
#line 3247 "y.tab.c" /* yacc.c:1648 */ #line 3251 "y.tab.c"
break; break;
case 126: case 128: /* sexpr: bexpr '?' sexpr ':' sexpr */
#line 1113 "eval.y" /* yacc.c:1648 */ #line 1129 "eval.y"
{ {
int outSize; int outSize;
if( SIZE((ffvsp[-4].Node))!=1 ) { if( SIZE((ffvsp[-4].Node))!=1 ) {
fferror("Cannot have a vector string column"); fferror("Cannot have a vector string column");
FFERROR; FFERROR;
} }
/* Since the output can be calculated now, as a constant /* Since the output can be calculated now, as a constant
scalar, we must precalculate the output size, in scalar, we must precalculate the output size, in
order to avoid an overflow. */ order to avoid an overflow. */
outSize = SIZE((ffvsp[-2].Node)); outSize = SIZE((ffvsp[-2].Node));
if (SIZE((ffvsp[0].Node)) > outSize) outSize = SIZE((ffvsp[0].N ode)); if (SIZE((ffvsp[0].Node)) > outSize) outSize = SIZE((ffvsp[0].N ode));
(ffval.Node) = New_FuncSize( 0, ifthenelse_fct, 3, (ffvsp[-2]. Node), (ffvsp[0].Node), (ffvsp[-4].Node), (ffval.Node) = New_FuncSize( 0, ifthenelse_fct, 3, (ffvsp[-2]. Node), (ffvsp[0].Node), (ffvsp[-4].Node),
0, 0, 0, 0, outSize); 0, 0, 0, 0, outSize);
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node)); if( SIZE((ffvsp[-2].Node))<SIZE((ffvsp[0].Node)) ) Copy_Dims( (ffval.Node), (ffvsp[0].Node));
} }
#line 3269 "y.tab.c" /* yacc.c:1648 */ #line 3273 "y.tab.c"
break; break;
case 127: case 129: /* sexpr: FUNCTION sexpr ',' sexpr ')' */
#line 1132 "eval.y" /* yacc.c:1648 */ #line 1148 "eval.y"
{ {
if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) { if (FSTRCMP((ffvsp[-4].str),"DEFNULL(") == 0) {
int outSize; int outSize;
/* Since the output can be calculated now, as a constant /* Since the output can be calculated now, as a constant
scalar, we must precalculate the output size, in scalar, we must precalculate the output size, in
order to avoid an overflow. */ order to avoid an overflow. */
outSize = SIZE((ffvsp[-3].Node)); outSize = SIZE((ffvsp[-3].Node));
if (SIZE((ffvsp[-1].Node)) > outSize) outSize = SIZE((ffvsp[ -1].Node)); if (SIZE((ffvsp[-1].Node)) > outSize) outSize = SIZE((ffvsp[ -1].Node));
(ffval.Node) = New_FuncSize( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0, (ffval.Node) = New_FuncSize( 0, defnull_fct, 2, (ffvsp[-3].N ode), (ffvsp[-1].Node), 0,
0, 0, 0, 0, outSize ); 0, 0, 0, 0, outSize );
TEST((ffval.Node)); TEST((ffval.Node));
if( SIZE((ffvsp[-1].Node))>SIZE((ffvsp[-3].Node)) ) SIZE((ff val.Node)) = SIZE((ffvsp[-1].Node)); if( SIZE((ffvsp[-1].Node))>SIZE((ffvsp[-3].Node)) ) SIZE((ff val.Node)) = SIZE((ffvsp[-1].Node));
} else { } else {
fferror("Function(string,string) not supported"); fferror("Function(string,string) not supported");
FFERROR; FFERROR;
} }
} }
#line 3292 "y.tab.c" /* yacc.c:1648 */ #line 3296 "y.tab.c"
break; break;
case 128: case 130: /* sexpr: FUNCTION sexpr ',' expr ',' expr ')' */
#line 1151 "eval.y" /* yacc.c:1648 */ #line 1167 "eval.y"
{ {
if (FSTRCMP((ffvsp[-6].str),"STRMID(") == 0) { if (FSTRCMP((ffvsp[-6].str),"STRMID(") == 0) {
int len; int len;
if( TYPE((ffvsp[-3].Node)) != LONG || SIZE((ffvsp[-3].Node)) != 1 || if( TYPE((ffvsp[-3].Node)) != LONG || SIZE((ffvsp[-3].Node)) != 1 ||
TYPE((ffvsp[-1].Node)) != LONG || SIZE((ffvsp[-1].Node)) != 1) { TYPE((ffvsp[-1].Node)) != LONG || SIZE((ffvsp[-1].Node)) != 1) {
fferror("When using STRMID(S,P,N), P and N must be integers (and not vector columns)"); fferror("When using STRMID(S,P,N), P and N must be integers (and not vector columns)");
FFERROR; FFERROR;
} }
if (OPER((ffvsp[-1].Node)) == CONST_OP) { if (OPER((ffvsp[-1].Node)) == CONST_OP) {
/* Constant value: use that directly */ /* Constant value: use that directly */
len = (gParse.Nodes[(ffvsp[-1].Node)].value.data.lng); len = (gParse.Nodes[(ffvsp[-1].Node)].value.data.lng);
skipping to change at line 3298 skipping to change at line 3289
fferror("STRMID(S,P,N), N must be 1-" MAX_STRLEN_S); fferror("STRMID(S,P,N), N must be 1-" MAX_STRLEN_S);
FFERROR; FFERROR;
} }
(ffval.Node) = New_FuncSize( 0, strmid_fct, 3, (ffvsp[-5].Nod e), (ffvsp[-3].Node),(ffvsp[-1].Node),0,0,0,0,len); (ffval.Node) = New_FuncSize( 0, strmid_fct, 3, (ffvsp[-5].Nod e), (ffvsp[-3].Node),(ffvsp[-1].Node),0,0,0,0,len);
TEST((ffval.Node)); TEST((ffval.Node));
} else { } else {
fferror("Function(string,expr,expr) not supported"); fferror("Function(string,expr,expr) not supported");
FFERROR; FFERROR;
} }
} }
#line 3323 "y.tab.c" /* yacc.c:1648 */ #line 3327 "y.tab.c"
break; break;
#line 3327 "y.tab.c" /* yacc.c:1648 */ #line 3331 "y.tab.c"
default: break; default: break;
} }
/* User semantic actions sometimes alter ffchar, and that requires /* User semantic actions sometimes alter ffchar, and that requires
that fftoken be updated with the new translation. We take the that fftoken be updated with the new translation. We take the
approach of translating immediately before every use of fftoken. approach of translating immediately before every use of fftoken.
One alternative is translating here after every semantic action, One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes but that translation would be missed if the semantic action invokes
FFABORT, FFACCEPT, or FFERROR immediately after altering ffchar or FFABORT, FFACCEPT, or FFERROR immediately after altering ffchar or
if it invokes FFBACKUP. In the case of FFABORT or FFACCEPT, an if it invokes FFBACKUP. In the case of FFABORT or FFACCEPT, an
incorrect destructor might then be invoked immediately. In the incorrect destructor might then be invoked immediately. In the
case of FFERROR or FFBACKUP, subsequent parser actions might lead case of FFERROR or FFBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */ before the lookahead is translated. */
FF_SYMBOL_PRINT ("-> $$ =", ffr1[ffn], &ffval, &ffloc); FF_SYMBOL_PRINT ("-> $$ =", FF_CAST (ffsymbol_kind_t, ffr1[ffn]), &ffval, &ffl oc);
FFPOPSTACK (fflen); FFPOPSTACK (fflen);
fflen = 0; fflen = 0;
FF_STACK_PRINT (ffss, ffssp);
*++ffvsp = ffval; *++ffvsp = ffval;
/* Now 'shift' the result of the reduction. Determine what state /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule that goes to, based on the state we popped back to and the rule
number reduced by. */ number reduced by. */
{
ffn = ffr1[ffn]; const int fflhs = ffr1[ffn] - FFNTOKENS;
const int ffi = ffpgoto[fflhs] + *ffssp;
ffstate = ffpgoto[ffn - FFNTOKENS] + *ffssp; ffstate = (0 <= ffi && ffi <= FFLAST && ffcheck[ffi] == *ffssp
if (0 <= ffstate && ffstate <= FFLAST && ffcheck[ffstate] == *ffssp) ? fftable[ffi]
ffstate = fftable[ffstate]; : ffdefgoto[fflhs]);
else }
ffstate = ffdefgoto[ffn - FFNTOKENS];
goto ffnewstate; goto ffnewstate;
/*--------------------------------------. /*--------------------------------------.
| fferrlab -- here on detecting error. | | fferrlab -- here on detecting error. |
`--------------------------------------*/ `--------------------------------------*/
fferrlab: fferrlab:
/* Make sure we have latest lookahead translation. See comments at /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */ user semantic actions for why this is necessary. */
fftoken = ffchar == FFEMPTY ? FFEMPTY : FFTRANSLATE (ffchar); fftoken = ffchar == FFEMPTY ? FFSYMBOL_FFEMPTY : FFTRANSLATE (ffchar);
/* If not already recovering from an error, report this error. */ /* If not already recovering from an error, report this error. */
if (!fferrstatus) if (!fferrstatus)
{ {
++ffnerrs; ++ffnerrs;
#if ! FFERROR_VERBOSE
fferror (FF_("syntax error")); fferror (FF_("syntax error"));
#else
# define FFSYNTAX_ERROR ffsyntax_error (&ffmsg_alloc, &ffmsg, \
ffssp, fftoken)
{
char const *ffmsgp = FF_("syntax error");
int ffsyntax_error_status;
ffsyntax_error_status = FFSYNTAX_ERROR;
if (ffsyntax_error_status == 0)
ffmsgp = ffmsg;
else if (ffsyntax_error_status == 1)
{
if (ffmsg != ffmsgbuf)
FFSTACK_FREE (ffmsg);
ffmsg = (char *) FFSTACK_ALLOC (ffmsg_alloc);
if (!ffmsg)
{
ffmsg = ffmsgbuf;
ffmsg_alloc = sizeof ffmsgbuf;
ffsyntax_error_status = 2;
}
else
{
ffsyntax_error_status = FFSYNTAX_ERROR;
ffmsgp = ffmsg;
}
}
fferror (ffmsgp);
if (ffsyntax_error_status == 2)
goto ffexhaustedlab;
}
# undef FFSYNTAX_ERROR
#endif
} }
if (fferrstatus == 3) if (fferrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse lookahead token after an
error, discard it. */ error, discard it. */
if (ffchar <= FFEOF) if (ffchar <= FFEOF)
{ {
/* Return failure if at end of input. */ /* Return failure if at end of input. */
skipping to change at line 3412 skipping to change at line 3368
} }
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse lookahead token after shifting the error
token. */ token. */
goto fferrlab1; goto fferrlab1;
/*---------------------------------------------------. /*---------------------------------------------------.
| fferrorlab -- error raised explicitly by FFERROR. | | fferrorlab -- error raised explicitly by FFERROR. |
`---------------------------------------------------*/ `---------------------------------------------------*/
fferrorlab: fferrorlab:
/* Pacify compilers when the user code never invokes FFERROR and the
/* Pacify compilers like GCC when the user code never invokes label fferrorlab therefore never appears in user code. */
FFERROR and the label fferrorlab therefore never appears in user if (0)
code. */ FFERROR;
if (/*CONSTCOND*/ 0)
goto fferrorlab;
/* Do not reclaim the symbols of the rule whose action triggered /* Do not reclaim the symbols of the rule whose action triggered
this FFERROR. */ this FFERROR. */
FFPOPSTACK (fflen); FFPOPSTACK (fflen);
fflen = 0; fflen = 0;
FF_STACK_PRINT (ffss, ffssp); FF_STACK_PRINT (ffss, ffssp);
ffstate = *ffssp; ffstate = *ffssp;
goto fferrlab1; goto fferrlab1;
/*-------------------------------------------------------------. /*-------------------------------------------------------------.
| fferrlab1 -- common code for both syntax error and FFERROR. | | fferrlab1 -- common code for both syntax error and FFERROR. |
`-------------------------------------------------------------*/ `-------------------------------------------------------------*/
fferrlab1: fferrlab1:
fferrstatus = 3; /* Each real token shifted decrements this. */ fferrstatus = 3; /* Each real token shifted decrements this. */
/* Pop stack until we find a state that shifts the error token. */
for (;;) for (;;)
{ {
ffn = ffpact[ffstate]; ffn = ffpact[ffstate];
if (!ffpact_value_is_default (ffn)) if (!ffpact_value_is_default (ffn))
{ {
ffn += FFTERROR; ffn += FFSYMBOL_FFerror;
if (0 <= ffn && ffn <= FFLAST && ffcheck[ffn] == FFTERROR) if (0 <= ffn && ffn <= FFLAST && ffcheck[ffn] == FFSYMBOL_FFerror)
{ {
ffn = fftable[ffn]; ffn = fftable[ffn];
if (0 < ffn) if (0 < ffn)
break; break;
} }
} }
/* Pop the current state because it cannot handle the error token. */ /* Pop the current state because it cannot handle the error token. */
if (ffssp == ffss) if (ffssp == ffss)
FFABORT; FFABORT;
ffdestruct ("Error: popping", ffdestruct ("Error: popping",
ffstos[ffstate], ffvsp); FF_ACCESSING_SYMBOL (ffstate), ffvsp);
FFPOPSTACK (1); FFPOPSTACK (1);
ffstate = *ffssp; ffstate = *ffssp;
FF_STACK_PRINT (ffss, ffssp); FF_STACK_PRINT (ffss, ffssp);
} }
FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN FF_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++ffvsp = fflval; *++ffvsp = fflval;
FF_IGNORE_MAYBE_UNINITIALIZED_END FF_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */ /* Shift the error token. */
FF_SYMBOL_PRINT ("Shifting", ffstos[ffn], ffvsp, fflsp); FF_SYMBOL_PRINT ("Shifting", FF_ACCESSING_SYMBOL (ffn), ffvsp, fflsp);
ffstate = ffn; ffstate = ffn;
goto ffnewstate; goto ffnewstate;
/*-------------------------------------. /*-------------------------------------.
| ffacceptlab -- FFACCEPT comes here. | | ffacceptlab -- FFACCEPT comes here. |
`-------------------------------------*/ `-------------------------------------*/
ffacceptlab: ffacceptlab:
ffresult = 0; ffresult = 0;
goto ffreturn; goto ffreturn;
/*-----------------------------------. /*-----------------------------------.
| ffabortlab -- FFABORT comes here. | | ffabortlab -- FFABORT comes here. |
`-----------------------------------*/ `-----------------------------------*/
ffabortlab: ffabortlab:
ffresult = 1; ffresult = 1;
goto ffreturn; goto ffreturn;
#if !defined ffoverflow || FFERROR_VERBOSE #if !defined ffoverflow
/*-------------------------------------------------. /*-------------------------------------------------.
| ffexhaustedlab -- memory exhaustion comes here. | | ffexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/ `-------------------------------------------------*/
ffexhaustedlab: ffexhaustedlab:
fferror (FF_("memory exhausted")); fferror (FF_("memory exhausted"));
ffresult = 2; ffresult = 2;
/* Fall through. */ goto ffreturn;
#endif #endif
/*-------------------------------------------------------.
| ffreturn -- parsing is finished, clean up and return. |
`-------------------------------------------------------*/
ffreturn: ffreturn:
if (ffchar != FFEMPTY) if (ffchar != FFEMPTY)
{ {
/* Make sure we have latest lookahead translation. See comments at /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */ user semantic actions for why this is necessary. */
fftoken = FFTRANSLATE (ffchar); fftoken = FFTRANSLATE (ffchar);
ffdestruct ("Cleanup: discarding lookahead", ffdestruct ("Cleanup: discarding lookahead",
fftoken, &fflval); fftoken, &fflval);
} }
/* Do not reclaim the symbols of the rule whose action triggered /* Do not reclaim the symbols of the rule whose action triggered
this FFABORT or FFACCEPT. */ this FFABORT or FFACCEPT. */
FFPOPSTACK (fflen); FFPOPSTACK (fflen);
FF_STACK_PRINT (ffss, ffssp); FF_STACK_PRINT (ffss, ffssp);
while (ffssp != ffss) while (ffssp != ffss)
{ {
ffdestruct ("Cleanup: popping", ffdestruct ("Cleanup: popping",
ffstos[*ffssp], ffvsp); FF_ACCESSING_SYMBOL (+*ffssp), ffvsp);
FFPOPSTACK (1); FFPOPSTACK (1);
} }
#ifndef ffoverflow #ifndef ffoverflow
if (ffss != ffssa) if (ffss != ffssa)
FFSTACK_FREE (ffss); FFSTACK_FREE (ffss);
#endif #endif
#if FFERROR_VERBOSE
if (ffmsg != ffmsgbuf)
FFSTACK_FREE (ffmsg);
#endif
return ffresult; return ffresult;
} }
#line 1180 "eval.y" /* yacc.c:1907 */
#line 1196 "eval.y"
/*************************************************************************/ /*************************************************************************/
/* Start of "New" routines which build the expression Nodal structure */ /* Start of "New" routines which build the expression Nodal structure */
/*************************************************************************/ /*************************************************************************/
static int Alloc_Node( void ) static int Alloc_Node( void )
{ {
/* Use this for allocation to guarantee *Nodes */ /* Use this for allocation to guarantee *Nodes */
Node *newNodePtr; /* survives on failure, making it still valid */ Node *newNodePtr; /* survives on failure, making it still valid */
/* while working our way out of this error */ /* while working our way out of this error */
skipping to change at line 3840 skipping to change at line 3796
fferror("Must specify just one or all indices for vector"); fferror("Must specify just one or all indices for vector");
return(-1); return(-1);
} }
if( constant ) this->DoOp( this ); if( constant ) this->DoOp( this );
} }
return(n); return(n);
} }
extern int ffGetVariable( char *varName, FFSTYPE *varVal ); extern int ffGetVariable( char *varName, FFSTYPE *varVal );
static int New_GTI( char *fname, int Node1, char *start, char *stop ) static int New_GTI( funcOp Op, char *fname, int Node1, int Node2, char *start, c har *stop )
{ {
fitsfile *fptr; fitsfile *fptr;
Node *this, *that0, *that1; Node *this, *that0, *that1, *that2;
int type,i,n, startCol, stopCol, Node0; int type,i,n, startCol, stopCol, Node0;
int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat; int hdutype, hdunum, evthdu, samefile, extvers, movetotype, tstat;
char extname[100]; char extname[100];
long nrows; long nrows;
double timeZeroI[2], timeZeroF[2], dt, timeSpan; double timeZeroI[2], timeZeroF[2], dt, timeSpan;
char xcol[20], xexpr[20]; char xcol[20], xexpr[20];
FFSTYPE colVal; FFSTYPE colVal;
if( Node1==-99 ) { if( Op == gtifilt_fct && Node1==-99 ) {
type = ffGetVariable( "TIME", &colVal ); type = ffGetVariable( "TIME", &colVal );
if( type==COLUMN ) { if( type==COLUMN ) {
Node1 = New_Column( (int)colVal.lng ); Node1 = New_Column( (int)colVal.lng );
} else { } else {
fferror("Could not build TIME column for GTIFILTER"); fferror("Could not build TIME column for GTIFILTER");
return(-1); return(-1);
} }
} }
if (Op == gtiover_fct) {
if (Node1 == -99 || Node2 == -99) {
fferror("startExpr and stopExpr values must be defined for GTIOVERLAP");
return(-1);
}
/* Also case TIME_STOP to double precision */
Node2 = New_Unary( DOUBLE, 0, Node2 );
if (Node2 < 0) return(-1);
}
/* Type cast TIME to double precision */
Node1 = New_Unary( DOUBLE, 0, Node1 ); Node1 = New_Unary( DOUBLE, 0, Node1 );
Node0 = Alloc_Node(); /* This will hold the START/STOP times */ Node0 = Alloc_Node(); /* This will hold the START/STOP times */
if( Node1<0 || Node0<0 ) return(-1); if( Node1<0 || Node0<0 ) return(-1);
/* Record current HDU number in case we need to move within this file */ /* Record current HDU number in case we need to move within this file */
fptr = gParse.def_fptr; fptr = gParse.def_fptr;
ffghdn( fptr, &evthdu ); ffghdn( fptr, &evthdu );
/* Look for TIMEZERO keywords in current extension */ /* Look for TIMEZERO keywords in current extension */
skipping to change at line 3974 skipping to change at line 3943
} else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) { } else if( ffgkyd( fptr, "TIMEZERF", timeZeroF+1, NULL, &tstat ) ) {
timeZeroF[1] = 0.0; timeZeroF[1] = 0.0;
} }
} else { } else {
timeZeroF[1] = 0.0; timeZeroF[1] = 0.0;
} }
n = Alloc_Node(); n = Alloc_Node();
if( n >= 0 ) { if( n >= 0 ) {
this = gParse.Nodes + n; this = gParse.Nodes + n;
this->nSubNodes = 2;
this->SubNodes[1] = Node1; this->SubNodes[1] = Node1;
this->operation = (int)gtifilt_fct; this->operation = (int) Op;
this->DoOp = Do_GTI; if (Op == gtifilt_fct) {
this->type = BOOLEAN; this->nSubNodes = 2;
this->DoOp = Do_GTI;
this->type = BOOLEAN;
} else {
this->nSubNodes = 3;
this->DoOp = Do_GTI_Over;
this->type = DOUBLE;
}
that1 = gParse.Nodes + Node1; that1 = gParse.Nodes + Node1;
this->value.nelem = that1->value.nelem; this->value.nelem = that1->value.nelem;
this->value.naxis = that1->value.naxis; this->value.naxis = that1->value.naxis;
for( i=0; i < that1->value.naxis; i++ ) for( i=0; i < that1->value.naxis; i++ )
this->value.naxes[i] = that1->value.naxes[i]; this->value.naxes[i] = that1->value.naxes[i];
if (Op == gtiover_fct) {
this->SubNodes[2] = Node2;
that2 = gParse.Nodes + Node2;
if (that1->value.nelem != that2->value.nelem) {
fferror("Dimensions of TIME and TIME_STOP must match for GTIOVERLAP");
return(-1);
}
}
/* Init START/STOP node to be treated as a "constant" */ /* Init START/STOP node to be treated as a "constant" */
this->SubNodes[0] = Node0; this->SubNodes[0] = Node0;
that0 = gParse.Nodes + Node0; that0 = gParse.Nodes + Node0;
that0->operation = CONST_OP; that0->operation = CONST_OP;
that0->DoOp = NULL; that0->DoOp = NULL;
that0->value.data.ptr= NULL; that0->value.data.ptr= NULL;
/* Read in START/STOP times */ /* Read in START/STOP times */
skipping to change at line 4028 skipping to change at line 4011
i = nrows; i = nrows;
while( --i ) while( --i )
if( that0->value.data.dblptr[i-1] if( that0->value.data.dblptr[i-1]
>= that0->value.data.dblptr[i] >= that0->value.data.dblptr[i]
|| that0->value.data.dblptr[i-1+nrows] || that0->value.data.dblptr[i-1+nrows]
>= that0->value.data.dblptr[i+nrows] ) { >= that0->value.data.dblptr[i+nrows] ) {
that0->type = 0; that0->type = 0;
break; break;
} }
/* GTIOVERLAP() requires ordered GTI */
if (that0->type != 1 && Op == gtiover_fct) {
fferror("Input GTI must be time-ordered for GTIOVERLAP");
return(-1);
}
/* Handle TIMEZERO offset, if any */ /* Handle TIMEZERO offset, if any */
dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]); dt = (timeZeroI[1] - timeZeroI[0]) + (timeZeroF[1] - timeZeroF[0]);
timeSpan = that0->value.data.dblptr[nrows+nrows-1] timeSpan = that0->value.data.dblptr[nrows+nrows-1]
- that0->value.data.dblptr[0]; - that0->value.data.dblptr[0];
if( fabs( dt / timeSpan ) > 1e-12 ) { if( fabs( dt / timeSpan ) > 1e-12 ) {
for( i=0; i<(nrows+nrows); i++ ) for( i=0; i<(nrows+nrows); i++ )
that0->value.data.dblptr[i] += dt; that0->value.data.dblptr[i] += dt;
} }
} }
if( OPER(Node1)==CONST_OP ) /* If Node1 is constant (gtifilt_fct) or
this->DoOp( this ); Node1 and Node2 are constant (gtiover_fct), then evaluate now */
if( OPER(Node1)==CONST_OP && (Op == gtifilt_fct || OPER(Node2)==CONST_OP))
{
this->DoOp( this );
}
} }
if( samefile ) if( samefile )
ffmahd( fptr, evthdu, &hdutype, &gParse.status ); ffmahd( fptr, evthdu, &hdutype, &gParse.status );
else else
ffclos( fptr, &gParse.status ); ffclos( fptr, &gParse.status );
return( n ); return( n );
} }
skipping to change at line 5846 skipping to change at line 5838
case defnull_fct: case defnull_fct:
if( this->type==BOOLEAN ) if( this->type==BOOLEAN )
this->value.data.log = pVals[0].data.log; this->value.data.log = pVals[0].data.log;
else if( this->type==LONG ) else if( this->type==LONG )
this->value.data.lng = pVals[0].data.lng; this->value.data.lng = pVals[0].data.lng;
else if( this->type==DOUBLE ) else if( this->type==DOUBLE )
this->value.data.dbl = pVals[0].data.dbl; this->value.data.dbl = pVals[0].data.dbl;
else if( this->type==STRING ) else if( this->type==STRING )
strcpy(this->value.data.str,pVals[0].data.str); strcpy(this->value.data.str,pVals[0].data.str);
break; break;
case setnull_fct: /* Only defined for numeric expressions */
if( this->type==LONG )
this->value.data.lng = pVals[0].data.lng;
else if( this->type==DOUBLE )
this->value.data.dbl = pVals[0].data.dbl;
break;
/* Math functions with 1 double argument */ /* Math functions with 1 double argument */
case sin_fct: case sin_fct:
this->value.data.dbl = sin( pVals[0].data.dbl ); this->value.data.dbl = sin( pVals[0].data.dbl );
break; break;
case cos_fct: case cos_fct:
this->value.data.dbl = cos( pVals[0].data.dbl ); this->value.data.dbl = cos( pVals[0].data.dbl );
break; break;
case tan_fct: case tan_fct:
skipping to change at line 6527 skipping to change at line 6525
if( pNull[0] ) { if( pNull[0] ) {
this->value.undef[row] = pNull[1]; this->value.undef[row] = pNull[1];
strcpy(this->value.data.strptr[row],pVals[1].data.str); strcpy(this->value.data.strptr[row],pVals[1].data.str);
} else { } else {
this->value.undef[elem] = 0; this->value.undef[elem] = 0;
strcpy(this->value.data.strptr[row],pVals[0].data.str); strcpy(this->value.data.strptr[row],pVals[0].data.str);
} }
} }
} }
break; break;
case setnull_fct:
switch( this->type ) {
case LONG:
while( elem-- ) {
if ( theParams[1]->value.data.lng ==
theParams[0]->value.data.lngptr[elem] ) {
this->value.data.lngptr[elem] = 0;
this->value.undef[elem] = 1;
} else {
this->value.data.lngptr[elem] = theParams[0]->value.data.lngptr
[elem];
this->value.undef[elem] = theParams[0]->value.undef[elem];
}
}
break;
case DOUBLE:
while( elem-- ) {
if ( theParams[1]->value.data.dbl ==
theParams[0]->value.data.dblptr[elem] ) {
this->value.data.dblptr[elem] = 0;
this->value.undef[elem] = 1;
} else {
this->value.data.dblptr[elem] = theParams[0]->value.data.dblptr
[elem];
this->value.undef[elem] = theParams[0]->value.undef[elem];
}
}
break;
}
break;
/* Math functions with 1 double argument */ /* Math functions with 1 double argument */
case sin_fct: case sin_fct:
while( elem-- ) while( elem-- )
if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) { if( !(this->value.undef[elem] = theParams[0]->value.undef[elem]) ) {
this->value.data.dblptr[elem] = this->value.data.dblptr[elem] =
sin( theParams[0]->value.data.dblptr[elem] ); sin( theParams[0]->value.data.dblptr[elem] );
} }
break; break;
skipping to change at line 7555 skipping to change at line 7581
theExpr = gParse.Nodes + this->SubNodes[1]; theExpr = gParse.Nodes + this->SubNodes[1];
nGTI = theTimes->value.nelem; nGTI = theTimes->value.nelem;
start = theTimes->value.data.dblptr; start = theTimes->value.data.dblptr;
stop = theTimes->value.data.dblptr + nGTI; stop = theTimes->value.data.dblptr + nGTI;
ordered = theTimes->type; ordered = theTimes->type;
if( theExpr->operation==CONST_OP ) { if( theExpr->operation==CONST_OP ) {
this->value.data.log = this->value.data.log =
(Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered )>=0); (Search_GTI( theExpr->value.data.dbl, nGTI, start, stop, ordered, 0 )>=0) ;
this->operation = CONST_OP; this->operation = CONST_OP;
} else { } else {
Allocate_Ptrs( this ); Allocate_Ptrs( this );
times = theExpr->value.data.dblptr; times = theExpr->value.data.dblptr;
if( !gParse.status ) { if( !gParse.status ) {
elem = gParse.nRows * this->value.nelem; elem = gParse.nRows * this->value.nelem;
if( nGTI ) { if( nGTI ) {
gti = -1; gti = -1;
while( elem-- ) { while( elem-- ) {
if( (this->value.undef[elem] = theExpr->value.undef[elem]) ) if( (this->value.undef[elem] = theExpr->value.undef[elem]) )
continue; continue;
/* Before searching entire GTI, check the GTI found last time */ /* Before searching entire GTI, check the GTI found last time */
if( gti<0 || times[elem]<start[gti] || times[elem]>stop[gti] ) { if( gti<0 || times[elem]<start[gti] || times[elem]>stop[gti] ) {
gti = Search_GTI( times[elem], nGTI, start, stop, ordered ); gti = Search_GTI( times[elem], nGTI, start, stop, ordered, 0 );
} }
this->value.data.logptr[elem] = ( gti>=0 ); this->value.data.logptr[elem] = ( gti>=0 );
} }
} else } else
while( elem-- ) { while( elem-- ) {
this->value.data.logptr[elem] = 0; this->value.data.logptr[elem] = 0;
this->value.undef[elem] = 0; this->value.undef[elem] = 0;
} }
} }
} }
if( theExpr->operation>0 ) if( theExpr->operation>0 )
free( theExpr->value.data.ptr ); free( theExpr->value.data.ptr );
} }
static void Do_GTI_Over( Node *this )
{
Node *theTimes, *theStart, *theStop;
double *gtiStart, *gtiStop;
double *evtStart, *evtStop;
long elem, nGTI, gti, nextGTI;
int ordered;
theTimes = gParse.Nodes + this->SubNodes[0]; /* GTI times */
theStop = gParse.Nodes + this->SubNodes[2]; /* User start time */
theStart = gParse.Nodes + this->SubNodes[1]; /* User stop time */
nGTI = theTimes->value.nelem;
gtiStart = theTimes->value.data.dblptr; /* GTI start */
gtiStop = theTimes->value.data.dblptr + nGTI; /* GTI stop */
if( theStart->operation==CONST_OP && theStop->operation==CONST_OP) {
this->value.data.dbl =
(GTI_Over( theStart->value.data.dbl, theStop->value.data.dbl,
nGTI, gtiStart, gtiStop, &gti));
this->operation = CONST_OP;
} else {
char undefStart = 0, undefStop = 0; /* Input values are undef? */
double uStart, uStop; /* User start/stop values */
if (theStart->operation==CONST_OP) uStart = theStart->value.data.dbl;
if (theStop ->operation==CONST_OP) uStop = theStop ->value.data.dbl;
Allocate_Ptrs( this );
evtStart = theStart->value.data.dblptr;
evtStop = theStop ->value.data.dblptr;
if( !gParse.status ) {
elem = gParse.nRows * this->value.nelem;
if( nGTI ) {
double toverlap = 0.0;
gti = -1;
while( elem-- ) {
if (theStart->operation!=CONST_OP) {
undefStart = theStart->value.undef[elem];
uStart = evtStart[elem];
}
if (theStop->operation!=CONST_OP) {
undefStop = theStop ->value.undef[elem];
uStop = evtStop[elem];
}
/* This works because at least one of the values is not const */
if( (this->value.undef[elem] = (undefStart||undefStop)) )
continue;
/* Before searching entire GTI, check the GTI found last time */
if( gti<0 ||
uStart<gtiStart[gti] || uStart>gtiStop[gti] ||
uStop <gtiStart[gti] || uStop >gtiStop[gti]) {
/* Nope, need to recalculate */
toverlap = GTI_Over(uStart, uStop,
nGTI, gtiStart, gtiStop,
&gti);
} else {
/* We are in same GTI, the overlap is just stop-start of user ra
nge */
toverlap = (uStop-uStart);
}
/* This works because at least one of the values is not const */
this->value.data.dblptr[elem] = toverlap;
}
} else
/* nGTI == 0; there is no overlap so set all values to 0.0 */
while( elem-- ) {
this->value.data.dblptr[elem] = 0.0;
this->value.undef[elem] = 0;
}
}
}
if( theStart->operation>0 ) {
free( theStart->value.data.ptr );
}
if( theStop->operation>0 ) {
free( theStop->value.data.ptr );
}
}
static double GTI_Over(double evtStart, double evtStop,
long nGTI, double *start, double *stop,
long *gtiout)
{
long gti1, gti2, nextGTI1, nextGTI2;
long gti, nMax;
double overlap = 0.0;
*gtiout = -1L;
/* Zero or negative bin size */
if (evtStop <= evtStart) return 0.0;
/* Locate adjacent GTIs for evtStart and evtStop */
gti1 = Search_GTI(evtStart, nGTI, start, stop, 1, &nextGTI1);
gti2 = Search_GTI(evtStop, nGTI, start, stop, 1, &nextGTI2);
/* evtStart is in gti1, we return that for future processing */
if (gti1 >= 0) *gtiout = gti1;
/* Both evtStart/evtStop are beyond the last GTI */
if (nextGTI1 < 0 && nextGTI2 < 0) return 0.0;
/* Both evtStart/evtStop are in the same gap between GTIs */
if (gti1 < 0 && gti2 < 0 && nextGTI1 == nextGTI2) return 0.0;
/* Both evtStart/evtStop are in the same GTI */
if (gti1 >= 0 && gti1 == gti2) return (evtStop-evtStart);
/* Count through the remaining GTIs; there will be at least one */
/* The largest GTI to consider is either nextGTI2-1, if it exists,
or nGTI-1 */
if (nextGTI2 < 0) nMax = nGTI-1;
else if (gti2 >= 0) nMax = nextGTI2;
else nMax = nextGTI2-1;
for (gti = nextGTI1; gti <= nMax; gti++) {
double starti = start[gti], stopi = stop[gti];
/* Trim the GTI by actual evtStart/Stop times */
if (evtStart > starti) starti = evtStart;
if (evtStop < stopi ) stopi = evtStop;
overlap += (stopi - starti);
}
return overlap;
}
/*
* Search_GTI - search GTI for requested evtTime
*
* double evtTime - requested event time
* long nGTI - number of entries in start[] and stop[]
* double start[], stop[] - start and stop of each GTI
* int ordered - set to 1 if time-ordered
* long *nextGTI0 - upon return, *nextGTI0 is either
* the GTI evtTime is inside
* the next GTI if evtTime is not inside
* -1L if there is no next GTI
* not set if nextGTI0 is a null pointer
*
* NOTE: for *nextGTI to be well-defined, the GTI must
* be ordered. This is true when called by Do_GTI.
*
* RETURNS: gti index that evtTime is located inside, or -1L
*/
static long Search_GTI( double evtTime, long nGTI, double *start, static long Search_GTI( double evtTime, long nGTI, double *start,
double *stop, int ordered ) double *stop, int ordered, long *nextGTI0 )
{ {
long gti, step; long gti, nextGTI = -1L, step;
if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */ if( ordered && nGTI>15 ) { /* If time-ordered and lots of GTIs, */
/* use "FAST" Binary search algorithm */ /* use "FAST" Binary search algorithm */
if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) { if( evtTime>=start[0] && evtTime<=stop[nGTI-1] ) {
gti = step = (nGTI >> 1); gti = step = (nGTI >> 1);
while(1) { while(1) {
if( step>1L ) step >>= 1; if( step>1L ) step >>= 1;
if( evtTime>stop[gti] ) { if( evtTime>stop[gti] ) {
if( evtTime>=start[gti+1] ) if( evtTime>=start[gti+1] )
gti += step; gti += step;
else { else {
nextGTI = gti+1;
gti = -1L; gti = -1L;
break; break;
} }
} else if( evtTime<start[gti] ) { } else if( evtTime<start[gti] ) {
if( evtTime<=stop[gti-1] ) if( evtTime<=stop[gti-1] )
gti -= step; gti -= step;
else { else {
nextGTI = gti;
gti = -1L; gti = -1L;
break; break;
} }
} else { } else {
nextGTI = gti;
break; break;
} }
} }
} else } else {
if (start[0] > evtTime) nextGTI = 0;
gti = -1L; gti = -1L;
}
} else { /* Use "SLOW" linear search */ } else { /* Use "SLOW" linear search. Not required to be
ordered, so we have to search the whole table
no matter what.
*/
gti = nGTI; gti = nGTI;
while( gti-- ) while( gti-- ) {
if( evtTime>=start[gti] && evtTime<=stop[gti] ) if( stop[gti] >= evtTime ) nextGTI = gti;
if( evtTime>=start[gti] && evtTime<=stop[gti] )
break; break;
}
} }
if (nextGTI >= nGTI) nextGTI = -1;
if (nextGTI0) *nextGTI0 = nextGTI;
return( gti ); return( gti );
} }
static void Do_REG( Node *this ) static void Do_REG( Node *this )
{ {
Node *theRegion, *theX, *theY; Node *theRegion, *theX, *theY;
double Xval=0.0, Yval=0.0; double Xval=0.0, Yval=0.0;
char Xnull=0, Ynull=0; char Xnull=0, Ynull=0;
int Xvector, Yvector; int Xvector, Yvector;
long nelem, elem, rows; long nelem, elem, rows;
 End of changes. 425 change blocks. 
1611 lines changed or deleted 1823 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)