* harbour/common.mak
* updated for new files - please check
* harbour/harbour.spec
* added compiler library
* harbour/bin/pack_src.sh
* harbour/bin/hb-func.sh
* updated for new files and libraries
* harbour/config/w32/mingw32.cf
* harbour/config/w32/watcom.cf
* harbour/config/w32/xcc.cf
* added winsock libraries
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
+ added hb_cdpicmp() - not case sensitive version of hb_cdpcmp()
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ hb_itemStrICmp(), hb_itemCopyFromRef(), hb_itemMoveFromRef()
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbpcode.h
* harbour/include/hbvmpub.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* harbour/source/macro/macrolex.c
* harbour/source/vm/Makefile
* harbour/source/vm/arrays.c
* harbour/source/vm/asort.c
* harbour/source/vm/classes.c
* harbour/source/vm/eval.c
* harbour/source/vm/garbage.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/macro.c
+ harbour/source/vm/hashes.c
+ harbour/source/vm/hashfunc.c
+ added hash items, f.e.:
local h1 := {=>}, h2 := { "a"=>1.234, "b"=>2.345 }
? h2[ "a" ], h2[ "b ]
+ added support for DYNAMIC function declaration - it allow to define
functions which are lately bound at runtime, f.e.:
/*** t01.prg ***/
dynamic func1
proc main()
local h:=__hrbload("t02.hrb")
? func1()
return
/*** t02.prg ***/
func func1
return "Hello!!!"
% use new FUNCALL structure to hold EXTERNAL and DYNAMIC functions,
it reduce memory usage, FUNCALL is much smaller then FUNCTION
% use symbol scope bits when possible instead of making some linear scan
+ added new enumarator message: __ENUMKEY - it allow to access
key value when hash item is base enumerator value, f.e.:
proc main()
local v, h:={"a"=>1.000,"b"=>2.000,"c"=>3.000}
heval( h, { |k,v,i| qout( k, v, i ) } ); ?
for each v in h
? v, "=>", v:__enumKey(), v:__enumValue(), v:__enumIndex(), ;
valtype(v:__enumBase())
v += 0.123
next
? ;heval( h, { |k,v,i| qout( k, v, i ) } )
return
+ added C level hb_hash*() functions
+ added support for full HASH item cloning and updated array cloning
to also clone nested hashes - please note that xHarbour does not do
that, in xHarbour ACLONE() clones _ONLY_ nested arrays and HCLONE()
_DOES_NOT_ clone _ANY_ nested items.
* harbour/include/hbextern.ch
+ added hash functions HB_H*()
* changed INET*() functions to HB_INET*()
+ added hash functions H*() and socket functions INET*() when
HB_COMPAT_XHB is set
* harbour/include/hbtypes.h
+ added missing HB_EXTERN_BEGIN / HB_EXTERN_END
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
! added protection against automatic word concatenation in some cases
! fixed preprocessing expressions when match marker matches ';' token
* harbour/source/rtl/Makefile
+ harbour/source/rtl/itemseri.c
+ added functions for item serialization: HB_SERIALIZE() and
HB_DESERIALIZE() - these function are not binary compatible
with xHarbour functions with the same names but make very
similar job with the exception to serialization of codeblock
and object variables - Harbour does not allow to serialize
codeblocks and serialize objects as arrays.
In most cases these functions can replace the xHarbour ones
+ added HB_DESERIALBEGIN() and HB_DESERIALIZE() functions covered
by HB_COMPAT_XHB macro - this functions are only for compatibility
with existing xHarbour code, In Harbour HB_DESERIALBEGIN() is
dummy function which returns first parameter and HB_DESERIALNEXT()
is a simple wrapper to HB_DESERIALIZE() so it's not necessary to
use them.
* harbour/source/rtl/hbinet.c
* changed INET*() functions to HB_INET*() and enable them for default
build
+ added INET*() functions wrappers covered by HB_COMPAT_XHB macro
* harbour/source/rtl/hbrandom.c
+ added HB_RANDOMINT() - xHarbour compatible
* harbour/source/rtl/len.c
+ added support for HASHes
* harbour/source/rtl/valtype.c
+ added support for HASHes
+ added set of HB_IS*() functions - they are a little bit faster then
calling VALTYPE( v ) == <cVal>
- removed HB_ISBYREF() - this function cannot longer work, it was using
a Clipper incompatible anomalies in passing variables by reference I
fixed so it has to stop to work. If it will be realy necessary to
implement HB_ISBYREF() function then please inform me - it will have
to be done at compiler level or with some much deeper HVM stack
checking.
* harbour/source/vm/extend.c
! fixed hb_extIsArray() and hb_extIsObject() to work well with
parameters passed by reference.
Please note that now hb_extIsArray() return TRUE only for pure arrays
not object values.
* harbour/contrib/Makefile
+ harbour/contrib/tip/Changelog
+ harbour/contrib/tip/Makefile
+ harbour/contrib/tip/atokens.c
+ harbour/contrib/tip/base64x.c
+ harbour/contrib/tip/cgi.prg
+ harbour/contrib/tip/client.prg
+ harbour/contrib/tip/credent.prg
+ harbour/contrib/tip/cstr.prg
+ harbour/contrib/tip/encb64.prg
+ harbour/contrib/tip/encmthd.c
+ harbour/contrib/tip/encoder.prg
+ harbour/contrib/tip/encqp.prg
+ harbour/contrib/tip/encurl.prg
+ harbour/contrib/tip/ftpcln.prg
+ harbour/contrib/tip/hbhex2n.c
+ harbour/contrib/tip/httpcln.prg
+ harbour/contrib/tip/mail.prg
+ harbour/contrib/tip/popcln.prg
+ harbour/contrib/tip/smtpcln.prg
+ harbour/contrib/tip/tip.ch
+ harbour/contrib/tip/url.prg
+ harbour/contrib/tip/utils.c
+ added TIP library - code borrowed from xHarbour
Please test - a lot of above code is not well tested, also some peaces
were written over year ago for different things (f.e. serialization for
NETRDD) and now I collected them and committed.
The TIP library was not tested at all. It can be compiled but I cannot
say if it works - I hope that people familiar with it can make necessary
test and fixes.
It's also not the final version of low level HASH item code. I'm working
on more efficient structure which uses binary tries but I cannot say when
I'll finish it (maybe in this weekend or maybe in next year) so I committed
working version now even if I'm not happy with overall performance (BTW
not worser then in xHarbour)
3450 lines
116 KiB
Plaintext
3450 lines
116 KiB
Plaintext
/* A Bison parser, made by GNU Bison 2.3. */
|
||
|
||
/* Skeleton implementation for Bison's Yacc-like parsers in C
|
||
|
||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||
Free Software Foundation, Inc.
|
||
|
||
This program is free software; you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation; either version 2, or (at your option)
|
||
any later version.
|
||
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program; if not, write to the Free Software
|
||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
Boston, MA 02110-1301, USA. */
|
||
|
||
/* As a special exception, you may create a larger work that contains
|
||
part or all of the Bison parser skeleton and distribute that work
|
||
under terms of your choice, so long as that work isn't itself a
|
||
parser generator using the skeleton or a modified version thereof
|
||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||
the parser skeleton itself, you may (at your option) remove this
|
||
special exception, which will cause the skeleton and the resulting
|
||
Bison output files to be licensed under the GNU General Public
|
||
License without this special exception.
|
||
|
||
This special exception was added by the Free Software Foundation in
|
||
version 2.2 of Bison. */
|
||
|
||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||
simplifying the original so-called "semantic" parser. */
|
||
|
||
/* All symbols defined below should begin with yy or YY, to avoid
|
||
infringing on user name space. This should be done even for local
|
||
variables, as they might otherwise be expanded by user macros.
|
||
There are some unavoidable exceptions within include files to
|
||
define necessary library symbols; they are noted "INFRINGES ON
|
||
USER NAME SPACE" below. */
|
||
|
||
/* Identify Bison output. */
|
||
#define YYBISON 1
|
||
|
||
/* Bison version. */
|
||
#define YYBISON_VERSION "2.3"
|
||
|
||
/* Skeleton name. */
|
||
#define YYSKELETON_NAME "yacc.c"
|
||
|
||
/* Pure parsers. */
|
||
#define YYPURE 1
|
||
|
||
/* Using locations. */
|
||
#define YYLSP_NEEDED 0
|
||
|
||
/* Substitute the variable and function names. */
|
||
#define yyparse hb_macroparse
|
||
#define yylex hb_macrolex
|
||
#define yyerror hb_macroerror
|
||
#define yylval hb_macrolval
|
||
#define yychar hb_macrochar
|
||
#define yydebug hb_macrodebug
|
||
#define yynerrs hb_macronerrs
|
||
|
||
|
||
/* Tokens. */
|
||
#ifndef YYTOKENTYPE
|
||
# define YYTOKENTYPE
|
||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||
know about them. */
|
||
enum yytokentype {
|
||
IDENTIFIER = 258,
|
||
NIL = 259,
|
||
NUM_DOUBLE = 260,
|
||
INASSIGN = 261,
|
||
NUM_LONG = 262,
|
||
NUM_DATE = 263,
|
||
IIF = 264,
|
||
LITERAL = 265,
|
||
TRUEVALUE = 266,
|
||
FALSEVALUE = 267,
|
||
AND = 268,
|
||
OR = 269,
|
||
NOT = 270,
|
||
EQ = 271,
|
||
NE1 = 272,
|
||
NE2 = 273,
|
||
INC = 274,
|
||
DEC = 275,
|
||
ALIASOP = 276,
|
||
HASHOP = 277,
|
||
SELF = 278,
|
||
LE = 279,
|
||
GE = 280,
|
||
FIELD = 281,
|
||
MACROVAR = 282,
|
||
MACROTEXT = 283,
|
||
PLUSEQ = 284,
|
||
MINUSEQ = 285,
|
||
MULTEQ = 286,
|
||
DIVEQ = 287,
|
||
POWER = 288,
|
||
EXPEQ = 289,
|
||
MODEQ = 290,
|
||
EPSILON = 291,
|
||
POST = 292,
|
||
UNARY = 293,
|
||
PRE = 294
|
||
};
|
||
#endif
|
||
/* Tokens. */
|
||
#define IDENTIFIER 258
|
||
#define NIL 259
|
||
#define NUM_DOUBLE 260
|
||
#define INASSIGN 261
|
||
#define NUM_LONG 262
|
||
#define NUM_DATE 263
|
||
#define IIF 264
|
||
#define LITERAL 265
|
||
#define TRUEVALUE 266
|
||
#define FALSEVALUE 267
|
||
#define AND 268
|
||
#define OR 269
|
||
#define NOT 270
|
||
#define EQ 271
|
||
#define NE1 272
|
||
#define NE2 273
|
||
#define INC 274
|
||
#define DEC 275
|
||
#define ALIASOP 276
|
||
#define HASHOP 277
|
||
#define SELF 278
|
||
#define LE 279
|
||
#define GE 280
|
||
#define FIELD 281
|
||
#define MACROVAR 282
|
||
#define MACROTEXT 283
|
||
#define PLUSEQ 284
|
||
#define MINUSEQ 285
|
||
#define MULTEQ 286
|
||
#define DIVEQ 287
|
||
#define POWER 288
|
||
#define EXPEQ 289
|
||
#define MODEQ 290
|
||
#define EPSILON 291
|
||
#define POST 292
|
||
#define UNARY 293
|
||
#define PRE 294
|
||
|
||
|
||
|
||
|
||
/* Copy the first part of user declarations. */
|
||
#line 6 "macro.y"
|
||
|
||
/*
|
||
* $Id$
|
||
*/
|
||
|
||
/*
|
||
* Harbour Project source code:
|
||
* Macro compiler YACC rules and actions
|
||
*
|
||
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
|
||
* www - http://www.harbour-project.org
|
||
*
|
||
* This program is free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2, or (at your option)
|
||
* any later version.
|
||
*
|
||
* This program is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* You should have received a copy of the GNU General Public License
|
||
* along with this software; see the file COPYING. If not, write to
|
||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||
*
|
||
* As a special exception, the Harbour Project gives permission for
|
||
* additional uses of the text contained in its release of Harbour.
|
||
*
|
||
* The exception is that, if you link the Harbour libraries with other
|
||
* files to produce an executable, this does not by itself cause the
|
||
* resulting executable to be covered by the GNU General Public License.
|
||
* Your use of that executable is in no way restricted on account of
|
||
* linking the Harbour library code into it.
|
||
*
|
||
* This exception does not however invalidate any other reasons why
|
||
* the executable file might be covered by the GNU General Public License.
|
||
*
|
||
* This exception applies only to the code released by the Harbour
|
||
* Project under the name Harbour. If you copy code from other
|
||
* Harbour Project or Free Software Foundation releases into a copy of
|
||
* Harbour, as the General Public License permits, the exception does
|
||
* not apply to the code that you add in this way. To avoid misleading
|
||
* anyone as to the status of such modified files, you must delete
|
||
* this exception notice from them.
|
||
*
|
||
* If you write modifications of your own for Harbour, it is your choice
|
||
* whether to permit this exception to apply to your modifications.
|
||
* If you do not wish that, delete this exception notice.
|
||
*
|
||
*/
|
||
|
||
/* TODO list
|
||
* 1) Change the pcode generated by ::cVar from Self:cVar to QSELF():cVar
|
||
* 2) Support this syntax: nPtr := @Hello()
|
||
*/
|
||
|
||
/* this #define HAVE TO be placed before all #include directives
|
||
*/
|
||
#define HB_MACRO_SUPPORT
|
||
|
||
#include "hbmacro.h"
|
||
#include "hbcomp.h"
|
||
#include "hbdate.h"
|
||
#include "hbpp.h"
|
||
|
||
/* Compile using: bison -d -p hb_comp macro.y */
|
||
|
||
/* to pacify some warnings in BCC */
|
||
#if defined( __BORLANDC__ ) && !defined( __STDC__ )
|
||
# define __STDC__
|
||
#endif
|
||
|
||
#undef alloca
|
||
#define alloca hb_xgrab
|
||
#undef malloc
|
||
#define malloc hb_xgrab
|
||
#undef realloc
|
||
#define realloc hb_xrealloc
|
||
#undef free
|
||
#define free hb_xfree
|
||
|
||
/* NOTE: these symbols are used internally in bison.simple
|
||
*/
|
||
#undef YYFREE
|
||
#define YYFREE hb_xfree
|
||
#undef YYMALLOC
|
||
#define YYMALLOC hb_xgrab
|
||
|
||
/* yacc/lex related definitions
|
||
*/
|
||
|
||
|
||
/* Standard checking for valid expression creation
|
||
*/
|
||
#define HB_MACRO_CHECK( pExpr ) \
|
||
if( ! ( HB_MACRO_DATA->status & HB_MACRO_CONT ) ) \
|
||
{ \
|
||
YYABORT; \
|
||
}
|
||
|
||
#define HB_MACRO_IFENABLED( pSet, pExpr, flag ) \
|
||
if( HB_MACRO_DATA->supported & (flag) ) \
|
||
{ \
|
||
pSet = (pExpr); \
|
||
}\
|
||
else \
|
||
{ \
|
||
YYABORT; \
|
||
}
|
||
|
||
|
||
|
||
/* Enabling traces. */
|
||
#ifndef YYDEBUG
|
||
# define YYDEBUG 0
|
||
#endif
|
||
|
||
/* Enabling verbose error messages. */
|
||
#ifdef YYERROR_VERBOSE
|
||
# undef YYERROR_VERBOSE
|
||
# define YYERROR_VERBOSE 1
|
||
#else
|
||
# define YYERROR_VERBOSE 0
|
||
#endif
|
||
|
||
/* Enabling the token table. */
|
||
#ifndef YYTOKEN_TABLE
|
||
# define YYTOKEN_TABLE 0
|
||
#endif
|
||
|
||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||
typedef union YYSTYPE
|
||
#line 121 "macro.y"
|
||
{
|
||
char * string; /* to hold a string returned by lex */
|
||
int iNumber; /* to hold a temporary integer number */
|
||
HB_LONG lNumber; /* to hold a temporary long number */
|
||
void * pVoid; /* to hold any memory structure we may need */
|
||
HB_EXPR_PTR asExpr;
|
||
struct
|
||
{
|
||
char * string;
|
||
int length;
|
||
} valChar;
|
||
struct
|
||
{
|
||
int iNumber; /* to hold a number returned by lex */
|
||
} valInteger;
|
||
struct
|
||
{
|
||
HB_LONG lNumber; /* to hold a long number returned by lex */
|
||
UCHAR bWidth; /* to hold the width of the value */
|
||
} valLong;
|
||
struct
|
||
{
|
||
double dNumber; /* to hold a double number returned by lex */
|
||
UCHAR bWidth; /* to hold the width of the value */
|
||
UCHAR bDec; /* to hold the number of decimal points in the value */
|
||
} valDouble;
|
||
}
|
||
/* Line 193 of yacc.c. */
|
||
#line 324 "macroy.c"
|
||
YYSTYPE;
|
||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||
# define YYSTYPE_IS_DECLARED 1
|
||
# define YYSTYPE_IS_TRIVIAL 1
|
||
#endif
|
||
|
||
|
||
|
||
/* Copy the second part of user declarations. */
|
||
#line 149 "macro.y"
|
||
|
||
/* This must be placed after the above union - the union is
|
||
* typedef-ined to YYSTYPE
|
||
*/
|
||
extern int yylex( YYSTYPE *, HB_MACRO_PTR ); /* main lex token function, called by yyparse() */
|
||
extern int yyparse( HB_MACRO_PTR ); /* main yacc parsing function */
|
||
extern void yyerror( HB_MACRO_PTR, char * ); /* parsing error management function */
|
||
|
||
static void hb_macroIdentNew( HB_COMP_DECL, char * );
|
||
|
||
#line 161 "macro.y"
|
||
|
||
#ifdef __WATCOMC__
|
||
/* disable warnings for unreachable code */
|
||
#pragma warning 13 9
|
||
#endif
|
||
|
||
|
||
/* Line 216 of yacc.c. */
|
||
#line 354 "macroy.c"
|
||
|
||
#ifdef short
|
||
# undef short
|
||
#endif
|
||
|
||
#ifdef YYTYPE_UINT8
|
||
typedef YYTYPE_UINT8 yytype_uint8;
|
||
#else
|
||
typedef unsigned char yytype_uint8;
|
||
#endif
|
||
|
||
#ifdef YYTYPE_INT8
|
||
typedef YYTYPE_INT8 yytype_int8;
|
||
#elif (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
typedef signed char yytype_int8;
|
||
#else
|
||
typedef short int yytype_int8;
|
||
#endif
|
||
|
||
#ifdef YYTYPE_UINT16
|
||
typedef YYTYPE_UINT16 yytype_uint16;
|
||
#else
|
||
typedef unsigned short int yytype_uint16;
|
||
#endif
|
||
|
||
#ifdef YYTYPE_INT16
|
||
typedef YYTYPE_INT16 yytype_int16;
|
||
#else
|
||
typedef short int yytype_int16;
|
||
#endif
|
||
|
||
#ifndef YYSIZE_T
|
||
# ifdef __SIZE_TYPE__
|
||
# define YYSIZE_T __SIZE_TYPE__
|
||
# elif defined size_t
|
||
# define YYSIZE_T size_t
|
||
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
||
# define YYSIZE_T size_t
|
||
# else
|
||
# define YYSIZE_T unsigned int
|
||
# endif
|
||
#endif
|
||
|
||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||
|
||
#ifndef YY_
|
||
# if YYENABLE_NLS
|
||
# if ENABLE_NLS
|
||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||
# endif
|
||
# endif
|
||
# ifndef YY_
|
||
# define YY_(msgid) msgid
|
||
# endif
|
||
#endif
|
||
|
||
/* Suppress unused-variable warnings by "using" E. */
|
||
#if ! defined lint || defined __GNUC__
|
||
# define YYUSE(e) ((void) (e))
|
||
#else
|
||
# define YYUSE(e) /* empty */
|
||
#endif
|
||
|
||
/* Identity function, used to suppress warnings about constant conditions. */
|
||
#ifndef lint
|
||
# define YYID(n) (n)
|
||
#else
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static int
|
||
YYID (int i)
|
||
#else
|
||
static int
|
||
YYID (i)
|
||
int i;
|
||
#endif
|
||
{
|
||
return i;
|
||
}
|
||
#endif
|
||
|
||
#if ! defined yyoverflow || YYERROR_VERBOSE
|
||
|
||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||
|
||
# ifdef YYSTACK_USE_ALLOCA
|
||
# if YYSTACK_USE_ALLOCA
|
||
# ifdef __GNUC__
|
||
# define YYSTACK_ALLOC __builtin_alloca
|
||
# elif defined __BUILTIN_VA_ARG_INCR
|
||
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
|
||
# elif defined _AIX
|
||
# define YYSTACK_ALLOC __alloca
|
||
# elif defined _MSC_VER
|
||
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
|
||
# define alloca _alloca
|
||
# else
|
||
# define YYSTACK_ALLOC alloca
|
||
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||
# ifndef _STDLIB_H
|
||
# define _STDLIB_H 1
|
||
# endif
|
||
# endif
|
||
# endif
|
||
# endif
|
||
# endif
|
||
|
||
# ifdef YYSTACK_ALLOC
|
||
/* Pacify GCC's `empty if-body' warning. */
|
||
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
|
||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||
/* The OS might guarantee only one guard page at the bottom of the stack,
|
||
and a page size can be as small as 4096 bytes. So we cannot safely
|
||
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
|
||
to allow for a few compiler-allocated temporary stack slots. */
|
||
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
|
||
# endif
|
||
# else
|
||
# define YYSTACK_ALLOC YYMALLOC
|
||
# define YYSTACK_FREE YYFREE
|
||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
||
# endif
|
||
# if (defined __cplusplus && ! defined _STDLIB_H \
|
||
&& ! ((defined YYMALLOC || defined malloc) \
|
||
&& (defined YYFREE || defined free)))
|
||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||
# ifndef _STDLIB_H
|
||
# define _STDLIB_H 1
|
||
# endif
|
||
# endif
|
||
# ifndef YYMALLOC
|
||
# define YYMALLOC malloc
|
||
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||
# endif
|
||
# endif
|
||
# ifndef YYFREE
|
||
# define YYFREE free
|
||
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||
# endif
|
||
# endif
|
||
# endif
|
||
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
|
||
|
||
|
||
#if (! defined yyoverflow \
|
||
&& (! defined __cplusplus \
|
||
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||
|
||
/* A type that is properly aligned for any stack member. */
|
||
union yyalloc
|
||
{
|
||
yytype_int16 yyss;
|
||
YYSTYPE yyvs;
|
||
};
|
||
|
||
/* The size of the maximum gap between one aligned stack and the next. */
|
||
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
|
||
|
||
/* The size of an array large to enough to hold all stacks, each with
|
||
N elements. */
|
||
# define YYSTACK_BYTES(N) \
|
||
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
|
||
+ YYSTACK_GAP_MAXIMUM)
|
||
|
||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||
not overlap. */
|
||
# ifndef YYCOPY
|
||
# if defined __GNUC__ && 1 < __GNUC__
|
||
# define YYCOPY(To, From, Count) \
|
||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||
# else
|
||
# define YYCOPY(To, From, Count) \
|
||
do \
|
||
{ \
|
||
YYSIZE_T yyi; \
|
||
for (yyi = 0; yyi < (Count); yyi++) \
|
||
(To)[yyi] = (From)[yyi]; \
|
||
} \
|
||
while (YYID (0))
|
||
# endif
|
||
# endif
|
||
|
||
/* Relocate STACK from its old location to the new one. The
|
||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||
elements in the stack, and YYPTR gives the new location of the
|
||
stack. Advance YYPTR to a properly aligned location for the next
|
||
stack. */
|
||
# define YYSTACK_RELOCATE(Stack) \
|
||
do \
|
||
{ \
|
||
YYSIZE_T yynewbytes; \
|
||
YYCOPY (&yyptr->Stack, Stack, yysize); \
|
||
Stack = &yyptr->Stack; \
|
||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||
} \
|
||
while (YYID (0))
|
||
|
||
#endif
|
||
|
||
/* YYFINAL -- State number of the termination state. */
|
||
#define YYFINAL 99
|
||
/* YYLAST -- Last index in YYTABLE. */
|
||
#define YYLAST 1173
|
||
|
||
/* YYNTOKENS -- Number of terminals. */
|
||
#define YYNTOKENS 61
|
||
/* YYNNTS -- Number of nonterminals. */
|
||
#define YYNNTS 67
|
||
/* YYNRULES -- Number of rules. */
|
||
#define YYNRULES 219
|
||
/* YYNRULES -- Number of states. */
|
||
#define YYNSTATES 313
|
||
|
||
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
||
#define YYUNDEFTOK 2
|
||
#define YYMAXUTOK 294
|
||
|
||
#define YYTRANSLATE(YYX) \
|
||
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
||
|
||
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
||
static const yytype_uint8 yytranslate[] =
|
||
{
|
||
0, 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, 41, 46, 49, 2,
|
||
55, 56, 44, 42, 51, 43, 2, 45, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 57, 2,
|
||
39, 38, 40, 2, 50, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 59, 2, 58, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 53, 60, 54, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 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,
|
||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
||
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||
35, 36, 37, 47, 48
|
||
};
|
||
|
||
#if YYDEBUG
|
||
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
||
YYRHS. */
|
||
static const yytype_uint16 yyprhs[] =
|
||
{
|
||
0, 0, 3, 6, 8, 10, 13, 15, 17, 19,
|
||
21, 24, 26, 28, 30, 32, 34, 38, 41, 45,
|
||
49, 53, 59, 61, 64, 66, 68, 71, 74, 77,
|
||
80, 84, 87, 90, 93, 96, 99, 101, 103, 106,
|
||
109, 112, 115, 118, 121, 124, 127, 130, 133, 136,
|
||
139, 142, 145, 148, 151, 154, 157, 160, 163, 166,
|
||
169, 172, 175, 178, 181, 184, 187, 190, 195, 200,
|
||
205, 207, 211, 213, 216, 219, 221, 223, 227, 231,
|
||
235, 240, 242, 244, 246, 248, 250, 252, 254, 256,
|
||
258, 260, 262, 264, 266, 268, 270, 272, 274, 276,
|
||
278, 280, 282, 284, 286, 288, 290, 292, 294, 296,
|
||
298, 300, 302, 304, 306, 307, 312, 314, 318, 319,
|
||
321, 323, 325, 327, 329, 331, 333, 335, 337, 339,
|
||
341, 343, 345, 347, 349, 351, 353, 355, 357, 359,
|
||
361, 363, 365, 367, 370, 373, 376, 379, 382, 385,
|
||
389, 393, 397, 401, 405, 409, 413, 417, 421, 425,
|
||
429, 433, 437, 441, 445, 449, 453, 457, 461, 465,
|
||
469, 473, 477, 481, 485, 489, 493, 495, 497, 499,
|
||
501, 503, 505, 509, 513, 517, 521, 525, 529, 533,
|
||
537, 541, 545, 549, 553, 557, 561, 565, 569, 573,
|
||
576, 579, 583, 588, 590, 594, 595, 603, 605, 609,
|
||
610, 612, 614, 618, 620, 624, 627, 631, 634, 637
|
||
};
|
||
|
||
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
||
static const yytype_int8 yyrhs[] =
|
||
{
|
||
62, 0, -1, 94, 52, -1, 94, -1, 98, -1,
|
||
94, 1, -1, 1, -1, 5, -1, 7, -1, 8,
|
||
-1, 7, 21, -1, 4, -1, 10, -1, 11, -1,
|
||
12, -1, 23, -1, 53, 118, 54, -1, 70, 116,
|
||
-1, 53, 22, 54, -1, 53, 73, 54, -1, 94,
|
||
22, 99, -1, 73, 51, 94, 22, 99, -1, 3,
|
||
-1, 3, 21, -1, 27, -1, 28, -1, 76, 21,
|
||
-1, 49, 125, -1, 78, 21, -1, 26, 21, -1,
|
||
26, 21, 80, -1, 80, 75, -1, 80, 65, -1,
|
||
80, 126, -1, 80, 77, -1, 80, 79, -1, 3,
|
||
-1, 76, -1, 65, 82, -1, 77, 82, -1, 79,
|
||
82, -1, 126, 82, -1, 75, 82, -1, 80, 82,
|
||
-1, 81, 82, -1, 65, 125, -1, 75, 125, -1,
|
||
77, 125, -1, 79, 125, -1, 126, 125, -1, 63,
|
||
116, -1, 66, 116, -1, 64, 116, -1, 67, 116,
|
||
-1, 119, 116, -1, 68, 116, -1, 69, 116, -1,
|
||
74, 116, -1, 83, 116, -1, 84, 116, -1, 76,
|
||
116, -1, 78, 116, -1, 91, 116, -1, 92, 116,
|
||
-1, 86, 116, -1, 127, 116, -1, 125, 116, -1,
|
||
3, 55, 88, 56, -1, 76, 55, 88, 56, -1,
|
||
50, 3, 55, 56, -1, 90, -1, 88, 51, 90,
|
||
-1, 99, -1, 50, 3, -1, 50, 83, -1, 36,
|
||
-1, 89, -1, 100, 57, 3, -1, 100, 57, 76,
|
||
-1, 100, 57, 78, -1, 91, 55, 88, 56, -1,
|
||
63, -1, 66, -1, 64, -1, 67, -1, 119, -1,
|
||
68, -1, 69, -1, 70, -1, 71, -1, 72, -1,
|
||
83, -1, 84, -1, 76, -1, 78, -1, 74, -1,
|
||
85, -1, 86, -1, 127, -1, 91, -1, 92, -1,
|
||
105, -1, 112, -1, 102, -1, 103, -1, 104, -1,
|
||
113, -1, 114, -1, 115, -1, 87, -1, 93, -1,
|
||
125, -1, 36, -1, 94, -1, -1, 99, 51, 97,
|
||
99, -1, 96, -1, 98, 51, 99, -1, -1, 94,
|
||
-1, 63, -1, 66, -1, 64, -1, 67, -1, 119,
|
||
-1, 68, -1, 69, -1, 70, -1, 71, -1, 72,
|
||
-1, 83, -1, 84, -1, 76, -1, 78, -1, 74,
|
||
-1, 85, -1, 125, -1, 86, -1, 127, -1, 91,
|
||
-1, 92, -1, 19, -1, 20, -1, 100, 101, -1,
|
||
19, 94, -1, 20, 94, -1, 15, 94, -1, 43,
|
||
94, -1, 42, 94, -1, 63, 6, 94, -1, 66,
|
||
6, 94, -1, 64, 6, 94, -1, 67, 6, 94,
|
||
-1, 119, 6, 94, -1, 68, 6, 94, -1, 69,
|
||
6, 94, -1, 70, 6, 94, -1, 71, 6, 94,
|
||
-1, 72, 6, 94, -1, 83, 6, 94, -1, 84,
|
||
6, 94, -1, 76, 6, 94, -1, 78, 6, 94,
|
||
-1, 74, 6, 94, -1, 85, 6, 94, -1, 125,
|
||
6, 94, -1, 86, 6, 94, -1, 127, 6, 94,
|
||
-1, 91, 6, 94, -1, 92, 6, 94, -1, 100,
|
||
29, 94, -1, 100, 30, 94, -1, 100, 31, 94,
|
||
-1, 100, 32, 94, -1, 100, 35, 94, -1, 100,
|
||
34, 94, -1, 106, -1, 107, -1, 108, -1, 109,
|
||
-1, 110, -1, 111, -1, 94, 42, 94, -1, 94,
|
||
43, 94, -1, 94, 44, 94, -1, 94, 45, 94,
|
||
-1, 94, 46, 94, -1, 94, 33, 94, -1, 94,
|
||
13, 94, -1, 94, 14, 94, -1, 94, 16, 94,
|
||
-1, 94, 39, 94, -1, 94, 40, 94, -1, 94,
|
||
24, 94, -1, 94, 25, 94, -1, 94, 17, 94,
|
||
-1, 94, 18, 94, -1, 94, 41, 94, -1, 94,
|
||
38, 94, -1, 117, 58, -1, 59, 95, -1, 117,
|
||
51, 95, -1, 117, 58, 59, 95, -1, 90, -1,
|
||
118, 51, 90, -1, -1, 53, 60, 120, 122, 60,
|
||
121, 54, -1, 94, -1, 121, 51, 94, -1, -1,
|
||
36, -1, 123, -1, 123, 51, 36, -1, 3, -1,
|
||
123, 51, 3, -1, 55, 99, -1, 124, 51, 99,
|
||
-1, 124, 56, -1, 125, 21, -1, 9, 55, 94,
|
||
51, 89, 51, 89, 56, -1
|
||
};
|
||
|
||
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
||
static const yytype_uint16 yyrline[] =
|
||
{
|
||
0, 239, 239, 248, 256, 264, 269, 278, 279, 282,
|
||
285, 290, 295, 300, 301, 306, 311, 316, 321, 322,
|
||
325, 326, 332, 335, 340, 343, 362, 367, 370, 377,
|
||
378, 383, 384, 385, 386, 387, 390, 391, 394, 395,
|
||
396, 397, 398, 399, 400, 409, 410, 411, 412, 413,
|
||
418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
|
||
428, 429, 430, 431, 432, 433, 434, 439, 442, 447,
|
||
450, 451, 454, 455, 456, 459, 460, 465, 466, 467,
|
||
472, 476, 477, 478, 479, 480, 481, 482, 483, 484,
|
||
485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
|
||
495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
|
||
507, 508, 511, 512, 515, 515, 529, 530, 534, 535,
|
||
538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
|
||
548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
|
||
558, 564, 565, 571, 574, 575, 578, 579, 580, 583,
|
||
584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
|
||
594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
|
||
606, 609, 612, 615, 618, 621, 624, 625, 626, 627,
|
||
628, 629, 632, 633, 634, 635, 636, 637, 640, 641,
|
||
644, 645, 646, 647, 648, 649, 650, 651, 652, 655,
|
||
661, 662, 663, 666, 667, 671, 670, 678, 679, 684,
|
||
685, 686, 687, 690, 691, 694, 695, 698, 701, 705
|
||
};
|
||
#endif
|
||
|
||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||
static const char *const yytname[] =
|
||
{
|
||
"$end", "error", "$undefined", "IDENTIFIER", "NIL", "NUM_DOUBLE",
|
||
"INASSIGN", "NUM_LONG", "NUM_DATE", "IIF", "LITERAL", "TRUEVALUE",
|
||
"FALSEVALUE", "AND", "OR", "NOT", "EQ", "NE1", "NE2", "INC", "DEC",
|
||
"ALIASOP", "HASHOP", "SELF", "LE", "GE", "FIELD", "MACROVAR",
|
||
"MACROTEXT", "PLUSEQ", "MINUSEQ", "MULTEQ", "DIVEQ", "POWER", "EXPEQ",
|
||
"MODEQ", "EPSILON", "POST", "'='", "'<'", "'>'", "'$'", "'+'", "'-'",
|
||
"'*'", "'/'", "'%'", "UNARY", "PRE", "'&'", "'@'", "','", "'\\n'", "'{'",
|
||
"'}'", "'('", "')'", "':'", "']'", "'['", "'|'", "$accept", "Main",
|
||
"NumValue", "DateValue", "NumAlias", "NilValue", "LiteralValue",
|
||
"Logical", "SelfValue", "Array", "ArrayAt", "Hash", "HashList",
|
||
"Variable", "VarAlias", "MacroVar", "MacroVarAlias", "MacroExpr",
|
||
"MacroExprAlias", "FieldAlias", "FieldVarAlias", "AliasId", "AliasVar",
|
||
"AliasExpr", "VariableAt", "FunCall", "FunRef", "ArgList", "Argument",
|
||
"ExtArgument", "ObjectData", "ObjectMethod", "SimpleExpression",
|
||
"Expression", "ExtExpression", "RootParamList", "@1", "AsParamList",
|
||
"EmptyExpression", "LeftExpression", "PostOp", "ExprPostOp", "ExprPreOp",
|
||
"ExprUnary", "ExprAssign", "ExprPlusEq", "ExprMinusEq", "ExprMultEq",
|
||
"ExprDivEq", "ExprModEq", "ExprExpEq", "ExprOperEq", "ExprMath",
|
||
"ExprBool", "ExprRelation", "ArrayIndex", "IndexList", "ElemList",
|
||
"CodeBlock", "@2", "BlockExpList", "BlockVars", "BlockVarList",
|
||
"ExpList", "PareExpList", "PareExpListAlias", "IfInline", 0
|
||
};
|
||
#endif
|
||
|
||
# ifdef YYPRINT
|
||
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
|
||
token YYLEX-NUM. */
|
||
static const yytype_uint16 yytoknum[] =
|
||
{
|
||
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
||
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
|
||
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
|
||
285, 286, 287, 288, 289, 290, 291, 292, 61, 60,
|
||
62, 36, 43, 45, 42, 47, 37, 293, 294, 38,
|
||
64, 44, 10, 123, 125, 40, 41, 58, 93, 91,
|
||
124
|
||
};
|
||
# endif
|
||
|
||
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
||
static const yytype_uint8 yyr1[] =
|
||
{
|
||
0, 61, 62, 62, 62, 62, 62, 63, 63, 64,
|
||
65, 66, 67, 68, 68, 69, 70, 71, 72, 72,
|
||
73, 73, 74, 75, 76, 76, 77, 78, 79, 80,
|
||
80, 81, 81, 81, 81, 81, 82, 82, 83, 83,
|
||
83, 83, 83, 83, 83, 84, 84, 84, 84, 84,
|
||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||
85, 85, 85, 85, 85, 85, 85, 86, 86, 87,
|
||
88, 88, 89, 89, 89, 90, 90, 91, 91, 91,
|
||
92, 93, 93, 93, 93, 93, 93, 93, 93, 93,
|
||
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
|
||
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
|
||
94, 94, 95, 95, 97, 96, 98, 98, 99, 99,
|
||
100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
||
100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
||
100, 101, 101, 102, 103, 103, 104, 104, 104, 105,
|
||
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
|
||
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
|
||
106, 107, 108, 109, 110, 111, 112, 112, 112, 112,
|
||
112, 112, 113, 113, 113, 113, 113, 113, 114, 114,
|
||
115, 115, 115, 115, 115, 115, 115, 115, 115, 116,
|
||
117, 117, 117, 118, 118, 120, 119, 121, 121, 122,
|
||
122, 122, 122, 123, 123, 124, 124, 125, 126, 127
|
||
};
|
||
|
||
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
||
static const yytype_uint8 yyr2[] =
|
||
{
|
||
0, 2, 2, 1, 1, 2, 1, 1, 1, 1,
|
||
2, 1, 1, 1, 1, 1, 3, 2, 3, 3,
|
||
3, 5, 1, 2, 1, 1, 2, 2, 2, 2,
|
||
3, 2, 2, 2, 2, 2, 1, 1, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 4, 4, 4,
|
||
1, 3, 1, 2, 2, 1, 1, 3, 3, 3,
|
||
4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 0, 4, 1, 3, 0, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 2, 2, 2, 2, 2, 2, 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, 1, 1, 1, 1,
|
||
1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
|
||
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
|
||
2, 3, 4, 1, 3, 0, 7, 1, 3, 0,
|
||
1, 1, 3, 1, 3, 2, 3, 2, 2, 8
|
||
};
|
||
|
||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||
means the default is an error. */
|
||
static const yytype_uint8 yydefact[] =
|
||
{
|
||
0, 6, 22, 11, 7, 8, 9, 0, 12, 13,
|
||
14, 0, 0, 0, 15, 0, 24, 25, 0, 0,
|
||
0, 0, 118, 118, 0, 81, 83, 0, 82, 84,
|
||
86, 87, 88, 89, 90, 95, 0, 93, 0, 94,
|
||
0, 0, 0, 91, 92, 96, 97, 109, 99, 100,
|
||
110, 0, 116, 4, 0, 0, 103, 104, 105, 101,
|
||
176, 177, 178, 179, 180, 181, 102, 106, 107, 108,
|
||
85, 0, 111, 0, 98, 23, 118, 10, 0, 146,
|
||
144, 145, 29, 148, 147, 27, 0, 0, 75, 0,
|
||
205, 0, 76, 203, 119, 72, 0, 119, 215, 1,
|
||
0, 0, 50, 0, 0, 52, 36, 37, 38, 45,
|
||
0, 51, 0, 53, 0, 55, 0, 56, 0, 17,
|
||
0, 0, 0, 57, 42, 46, 0, 26, 118, 60,
|
||
39, 47, 0, 28, 61, 40, 48, 36, 0, 32,
|
||
31, 37, 34, 0, 35, 43, 0, 33, 44, 0,
|
||
58, 0, 59, 0, 0, 64, 0, 118, 62, 0,
|
||
63, 5, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
|
||
118, 114, 141, 142, 0, 0, 0, 0, 0, 0,
|
||
0, 143, 0, 54, 118, 217, 0, 218, 66, 41,
|
||
49, 0, 65, 0, 70, 0, 30, 0, 18, 73,
|
||
0, 0, 0, 0, 0, 74, 0, 209, 0, 19,
|
||
118, 118, 16, 149, 112, 113, 200, 0, 199, 151,
|
||
150, 152, 154, 155, 156, 157, 158, 163, 161, 0,
|
||
162, 159, 160, 164, 166, 168, 0, 169, 188, 189,
|
||
190, 195, 196, 193, 194, 187, 198, 191, 192, 197,
|
||
182, 183, 184, 185, 186, 117, 118, 170, 171, 172,
|
||
173, 175, 174, 77, 78, 79, 153, 216, 165, 167,
|
||
118, 67, 118, 69, 213, 210, 0, 211, 0, 20,
|
||
204, 201, 0, 68, 80, 115, 71, 0, 0, 0,
|
||
118, 202, 118, 207, 0, 214, 212, 21, 0, 0,
|
||
206, 219, 208
|
||
};
|
||
|
||
/* YYDEFGOTO[NTERM-NUM]. */
|
||
static const yytype_int16 yydefgoto[] =
|
||
{
|
||
-1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
||
33, 34, 91, 35, 36, 37, 38, 39, 40, 41,
|
||
42, 108, 43, 44, 45, 46, 47, 203, 92, 204,
|
||
48, 49, 50, 97, 226, 52, 266, 53, 95, 55,
|
||
191, 56, 57, 58, 59, 60, 61, 62, 63, 64,
|
||
65, 66, 67, 68, 69, 102, 103, 96, 70, 217,
|
||
304, 286, 287, 71, 72, 73, 74
|
||
};
|
||
|
||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
||
STATE-NUM. */
|
||
#define YYPACT_NINF -267
|
||
static const yytype_int16 yypact[] =
|
||
{
|
||
303, -267, -6, -267, -267, -17, -267, -50, -267, -267,
|
||
-267, 787, 787, 787, -267, 52, -267, -267, 787, 787,
|
||
22, 76, 221, 787, 85, 414, 432, 37, 449, 466,
|
||
484, 501, 518, 259, 890, 536, 37, 330, 37, 349,
|
||
37, 25, 78, 553, 570, 908, 588, -267, 380, 605,
|
||
-267, 861, -267, 47, 58, 104, -267, -267, -267, -267,
|
||
-267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
|
||
622, 51, 397, 37, 640, -267, 681, -267, 787, 1127,
|
||
-267, -267, 69, -267, -267, -267, 56, 61, -267, 35,
|
||
-267, -37, -267, -267, 994, -267, -28, 1062, -267, -267,
|
||
787, 734, -267, 38, 787, -267, -267, -267, -267, -267,
|
||
787, -267, 787, -267, 787, -267, 787, -267, 787, -267,
|
||
787, 787, 787, -267, -267, -267, 787, -267, 681, -267,
|
||
-267, -267, 787, -267, -267, -267, -267, 96, -17, -267,
|
||
-267, 106, -267, 107, -267, -267, 108, -267, -267, 787,
|
||
-267, 787, -267, 787, 787, -267, 787, 681, -267, 787,
|
||
-267, -267, 787, 787, 787, 787, 787, 787, 787, 787,
|
||
787, 787, 787, 787, 787, 787, 787, 787, 787, -267,
|
||
787, -267, -267, -267, 787, 787, 787, 787, 787, 787,
|
||
44, -267, 787, -267, 787, -267, 787, -267, -267, -267,
|
||
-267, 787, -267, 57, -267, 958, -267, 63, -267, 4,
|
||
78, 78, 106, 78, 78, -267, 78, 24, 787, -267,
|
||
787, 681, -267, 1062, -267, 1062, -267, 734, 87, 1062,
|
||
1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 74,
|
||
1062, 1062, 1062, 1062, 1062, 1062, 94, 1062, 1096, 1062,
|
||
1127, 1127, 1127, 1127, 1127, 114, 1127, 1127, 1127, 1127,
|
||
98, 98, 42, 42, 42, -267, 787, 1062, 1062, 1062,
|
||
1062, 1062, 1062, -267, -267, -267, 1062, -267, 1062, 1062,
|
||
681, -267, 840, -267, -267, -267, 77, 97, 1028, -267,
|
||
-267, -267, 734, -267, -267, -267, -267, 101, 787, 67,
|
||
787, -267, 840, 1062, 40, -267, -267, -267, 102, 787,
|
||
-267, -267, 1062
|
||
};
|
||
|
||
/* YYPGOTO[NTERM-NUM]. */
|
||
static const yytype_int16 yypgoto[] =
|
||
{
|
||
-267, -267, -267, -267, -34, -267, -267, -267, -267, -267,
|
||
-267, -267, -267, -267, -33, -7, -32, -35, -31, 75,
|
||
-267, 3, 71, -267, -267, -267, -267, -60, -266, -19,
|
||
-267, -267, -267, 0, -225, -267, -267, -267, 1, -267,
|
||
-267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
|
||
-267, -267, -267, -267, -267, 920, -267, -267, -267, -267,
|
||
-267, -267, -267, -267, 10, -20, -267
|
||
};
|
||
|
||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||
positive, shift that token. If negative, reduce the rule which
|
||
number is the opposite. If zero, do what YYDEFACT says.
|
||
If YYTABLE_NINF, syntax error. */
|
||
#define YYTABLE_NINF -141
|
||
static const yytype_int16 yytable[] =
|
||
{
|
||
51, 54, 291, 93, 77, 78, 143, 139, 140, 142,
|
||
144, 79, 80, 81, 218, 75, 297, 219, 83, 84,
|
||
107, 147, 94, 221, 98, 75, 222, 284, 137, 107,
|
||
85, 107, 138, 107, 141, 107, 308, 109, 209, 124,
|
||
106, 130, 138, 135, 145, 148, 125, 273, 131, 76,
|
||
136, 146, 16, 17, 143, 210, 211, 213, 214, 207,
|
||
285, 15, 16, 17, 16, 17, 107, 301, 239, 216,
|
||
305, 16, 17, 82, 20, 169, 199, 23, 205, 86,
|
||
23, 106, 212, 200, 20, 99, 176, 177, 178, 227,
|
||
23, 309, 23, 20, 310, 15, 228, 246, 180, 146,
|
||
223, 225, 194, 306, 229, 16, 17, 195, 280, 181,
|
||
230, 207, 231, 281, 232, 208, 233, 75, 234, 283,
|
||
235, 236, 237, 182, 183, 280, 238, 127, 133, 197,
|
||
293, 169, 240, 184, 185, 186, 187, 298, 188, 189,
|
||
174, 175, 176, 177, 178, 280, 292, 169, 299, 241,
|
||
294, 242, 302, 243, 244, 275, 245, 206, 311, 247,
|
||
215, 190, 248, 249, 250, 251, 252, 253, 254, 255,
|
||
256, 257, 258, 259, 260, 261, 262, 263, 264, 0,
|
||
0, 265, 0, 274, 267, 268, 269, 270, 271, 272,
|
||
0, 0, 276, 0, 0, 277, 278, 0, 0, 0,
|
||
0, 279, 290, 107, 107, 0, 107, 107, 0, 107,
|
||
0, 0, 0, 0, 124, 0, 130, 135, 288, 199,
|
||
0, 289, 0, 0, 2, 3, 4, 225, 5, 6,
|
||
7, 8, 9, 10, 0, 0, 11, 0, 0, 0,
|
||
12, 13, 0, 87, 14, 0, 0, 15, 16, 17,
|
||
0, 0, 0, 0, 0, 0, 0, 88, 0, 0,
|
||
0, 296, 0, 18, 19, 120, 0, 295, 0, 0,
|
||
20, 89, 0, 0, 22, 0, 23, 0, -128, -128,
|
||
0, 90, 0, 0, 0, 0, 0, 0, -128, -128,
|
||
-128, -128, 225, -128, -128, 0, 0, 0, 303, 0,
|
||
0, 307, 0, 0, 1, 0, 2, 3, 4, 312,
|
||
5, 6, 7, 8, 9, 10, -128, 0, 11, 0,
|
||
0, 0, 12, 13, 0, 0, 14, 0, 0, 15,
|
||
16, 17, 0, 0, 0, 0, 126, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 18, 19, 0, 0, -132,
|
||
-132, 127, 20, 21, -118, 132, 22, 0, 23, -132,
|
||
-132, -132, -132, 0, -132, -132, 0, 0, -133, -133,
|
||
133, 0, 0, 0, 0, 0, 0, 0, -133, -133,
|
||
-133, -133, 0, -133, -133, 128, 156, -132, 0, 101,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, -139,
|
||
-139, 0, 0, 196, 0, 0, -133, 0, 101, -139,
|
||
-139, -139, -139, 0, -139, -139, -136, -136, 197, 0,
|
||
100, 0, 0, 0, 0, 0, -136, -136, -136, -136,
|
||
0, -136, -136, -120, -120, 157, 0, -139, 104, 101,
|
||
0, 0, 0, -120, -120, -120, -120, 0, -120, -120,
|
||
0, -122, -122, 0, -136, 110, 101, 0, 0, 0,
|
||
0, -122, -122, -122, -122, 0, -122, -122, -121, -121,
|
||
0, -120, 112, 101, 0, 0, 0, 0, -121, -121,
|
||
-121, -121, 0, -121, -121, -123, -123, 0, 0, -122,
|
||
114, 101, 0, 0, 0, -123, -123, -123, -123, 0,
|
||
-123, -123, 0, -125, -125, 0, -121, 116, 101, 0,
|
||
0, 0, 0, -125, -125, -125, -125, 0, -125, -125,
|
||
-126, -126, 0, -123, 118, 101, 0, 0, 0, 0,
|
||
-126, -126, -126, -126, 0, -126, -126, -127, -127, 0,
|
||
0, -125, 122, 101, 0, 0, 0, -127, -127, -127,
|
||
-127, 0, -127, -127, 0, -134, -134, 0, -126, 149,
|
||
101, 0, 0, 0, 0, -134, -134, -134, -134, 0,
|
||
-134, -134, -130, -130, 0, -127, 151, 101, 0, 0,
|
||
0, 0, -130, -130, -130, -130, 0, -130, -130, -131,
|
||
-131, 0, 0, -134, 154, 101, 0, 0, 0, -131,
|
||
-131, -131, -131, 0, -131, -131, 0, -137, -137, 0,
|
||
-130, 159, 101, 0, 0, 0, 0, -137, -137, -137,
|
||
-137, 0, -137, -137, -140, -140, 0, -131, 192, 101,
|
||
0, 0, 0, 0, -140, -140, -140, -140, 0, -140,
|
||
-140, -124, -124, 0, 0, -137, 201, 101, 0, 0,
|
||
0, -124, -124, -124, -124, 0, -124, -124, 0, -138,
|
||
-138, 0, -140, 0, 101, 0, 0, 0, 0, -138,
|
||
-138, -138, -138, 0, -138, -138, 0, 0, 0, -124,
|
||
0, 101, 0, 0, 2, 3, 4, 0, 5, 6,
|
||
7, 8, 9, 10, 0, 0, 11, -138, 0, 101,
|
||
12, 13, 0, 0, 14, 0, 0, 15, 16, 17,
|
||
0, 0, 0, 0, 0, 0, 0, 88, 0, 0,
|
||
0, 0, 0, 18, 19, 0, 0, 0, 0, 0,
|
||
20, 89, 0, 0, 22, 0, 23, 2, 3, 4,
|
||
0, 5, 6, 7, 8, 9, 10, 0, 0, 11,
|
||
0, 0, 0, 12, 13, 0, 0, 14, 0, 0,
|
||
15, 16, 17, 0, 0, 0, 0, 0, 0, 0,
|
||
224, 0, 0, 0, 0, 0, 18, 19, 0, 0,
|
||
0, 0, 0, 20, 21, 0, 0, 22, 0, 23,
|
||
2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
|
||
0, 0, 11, 0, 0, 0, 12, 13, 0, 0,
|
||
14, 0, 0, 15, 16, 17, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
|
||
19, 0, 0, 0, 0, 0, 20, 21, 0, 0,
|
||
22, 0, 23, 2, 3, 4, 0, 5, 6, 7,
|
||
8, 9, 10, 0, 0, 11, 0, 0, 0, 12,
|
||
13, -3, 161, 14, 0, 0, 15, 16, 17, 0,
|
||
0, 0, 0, 0, 162, 163, 0, 164, 165, 166,
|
||
0, 0, 18, 19, 0, 167, 168, 0, 0, 20,
|
||
89, 0, 0, 22, 169, 23, 121, 0, 0, 170,
|
||
171, 172, 173, 174, 175, 176, 177, 178, 0, -129,
|
||
-129, 0, -119, 179, 153, 0, 0, 0, 0, -129,
|
||
-129, -129, -129, 0, -129, -129, 0, -135, -135, 0,
|
||
0, 0, 0, 0, 0, 0, 0, -135, -135, -135,
|
||
-135, 0, -135, -135, 0, 0, 105, -129, 111, 113,
|
||
115, 117, 119, 0, 0, 123, 0, 129, 0, 134,
|
||
0, 0, 0, 150, 152, -135, 155, 0, 158, 160,
|
||
0, 162, 163, 0, 164, 165, 166, 0, 0, 0,
|
||
0, 0, 167, 168, 0, 0, 0, 0, 0, 0,
|
||
193, 169, 198, 0, 202, 0, 170, 171, 172, 173,
|
||
174, 175, 176, 177, 178, 0, 0, 162, 163, 282,
|
||
164, 165, 166, 0, 0, 0, 220, 0, 167, 168,
|
||
0, 0, 0, 0, 0, 0, 0, 169, 0, 0,
|
||
0, 0, 170, 171, 172, 173, 174, 175, 176, 177,
|
||
178, 162, 163, 0, 164, 165, 166, 0, 0, 0,
|
||
300, 0, 167, 168, 0, 0, 0, 0, 0, 0,
|
||
0, 169, 0, 0, 0, 0, 170, 171, 172, 173,
|
||
174, 175, 176, 177, 178, 162, 163, 0, 164, 165,
|
||
166, 0, 0, 0, 0, 0, 167, 168, 0, 0,
|
||
0, 0, 0, 0, 0, 169, 0, 0, 0, 0,
|
||
170, 171, 172, 173, 174, 175, 176, 177, 178, 162,
|
||
0, 0, 164, 165, 166, 0, 0, 0, 0, 0,
|
||
167, 168, 0, 0, 0, 0, 0, 0, 0, 169,
|
||
0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
|
||
176, 177, 178, 164, 165, 166, 0, 0, 0, 0,
|
||
0, 167, 168, 0, 0, 0, 0, 0, 0, 0,
|
||
169, 0, 0, 0, 0, 170, 171, 172, 173, 174,
|
||
175, 176, 177, 178
|
||
};
|
||
|
||
static const yytype_int16 yycheck[] =
|
||
{
|
||
0, 0, 227, 22, 21, 55, 41, 41, 41, 41,
|
||
41, 11, 12, 13, 51, 21, 282, 54, 18, 19,
|
||
27, 41, 22, 51, 23, 21, 54, 3, 3, 36,
|
||
20, 38, 7, 40, 41, 42, 302, 27, 3, 36,
|
||
3, 38, 7, 40, 41, 42, 36, 3, 38, 55,
|
||
40, 41, 27, 28, 89, 89, 89, 89, 89, 55,
|
||
36, 26, 27, 28, 27, 28, 73, 292, 128, 89,
|
||
3, 27, 28, 21, 49, 33, 73, 55, 78, 3,
|
||
55, 3, 89, 73, 49, 0, 44, 45, 46, 51,
|
||
55, 51, 55, 49, 54, 26, 58, 157, 51, 89,
|
||
100, 101, 51, 36, 104, 27, 28, 56, 51, 51,
|
||
110, 55, 112, 56, 114, 54, 116, 21, 118, 56,
|
||
120, 121, 122, 19, 20, 51, 126, 21, 21, 21,
|
||
56, 33, 132, 29, 30, 31, 32, 60, 34, 35,
|
||
42, 43, 44, 45, 46, 51, 59, 33, 51, 149,
|
||
56, 151, 51, 153, 154, 190, 156, 82, 56, 159,
|
||
89, 57, 162, 163, 164, 165, 166, 167, 168, 169,
|
||
170, 171, 172, 173, 174, 175, 176, 177, 178, -1,
|
||
-1, 180, -1, 190, 184, 185, 186, 187, 188, 189,
|
||
-1, -1, 192, -1, -1, 194, 196, -1, -1, -1,
|
||
-1, 201, 221, 210, 211, -1, 213, 214, -1, 216,
|
||
-1, -1, -1, -1, 211, -1, 213, 214, 218, 216,
|
||
-1, 220, -1, -1, 3, 4, 5, 227, 7, 8,
|
||
9, 10, 11, 12, -1, -1, 15, -1, -1, -1,
|
||
19, 20, -1, 22, 23, -1, -1, 26, 27, 28,
|
||
-1, -1, -1, -1, -1, -1, -1, 36, -1, -1,
|
||
-1, 280, -1, 42, 43, 6, -1, 266, -1, -1,
|
||
49, 50, -1, -1, 53, -1, 55, -1, 19, 20,
|
||
-1, 60, -1, -1, -1, -1, -1, -1, 29, 30,
|
||
31, 32, 292, 34, 35, -1, -1, -1, 298, -1,
|
||
-1, 300, -1, -1, 1, -1, 3, 4, 5, 309,
|
||
7, 8, 9, 10, 11, 12, 57, -1, 15, -1,
|
||
-1, -1, 19, 20, -1, -1, 23, -1, -1, 26,
|
||
27, 28, -1, -1, -1, -1, 6, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, 42, 43, -1, -1, 19,
|
||
20, 21, 49, 50, 51, 6, 53, -1, 55, 29,
|
||
30, 31, 32, -1, 34, 35, -1, -1, 19, 20,
|
||
21, -1, -1, -1, -1, -1, -1, -1, 29, 30,
|
||
31, 32, -1, 34, 35, 55, 6, 57, -1, 59,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 19,
|
||
20, -1, -1, 6, -1, -1, 57, -1, 59, 29,
|
||
30, 31, 32, -1, 34, 35, 19, 20, 21, -1,
|
||
6, -1, -1, -1, -1, -1, 29, 30, 31, 32,
|
||
-1, 34, 35, 19, 20, 55, -1, 57, 6, 59,
|
||
-1, -1, -1, 29, 30, 31, 32, -1, 34, 35,
|
||
-1, 19, 20, -1, 57, 6, 59, -1, -1, -1,
|
||
-1, 29, 30, 31, 32, -1, 34, 35, 19, 20,
|
||
-1, 57, 6, 59, -1, -1, -1, -1, 29, 30,
|
||
31, 32, -1, 34, 35, 19, 20, -1, -1, 57,
|
||
6, 59, -1, -1, -1, 29, 30, 31, 32, -1,
|
||
34, 35, -1, 19, 20, -1, 57, 6, 59, -1,
|
||
-1, -1, -1, 29, 30, 31, 32, -1, 34, 35,
|
||
19, 20, -1, 57, 6, 59, -1, -1, -1, -1,
|
||
29, 30, 31, 32, -1, 34, 35, 19, 20, -1,
|
||
-1, 57, 6, 59, -1, -1, -1, 29, 30, 31,
|
||
32, -1, 34, 35, -1, 19, 20, -1, 57, 6,
|
||
59, -1, -1, -1, -1, 29, 30, 31, 32, -1,
|
||
34, 35, 19, 20, -1, 57, 6, 59, -1, -1,
|
||
-1, -1, 29, 30, 31, 32, -1, 34, 35, 19,
|
||
20, -1, -1, 57, 6, 59, -1, -1, -1, 29,
|
||
30, 31, 32, -1, 34, 35, -1, 19, 20, -1,
|
||
57, 6, 59, -1, -1, -1, -1, 29, 30, 31,
|
||
32, -1, 34, 35, 19, 20, -1, 57, 6, 59,
|
||
-1, -1, -1, -1, 29, 30, 31, 32, -1, 34,
|
||
35, 19, 20, -1, -1, 57, 6, 59, -1, -1,
|
||
-1, 29, 30, 31, 32, -1, 34, 35, -1, 19,
|
||
20, -1, 57, -1, 59, -1, -1, -1, -1, 29,
|
||
30, 31, 32, -1, 34, 35, -1, -1, -1, 57,
|
||
-1, 59, -1, -1, 3, 4, 5, -1, 7, 8,
|
||
9, 10, 11, 12, -1, -1, 15, 57, -1, 59,
|
||
19, 20, -1, -1, 23, -1, -1, 26, 27, 28,
|
||
-1, -1, -1, -1, -1, -1, -1, 36, -1, -1,
|
||
-1, -1, -1, 42, 43, -1, -1, -1, -1, -1,
|
||
49, 50, -1, -1, 53, -1, 55, 3, 4, 5,
|
||
-1, 7, 8, 9, 10, 11, 12, -1, -1, 15,
|
||
-1, -1, -1, 19, 20, -1, -1, 23, -1, -1,
|
||
26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
|
||
36, -1, -1, -1, -1, -1, 42, 43, -1, -1,
|
||
-1, -1, -1, 49, 50, -1, -1, 53, -1, 55,
|
||
3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
|
||
-1, -1, 15, -1, -1, -1, 19, 20, -1, -1,
|
||
23, -1, -1, 26, 27, 28, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
|
||
43, -1, -1, -1, -1, -1, 49, 50, -1, -1,
|
||
53, -1, 55, 3, 4, 5, -1, 7, 8, 9,
|
||
10, 11, 12, -1, -1, 15, -1, -1, -1, 19,
|
||
20, 0, 1, 23, -1, -1, 26, 27, 28, -1,
|
||
-1, -1, -1, -1, 13, 14, -1, 16, 17, 18,
|
||
-1, -1, 42, 43, -1, 24, 25, -1, -1, 49,
|
||
50, -1, -1, 53, 33, 55, 6, -1, -1, 38,
|
||
39, 40, 41, 42, 43, 44, 45, 46, -1, 19,
|
||
20, -1, 51, 52, 6, -1, -1, -1, -1, 29,
|
||
30, 31, 32, -1, 34, 35, -1, 19, 20, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, 29, 30, 31,
|
||
32, -1, 34, 35, -1, -1, 26, 57, 28, 29,
|
||
30, 31, 32, -1, -1, 35, -1, 37, -1, 39,
|
||
-1, -1, -1, 43, 44, 57, 46, -1, 48, 49,
|
||
-1, 13, 14, -1, 16, 17, 18, -1, -1, -1,
|
||
-1, -1, 24, 25, -1, -1, -1, -1, -1, -1,
|
||
70, 33, 72, -1, 74, -1, 38, 39, 40, 41,
|
||
42, 43, 44, 45, 46, -1, -1, 13, 14, 51,
|
||
16, 17, 18, -1, -1, -1, 22, -1, 24, 25,
|
||
-1, -1, -1, -1, -1, -1, -1, 33, -1, -1,
|
||
-1, -1, 38, 39, 40, 41, 42, 43, 44, 45,
|
||
46, 13, 14, -1, 16, 17, 18, -1, -1, -1,
|
||
22, -1, 24, 25, -1, -1, -1, -1, -1, -1,
|
||
-1, 33, -1, -1, -1, -1, 38, 39, 40, 41,
|
||
42, 43, 44, 45, 46, 13, 14, -1, 16, 17,
|
||
18, -1, -1, -1, -1, -1, 24, 25, -1, -1,
|
||
-1, -1, -1, -1, -1, 33, -1, -1, -1, -1,
|
||
38, 39, 40, 41, 42, 43, 44, 45, 46, 13,
|
||
-1, -1, 16, 17, 18, -1, -1, -1, -1, -1,
|
||
24, 25, -1, -1, -1, -1, -1, -1, -1, 33,
|
||
-1, -1, -1, -1, 38, 39, 40, 41, 42, 43,
|
||
44, 45, 46, 16, 17, 18, -1, -1, -1, -1,
|
||
-1, 24, 25, -1, -1, -1, -1, -1, -1, -1,
|
||
33, -1, -1, -1, -1, 38, 39, 40, 41, 42,
|
||
43, 44, 45, 46
|
||
};
|
||
|
||
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
||
symbol of state STATE-NUM. */
|
||
static const yytype_uint8 yystos[] =
|
||
{
|
||
0, 1, 3, 4, 5, 7, 8, 9, 10, 11,
|
||
12, 15, 19, 20, 23, 26, 27, 28, 42, 43,
|
||
49, 50, 53, 55, 62, 63, 64, 65, 66, 67,
|
||
68, 69, 70, 71, 72, 74, 75, 76, 77, 78,
|
||
79, 80, 81, 83, 84, 85, 86, 87, 91, 92,
|
||
93, 94, 96, 98, 99, 100, 102, 103, 104, 105,
|
||
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
|
||
119, 124, 125, 126, 127, 21, 55, 21, 55, 94,
|
||
94, 94, 21, 94, 94, 125, 3, 22, 36, 50,
|
||
60, 73, 89, 90, 94, 99, 118, 94, 99, 0,
|
||
6, 59, 116, 117, 6, 116, 3, 76, 82, 125,
|
||
6, 116, 6, 116, 6, 116, 6, 116, 6, 116,
|
||
6, 6, 6, 116, 82, 125, 6, 21, 55, 116,
|
||
82, 125, 6, 21, 116, 82, 125, 3, 7, 65,
|
||
75, 76, 77, 78, 79, 82, 125, 126, 82, 6,
|
||
116, 6, 116, 6, 6, 116, 6, 55, 116, 6,
|
||
116, 1, 13, 14, 16, 17, 18, 24, 25, 33,
|
||
38, 39, 40, 41, 42, 43, 44, 45, 46, 52,
|
||
51, 51, 19, 20, 29, 30, 31, 32, 34, 35,
|
||
57, 101, 6, 116, 51, 56, 6, 21, 116, 82,
|
||
125, 6, 116, 88, 90, 94, 80, 55, 54, 3,
|
||
65, 75, 76, 77, 79, 83, 126, 120, 51, 54,
|
||
22, 51, 54, 94, 36, 94, 95, 51, 58, 94,
|
||
94, 94, 94, 94, 94, 94, 94, 94, 94, 88,
|
||
94, 94, 94, 94, 94, 94, 88, 94, 94, 94,
|
||
94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
|
||
94, 94, 94, 94, 94, 99, 97, 94, 94, 94,
|
||
94, 94, 94, 3, 76, 78, 94, 99, 94, 94,
|
||
51, 56, 51, 56, 3, 36, 122, 123, 94, 99,
|
||
90, 95, 59, 56, 56, 99, 90, 89, 60, 51,
|
||
22, 95, 51, 94, 121, 3, 36, 99, 89, 51,
|
||
54, 56, 94
|
||
};
|
||
|
||
#define yyerrok (yyerrstatus = 0)
|
||
#define yyclearin (yychar = YYEMPTY)
|
||
#define YYEMPTY (-2)
|
||
#define YYEOF 0
|
||
|
||
#define YYACCEPT goto yyacceptlab
|
||
#define YYABORT goto yyabortlab
|
||
#define YYERROR goto yyerrorlab
|
||
|
||
|
||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||
Once GCC version 2 has supplanted version 1, this can go. */
|
||
|
||
#define YYFAIL goto yyerrlab
|
||
|
||
#define YYRECOVERING() (!!yyerrstatus)
|
||
|
||
#define YYBACKUP(Token, Value) \
|
||
do \
|
||
if (yychar == YYEMPTY && yylen == 1) \
|
||
{ \
|
||
yychar = (Token); \
|
||
yylval = (Value); \
|
||
yytoken = YYTRANSLATE (yychar); \
|
||
YYPOPSTACK (1); \
|
||
goto yybackup; \
|
||
} \
|
||
else \
|
||
{ \
|
||
yyerror (pMacro, YY_("syntax error: cannot back up")); \
|
||
YYERROR; \
|
||
} \
|
||
while (YYID (0))
|
||
|
||
|
||
#define YYTERROR 1
|
||
#define YYERRCODE 256
|
||
|
||
|
||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||
If N is 0, then set CURRENT to the empty location which ends
|
||
the previous symbol: RHS[0] (always defined). */
|
||
|
||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||
#ifndef YYLLOC_DEFAULT
|
||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||
do \
|
||
if (YYID (N)) \
|
||
{ \
|
||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||
} \
|
||
else \
|
||
{ \
|
||
(Current).first_line = (Current).last_line = \
|
||
YYRHSLOC (Rhs, 0).last_line; \
|
||
(Current).first_column = (Current).last_column = \
|
||
YYRHSLOC (Rhs, 0).last_column; \
|
||
} \
|
||
while (YYID (0))
|
||
#endif
|
||
|
||
|
||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||
This macro was not mandated originally: define only if we know
|
||
we won't break user code: when these are the locations we know. */
|
||
|
||
#ifndef YY_LOCATION_PRINT
|
||
# if YYLTYPE_IS_TRIVIAL
|
||
# define YY_LOCATION_PRINT(File, Loc) \
|
||
fprintf (File, "%d.%d-%d.%d", \
|
||
(Loc).first_line, (Loc).first_column, \
|
||
(Loc).last_line, (Loc).last_column)
|
||
# else
|
||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||
# endif
|
||
#endif
|
||
|
||
|
||
/* YYLEX -- calling `yylex' with the right arguments. */
|
||
|
||
#ifdef YYLEX_PARAM
|
||
# define YYLEX yylex (&yylval, YYLEX_PARAM)
|
||
#else
|
||
# define YYLEX yylex (&yylval, pMacro)
|
||
#endif
|
||
|
||
/* Enable debugging if requested. */
|
||
#if YYDEBUG
|
||
|
||
# ifndef YYFPRINTF
|
||
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
||
# define YYFPRINTF fprintf
|
||
# endif
|
||
|
||
# define YYDPRINTF(Args) \
|
||
do { \
|
||
if (yydebug) \
|
||
YYFPRINTF Args; \
|
||
} while (YYID (0))
|
||
|
||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
||
do { \
|
||
if (yydebug) \
|
||
{ \
|
||
YYFPRINTF (stderr, "%s ", Title); \
|
||
yy_symbol_print (stderr, \
|
||
Type, Value, pMacro); \
|
||
YYFPRINTF (stderr, "\n"); \
|
||
} \
|
||
} while (YYID (0))
|
||
|
||
|
||
/*--------------------------------.
|
||
| Print this symbol on YYOUTPUT. |
|
||
`--------------------------------*/
|
||
|
||
/*ARGSUSED*/
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static void
|
||
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, HB_MACRO_PTR pMacro)
|
||
#else
|
||
static void
|
||
yy_symbol_value_print (yyoutput, yytype, yyvaluep, pMacro)
|
||
FILE *yyoutput;
|
||
int yytype;
|
||
YYSTYPE const * const yyvaluep;
|
||
HB_MACRO_PTR pMacro;
|
||
#endif
|
||
{
|
||
if (!yyvaluep)
|
||
return;
|
||
YYUSE (pMacro);
|
||
# ifdef YYPRINT
|
||
if (yytype < YYNTOKENS)
|
||
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
||
# else
|
||
YYUSE (yyoutput);
|
||
# endif
|
||
switch (yytype)
|
||
{
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
|
||
/*--------------------------------.
|
||
| Print this symbol on YYOUTPUT. |
|
||
`--------------------------------*/
|
||
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static void
|
||
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, HB_MACRO_PTR pMacro)
|
||
#else
|
||
static void
|
||
yy_symbol_print (yyoutput, yytype, yyvaluep, pMacro)
|
||
FILE *yyoutput;
|
||
int yytype;
|
||
YYSTYPE const * const yyvaluep;
|
||
HB_MACRO_PTR pMacro;
|
||
#endif
|
||
{
|
||
if (yytype < YYNTOKENS)
|
||
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
|
||
else
|
||
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
||
|
||
yy_symbol_value_print (yyoutput, yytype, yyvaluep, pMacro);
|
||
YYFPRINTF (yyoutput, ")");
|
||
}
|
||
|
||
/*------------------------------------------------------------------.
|
||
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
||
| TOP (included). |
|
||
`------------------------------------------------------------------*/
|
||
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static void
|
||
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
|
||
#else
|
||
static void
|
||
yy_stack_print (bottom, top)
|
||
yytype_int16 *bottom;
|
||
yytype_int16 *top;
|
||
#endif
|
||
{
|
||
YYFPRINTF (stderr, "Stack now");
|
||
for (; bottom <= top; ++bottom)
|
||
YYFPRINTF (stderr, " %d", *bottom);
|
||
YYFPRINTF (stderr, "\n");
|
||
}
|
||
|
||
# define YY_STACK_PRINT(Bottom, Top) \
|
||
do { \
|
||
if (yydebug) \
|
||
yy_stack_print ((Bottom), (Top)); \
|
||
} while (YYID (0))
|
||
|
||
|
||
/*------------------------------------------------.
|
||
| Report that the YYRULE is going to be reduced. |
|
||
`------------------------------------------------*/
|
||
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static void
|
||
yy_reduce_print (YYSTYPE *yyvsp, int yyrule, HB_MACRO_PTR pMacro)
|
||
#else
|
||
static void
|
||
yy_reduce_print (yyvsp, yyrule, pMacro)
|
||
YYSTYPE *yyvsp;
|
||
int yyrule;
|
||
HB_MACRO_PTR pMacro;
|
||
#endif
|
||
{
|
||
int yynrhs = yyr2[yyrule];
|
||
int yyi;
|
||
unsigned long int yylno = yyrline[yyrule];
|
||
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
|
||
yyrule - 1, yylno);
|
||
/* The symbols being reduced. */
|
||
for (yyi = 0; yyi < yynrhs; yyi++)
|
||
{
|
||
fprintf (stderr, " $%d = ", yyi + 1);
|
||
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
|
||
&(yyvsp[(yyi + 1) - (yynrhs)])
|
||
, pMacro);
|
||
fprintf (stderr, "\n");
|
||
}
|
||
}
|
||
|
||
# define YY_REDUCE_PRINT(Rule) \
|
||
do { \
|
||
if (yydebug) \
|
||
yy_reduce_print (yyvsp, Rule, pMacro); \
|
||
} while (YYID (0))
|
||
|
||
/* Nonzero means print parse trace. It is left uninitialized so that
|
||
multiple parsers can coexist. */
|
||
int yydebug;
|
||
#else /* !YYDEBUG */
|
||
# define YYDPRINTF(Args)
|
||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
||
# define YY_STACK_PRINT(Bottom, Top)
|
||
# define YY_REDUCE_PRINT(Rule)
|
||
#endif /* !YYDEBUG */
|
||
|
||
|
||
/* YYINITDEPTH -- initial size of the parser's stacks. */
|
||
#ifndef YYINITDEPTH
|
||
# define YYINITDEPTH 200
|
||
#endif
|
||
|
||
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
||
if the built-in stack extension method is used).
|
||
|
||
Do not make this value too large; the results are undefined if
|
||
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
|
||
evaluated with infinite-precision integer arithmetic. */
|
||
|
||
#ifndef YYMAXDEPTH
|
||
# define YYMAXDEPTH 10000
|
||
#endif
|
||
|
||
|
||
|
||
#if YYERROR_VERBOSE
|
||
|
||
# ifndef yystrlen
|
||
# if defined __GLIBC__ && defined _STRING_H
|
||
# define yystrlen strlen
|
||
# else
|
||
/* Return the length of YYSTR. */
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static YYSIZE_T
|
||
yystrlen (const char *yystr)
|
||
#else
|
||
static YYSIZE_T
|
||
yystrlen (yystr)
|
||
const char *yystr;
|
||
#endif
|
||
{
|
||
YYSIZE_T yylen;
|
||
for (yylen = 0; yystr[yylen]; yylen++)
|
||
continue;
|
||
return yylen;
|
||
}
|
||
# endif
|
||
# endif
|
||
|
||
# ifndef yystpcpy
|
||
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
|
||
# define yystpcpy stpcpy
|
||
# else
|
||
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
||
YYDEST. */
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static char *
|
||
yystpcpy (char *yydest, const char *yysrc)
|
||
#else
|
||
static char *
|
||
yystpcpy (yydest, yysrc)
|
||
char *yydest;
|
||
const char *yysrc;
|
||
#endif
|
||
{
|
||
char *yyd = yydest;
|
||
const char *yys = yysrc;
|
||
|
||
while ((*yyd++ = *yys++) != '\0')
|
||
continue;
|
||
|
||
return yyd - 1;
|
||
}
|
||
# endif
|
||
# endif
|
||
|
||
# ifndef yytnamerr
|
||
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
|
||
quotes and backslashes, so that it's suitable for yyerror. The
|
||
heuristic is that double-quoting is unnecessary unless the string
|
||
contains an apostrophe, a comma, or backslash (other than
|
||
backslash-backslash). YYSTR is taken from yytname. If YYRES is
|
||
null, do not copy; instead, return the length of what the result
|
||
would have been. */
|
||
static YYSIZE_T
|
||
yytnamerr (char *yyres, const char *yystr)
|
||
{
|
||
if (*yystr == '"')
|
||
{
|
||
YYSIZE_T yyn = 0;
|
||
char const *yyp = yystr;
|
||
|
||
for (;;)
|
||
switch (*++yyp)
|
||
{
|
||
case '\'':
|
||
case ',':
|
||
goto do_not_strip_quotes;
|
||
|
||
case '\\':
|
||
if (*++yyp != '\\')
|
||
goto do_not_strip_quotes;
|
||
/* Fall through. */
|
||
default:
|
||
if (yyres)
|
||
yyres[yyn] = *yyp;
|
||
yyn++;
|
||
break;
|
||
|
||
case '"':
|
||
if (yyres)
|
||
yyres[yyn] = '\0';
|
||
return yyn;
|
||
}
|
||
do_not_strip_quotes: ;
|
||
}
|
||
|
||
if (! yyres)
|
||
return yystrlen (yystr);
|
||
|
||
return yystpcpy (yyres, yystr) - yyres;
|
||
}
|
||
# endif
|
||
|
||
/* Copy into YYRESULT an error message about the unexpected token
|
||
YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
||
including the terminating null byte. If YYRESULT is null, do not
|
||
copy anything; just return the number of bytes that would be
|
||
copied. As a special case, return 0 if an ordinary "syntax error"
|
||
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
||
size calculation. */
|
||
static YYSIZE_T
|
||
yysyntax_error (char *yyresult, int yystate, int yychar)
|
||
{
|
||
int yyn = yypact[yystate];
|
||
|
||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
||
return 0;
|
||
else
|
||
{
|
||
int yytype = YYTRANSLATE (yychar);
|
||
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||
YYSIZE_T yysize = yysize0;
|
||
YYSIZE_T yysize1;
|
||
int yysize_overflow = 0;
|
||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||
int yyx;
|
||
|
||
# if 0
|
||
/* This is so xgettext sees the translatable formats that are
|
||
constructed on the fly. */
|
||
YY_("syntax error, unexpected %s");
|
||
YY_("syntax error, unexpected %s, expecting %s");
|
||
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||
# endif
|
||
char *yyfmt;
|
||
char const *yyf;
|
||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||
static char const yyexpecting[] = ", expecting %s";
|
||
static char const yyor[] = " or %s";
|
||
char yyformat[sizeof yyunexpected
|
||
+ sizeof yyexpecting - 1
|
||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||
* (sizeof yyor - 1))];
|
||
char const *yyprefix = yyexpecting;
|
||
|
||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||
YYCHECK. */
|
||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||
|
||
/* Stay within bounds of both yycheck and yytname. */
|
||
int yychecklim = YYLAST - yyn + 1;
|
||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||
int yycount = 1;
|
||
|
||
yyarg[0] = yytname[yytype];
|
||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||
|
||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||
{
|
||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||
{
|
||
yycount = 1;
|
||
yysize = yysize0;
|
||
yyformat[sizeof yyunexpected - 1] = '\0';
|
||
break;
|
||
}
|
||
yyarg[yycount++] = yytname[yyx];
|
||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||
yysize_overflow |= (yysize1 < yysize);
|
||
yysize = yysize1;
|
||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||
yyprefix = yyor;
|
||
}
|
||
|
||
yyf = YY_(yyformat);
|
||
yysize1 = yysize + yystrlen (yyf);
|
||
yysize_overflow |= (yysize1 < yysize);
|
||
yysize = yysize1;
|
||
|
||
if (yysize_overflow)
|
||
return YYSIZE_MAXIMUM;
|
||
|
||
if (yyresult)
|
||
{
|
||
/* Avoid sprintf, as that infringes on the user's name space.
|
||
Don't have undefined behavior even if the translation
|
||
produced a string with the wrong number of "%s"s. */
|
||
char *yyp = yyresult;
|
||
int yyi = 0;
|
||
while ((*yyp = *yyf) != '\0')
|
||
{
|
||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||
{
|
||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||
yyf += 2;
|
||
}
|
||
else
|
||
{
|
||
yyp++;
|
||
yyf++;
|
||
}
|
||
}
|
||
}
|
||
return yysize;
|
||
}
|
||
}
|
||
#endif /* YYERROR_VERBOSE */
|
||
|
||
|
||
/*-----------------------------------------------.
|
||
| Release the memory associated to this symbol. |
|
||
`-----------------------------------------------*/
|
||
|
||
/*ARGSUSED*/
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
static void
|
||
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, HB_MACRO_PTR pMacro)
|
||
#else
|
||
static void
|
||
yydestruct (yymsg, yytype, yyvaluep, pMacro)
|
||
const char *yymsg;
|
||
int yytype;
|
||
YYSTYPE *yyvaluep;
|
||
HB_MACRO_PTR pMacro;
|
||
#endif
|
||
{
|
||
YYUSE (yyvaluep);
|
||
YYUSE (pMacro);
|
||
|
||
if (!yymsg)
|
||
yymsg = "Deleting";
|
||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||
|
||
switch (yytype)
|
||
{
|
||
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
|
||
/* Prevent warnings from -Wmissing-prototypes. */
|
||
|
||
#ifdef YYPARSE_PARAM
|
||
#if defined __STDC__ || defined __cplusplus
|
||
int yyparse (void *YYPARSE_PARAM);
|
||
#else
|
||
int yyparse ();
|
||
#endif
|
||
#else /* ! YYPARSE_PARAM */
|
||
#if defined __STDC__ || defined __cplusplus
|
||
int yyparse (HB_MACRO_PTR pMacro);
|
||
#else
|
||
int yyparse ();
|
||
#endif
|
||
#endif /* ! YYPARSE_PARAM */
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/*----------.
|
||
| yyparse. |
|
||
`----------*/
|
||
|
||
#ifdef YYPARSE_PARAM
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
int
|
||
yyparse (void *YYPARSE_PARAM)
|
||
#else
|
||
int
|
||
yyparse (YYPARSE_PARAM)
|
||
void *YYPARSE_PARAM;
|
||
#endif
|
||
#else /* ! YYPARSE_PARAM */
|
||
#if (defined __STDC__ || defined __C99__FUNC__ \
|
||
|| defined __cplusplus || defined _MSC_VER)
|
||
int
|
||
yyparse (HB_MACRO_PTR pMacro)
|
||
#else
|
||
int
|
||
yyparse (pMacro)
|
||
HB_MACRO_PTR pMacro;
|
||
#endif
|
||
#endif
|
||
{
|
||
/* The look-ahead symbol. */
|
||
int yychar;
|
||
|
||
/* The semantic value of the look-ahead symbol. */
|
||
YYSTYPE yylval;
|
||
|
||
/* Number of syntax errors so far. */
|
||
int yynerrs;
|
||
|
||
int yystate;
|
||
int yyn;
|
||
int yyresult;
|
||
/* Number of tokens to shift before error messages enabled. */
|
||
int yyerrstatus;
|
||
/* Look-ahead token as an internal (translated) token number. */
|
||
int yytoken = 0;
|
||
#if YYERROR_VERBOSE
|
||
/* Buffer for error messages, and its allocated size. */
|
||
char yymsgbuf[128];
|
||
char *yymsg = yymsgbuf;
|
||
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
||
#endif
|
||
|
||
/* Three stacks and their tools:
|
||
`yyss': related to states,
|
||
`yyvs': related to semantic values,
|
||
`yyls': related to locations.
|
||
|
||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||
to reallocate them elsewhere. */
|
||
|
||
/* The state stack. */
|
||
yytype_int16 yyssa[YYINITDEPTH];
|
||
yytype_int16 *yyss = yyssa;
|
||
yytype_int16 *yyssp;
|
||
|
||
/* The semantic value stack. */
|
||
YYSTYPE yyvsa[YYINITDEPTH];
|
||
YYSTYPE *yyvs = yyvsa;
|
||
YYSTYPE *yyvsp;
|
||
|
||
|
||
|
||
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
|
||
|
||
YYSIZE_T yystacksize = YYINITDEPTH;
|
||
|
||
/* The variables used to return semantic value and location from the
|
||
action routines. */
|
||
YYSTYPE yyval;
|
||
|
||
|
||
/* The number of symbols on the RHS of the reduced rule.
|
||
Keep to zero when no symbol should be popped. */
|
||
int yylen = 0;
|
||
|
||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||
|
||
yystate = 0;
|
||
yyerrstatus = 0;
|
||
yynerrs = 0;
|
||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||
|
||
/* Initialize stack pointers.
|
||
Waste one element of value and location stack
|
||
so that they stay on the same level as the state stack.
|
||
The wasted elements are never initialized. */
|
||
|
||
yyssp = yyss;
|
||
yyvsp = yyvs;
|
||
|
||
goto yysetstate;
|
||
|
||
/*------------------------------------------------------------.
|
||
| yynewstate -- Push a new state, which is found in yystate. |
|
||
`------------------------------------------------------------*/
|
||
yynewstate:
|
||
/* In all cases, when you get here, the value and location stacks
|
||
have just been pushed. So pushing a state here evens the stacks. */
|
||
yyssp++;
|
||
|
||
yysetstate:
|
||
*yyssp = yystate;
|
||
|
||
if (yyss + yystacksize - 1 <= yyssp)
|
||
{
|
||
/* Get the current used size of the three stacks, in elements. */
|
||
YYSIZE_T yysize = yyssp - yyss + 1;
|
||
|
||
#ifdef yyoverflow
|
||
{
|
||
/* Give user a chance to reallocate the stack. Use copies of
|
||
these so that the &'s don't force the real ones into
|
||
memory. */
|
||
YYSTYPE *yyvs1 = yyvs;
|
||
yytype_int16 *yyss1 = yyss;
|
||
|
||
|
||
/* Each stack pointer address is followed by the size of the
|
||
data in use in that stack, in bytes. This used to be a
|
||
conditional around just the two extra args, but that might
|
||
be undefined if yyoverflow is a macro. */
|
||
yyoverflow (YY_("memory exhausted"),
|
||
&yyss1, yysize * sizeof (*yyssp),
|
||
&yyvs1, yysize * sizeof (*yyvsp),
|
||
|
||
&yystacksize);
|
||
|
||
yyss = yyss1;
|
||
yyvs = yyvs1;
|
||
}
|
||
#else /* no yyoverflow */
|
||
# ifndef YYSTACK_RELOCATE
|
||
goto yyexhaustedlab;
|
||
# else
|
||
/* Extend the stack our own way. */
|
||
if (YYMAXDEPTH <= yystacksize)
|
||
goto yyexhaustedlab;
|
||
yystacksize *= 2;
|
||
if (YYMAXDEPTH < yystacksize)
|
||
yystacksize = YYMAXDEPTH;
|
||
|
||
{
|
||
yytype_int16 *yyss1 = yyss;
|
||
union yyalloc *yyptr =
|
||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||
if (! yyptr)
|
||
goto yyexhaustedlab;
|
||
YYSTACK_RELOCATE (yyss);
|
||
YYSTACK_RELOCATE (yyvs);
|
||
|
||
# undef YYSTACK_RELOCATE
|
||
if (yyss1 != yyssa)
|
||
YYSTACK_FREE (yyss1);
|
||
}
|
||
# endif
|
||
#endif /* no yyoverflow */
|
||
|
||
yyssp = yyss + yysize - 1;
|
||
yyvsp = yyvs + yysize - 1;
|
||
|
||
|
||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||
(unsigned long int) yystacksize));
|
||
|
||
if (yyss + yystacksize - 1 <= yyssp)
|
||
YYABORT;
|
||
}
|
||
|
||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||
|
||
goto yybackup;
|
||
|
||
/*-----------.
|
||
| yybackup. |
|
||
`-----------*/
|
||
yybackup:
|
||
|
||
/* Do appropriate processing given the current state. Read a
|
||
look-ahead token if we need one and don't already have one. */
|
||
|
||
/* First try to decide what to do without reference to look-ahead token. */
|
||
yyn = yypact[yystate];
|
||
if (yyn == YYPACT_NINF)
|
||
goto yydefault;
|
||
|
||
/* Not known => get a look-ahead token if don't already have one. */
|
||
|
||
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
|
||
if (yychar == YYEMPTY)
|
||
{
|
||
YYDPRINTF ((stderr, "Reading a token: "));
|
||
yychar = YYLEX;
|
||
}
|
||
|
||
if (yychar <= YYEOF)
|
||
{
|
||
yychar = yytoken = YYEOF;
|
||
YYDPRINTF ((stderr, "Now at end of input.\n"));
|
||
}
|
||
else
|
||
{
|
||
yytoken = YYTRANSLATE (yychar);
|
||
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
||
}
|
||
|
||
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
||
detect an error, take that action. */
|
||
yyn += yytoken;
|
||
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
|
||
goto yydefault;
|
||
yyn = yytable[yyn];
|
||
if (yyn <= 0)
|
||
{
|
||
if (yyn == 0 || yyn == YYTABLE_NINF)
|
||
goto yyerrlab;
|
||
yyn = -yyn;
|
||
goto yyreduce;
|
||
}
|
||
|
||
if (yyn == YYFINAL)
|
||
YYACCEPT;
|
||
|
||
/* Count tokens shifted since error; after three, turn off error
|
||
status. */
|
||
if (yyerrstatus)
|
||
yyerrstatus--;
|
||
|
||
/* Shift the look-ahead token. */
|
||
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
||
|
||
/* Discard the shifted token unless it is eof. */
|
||
if (yychar != YYEOF)
|
||
yychar = YYEMPTY;
|
||
|
||
yystate = yyn;
|
||
*++yyvsp = yylval;
|
||
|
||
goto yynewstate;
|
||
|
||
|
||
/*-----------------------------------------------------------.
|
||
| yydefault -- do the default action for the current state. |
|
||
`-----------------------------------------------------------*/
|
||
yydefault:
|
||
yyn = yydefact[yystate];
|
||
if (yyn == 0)
|
||
goto yyerrlab;
|
||
goto yyreduce;
|
||
|
||
|
||
/*-----------------------------.
|
||
| yyreduce -- Do a reduction. |
|
||
`-----------------------------*/
|
||
yyreduce:
|
||
/* yyn is the number of a rule to reduce with. */
|
||
yylen = yyr2[yyn];
|
||
|
||
/* If YYLEN is nonzero, implement the default value of the action:
|
||
`$$ = $1'.
|
||
|
||
Otherwise, the following line sets YYVAL to garbage.
|
||
This behavior is undocumented and Bison
|
||
users should not rely upon it. Assigning to YYVAL
|
||
unconditionally makes the parser a bit smaller, and it avoids a
|
||
GCC warning that YYVAL may be used uninitialized. */
|
||
yyval = yyvsp[1-yylen];
|
||
|
||
|
||
YY_REDUCE_PRINT (yyn);
|
||
switch (yyn)
|
||
{
|
||
case 2:
|
||
#line 239 "macro.y"
|
||
{
|
||
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (2)].asExpr) );
|
||
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
|
||
hb_macroExprGenPush( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM );
|
||
else
|
||
hb_macroExprGenPop( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM );
|
||
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
|
||
;}
|
||
break;
|
||
|
||
case 3:
|
||
#line 248 "macro.y"
|
||
{
|
||
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (1)].asExpr) );
|
||
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
|
||
hb_macroExprGenPush( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
|
||
else
|
||
hb_macroExprGenPop( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
|
||
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
|
||
;}
|
||
break;
|
||
|
||
case 4:
|
||
#line 256 "macro.y"
|
||
{
|
||
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (1)].asExpr) );
|
||
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
|
||
hb_macroExprGenPush( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
|
||
else
|
||
hb_macroExprGenPop( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
|
||
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
|
||
;}
|
||
break;
|
||
|
||
case 5:
|
||
#line 264 "macro.y"
|
||
{
|
||
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid expression: %s", HB_MACRO_DATA->string));
|
||
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
|
||
YYABORT;
|
||
;}
|
||
break;
|
||
|
||
case 6:
|
||
#line 269 "macro.y"
|
||
{
|
||
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid syntax: %s", HB_MACRO_DATA->string));
|
||
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
|
||
YYABORT;
|
||
;}
|
||
break;
|
||
|
||
case 7:
|
||
#line 278 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewDouble( (yyvsp[(1) - (1)].valDouble).dNumber, (yyvsp[(1) - (1)].valDouble).bWidth, (yyvsp[(1) - (1)].valDouble).bDec, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 8:
|
||
#line 279 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 9:
|
||
#line 282 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewDate( (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 10:
|
||
#line 285 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (2)].valLong).lNumber, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 11:
|
||
#line 290 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewNil( HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 12:
|
||
#line 295 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewString( (yyvsp[(1) - (1)].valChar).string, (yyvsp[(1) - (1)].valChar).length, FALSE, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 13:
|
||
#line 300 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewLogical( TRUE, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 14:
|
||
#line 301 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewLogical( FALSE, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 15:
|
||
#line 306 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewSelf( HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 16:
|
||
#line 311 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewArray( (yyvsp[(2) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 17:
|
||
#line 316 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 18:
|
||
#line 321 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewHash( NULL, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 19:
|
||
#line 322 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewHash( (yyvsp[(2) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 20:
|
||
#line 325 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 21:
|
||
#line 326 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprAddListExpr( (yyvsp[(1) - (5)].asExpr), (yyvsp[(3) - (5)].asExpr) ), (yyvsp[(5) - (5)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 22:
|
||
#line 332 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 23:
|
||
#line 335 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAlias( (yyvsp[(1) - (2)].string), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 24:
|
||
#line 340 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewMacro( NULL, '&', (yyvsp[(1) - (1)].string), HB_COMP_PARAM );
|
||
HB_MACRO_CHECK( (yyval.asExpr) );
|
||
;}
|
||
break;
|
||
|
||
case 25:
|
||
#line 343 "macro.y"
|
||
{ ULONG ulLen = strlen( (yyvsp[(1) - (1)].string) );
|
||
char * szVarName = hb_macroTextSubst( (yyvsp[(1) - (1)].string), &ulLen );
|
||
if( szVarName != (yyvsp[(1) - (1)].string) )
|
||
hb_macroIdentNew( HB_COMP_PARAM, szVarName );
|
||
if( hb_macroIsIdent( szVarName ) )
|
||
{
|
||
(yyval.asExpr) = hb_compExprNewVar( szVarName, HB_COMP_PARAM );
|
||
HB_MACRO_CHECK( (yyval.asExpr) );
|
||
}
|
||
else
|
||
{
|
||
/* invalid variable name
|
||
*/
|
||
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid variable name: %s", (yyvsp[(1) - (1)].string)));
|
||
YYABORT;
|
||
}
|
||
;}
|
||
break;
|
||
|
||
case 26:
|
||
#line 362 "macro.y"
|
||
{ hb_compExprMacroAsAlias( (yyvsp[(1) - (2)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 27:
|
||
#line 367 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewMacro( (yyvsp[(2) - (2)].asExpr), 0, NULL, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 29:
|
||
#line 377 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAlias( "FIELD", HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 30:
|
||
#line 378 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(3) - (3)].asExpr); ;}
|
||
break;
|
||
|
||
case 31:
|
||
#line 383 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 32:
|
||
#line 384 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 33:
|
||
#line 385 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 34:
|
||
#line 386 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 35:
|
||
#line 387 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 36:
|
||
#line 390 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 38:
|
||
#line 394 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 39:
|
||
#line 395 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 40:
|
||
#line 396 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 41:
|
||
#line 397 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 42:
|
||
#line 398 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 43:
|
||
#line 399 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 44:
|
||
#line 400 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 45:
|
||
#line 409 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 46:
|
||
#line 410 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 47:
|
||
#line 411 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 48:
|
||
#line 412 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 49:
|
||
#line 413 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 50:
|
||
#line 418 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 51:
|
||
#line 419 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 52:
|
||
#line 420 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 53:
|
||
#line 421 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 54:
|
||
#line 422 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 55:
|
||
#line 423 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 56:
|
||
#line 424 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 57:
|
||
#line 425 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 58:
|
||
#line 426 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 59:
|
||
#line 427 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 60:
|
||
#line 428 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 61:
|
||
#line 429 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 62:
|
||
#line 430 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 63:
|
||
#line 431 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 64:
|
||
#line 432 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 65:
|
||
#line 433 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 66:
|
||
#line 434 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 67:
|
||
#line 439 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewFunCall( hb_compExprNewFunName( (yyvsp[(1) - (4)].string), HB_COMP_PARAM ), (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM );
|
||
HB_MACRO_CHECK( (yyval.asExpr) );
|
||
;}
|
||
break;
|
||
|
||
case 68:
|
||
#line 442 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewFunCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM );
|
||
HB_MACRO_CHECK( (yyval.asExpr) );
|
||
;}
|
||
break;
|
||
|
||
case 69:
|
||
#line 447 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewFunRef( (yyvsp[(2) - (4)].string), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 70:
|
||
#line 450 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 71:
|
||
#line 451 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 73:
|
||
#line 455 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[(2) - (2)].string), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 74:
|
||
#line 456 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 75:
|
||
#line 459 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 77:
|
||
#line 465 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].string), NULL, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 78:
|
||
#line 466 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), NULL, (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 79:
|
||
#line 467 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), NULL, (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 80:
|
||
#line 472 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewMethodCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 102:
|
||
#line 497 "macro.y"
|
||
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
|
||
break;
|
||
|
||
case 103:
|
||
#line 498 "macro.y"
|
||
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
|
||
break;
|
||
|
||
case 104:
|
||
#line 499 "macro.y"
|
||
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
|
||
break;
|
||
|
||
case 110:
|
||
#line 507 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
|
||
break;
|
||
|
||
case 111:
|
||
#line 508 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
|
||
break;
|
||
|
||
case 112:
|
||
#line 511 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 114:
|
||
#line 515 "macro.y"
|
||
{
|
||
if( !(HB_MACRO_DATA->Flags & HB_MACRO_GEN_LIST) )
|
||
{
|
||
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid expression: %s", HB_MACRO_DATA->string));
|
||
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
|
||
YYABORT;
|
||
}
|
||
;}
|
||
break;
|
||
|
||
case 115:
|
||
#line 523 "macro.y"
|
||
{
|
||
HB_MACRO_DATA->uiListElements = 1;
|
||
(yyval.asExpr) = hb_compExprAddListExpr( ( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PARE ) ? hb_compExprNewList( (yyvsp[(1) - (4)].asExpr), HB_COMP_PARAM ) : hb_compExprNewArgList( (yyvsp[(1) - (4)].asExpr), HB_COMP_PARAM ), (yyvsp[(4) - (4)].asExpr) );
|
||
;}
|
||
break;
|
||
|
||
case 117:
|
||
#line 530 "macro.y"
|
||
{ HB_MACRO_DATA->uiListElements++;
|
||
(yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 118:
|
||
#line 534 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewEmpty( HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 141:
|
||
#line 564 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewPostInc( (yyvsp[(0) - (1)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 142:
|
||
#line 565 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewPostDec( (yyvsp[(0) - (1)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 143:
|
||
#line 571 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 144:
|
||
#line 574 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewPreInc( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 145:
|
||
#line 575 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewPreDec( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 146:
|
||
#line 578 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewNot( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 147:
|
||
#line 579 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewNegate( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 148:
|
||
#line 580 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
|
||
break;
|
||
|
||
case 149:
|
||
#line 583 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 150:
|
||
#line 584 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 151:
|
||
#line 585 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 152:
|
||
#line 586 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 153:
|
||
#line 587 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 154:
|
||
#line 588 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 155:
|
||
#line 589 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 156:
|
||
#line 590 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 157:
|
||
#line 591 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 158:
|
||
#line 592 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 159:
|
||
#line 593 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 160:
|
||
#line 594 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 161:
|
||
#line 595 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 162:
|
||
#line 596 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 163:
|
||
#line 597 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 164:
|
||
#line 598 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 165:
|
||
#line 599 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 166:
|
||
#line 600 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 167:
|
||
#line 601 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 168:
|
||
#line 602 "macro.y"
|
||
{ HB_MACRO_IFENABLED( (yyval.asExpr), hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ), HB_SM_HARBOUR ); ;}
|
||
break;
|
||
|
||
case 169:
|
||
#line 603 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 170:
|
||
#line 606 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 171:
|
||
#line 609 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 172:
|
||
#line 612 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 173:
|
||
#line 615 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 174:
|
||
#line 618 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 175:
|
||
#line 621 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 182:
|
||
#line 632 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlus( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 183:
|
||
#line 633 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinus( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 184:
|
||
#line 634 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMult( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 185:
|
||
#line 635 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDiv( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 186:
|
||
#line 636 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMod( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 187:
|
||
#line 637 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPower( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 188:
|
||
#line 640 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewAnd( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 189:
|
||
#line 641 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewOr( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 190:
|
||
#line 644 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEQ( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 191:
|
||
#line 645 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLT( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 192:
|
||
#line 646 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGT( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 193:
|
||
#line 647 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 194:
|
||
#line 648 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 195:
|
||
#line 649 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 196:
|
||
#line 650 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 197:
|
||
#line 651 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewIN( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 198:
|
||
#line 652 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEqual( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 200:
|
||
#line 661 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(0) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 201:
|
||
#line 662 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 202:
|
||
#line 663 "macro.y"
|
||
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(1) - (4)].asExpr), (yyvsp[(4) - (4)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 203:
|
||
#line 666 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 204:
|
||
#line 667 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 205:
|
||
#line 671 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewCodeBlock( NULL, 0, 0, HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 206:
|
||
#line 673 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(3) - (7)].asExpr); ;}
|
||
break;
|
||
|
||
case 207:
|
||
#line 678 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (1)].asExpr), (yyvsp[(1) - (1)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 208:
|
||
#line 679 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 209:
|
||
#line 684 "macro.y"
|
||
{ (yyval.asExpr) = NULL; ;}
|
||
break;
|
||
|
||
case 210:
|
||
#line 685 "macro.y"
|
||
{ (yyval.asExpr) = NULL; (yyvsp[(0) - (1)].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; ;}
|
||
break;
|
||
|
||
case 211:
|
||
#line 686 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); ;}
|
||
break;
|
||
|
||
case 212:
|
||
#line 687 "macro.y"
|
||
{ (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); (yyvsp[(0) - (3)].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; ;}
|
||
break;
|
||
|
||
case 213:
|
||
#line 690 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (1)].asExpr), (yyvsp[(1) - (1)].string), ' ', HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 214:
|
||
#line 691 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (3)].asExpr), (yyvsp[(3) - (3)].string), ' ', HB_COMP_PARAM ); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
|
||
break;
|
||
|
||
case 215:
|
||
#line 694 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
|
||
break;
|
||
|
||
case 216:
|
||
#line 695 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
|
||
break;
|
||
|
||
case 219:
|
||
#line 706 "macro.y"
|
||
{ (yyval.asExpr) = hb_compExprNewIIF( hb_compExprAddListExpr( hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[(3) - (8)].asExpr), HB_COMP_PARAM ), (yyvsp[(5) - (8)].asExpr) ), (yyvsp[(7) - (8)].asExpr) ) ); ;}
|
||
break;
|
||
|
||
|
||
/* Line 1267 of yacc.c. */
|
||
#line 2892 "macroy.c"
|
||
default: break;
|
||
}
|
||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||
|
||
YYPOPSTACK (yylen);
|
||
yylen = 0;
|
||
YY_STACK_PRINT (yyss, yyssp);
|
||
|
||
*++yyvsp = yyval;
|
||
|
||
|
||
/* Now `shift' the result of the reduction. Determine what state
|
||
that goes to, based on the state we popped back to and the rule
|
||
number reduced by. */
|
||
|
||
yyn = yyr1[yyn];
|
||
|
||
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
|
||
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
||
yystate = yytable[yystate];
|
||
else
|
||
yystate = yydefgoto[yyn - YYNTOKENS];
|
||
|
||
goto yynewstate;
|
||
|
||
|
||
/*------------------------------------.
|
||
| yyerrlab -- here on detecting error |
|
||
`------------------------------------*/
|
||
yyerrlab:
|
||
/* If not already recovering from an error, report this error. */
|
||
if (!yyerrstatus)
|
||
{
|
||
++yynerrs;
|
||
#if ! YYERROR_VERBOSE
|
||
yyerror (pMacro, YY_("syntax error"));
|
||
#else
|
||
{
|
||
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
||
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
||
{
|
||
YYSIZE_T yyalloc = 2 * yysize;
|
||
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
||
yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
||
if (yymsg != yymsgbuf)
|
||
YYSTACK_FREE (yymsg);
|
||
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
||
if (yymsg)
|
||
yymsg_alloc = yyalloc;
|
||
else
|
||
{
|
||
yymsg = yymsgbuf;
|
||
yymsg_alloc = sizeof yymsgbuf;
|
||
}
|
||
}
|
||
|
||
if (0 < yysize && yysize <= yymsg_alloc)
|
||
{
|
||
(void) yysyntax_error (yymsg, yystate, yychar);
|
||
yyerror (pMacro, yymsg);
|
||
}
|
||
else
|
||
{
|
||
yyerror (pMacro, YY_("syntax error"));
|
||
if (yysize != 0)
|
||
goto yyexhaustedlab;
|
||
}
|
||
}
|
||
#endif
|
||
}
|
||
|
||
|
||
|
||
if (yyerrstatus == 3)
|
||
{
|
||
/* If just tried and failed to reuse look-ahead token after an
|
||
error, discard it. */
|
||
|
||
if (yychar <= YYEOF)
|
||
{
|
||
/* Return failure if at end of input. */
|
||
if (yychar == YYEOF)
|
||
YYABORT;
|
||
}
|
||
else
|
||
{
|
||
yydestruct ("Error: discarding",
|
||
yytoken, &yylval, pMacro);
|
||
yychar = YYEMPTY;
|
||
}
|
||
}
|
||
|
||
/* Else will try to reuse look-ahead token after shifting the error
|
||
token. */
|
||
goto yyerrlab1;
|
||
|
||
|
||
/*---------------------------------------------------.
|
||
| yyerrorlab -- error raised explicitly by YYERROR. |
|
||
`---------------------------------------------------*/
|
||
yyerrorlab:
|
||
|
||
/* Pacify compilers like GCC when the user code never invokes
|
||
YYERROR and the label yyerrorlab therefore never appears in user
|
||
code. */
|
||
if (/*CONSTCOND*/ 0)
|
||
goto yyerrorlab;
|
||
|
||
/* Do not reclaim the symbols of the rule which action triggered
|
||
this YYERROR. */
|
||
YYPOPSTACK (yylen);
|
||
yylen = 0;
|
||
YY_STACK_PRINT (yyss, yyssp);
|
||
yystate = *yyssp;
|
||
goto yyerrlab1;
|
||
|
||
|
||
/*-------------------------------------------------------------.
|
||
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||
`-------------------------------------------------------------*/
|
||
yyerrlab1:
|
||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||
|
||
for (;;)
|
||
{
|
||
yyn = yypact[yystate];
|
||
if (yyn != YYPACT_NINF)
|
||
{
|
||
yyn += YYTERROR;
|
||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||
{
|
||
yyn = yytable[yyn];
|
||
if (0 < yyn)
|
||
break;
|
||
}
|
||
}
|
||
|
||
/* Pop the current state because it cannot handle the error token. */
|
||
if (yyssp == yyss)
|
||
YYABORT;
|
||
|
||
|
||
yydestruct ("Error: popping",
|
||
yystos[yystate], yyvsp, pMacro);
|
||
YYPOPSTACK (1);
|
||
yystate = *yyssp;
|
||
YY_STACK_PRINT (yyss, yyssp);
|
||
}
|
||
|
||
if (yyn == YYFINAL)
|
||
YYACCEPT;
|
||
|
||
*++yyvsp = yylval;
|
||
|
||
|
||
/* Shift the error token. */
|
||
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
|
||
|
||
yystate = yyn;
|
||
goto yynewstate;
|
||
|
||
|
||
/*-------------------------------------.
|
||
| yyacceptlab -- YYACCEPT comes here. |
|
||
`-------------------------------------*/
|
||
yyacceptlab:
|
||
yyresult = 0;
|
||
goto yyreturn;
|
||
|
||
/*-----------------------------------.
|
||
| yyabortlab -- YYABORT comes here. |
|
||
`-----------------------------------*/
|
||
yyabortlab:
|
||
yyresult = 1;
|
||
goto yyreturn;
|
||
|
||
#ifndef yyoverflow
|
||
/*-------------------------------------------------.
|
||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||
`-------------------------------------------------*/
|
||
yyexhaustedlab:
|
||
yyerror (pMacro, YY_("memory exhausted"));
|
||
yyresult = 2;
|
||
/* Fall through. */
|
||
#endif
|
||
|
||
yyreturn:
|
||
if (yychar != YYEOF && yychar != YYEMPTY)
|
||
yydestruct ("Cleanup: discarding lookahead",
|
||
yytoken, &yylval, pMacro);
|
||
/* Do not reclaim the symbols of the rule which action triggered
|
||
this YYABORT or YYACCEPT. */
|
||
YYPOPSTACK (yylen);
|
||
YY_STACK_PRINT (yyss, yyssp);
|
||
while (yyssp != yyss)
|
||
{
|
||
yydestruct ("Cleanup: popping",
|
||
yystos[*yyssp], yyvsp, pMacro);
|
||
YYPOPSTACK (1);
|
||
}
|
||
#ifndef yyoverflow
|
||
if (yyss != yyssa)
|
||
YYSTACK_FREE (yyss);
|
||
#endif
|
||
#if YYERROR_VERBOSE
|
||
if (yymsg != yymsgbuf)
|
||
YYSTACK_FREE (yymsg);
|
||
#endif
|
||
/* Make sure YYID is used. */
|
||
return YYID (yyresult);
|
||
}
|
||
|
||
|
||
#line 709 "macro.y"
|
||
|
||
|
||
#ifdef __WATCOMC__
|
||
/* enable warnings for unreachable code */
|
||
#pragma warning 13 1
|
||
#endif
|
||
|
||
|
||
/*
|
||
** ------------------------------------------------------------------------ **
|
||
*/
|
||
|
||
void yyerror( HB_MACRO_PTR pMacro, char * s )
|
||
{
|
||
HB_SYMBOL_UNUSED( pMacro );
|
||
HB_SYMBOL_UNUSED( s );
|
||
}
|
||
|
||
/* ************************************************************************* */
|
||
|
||
typedef struct HB_MEXPR_
|
||
{
|
||
HB_EXPR Expression;
|
||
struct HB_MEXPR_ *pPrev;
|
||
}
|
||
HB_MEXPR, * HB_MEXPR_PTR;
|
||
|
||
typedef struct HB_MIDENT_
|
||
{
|
||
char * Identifier;
|
||
struct HB_MIDENT_ *pPrev;
|
||
}
|
||
HB_MIDENT, * HB_MIDENT_PTR;
|
||
|
||
/* Allocates memory for Expression holder structure and stores it
|
||
* on the linked list
|
||
*/
|
||
static HB_EXPR_PTR hb_macroExprAlloc( HB_COMP_DECL )
|
||
{
|
||
HB_MEXPR_PTR pMExpr = ( HB_MEXPR_PTR ) hb_xgrab( sizeof( HB_MEXPR ) );
|
||
pMExpr->pPrev = ( HB_MEXPR_PTR ) HB_MACRO_DATA->pExprLst;
|
||
HB_MACRO_DATA->pExprLst = ( void * ) pMExpr;
|
||
return &pMExpr->Expression;
|
||
}
|
||
|
||
static void hb_macroIdentNew( HB_COMP_DECL, char * szIdent )
|
||
{
|
||
HB_MIDENT_PTR pMIdent = ( HB_MIDENT_PTR ) hb_xgrab( sizeof( HB_MIDENT ) );
|
||
pMIdent->Identifier = szIdent;
|
||
pMIdent->pPrev = ( HB_MIDENT_PTR ) HB_MACRO_DATA->pIdentLst;
|
||
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent;
|
||
}
|
||
|
||
static HB_EXPR_PTR hb_macroExprNew( HB_COMP_DECL, HB_EXPRTYPE iType )
|
||
{
|
||
HB_EXPR_PTR pExpr;
|
||
|
||
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprNew(%p,%i)", HB_COMP_PARAM, iType));
|
||
|
||
pExpr = hb_macroExprAlloc( HB_COMP_PARAM );
|
||
pExpr->ExprType = iType;
|
||
pExpr->pNext = NULL;
|
||
pExpr->ValType = HB_EV_UNKNOWN;
|
||
pExpr->Counter = 1;
|
||
|
||
return pExpr;
|
||
}
|
||
|
||
/* Delete self - all components will be deleted somewhere else
|
||
*/
|
||
static void hb_macroExprClear( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
||
{
|
||
HB_SYMBOL_UNUSED( HB_COMP_PARAM );
|
||
if( --pExpr->Counter == 0 )
|
||
pExpr->ExprType = HB_ET_NONE;
|
||
}
|
||
|
||
/* Delete all components and delete self
|
||
*/
|
||
static void hb_macroExprDelete( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
||
{
|
||
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprDelete(%p,%p)", HB_COMP_PARAM, pExpr));
|
||
if( pExpr && --pExpr->Counter == 0 )
|
||
{
|
||
HB_EXPR_USE( pExpr, HB_EA_DELETE );
|
||
pExpr->ExprType = HB_ET_NONE;
|
||
}
|
||
}
|
||
|
||
/* Delete all components and delete self
|
||
*/
|
||
static void hb_macroExprFree( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
||
{
|
||
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprFree()"));
|
||
if( --pExpr->Counter == 0 )
|
||
{
|
||
HB_EXPR_USE( pExpr, HB_EA_DELETE );
|
||
pExpr->ExprType = HB_ET_NONE;
|
||
}
|
||
}
|
||
|
||
/* Deallocate all memory used by expression optimizer */
|
||
static void hb_macroLstFree( HB_MACRO_PTR pMacro )
|
||
{
|
||
if( pMacro->pExprLst )
|
||
{
|
||
HB_MEXPR_PTR pMExpr = ( HB_MEXPR_PTR ) pMacro->pExprLst;
|
||
do
|
||
{
|
||
hb_macroExprDelete( pMacro, &pMExpr->Expression );
|
||
pMExpr = pMExpr->pPrev;
|
||
}
|
||
while( pMExpr );
|
||
do
|
||
{
|
||
pMExpr = ( HB_MEXPR_PTR ) pMacro->pExprLst;
|
||
pMacro->pExprLst = ( void * ) pMExpr->pPrev;
|
||
hb_xfree( pMExpr );
|
||
}
|
||
while( pMacro->pExprLst );
|
||
}
|
||
|
||
while( pMacro->pIdentLst )
|
||
{
|
||
HB_MIDENT_PTR pMIdent = ( HB_MIDENT_PTR ) HB_MACRO_DATA->pIdentLst;;
|
||
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent->pPrev;
|
||
hb_xfree( pMIdent->Identifier );
|
||
hb_xfree( pMIdent );
|
||
}
|
||
}
|
||
|
||
static HB_EXPR_PTR hb_macroErrorType( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
||
{
|
||
hb_macroError( EG_ARG, HB_COMP_PARAM );
|
||
return pExpr;
|
||
}
|
||
|
||
static HB_EXPR_PTR hb_macroErrorSyntax( HB_COMP_DECL, HB_EXPR_PTR pExpr )
|
||
{
|
||
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
|
||
return pExpr;
|
||
}
|
||
|
||
static void hb_macroErrorDuplVar( HB_COMP_DECL, const char * szVarName )
|
||
{
|
||
HB_SYMBOL_UNUSED( szVarName );
|
||
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
|
||
}
|
||
|
||
|
||
static const HB_COMP_FUNCS s_macro_funcs =
|
||
{
|
||
hb_macroExprNew,
|
||
hb_macroExprClear,
|
||
hb_macroExprFree,
|
||
hb_macroExprDelete,
|
||
|
||
hb_macroErrorType,
|
||
hb_macroErrorSyntax,
|
||
hb_macroErrorDuplVar,
|
||
};
|
||
|
||
int hb_macroYYParse( HB_MACRO_PTR pMacro )
|
||
{
|
||
int iResult;
|
||
|
||
pMacro->funcs = &s_macro_funcs;
|
||
|
||
if( hb_macroLexNew( pMacro ) )
|
||
{
|
||
pMacro->status = HB_MACRO_CONT;
|
||
pMacro->pExprLst = NULL;
|
||
pMacro->pIdentLst = NULL;
|
||
|
||
iResult = yyparse( pMacro );
|
||
|
||
hb_macroLstFree( pMacro );
|
||
hb_macroLexDelete( pMacro );
|
||
}
|
||
else
|
||
iResult = HB_MACRO_FAILURE;
|
||
|
||
return iResult;
|
||
}
|
||
|
||
|
||
#if defined( HB_MACRO_PPLEX )
|
||
|
||
/* it's an example of PP token translator which change tokens generated by
|
||
PP into terminal symbols used by our grammar parser generated by Bison */
|
||
BOOL hb_macroLexNew( HB_MACRO_PTR pMacro )
|
||
{
|
||
pMacro->pLex = ( void * ) hb_pp_lexNew( pMacro->string, pMacro->length );
|
||
return pMacro->pLex != NULL;
|
||
}
|
||
|
||
void hb_macroLexDelete( HB_MACRO_PTR pMacro )
|
||
{
|
||
if( pMacro->pLex )
|
||
{
|
||
hb_pp_free( ( PHB_PP_STATE ) pMacro->pLex );
|
||
pMacro->pLex = NULL;
|
||
}
|
||
}
|
||
|
||
int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro )
|
||
{
|
||
PHB_PP_TOKEN pToken = hb_pp_lexGet( ( PHB_PP_STATE ) pMacro->pLex );
|
||
|
||
if( !pToken )
|
||
return 0;
|
||
|
||
switch( HB_PP_TOKEN_TYPE( pToken->type ) )
|
||
{
|
||
case HB_PP_TOKEN_KEYWORD:
|
||
if( pToken->len >= 4 && pToken->len <= 6 &&
|
||
( hb_strnicmp( "_FILED", pToken->value, pToken->len ) == 0 ||
|
||
hb_strnicmp( "FILED", pToken->value, pToken->len ) == 0 ) )
|
||
return FIELD;
|
||
else if( pToken->len == 3 && hb_stricmp( "IIF", pToken->value ) == 0 )
|
||
return IIF;
|
||
else if( pToken->len == 2 && hb_stricmp( "IF", pToken->value ) == 0 )
|
||
return IIF;
|
||
else if( pToken->len == 3 && hb_stricmp( "NIL", pToken->value ) == 0 )
|
||
return NIL;
|
||
|
||
hb_pp_tokenUpper( pToken );
|
||
yylval_ptr->string = pToken->value;
|
||
return IDENTIFIER;
|
||
|
||
case HB_PP_TOKEN_MACROVAR:
|
||
hb_pp_tokenUpper( pToken );
|
||
yylval_ptr->string = pToken->value;
|
||
return MACROVAR;
|
||
|
||
case HB_PP_TOKEN_MACROTEXT:
|
||
hb_pp_tokenUpper( pToken );
|
||
yylval_ptr->string = pToken->value;
|
||
return MACROTEXT;
|
||
|
||
case HB_PP_TOKEN_NUMBER:
|
||
{
|
||
HB_LONG lNumber;
|
||
double dNumber;
|
||
int iDec, iWidth;
|
||
|
||
if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) )
|
||
{
|
||
yylval_ptr->valDouble.dNumber = dNumber;
|
||
yylval_ptr->valDouble.bDec = ( UCHAR ) iDec;
|
||
yylval_ptr->valDouble.bWidth = ( UCHAR ) iWidth;
|
||
return NUM_DOUBLE;
|
||
}
|
||
else
|
||
{
|
||
yylval_ptr->valLong.lNumber = lNumber;
|
||
yylval_ptr->valLong.bWidth = ( UCHAR ) iWidth;
|
||
return NUM_LONG;
|
||
}
|
||
}
|
||
case HB_PP_TOKEN_DATE:
|
||
if( pToken->len == 10 )
|
||
{
|
||
int year, month, day;
|
||
hb_dateStrGet( pToken->value + 2, &year, &month, &day );
|
||
yylval_ptr->valLong.lNumber = hb_dateEncode( year, month, day );
|
||
}
|
||
else
|
||
yylval_ptr->valLong.lNumber = 0;
|
||
return NUM_DATE;
|
||
|
||
case HB_PP_TOKEN_STRING:
|
||
yylval_ptr->valChar.string = pToken->value;
|
||
yylval_ptr->valChar.length = pToken->len;
|
||
return LITERAL;
|
||
|
||
case HB_PP_TOKEN_LOGICAL:
|
||
return pToken->value[ 1 ] == 'T' ? TRUEVALUE : FALSEVALUE;
|
||
|
||
case HB_PP_TOKEN_HASH:
|
||
case HB_PP_TOKEN_DIRECTIVE:
|
||
return NE1;
|
||
|
||
case HB_PP_TOKEN_NE:
|
||
return NE2;
|
||
|
||
case HB_PP_TOKEN_ASSIGN:
|
||
return INASSIGN;
|
||
|
||
case HB_PP_TOKEN_EQUAL:
|
||
return EQ;
|
||
|
||
case HB_PP_TOKEN_INC:
|
||
return INC;
|
||
|
||
case HB_PP_TOKEN_DEC:
|
||
return DEC;
|
||
|
||
case HB_PP_TOKEN_ALIAS:
|
||
return ALIASOP;
|
||
|
||
case HB_PP_TOKEN_LE:
|
||
return LE;
|
||
|
||
case HB_PP_TOKEN_GE:
|
||
return GE;
|
||
|
||
case HB_PP_TOKEN_PLUSEQ:
|
||
return PLUSEQ;
|
||
|
||
case HB_PP_TOKEN_MINUSEQ:
|
||
return MINUSEQ;
|
||
|
||
case HB_PP_TOKEN_MULTEQ:
|
||
return MULTEQ;
|
||
|
||
case HB_PP_TOKEN_DIVEQ:
|
||
return DIVEQ;
|
||
|
||
case HB_PP_TOKEN_MODEQ:
|
||
return MODEQ;
|
||
|
||
case HB_PP_TOKEN_EXPEQ:
|
||
return EXPEQ;
|
||
|
||
case HB_PP_TOKEN_POWER:
|
||
return POWER;
|
||
|
||
case HB_PP_TOKEN_AND:
|
||
return AND;
|
||
|
||
case HB_PP_TOKEN_OR:
|
||
return OR;
|
||
|
||
case HB_PP_TOKEN_NOT:
|
||
return NOT;
|
||
|
||
default:
|
||
return pToken->value[ 0 ];
|
||
}
|
||
}
|
||
|
||
#endif /* HB_MACRO_PPLEX */
|
||
|