Files
harbour-core/src/macro/macro.yyc
Aleksander Czajczynski 4041902a19 2020-02-05 11:25 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/vm/fm.c
  * src/macro/macro.y
  * src/macro/macro.yyc
    ! guarded more C++ mode only pragmas for OpenWatcom. Issue #202

  * utils/hbmk2/hbmk2.prg
    ! reverted C++ check
2020-02-05 11:25:32 +01:00

3340 lines
119 KiB
Plaintext

/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
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, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
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 "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 1
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Substitute the variable and function names. */
#define yyparse hb_macro_yyparse
#define yylex hb_macro_yylex
#define yyerror hb_macro_yyerror
#define yydebug hb_macro_yydebug
#define yynerrs hb_macro_yynerrs
/* Copy the first part of user declarations. */
#line 6 "macro.y" /* yacc.c:339 */
/*
* Macro compiler YACC rules and actions
*
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
*
* 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; see the file LICENSE.txt. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA (or visit https://www.gnu.org/licenses/).
*
* 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
* The major problem to solve is how to support QSELF() inside a codeblock.
*/
/* 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 meaningless warnings */
#if defined( __BORLANDC__ )
# if ! defined( __STDC__ )
# define __STDC__
# endif
# pragma warn -aus
# pragma warn -ccc
# pragma warn -rch
#elif defined( __WATCOMC__ ) && defined( __cplusplus )
# pragma warning 13 9
# pragma warning 368 9
#elif defined( _MSC_VER )
# pragma warning( disable : 4244 )
# pragma warning( disable : 4702 )
#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
#define NO_YYERROR
/* NOTE: these symbols are defined explicitly to pacify warnings */
#define YYENABLE_NLS 0
#define YYLTYPE_IS_TRIVIAL 0
/* 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; \
}
#if defined( __BORLANDC__ ) || defined( __WATCOMC__ )
/* The if() inside this macro is always TRUE but it's used to hide BCC warning */
#define HB_MACRO_ABORT if( !( HB_MACRO_DATA->status & HB_MACRO_CONT ) ) { YYABORT; }
#else
#define HB_MACRO_ABORT { YYABORT; }
#endif
#line 205 "macroy.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULLPTR nullptr
# else
# define YY_NULLPTR 0
# endif
# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* In a future release of Bison, this section will be replaced
by #include "macroy.h". */
#ifndef YY_HB_MACRO_YY_MACROY_H_INCLUDED
# define YY_HB_MACRO_YY_MACROY_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int hb_macro_yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
IDENTIFIER = 258,
NIL = 259,
NUM_DOUBLE = 260,
INASSIGN = 261,
NUM_LONG = 262,
NUM_DATE = 263,
TIMESTAMP = 264,
IIF = 265,
LITERAL = 266,
TRUEVALUE = 267,
FALSEVALUE = 268,
AND = 269,
OR = 270,
NOT = 271,
EQ = 272,
NE1 = 273,
NE2 = 274,
INC = 275,
DEC = 276,
ALIASOP = 277,
HASHOP = 278,
SELF = 279,
LE = 280,
GE = 281,
FIELD = 282,
MACROVAR = 283,
MACROTEXT = 284,
PLUSEQ = 285,
MINUSEQ = 286,
MULTEQ = 287,
DIVEQ = 288,
POWER = 289,
EXPEQ = 290,
MODEQ = 291,
EPSILON = 292,
POST = 293,
UNARY = 294,
PRE = 295
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 140 "macro.y" /* yacc.c:355 */
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_MAXINT lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
PHB_EXPR asExpr;
struct
{
const char * string;
HB_SIZE length;
} valChar;
struct
{
int iNumber; /* to hold a number returned by lex */
} valInteger;
struct
{
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{
double dNumber; /* to hold a double number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_UCHAR bDec; /* to hold the number of decimal points in the value */
} valDouble;
struct
{
long date; /* to hold julian date */
long time; /* to hold milliseconds */
} valTimeStamp;
#line 319 "macroy.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
int hb_macro_yyparse (PHB_MACRO pMacro);
#endif /* !YY_HB_MACRO_YY_MACROY_H_INCLUDED */
/* Copy the second part of user declarations. */
#line 173 "macro.y" /* yacc.c:358 */
/* This must be placed after the above union - the union is
* typedef-ined to YYSTYPE
*/
extern int yylex( YYSTYPE *, PHB_MACRO ); /* main lex token function, called by yyparse() */
extern int yyparse( PHB_MACRO ); /* main yacc parsing function */
extern void yyerror( PHB_MACRO, const char * ); /* parsing error management function */
#line 342 "macroy.c" /* yacc.c:358 */
#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;
#else
typedef signed char 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
# 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 defined YYENABLE_NLS && 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
#ifndef YY_ATTRIBUTE
# if (defined __GNUC__ \
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
# define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif
#ifndef YY_ATTRIBUTE_PURE
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
#endif
#ifndef YY_ATTRIBUTE_UNUSED
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
#if !defined _Noreturn \
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
#if ! defined yyoverflow || YYERROR_VERBOSE
/* 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 EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
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 EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined EXIT_SUCCESS
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_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* 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)
# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 102
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1272
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 61
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 70
/* YYNRULES -- Number of rules. */
#define YYNRULES 208
/* YYNSTATES -- Number of states. */
#define YYNSTATES 298
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 42, 47, 50, 2,
55, 56, 45, 43, 52, 44, 2, 46, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 57, 2,
40, 39, 41, 2, 51, 2, 2, 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, 38, 48, 49
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 257, 257, 267, 275, 284, 285, 288, 291, 294,
299, 304, 309, 310, 315, 320, 325, 330, 331, 334,
335, 341, 344, 349, 352, 371, 376, 379, 386, 387,
392, 393, 394, 395, 396, 399, 400, 401, 404, 405,
406, 407, 408, 409, 410, 419, 420, 421, 422, 423,
428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
438, 439, 440, 441, 442, 443, 444, 445, 446, 451,
454, 459, 469, 470, 473, 474, 477, 478, 479, 480,
481, 484, 485, 490, 493, 494, 495, 500, 504, 505,
506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
526, 527, 528, 529, 530, 531, 532, 533, 536, 537,
540, 541, 544, 544, 558, 559, 563, 564, 567, 568,
569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
594, 595, 601, 604, 605, 608, 609, 610, 613, 616,
619, 622, 625, 628, 631, 634, 635, 636, 637, 638,
639, 642, 643, 644, 645, 646, 647, 650, 651, 654,
655, 656, 657, 658, 659, 660, 661, 662, 665, 671,
672, 673, 676, 677, 681, 680, 688, 689, 694, 695,
696, 697, 700, 701, 704, 705, 708, 711, 715
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "IDENTIFIER", "NIL", "NUM_DOUBLE",
"INASSIGN", "NUM_LONG", "NUM_DATE", "TIMESTAMP", "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", "'&'", "'@'", "','", "'{'", "'}'",
"'('", "')'", "':'", "']'", "'['", "'|'", "$accept", "Main", "NumValue",
"DateValue", "TimeStampValue", "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",
"RefArgument", "ExtArgument", "ObjectData", "SendId", "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", YY_NULLPTR
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 61,
60, 62, 36, 43, 45, 42, 47, 37, 294, 295,
38, 64, 44, 123, 125, 40, 41, 58, 93, 91,
124
};
# endif
#define YYPACT_NINF -260
#define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-260)))
#define YYTABLE_NINF -150
#define yytable_value_is_error(Yytable_value) \
0
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const yytype_int16 yypact[] =
{
346, -260, -15, -260, -260, -12, -260, -260, -38, -260,
-260, -260, 843, 843, 843, -260, -4, -260, -260, 843,
843, -31, 32, 288, 843, 42, 437, 454, 471, 5,
489, 506, 523, 541, 558, 959, 575, 593, 5, 172,
5, 372, 5, 2, 8, 610, 627, 976, 645, -260,
389, 662, -260, 1020, -260, 15, 30, 994, -260, -260,
-260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
-260, -260, 679, 70, 406, 5, 697, -260, 737, -260,
843, 1225, -260, -260, 58, -260, -260, -260, -7, 14,
-260, 949, -260, 46, -260, -260, -260, 1092, -260, 87,
1160, -260, -260, 790, -260, -37, -260, -260, -260, -260,
-260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
-260, -260, -260, 737, -260, -260, -260, -260, -260, -260,
-260, 51, -12, -260, -260, 77, -260, 83, -260, -260,
88, -260, -260, -260, -260, -260, 737, -260, -260, 843,
843, 843, 843, 843, 843, 843, 843, 843, 843, 843,
843, 843, 843, 843, 843, 843, 843, -260, 843, -260,
-260, 843, 843, 843, 843, 843, 843, 41, -260, -260,
843, -260, -260, -260, -260, -260, -260, 73, -260, 1056,
-260, 737, -260, -6, 64, 64, 64, 64, 64, 64,
64, 64, -260, 64, 64, 17, 7, 138, 64, 90,
64, 22, 64, 91, 64, 16, 64, 19, 843, -260,
843, 737, -260, -260, 1160, -260, 790, 68, 84, 127,
1194, 1160, 1225, 1225, 1225, 835, 835, 100, 1225, 835,
835, 835, 74, 74, 97, 97, 97, -260, 843, 1160,
1160, 1160, 1160, 1160, 1160, 1160, -260, -260, -260, -260,
-260, 737, -260, 896, 132, 737, -260, -260, 106, 117,
1126, -260, -260, -260, 790, -260, -260, -260, -260, 125,
-260, 133, 843, 25, 843, -260, 896, 142, 1160, 157,
-260, -260, -260, 126, 843, -260, -260, 1160
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 4, 21, 10, 5, 6, 7, 8, 0, 11,
12, 13, 0, 0, 0, 14, 0, 23, 24, 0,
0, 0, 0, 126, 126, 0, 88, 90, 91, 0,
89, 92, 94, 95, 96, 97, 98, 103, 0, 101,
0, 102, 0, 0, 0, 99, 100, 104, 105, 117,
107, 108, 118, 2, 124, 3, 0, 0, 111, 112,
113, 109, 165, 166, 167, 168, 169, 170, 110, 114,
115, 116, 93, 0, 119, 0, 106, 22, 126, 9,
0, 155, 153, 154, 28, 157, 156, 26, 0, 0,
81, 0, 194, 0, 82, 75, 192, 127, 74, 0,
127, 204, 1, 0, 50, 0, 52, 53, 35, 36,
37, 38, 45, 51, 54, 56, 58, 16, 57, 59,
42, 46, 25, 126, 62, 39, 47, 27, 63, 40,
48, 35, 0, 31, 30, 36, 33, 37, 34, 43,
0, 32, 44, 60, 61, 66, 126, 64, 65, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 126, 122, 0, 150,
151, 0, 0, 0, 0, 0, 0, 0, 152, 55,
126, 206, 207, 68, 41, 49, 67, 0, 72, 0,
29, 126, 17, 76, 128, 130, 131, 129, 132, 134,
135, 136, 137, 138, 143, 77, 142, 78, 140, 80,
146, 79, 149, 0, 133, 145, 147, 198, 0, 18,
126, 126, 15, 120, 121, 189, 0, 188, 0, 0,
177, 178, 179, 184, 185, 182, 183, 176, 187, 180,
181, 186, 171, 172, 173, 174, 175, 125, 126, 158,
159, 160, 161, 162, 164, 163, 84, 85, 86, 83,
205, 126, 69, 126, 0, 126, 202, 199, 0, 200,
0, 19, 193, 190, 0, 70, 87, 123, 73, 0,
71, 0, 0, 0, 126, 191, 126, 71, 196, 0,
203, 201, 20, 0, 0, 195, 208, 197
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-260, -260, 96, 99, 105, 148, 115, 119, 121, 122,
123, 124, 128, -260, 129, 173, 3, 174, 21, 179,
139, -260, 71, 134, 137, 141, 143, -260, -120, -259,
-260, -21, 144, -260, 145, -260, 0, -220, -260, -260,
-260, 1, 146, -260, -260, -260, -260, -260, -260, -260,
-260, -260, -260, -260, -260, -260, -260, -260, 56, -260,
-260, 147, -260, -260, -260, -260, -260, 95, 181, 150
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 93, 37, 38, 39, 40, 41, 42,
43, 44, 111, 45, 46, 47, 48, 49, 187, 94,
95, 188, 50, 259, 51, 52, 100, 225, 54, 248,
55, 98, 57, 178, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 104, 105,
99, 72, 217, 289, 268, 269, 73, 74, 75, 76
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
53, 56, 96, 228, 279, 131, 273, 77, 108, 132,
79, 108, 81, 82, 83, 226, 77, 80, 84, 85,
86, 227, 266, 97, 24, 101, 229, 293, 290, 127,
17, 18, 109, 17, 18, 88, 17, 18, 182, 122,
78, 109, 102, 109, 256, 109, 135, 109, 191, 265,
110, -21, 21, -21, 285, 21, 267, 24, 21, 110,
24, 110, 291, 110, 137, 110, 103, 166, 192, 17,
18, 264, 123, 77, -141, 103, 103, 146, 109, -148,
189, 103, 167, 106, 107, 16, 113, 114, 115, 116,
117, 21, 118, 119, 205, 124, 110, 128, 218, 122,
219, 143, 144, 224, 145, 127, 147, 148, 156, 120,
182, 125, 206, 129, 139, 142, 87, 161, 162, 163,
164, 165, 180, 103, 112, 261, 181, 274, 179, 262,
183, 156, 186, 121, 156, 126, 261, 130, 140, 221,
275, 222, 163, 164, 165, 281, 184, -144, 177, 230,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
241, 242, 243, 244, 245, 246, 282, 247, 249, 283,
185, 250, 251, 252, 253, 254, 255, 286, -141, 261,
257, 260, 296, 276, 261, 261, 215, 194, 280, 287,
195, 133, -141, -141, 122, -139, 196, 103, 258, -69,
272, -69, -141, -141, -141, -141, 197, -141, -141, 294,
198, 295, 199, 200, 201, 202, 134, 136, 270, 203,
204, 271, 138, 190, 141, 207, 224, 123, 208, -141,
0, 103, 209, 0, 210, 211, 212, 213, 214, 0,
278, 216, 0, 0, 0, 0, 0, 0, 0, 277,
0, 106, 107, 113, 114, 115, 116, 117, 0, 118,
119, 124, 128, 143, 144, 0, 145, 147, 148, 0,
179, 183, 186, 0, 224, 0, 0, 0, 0, 0,
0, 0, 288, 0, 0, 292, 0, 0, 0, 0,
0, 2, 3, 4, 297, 5, 6, 7, 8, 9,
10, 11, 0, 0, 12, 0, 0, 0, 13, 14,
0, 89, 15, 0, 0, 16, 17, 18, 0, 0,
0, 0, 0, 0, 0, 90, 0, 0, 0, 0,
0, 19, 20, 0, 0, 0, 0, 0, 21, 91,
0, 23, 0, 24, 0, 0, 0, 1, 92, 2,
3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
0, 0, 12, 0, 0, 0, 13, 14, 0, 0,
15, 0, 0, 16, 17, 18, 0, 0, -142, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
20, 0, -142, -142, 127, -148, 21, 22, -126, 23,
0, 24, -142, -142, -142, -142, 0, -142, -142, -148,
-148, 0, -145, 0, 0, 0, 0, 0, 0, -148,
-148, -148, -148, 0, -148, -148, -145, -145, 182, -142,
0, 103, 0, 0, 0, 0, -145, -145, -145, -145,
0, -145, -145, -128, 146, 0, -148, 0, 103, 0,
0, 0, 0, 0, 0, 0, 0, -128, -128, 0,
-130, 0, 0, -145, 0, 103, 0, -128, -128, -128,
-128, 0, -128, -128, -130, -130, 0, -131, 0, 0,
0, 0, 0, 0, -130, -130, -130, -130, 0, -130,
-130, -131, -131, 0, -128, -129, 103, 0, 0, 0,
0, -131, -131, -131, -131, 0, -131, -131, 0, -129,
-129, -130, -132, 103, 0, 0, 0, 0, 0, -129,
-129, -129, -129, 0, -129, -129, -132, -132, -131, -134,
103, 0, 0, 0, 0, 0, -132, -132, -132, -132,
0, -132, -132, -134, -134, 0, -129, -135, 103, 0,
0, 0, 0, -134, -134, -134, -134, 0, -134, -134,
0, -135, -135, -132, -136, 103, 0, 0, 0, 0,
0, -135, -135, -135, -135, 0, -135, -135, -136, -136,
-134, -138, 103, 0, 0, 0, 0, 0, -136, -136,
-136, -136, 0, -136, -136, -138, -138, 0, -135, -143,
103, 0, 0, 0, 0, -138, -138, -138, -138, 0,
-138, -138, 0, -143, -143, -136, -139, 103, 0, 0,
0, 0, 0, -143, -143, -143, -143, 0, -143, -143,
-139, -139, -138, -140, 103, 0, 0, 0, 0, 0,
-139, -139, -139, -139, 0, -139, -139, -140, -140, 0,
-143, -146, 103, 0, 0, 0, 0, -140, -140, -140,
-140, 0, -140, -140, 0, -146, -146, -139, -149, 103,
0, 0, 0, 0, 0, -146, -146, -146, -146, 0,
-146, -146, -149, -149, -140, -133, 103, 0, 0, 0,
0, 0, -149, -149, -149, -149, 0, -149, -149, -133,
-133, 0, -146, -147, 103, 0, 0, 0, 0, -133,
-133, -133, -133, 0, -133, -133, 0, -147, -147, -149,
0, 103, 0, 0, 0, 0, 0, -147, -147, -147,
-147, 0, -147, -147, 0, 0, -133, 0, 103, 0,
2, 3, 4, 0, 5, 6, 7, 8, 9, 10,
11, 0, 0, 12, -147, 0, 103, 13, 14, 0,
0, 15, 0, 0, 16, 17, 18, 0, 0, 0,
0, 0, 0, 0, 90, 0, 0, 0, 0, 0,
19, 20, 0, 0, 0, 0, 0, 21, 91, 0,
23, 0, 24, 2, 3, 4, 0, 5, 6, 7,
8, 9, 10, 11, 0, 0, 12, 0, 0, 0,
13, 14, 0, 0, 15, 0, 0, 16, 17, 18,
0, 0, 0, 0, 0, 0, 0, 223, 0, 0,
0, 0, 0, 19, 20, 0, 0, 0, 0, 0,
21, 22, 0, 23, 0, 24, 2, 3, 4, 0,
5, 6, 7, 8, 9, 10, 11, 0, 0, 12,
154, 155, 0, 13, 14, 0, 0, 15, 0, 156,
16, 17, 18, 0, 0, 158, 159, 160, 161, 162,
163, 164, 165, 0, 0, 0, 19, 20, 0, 0,
0, 0, 0, 21, 22, 0, 23, 0, 24, 2,
3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
0, 0, 12, 0, 0, 0, 13, 14, 0, 0,
15, 0, 0, 16, 17, 18, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
20, 0, 0, 0, 0, 0, 21, 91, 0, 23,
0, 24, 193, 3, 4, 0, 5, 6, 7, 8,
9, 10, 11, 0, 0, -137, 0, 0, 0, 0,
0, 0, 0, 15, 0, 0, 16, 17, 18, -137,
-137, 0, -144, 0, 0, 0, 0, 0, 0, -137,
-137, -137, -137, 0, -137, -137, -144, -144, 0, 21,
168, 0, 23, 0, 24, 0, -144, -144, -144, -144,
0, -144, -144, 0, 169, 170, -137, 0, 0, 0,
0, 0, 0, 0, 171, 172, 173, 174, 0, 175,
176, 0, 0, -144, 149, 150, 0, 151, 152, 153,
0, 0, 0, 0, 0, 154, 155, 0, 0, 0,
0, 177, 0, 0, 156, 0, 0, 0, 0, 157,
158, 159, 160, 161, 162, 163, 164, 165, 0, 0,
149, 150, -127, 151, 152, 153, 0, 0, 0, 0,
0, 154, 155, 0, 0, 0, 0, 0, 0, 0,
156, 0, 0, 0, 0, 157, 158, 159, 160, 161,
162, 163, 164, 165, 0, 0, 149, 150, 263, 151,
152, 153, 0, 0, 0, 220, 0, 154, 155, 0,
0, 0, 0, 0, 0, 0, 156, 0, 0, 0,
0, 157, 158, 159, 160, 161, 162, 163, 164, 165,
149, 150, 0, 151, 152, 153, 0, 0, 0, 284,
0, 154, 155, 0, 0, 0, 0, 0, 0, 0,
156, 0, 0, 0, 0, 157, 158, 159, 160, 161,
162, 163, 164, 165, 149, 150, 0, 151, 152, 153,
0, 0, 0, 0, 0, 154, 155, 0, 0, 0,
0, 0, 0, 0, 156, 0, 0, 0, 0, 157,
158, 159, 160, 161, 162, 163, 164, 165, 149, 0,
0, 151, 152, 153, 0, 0, 0, 0, 0, 154,
155, 0, 0, 0, 0, 0, 0, 0, 156, 0,
0, 0, 0, 157, 158, 159, 160, 161, 162, 163,
164, 165, 151, 152, 153, 0, 0, 0, 0, 0,
154, 155, 0, 0, 0, 0, 0, 0, 0, 156,
0, 0, 0, 0, 157, 158, 159, 160, 161, 162,
163, 164, 165
};
static const yytype_int16 yycheck[] =
{
0, 0, 23, 123, 263, 3, 226, 22, 3, 7,
22, 3, 12, 13, 14, 52, 22, 55, 22, 19,
20, 58, 3, 23, 55, 24, 146, 286, 3, 22,
28, 29, 29, 28, 29, 3, 28, 29, 22, 22,
55, 38, 0, 40, 3, 42, 43, 44, 55, 55,
29, 57, 50, 59, 274, 50, 37, 55, 50, 38,
55, 40, 37, 42, 43, 44, 59, 52, 54, 28,
29, 191, 55, 22, 57, 59, 59, 55, 75, 57,
80, 59, 52, 27, 28, 27, 30, 31, 32, 33,
34, 50, 36, 37, 91, 39, 75, 41, 52, 22,
54, 45, 46, 103, 48, 22, 50, 51, 34, 38,
22, 40, 91, 42, 43, 44, 21, 43, 44, 45,
46, 47, 52, 59, 29, 52, 56, 59, 72, 56,
74, 34, 76, 38, 34, 40, 52, 42, 43, 52,
56, 54, 45, 46, 47, 265, 75, 57, 57, 149,
150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 162, 163, 164, 165, 60, 166, 168, 52,
75, 171, 172, 173, 174, 175, 176, 52, 6, 52,
177, 180, 56, 56, 52, 52, 91, 91, 56, 56,
91, 43, 20, 21, 22, 57, 91, 59, 177, 57,
221, 59, 30, 31, 32, 33, 91, 35, 36, 52,
91, 54, 91, 91, 91, 91, 43, 43, 218, 91,
91, 220, 43, 84, 43, 91, 226, 55, 91, 57,
-1, 59, 91, -1, 91, 91, 91, 91, 91, -1,
261, 91, -1, -1, -1, -1, -1, -1, -1, 248,
-1, 195, 196, 197, 198, 199, 200, 201, -1, 203,
204, 205, 206, 207, 208, -1, 210, 211, 212, -1,
214, 215, 216, -1, 274, -1, -1, -1, -1, -1,
-1, -1, 282, -1, -1, 284, -1, -1, -1, -1,
-1, 3, 4, 5, 294, 7, 8, 9, 10, 11,
12, 13, -1, -1, 16, -1, -1, -1, 20, 21,
-1, 23, 24, -1, -1, 27, 28, 29, -1, -1,
-1, -1, -1, -1, -1, 37, -1, -1, -1, -1,
-1, 43, 44, -1, -1, -1, -1, -1, 50, 51,
-1, 53, -1, 55, -1, -1, -1, 1, 60, 3,
4, 5, -1, 7, 8, 9, 10, 11, 12, 13,
-1, -1, 16, -1, -1, -1, 20, 21, -1, -1,
24, -1, -1, 27, 28, 29, -1, -1, 6, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
44, -1, 20, 21, 22, 6, 50, 51, 52, 53,
-1, 55, 30, 31, 32, 33, -1, 35, 36, 20,
21, -1, 6, -1, -1, -1, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, 20, 21, 22, 57,
-1, 59, -1, -1, -1, -1, 30, 31, 32, 33,
-1, 35, 36, 6, 55, -1, 57, -1, 59, -1,
-1, -1, -1, -1, -1, -1, -1, 20, 21, -1,
6, -1, -1, 57, -1, 59, -1, 30, 31, 32,
33, -1, 35, 36, 20, 21, -1, 6, -1, -1,
-1, -1, -1, -1, 30, 31, 32, 33, -1, 35,
36, 20, 21, -1, 57, 6, 59, -1, -1, -1,
-1, 30, 31, 32, 33, -1, 35, 36, -1, 20,
21, 57, 6, 59, -1, -1, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, 20, 21, 57, 6,
59, -1, -1, -1, -1, -1, 30, 31, 32, 33,
-1, 35, 36, 20, 21, -1, 57, 6, 59, -1,
-1, -1, -1, 30, 31, 32, 33, -1, 35, 36,
-1, 20, 21, 57, 6, 59, -1, -1, -1, -1,
-1, 30, 31, 32, 33, -1, 35, 36, 20, 21,
57, 6, 59, -1, -1, -1, -1, -1, 30, 31,
32, 33, -1, 35, 36, 20, 21, -1, 57, 6,
59, -1, -1, -1, -1, 30, 31, 32, 33, -1,
35, 36, -1, 20, 21, 57, 6, 59, -1, -1,
-1, -1, -1, 30, 31, 32, 33, -1, 35, 36,
20, 21, 57, 6, 59, -1, -1, -1, -1, -1,
30, 31, 32, 33, -1, 35, 36, 20, 21, -1,
57, 6, 59, -1, -1, -1, -1, 30, 31, 32,
33, -1, 35, 36, -1, 20, 21, 57, 6, 59,
-1, -1, -1, -1, -1, 30, 31, 32, 33, -1,
35, 36, 20, 21, 57, 6, 59, -1, -1, -1,
-1, -1, 30, 31, 32, 33, -1, 35, 36, 20,
21, -1, 57, 6, 59, -1, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, -1, 20, 21, 57,
-1, 59, -1, -1, -1, -1, -1, 30, 31, 32,
33, -1, 35, 36, -1, -1, 57, -1, 59, -1,
3, 4, 5, -1, 7, 8, 9, 10, 11, 12,
13, -1, -1, 16, 57, -1, 59, 20, 21, -1,
-1, 24, -1, -1, 27, 28, 29, -1, -1, -1,
-1, -1, -1, -1, 37, -1, -1, -1, -1, -1,
43, 44, -1, -1, -1, -1, -1, 50, 51, -1,
53, -1, 55, 3, 4, 5, -1, 7, 8, 9,
10, 11, 12, 13, -1, -1, 16, -1, -1, -1,
20, 21, -1, -1, 24, -1, -1, 27, 28, 29,
-1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
-1, -1, -1, 43, 44, -1, -1, -1, -1, -1,
50, 51, -1, 53, -1, 55, 3, 4, 5, -1,
7, 8, 9, 10, 11, 12, 13, -1, -1, 16,
25, 26, -1, 20, 21, -1, -1, 24, -1, 34,
27, 28, 29, -1, -1, 40, 41, 42, 43, 44,
45, 46, 47, -1, -1, -1, 43, 44, -1, -1,
-1, -1, -1, 50, 51, -1, 53, -1, 55, 3,
4, 5, -1, 7, 8, 9, 10, 11, 12, 13,
-1, -1, 16, -1, -1, -1, 20, 21, -1, -1,
24, -1, -1, 27, 28, 29, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
44, -1, -1, -1, -1, -1, 50, 51, -1, 53,
-1, 55, 3, 4, 5, -1, 7, 8, 9, 10,
11, 12, 13, -1, -1, 6, -1, -1, -1, -1,
-1, -1, -1, 24, -1, -1, 27, 28, 29, 20,
21, -1, 6, -1, -1, -1, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, 20, 21, -1, 50,
6, -1, 53, -1, 55, -1, 30, 31, 32, 33,
-1, 35, 36, -1, 20, 21, 57, -1, -1, -1,
-1, -1, -1, -1, 30, 31, 32, 33, -1, 35,
36, -1, -1, 57, 14, 15, -1, 17, 18, 19,
-1, -1, -1, -1, -1, 25, 26, -1, -1, -1,
-1, 57, -1, -1, 34, -1, -1, -1, -1, 39,
40, 41, 42, 43, 44, 45, 46, 47, -1, -1,
14, 15, 52, 17, 18, 19, -1, -1, -1, -1,
-1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
34, -1, -1, -1, -1, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, -1, 14, 15, 52, 17,
18, 19, -1, -1, -1, 23, -1, 25, 26, -1,
-1, -1, -1, -1, -1, -1, 34, -1, -1, -1,
-1, 39, 40, 41, 42, 43, 44, 45, 46, 47,
14, 15, -1, 17, 18, 19, -1, -1, -1, 23,
-1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
34, -1, -1, -1, -1, 39, 40, 41, 42, 43,
44, 45, 46, 47, 14, 15, -1, 17, 18, 19,
-1, -1, -1, -1, -1, 25, 26, -1, -1, -1,
-1, -1, -1, -1, 34, -1, -1, -1, -1, 39,
40, 41, 42, 43, 44, 45, 46, 47, 14, -1,
-1, 17, 18, 19, -1, -1, -1, -1, -1, 25,
26, -1, -1, -1, -1, -1, -1, -1, 34, -1,
-1, -1, -1, 39, 40, 41, 42, 43, 44, 45,
46, 47, 17, 18, 19, -1, -1, -1, -1, -1,
25, 26, -1, -1, -1, -1, -1, -1, -1, 34,
-1, -1, -1, -1, 39, 40, 41, 42, 43, 44,
45, 46, 47
};
/* 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, 13, 16, 20, 21, 24, 27, 28, 29, 43,
44, 50, 51, 53, 55, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 75, 76, 77,
78, 79, 80, 81, 82, 84, 85, 86, 87, 88,
93, 95, 96, 97, 99, 101, 102, 103, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 122, 127, 128, 129, 130, 22, 55, 22,
55, 97, 97, 97, 22, 97, 97, 128, 3, 23,
37, 51, 60, 74, 90, 91, 92, 97, 102, 121,
97, 102, 0, 59, 119, 120, 119, 119, 3, 77,
79, 83, 128, 119, 119, 119, 119, 119, 119, 119,
83, 128, 22, 55, 119, 83, 128, 22, 119, 83,
128, 3, 7, 66, 76, 77, 78, 79, 80, 83,
128, 129, 83, 119, 119, 119, 55, 119, 119, 14,
15, 17, 18, 19, 25, 26, 34, 39, 40, 41,
42, 43, 44, 45, 46, 47, 52, 52, 6, 20,
21, 30, 31, 32, 33, 35, 36, 57, 104, 119,
52, 56, 22, 119, 83, 128, 119, 89, 92, 97,
81, 55, 54, 3, 63, 64, 65, 67, 68, 69,
70, 71, 72, 73, 75, 77, 79, 84, 85, 86,
87, 93, 95, 103, 122, 128, 130, 123, 52, 54,
23, 52, 54, 37, 97, 98, 52, 58, 89, 89,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 102, 100, 97,
97, 97, 97, 97, 97, 97, 3, 77, 79, 94,
102, 52, 56, 52, 89, 55, 3, 37, 125, 126,
97, 102, 92, 98, 59, 56, 56, 102, 92, 90,
56, 89, 60, 52, 23, 98, 52, 56, 97, 124,
3, 37, 102, 90, 52, 54, 56, 97
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 61, 62, 62, 62, 63, 63, 64, 65, 66,
67, 68, 69, 69, 70, 71, 72, 73, 73, 74,
74, 75, 76, 77, 77, 78, 79, 80, 81, 81,
82, 82, 82, 82, 82, 83, 83, 83, 84, 84,
84, 84, 84, 84, 84, 85, 85, 85, 85, 85,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 87,
87, 88, 89, 89, 90, 90, 91, 91, 91, 91,
91, 92, 92, 93, 94, 94, 94, 95, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 97, 97,
98, 98, 100, 99, 101, 101, 102, 102, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
104, 104, 105, 106, 106, 107, 107, 107, 108, 109,
110, 111, 112, 113, 114, 115, 115, 115, 115, 115,
115, 116, 116, 116, 116, 116, 116, 117, 117, 118,
118, 118, 118, 118, 118, 118, 118, 118, 119, 120,
120, 120, 121, 121, 123, 122, 124, 124, 125, 125,
125, 125, 126, 126, 127, 127, 128, 129, 130
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 1, 1, 1, 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, 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, 2, 2, 4,
4, 5, 1, 3, 1, 1, 2, 2, 2, 2,
2, 1, 1, 3, 1, 1, 1, 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, 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, 1, 2, 2, 2, 2, 2, 2, 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
};
#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
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (pMacro, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
/* Error token number */
#define YYTERROR 1
#define YYERRCODE 256
/* 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 (0)
/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
# 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 (0)
/*----------------------------------------.
| Print this symbol's value on YYOUTPUT. |
`----------------------------------------*/
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, PHB_MACRO pMacro)
{
FILE *yyo = yyoutput;
YYUSE (yyo);
YYUSE (pMacro);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
YYUSE (yytype);
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, PHB_MACRO pMacro)
{
YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", 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). |
`------------------------------------------------------------------*/
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
{
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, PHB_MACRO pMacro)
{
unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
yystos[yyssp[yyi + 1 - yynrhs]],
&(yyvsp[(yyi + 1) - (yynrhs)])
, pMacro);
YYFPRINTF (stderr, "\n");
}
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (yyssp, yyvsp, Rule, pMacro); \
} while (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. */
static YYSIZE_T
yystrlen (const char *yystr)
{
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. */
static char *
yystpcpy (char *yydest, const char *yysrc)
{
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 *YYMSG, which is of size *YYMSG_ALLOC, an error message
about the unexpected token YYTOKEN for the state stack whose top is
YYSSP.
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
not large enough to hold the message. In that case, also set
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
required number of bytes is too large to store. */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
"expected"). */
int yycount = 0;
/* There are many possibilities here to consider:
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in yychar) is if
this state is a consistent state with a default action. Thus,
detecting the absence of a lookahead is sufficient to determine
that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is a
consistent state with a default action. There might have been a
previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (yytoken != YYEMPTY)
{
int yyn = yypact[*yyssp];
yyarg[yycount++] = yytname[yytoken];
if (!yypact_value_is_default (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yyx;
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
break;
}
yyarg[yycount++] = yytname[yyx];
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
}
}
}
switch (yycount)
{
# define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
}
{
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
if (*yymsg_alloc < yysize)
{
*yymsg_alloc = 2 * yysize;
if (! (yysize <= *yymsg_alloc
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
return 1;
}
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
{
char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
yyp++;
yyformat++;
}
}
return 0;
}
#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, PHB_MACRO pMacro)
{
YYUSE (yyvaluep);
YYUSE (pMacro);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/*----------.
| yyparse. |
`----------*/
int
yyparse (PHB_MACRO pMacro)
{
/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
'yyss': related to states.
'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
yyssp = yyss = yyssa;
yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
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_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, 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));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = yylex (&yylval, pMacro);
}
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 (yytable_value_is_error (yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token. */
yychar = YYEMPTY;
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
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 257 "macro.y" /* yacc.c:1646 */
{
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[0].asExpr) );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_REFER )
hb_macroExprGenPush( hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ), HB_COMP_PARAM );
else if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_macroExprGenPush( (yyvsp[0].asExpr), HB_COMP_PARAM );
else
hb_macroExprGenPop( (yyvsp[0].asExpr), HB_COMP_PARAM );
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
}
#line 1864 "macroy.c" /* yacc.c:1646 */
break;
case 3:
#line 267 "macro.y" /* yacc.c:1646 */
{
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[0].asExpr) );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_macroExprGenPush( (yyvsp[0].asExpr), HB_COMP_PARAM );
else
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
}
#line 1877 "macroy.c" /* yacc.c:1646 */
break;
case 4:
#line 275 "macro.y" /* yacc.c:1646 */
{
HB_TRACE( HB_TR_DEBUG, ( "macro -> invalid syntax: %s", HB_MACRO_DATA->string ) );
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
HB_MACRO_ABORT;
}
#line 1887 "macroy.c" /* yacc.c:1646 */
break;
case 5:
#line 284 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewDouble( (yyvsp[0].valDouble).dNumber, (yyvsp[0].valDouble).bWidth, (yyvsp[0].valDouble).bDec, HB_COMP_PARAM ); }
#line 1893 "macroy.c" /* yacc.c:1646 */
break;
case 6:
#line 285 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[0].valLong).lNumber, HB_COMP_PARAM ); }
#line 1899 "macroy.c" /* yacc.c:1646 */
break;
case 7:
#line 288 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewDate( ( long ) (yyvsp[0].valLong).lNumber, HB_COMP_PARAM ); }
#line 1905 "macroy.c" /* yacc.c:1646 */
break;
case 8:
#line 291 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewTimeStamp( (yyvsp[0].valTimeStamp).date, (yyvsp[0].valTimeStamp).time, HB_COMP_PARAM ); }
#line 1911 "macroy.c" /* yacc.c:1646 */
break;
case 9:
#line 294 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[-1].valLong).lNumber, HB_COMP_PARAM ); }
#line 1917 "macroy.c" /* yacc.c:1646 */
break;
case 10:
#line 299 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewNil( HB_COMP_PARAM ); }
#line 1923 "macroy.c" /* yacc.c:1646 */
break;
case 11:
#line 304 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewString( (yyvsp[0].valChar).string, (yyvsp[0].valChar).length, HB_FALSE, HB_COMP_PARAM ); }
#line 1929 "macroy.c" /* yacc.c:1646 */
break;
case 12:
#line 309 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewLogical( HB_TRUE, HB_COMP_PARAM ); }
#line 1935 "macroy.c" /* yacc.c:1646 */
break;
case 13:
#line 310 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewLogical( HB_FALSE, HB_COMP_PARAM ); }
#line 1941 "macroy.c" /* yacc.c:1646 */
break;
case 14:
#line 315 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewSelf( HB_COMP_PARAM ); }
#line 1947 "macroy.c" /* yacc.c:1646 */
break;
case 15:
#line 320 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewArray( (yyvsp[-1].asExpr), HB_COMP_PARAM ); }
#line 1953 "macroy.c" /* yacc.c:1646 */
break;
case 16:
#line 325 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 1959 "macroy.c" /* yacc.c:1646 */
break;
case 17:
#line 330 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewHash( NULL, HB_COMP_PARAM ); }
#line 1965 "macroy.c" /* yacc.c:1646 */
break;
case 18:
#line 331 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewHash( (yyvsp[-1].asExpr), HB_COMP_PARAM ); }
#line 1971 "macroy.c" /* yacc.c:1646 */
break;
case 19:
#line 334 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr) ); }
#line 1977 "macroy.c" /* yacc.c:1646 */
break;
case 20:
#line 335 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprAddListExpr( (yyvsp[-4].asExpr), (yyvsp[-2].asExpr) ), (yyvsp[0].asExpr) ); }
#line 1983 "macroy.c" /* yacc.c:1646 */
break;
case 21:
#line 341 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[0].string), HB_COMP_PARAM ); }
#line 1989 "macroy.c" /* yacc.c:1646 */
break;
case 22:
#line 344 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAlias( (yyvsp[-1].string), HB_COMP_PARAM ); }
#line 1995 "macroy.c" /* yacc.c:1646 */
break;
case 23:
#line 349 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMacro( NULL, '&', (yyvsp[0].string), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
}
#line 2003 "macroy.c" /* yacc.c:1646 */
break;
case 24:
#line 352 "macro.y" /* yacc.c:1646 */
{ HB_BOOL fNewString;
char * szVarName = hb_macroTextSymbol( (yyvsp[0].string), strlen( (yyvsp[0].string) ), &fNewString );
if( szVarName )
{
if( fNewString )
hb_macroIdentNew( HB_COMP_PARAM, 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[0].string) ) );
YYABORT;
}
}
#line 2025 "macroy.c" /* yacc.c:1646 */
break;
case 25:
#line 371 "macro.y" /* yacc.c:1646 */
{ hb_compExprMacroAsAlias( (yyvsp[-1].asExpr) ); }
#line 2031 "macroy.c" /* yacc.c:1646 */
break;
case 26:
#line 376 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMacro( (yyvsp[0].asExpr), 0, NULL, HB_COMP_PARAM ); }
#line 2037 "macroy.c" /* yacc.c:1646 */
break;
case 28:
#line 386 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAlias( "FIELD", HB_COMP_PARAM ); }
#line 2043 "macroy.c" /* yacc.c:1646 */
break;
case 29:
#line 387 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2049 "macroy.c" /* yacc.c:1646 */
break;
case 30:
#line 392 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2055 "macroy.c" /* yacc.c:1646 */
break;
case 31:
#line 393 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2061 "macroy.c" /* yacc.c:1646 */
break;
case 32:
#line 394 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2067 "macroy.c" /* yacc.c:1646 */
break;
case 33:
#line 395 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2073 "macroy.c" /* yacc.c:1646 */
break;
case 34:
#line 396 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2079 "macroy.c" /* yacc.c:1646 */
break;
case 35:
#line 399 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[0].string), HB_COMP_PARAM ); }
#line 2085 "macroy.c" /* yacc.c:1646 */
break;
case 38:
#line 404 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2091 "macroy.c" /* yacc.c:1646 */
break;
case 39:
#line 405 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2097 "macroy.c" /* yacc.c:1646 */
break;
case 40:
#line 406 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2103 "macroy.c" /* yacc.c:1646 */
break;
case 41:
#line 407 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2109 "macroy.c" /* yacc.c:1646 */
break;
case 42:
#line 408 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2115 "macroy.c" /* yacc.c:1646 */
break;
case 43:
#line 409 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2121 "macroy.c" /* yacc.c:1646 */
break;
case 44:
#line 410 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2127 "macroy.c" /* yacc.c:1646 */
break;
case 45:
#line 419 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2133 "macroy.c" /* yacc.c:1646 */
break;
case 46:
#line 420 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2139 "macroy.c" /* yacc.c:1646 */
break;
case 47:
#line 421 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2145 "macroy.c" /* yacc.c:1646 */
break;
case 48:
#line 422 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2151 "macroy.c" /* yacc.c:1646 */
break;
case 49:
#line 423 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[-1].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2157 "macroy.c" /* yacc.c:1646 */
break;
case 50:
#line 428 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2163 "macroy.c" /* yacc.c:1646 */
break;
case 51:
#line 429 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2169 "macroy.c" /* yacc.c:1646 */
break;
case 52:
#line 430 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2175 "macroy.c" /* yacc.c:1646 */
break;
case 53:
#line 431 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2181 "macroy.c" /* yacc.c:1646 */
break;
case 54:
#line 432 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2187 "macroy.c" /* yacc.c:1646 */
break;
case 55:
#line 433 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2193 "macroy.c" /* yacc.c:1646 */
break;
case 56:
#line 434 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2199 "macroy.c" /* yacc.c:1646 */
break;
case 57:
#line 435 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2205 "macroy.c" /* yacc.c:1646 */
break;
case 58:
#line 436 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2211 "macroy.c" /* yacc.c:1646 */
break;
case 59:
#line 437 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2217 "macroy.c" /* yacc.c:1646 */
break;
case 60:
#line 438 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2223 "macroy.c" /* yacc.c:1646 */
break;
case 61:
#line 439 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2229 "macroy.c" /* yacc.c:1646 */
break;
case 62:
#line 440 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2235 "macroy.c" /* yacc.c:1646 */
break;
case 63:
#line 441 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2241 "macroy.c" /* yacc.c:1646 */
break;
case 64:
#line 442 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2247 "macroy.c" /* yacc.c:1646 */
break;
case 65:
#line 443 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2253 "macroy.c" /* yacc.c:1646 */
break;
case 66:
#line 444 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2259 "macroy.c" /* yacc.c:1646 */
break;
case 67:
#line 445 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2265 "macroy.c" /* yacc.c:1646 */
break;
case 68:
#line 446 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2271 "macroy.c" /* yacc.c:1646 */
break;
case 69:
#line 451 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_macroExprNewFunCall( hb_compExprNewFunName( (yyvsp[-3].string), HB_COMP_PARAM ), (yyvsp[-1].asExpr), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
}
#line 2279 "macroy.c" /* yacc.c:1646 */
break;
case 70:
#line 454 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_macroExprNewFunCall( (yyvsp[-3].asExpr), (yyvsp[-1].asExpr), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
}
#line 2287 "macroy.c" /* yacc.c:1646 */
break;
case 71:
#line 459 "macro.y" /* yacc.c:1646 */
{ if( hb_compExprParamListLen( (yyvsp[-1].asExpr) ) != 0 )
{
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
YYABORT;
}
else
(yyval.asExpr) = hb_compExprNewFunRef( (yyvsp[-3].string), HB_COMP_PARAM );
}
#line 2300 "macroy.c" /* yacc.c:1646 */
break;
case 72:
#line 469 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2306 "macroy.c" /* yacc.c:1646 */
break;
case 73:
#line 470 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); }
#line 2312 "macroy.c" /* yacc.c:1646 */
break;
case 76:
#line 477 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[0].string), HB_COMP_PARAM ); }
#line 2318 "macroy.c" /* yacc.c:1646 */
break;
case 77:
#line 478 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2324 "macroy.c" /* yacc.c:1646 */
break;
case 78:
#line 479 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2330 "macroy.c" /* yacc.c:1646 */
break;
case 79:
#line 480 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2336 "macroy.c" /* yacc.c:1646 */
break;
case 80:
#line 481 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); (yyval.asExpr)->value.asList.reference = HB_TRUE; }
#line 2342 "macroy.c" /* yacc.c:1646 */
break;
case 81:
#line 484 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); }
#line 2348 "macroy.c" /* yacc.c:1646 */
break;
case 83:
#line 490 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMethodObject( (yyvsp[0].asExpr), (yyvsp[-2].asExpr) ); }
#line 2354 "macroy.c" /* yacc.c:1646 */
break;
case 84:
#line 493 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewSend( (yyvsp[0].string), HB_COMP_PARAM ); }
#line 2360 "macroy.c" /* yacc.c:1646 */
break;
case 85:
#line 494 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMacroSend( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2366 "macroy.c" /* yacc.c:1646 */
break;
case 86:
#line 495 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMacroSend( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2372 "macroy.c" /* yacc.c:1646 */
break;
case 87:
#line 500 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewMethodCall( (yyvsp[-3].asExpr), (yyvsp[-1].asExpr) ); }
#line 2378 "macroy.c" /* yacc.c:1646 */
break;
case 110:
#line 526 "macro.y" /* yacc.c:1646 */
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[0].asExpr), HB_SM_HARBOUR ); }
#line 2384 "macroy.c" /* yacc.c:1646 */
break;
case 111:
#line 527 "macro.y" /* yacc.c:1646 */
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[0].asExpr), HB_SM_HARBOUR ); }
#line 2390 "macroy.c" /* yacc.c:1646 */
break;
case 112:
#line 528 "macro.y" /* yacc.c:1646 */
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[0].asExpr), HB_SM_HARBOUR ); }
#line 2396 "macroy.c" /* yacc.c:1646 */
break;
case 118:
#line 536 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); }
#line 2402 "macroy.c" /* yacc.c:1646 */
break;
case 119:
#line 537 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); }
#line 2408 "macroy.c" /* yacc.c:1646 */
break;
case 120:
#line 540 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); }
#line 2414 "macroy.c" /* yacc.c:1646 */
break;
case 122:
#line 544 "macro.y" /* yacc.c:1646 */
{
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;
}
}
#line 2427 "macroy.c" /* yacc.c:1646 */
break;
case 123:
#line 552 "macro.y" /* yacc.c:1646 */
{
HB_MACRO_DATA->uiListElements = 1;
(yyval.asExpr) = hb_compExprAddListExpr( ( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PARE ) ? hb_compExprNewList( (yyvsp[-3].asExpr), HB_COMP_PARAM ) : hb_compExprNewArgList( (yyvsp[-3].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr) );
}
#line 2436 "macroy.c" /* yacc.c:1646 */
break;
case 125:
#line 559 "macro.y" /* yacc.c:1646 */
{ HB_MACRO_DATA->uiListElements++;
(yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); }
#line 2443 "macroy.c" /* yacc.c:1646 */
break;
case 126:
#line 563 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewEmpty( HB_COMP_PARAM ); }
#line 2449 "macroy.c" /* yacc.c:1646 */
break;
case 148:
#line 587 "macro.y" /* yacc.c:1646 */
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[0].asExpr), HB_SM_HARBOUR ); }
#line 2455 "macroy.c" /* yacc.c:1646 */
break;
case 150:
#line 594 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewPostInc( (yyvsp[-1].asExpr), HB_COMP_PARAM ); }
#line 2461 "macroy.c" /* yacc.c:1646 */
break;
case 151:
#line 595 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewPostDec( (yyvsp[-1].asExpr), HB_COMP_PARAM ); }
#line 2467 "macroy.c" /* yacc.c:1646 */
break;
case 152:
#line 601 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2473 "macroy.c" /* yacc.c:1646 */
break;
case 153:
#line 604 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewPreInc( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2479 "macroy.c" /* yacc.c:1646 */
break;
case 154:
#line 605 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewPreDec( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2485 "macroy.c" /* yacc.c:1646 */
break;
case 155:
#line 608 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewNot( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2491 "macroy.c" /* yacc.c:1646 */
break;
case 156:
#line 609 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewNegate( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2497 "macroy.c" /* yacc.c:1646 */
break;
case 157:
#line 610 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2503 "macroy.c" /* yacc.c:1646 */
break;
case 158:
#line 613 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2509 "macroy.c" /* yacc.c:1646 */
break;
case 159:
#line 616 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2515 "macroy.c" /* yacc.c:1646 */
break;
case 160:
#line 619 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2521 "macroy.c" /* yacc.c:1646 */
break;
case 161:
#line 622 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2527 "macroy.c" /* yacc.c:1646 */
break;
case 162:
#line 625 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2533 "macroy.c" /* yacc.c:1646 */
break;
case 163:
#line 628 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2539 "macroy.c" /* yacc.c:1646 */
break;
case 164:
#line 631 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2545 "macroy.c" /* yacc.c:1646 */
break;
case 171:
#line 642 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlus( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2551 "macroy.c" /* yacc.c:1646 */
break;
case 172:
#line 643 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinus( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2557 "macroy.c" /* yacc.c:1646 */
break;
case 173:
#line 644 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMult( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2563 "macroy.c" /* yacc.c:1646 */
break;
case 174:
#line 645 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDiv( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2569 "macroy.c" /* yacc.c:1646 */
break;
case 175:
#line 646 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMod( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2575 "macroy.c" /* yacc.c:1646 */
break;
case 176:
#line 647 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPower( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2581 "macroy.c" /* yacc.c:1646 */
break;
case 177:
#line 650 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewAnd( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2587 "macroy.c" /* yacc.c:1646 */
break;
case 178:
#line 651 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewOr( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2593 "macroy.c" /* yacc.c:1646 */
break;
case 179:
#line 654 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEQ( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2599 "macroy.c" /* yacc.c:1646 */
break;
case 180:
#line 655 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLT( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2605 "macroy.c" /* yacc.c:1646 */
break;
case 181:
#line 656 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGT( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2611 "macroy.c" /* yacc.c:1646 */
break;
case 182:
#line 657 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2617 "macroy.c" /* yacc.c:1646 */
break;
case 183:
#line 658 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2623 "macroy.c" /* yacc.c:1646 */
break;
case 184:
#line 659 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2629 "macroy.c" /* yacc.c:1646 */
break;
case 185:
#line 660 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2635 "macroy.c" /* yacc.c:1646 */
break;
case 186:
#line 661 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewIN( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2641 "macroy.c" /* yacc.c:1646 */
break;
case 187:
#line 662 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEqual( (yyvsp[-2].asExpr), HB_COMP_PARAM ), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2647 "macroy.c" /* yacc.c:1646 */
break;
case 189:
#line 671 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2653 "macroy.c" /* yacc.c:1646 */
break;
case 190:
#line 672 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[-2].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2659 "macroy.c" /* yacc.c:1646 */
break;
case 191:
#line 673 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[-3].asExpr), (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2665 "macroy.c" /* yacc.c:1646 */
break;
case 192:
#line 676 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2671 "macroy.c" /* yacc.c:1646 */
break;
case 193:
#line 677 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); }
#line 2677 "macroy.c" /* yacc.c:1646 */
break;
case 194:
#line 681 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewCodeBlock( NULL, 0, 0, HB_COMP_PARAM ); }
#line 2683 "macroy.c" /* yacc.c:1646 */
break;
case 195:
#line 683 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[-4].asExpr); }
#line 2689 "macroy.c" /* yacc.c:1646 */
break;
case 196:
#line 688 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (1)].asExpr), (yyvsp[0].asExpr) ); }
#line 2695 "macroy.c" /* yacc.c:1646 */
break;
case 197:
#line 689 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (3)].asExpr), (yyvsp[0].asExpr) ); }
#line 2701 "macroy.c" /* yacc.c:1646 */
break;
case 198:
#line 694 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = NULL; }
#line 2707 "macroy.c" /* yacc.c:1646 */
break;
case 199:
#line 695 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = NULL; (yyvsp[-1].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; }
#line 2713 "macroy.c" /* yacc.c:1646 */
break;
case 200:
#line 696 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[0].asExpr); }
#line 2719 "macroy.c" /* yacc.c:1646 */
break;
case 201:
#line 697 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = (yyvsp[-2].asExpr); (yyvsp[-3].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; }
#line 2725 "macroy.c" /* yacc.c:1646 */
break;
case 202:
#line 700 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[-1].asExpr), (yyvsp[0].string), ' ', HB_COMP_PARAM ); }
#line 2731 "macroy.c" /* yacc.c:1646 */
break;
case 203:
#line 701 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[-3].asExpr), (yyvsp[0].string), ' ', HB_COMP_PARAM ); HB_MACRO_CHECK( (yyval.asExpr) ); }
#line 2737 "macroy.c" /* yacc.c:1646 */
break;
case 204:
#line 704 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[0].asExpr), HB_COMP_PARAM ); }
#line 2743 "macroy.c" /* yacc.c:1646 */
break;
case 205:
#line 705 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[-2].asExpr), (yyvsp[0].asExpr) ); }
#line 2749 "macroy.c" /* yacc.c:1646 */
break;
case 208:
#line 716 "macro.y" /* yacc.c:1646 */
{ (yyval.asExpr) = hb_compExprNewIIF( hb_compExprAddListExpr( hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[-5].asExpr), HB_COMP_PARAM ), (yyvsp[-3].asExpr) ), (yyvsp[-1].asExpr) ) ); }
#line 2755 "macroy.c" /* yacc.c:1646 */
break;
#line 2759 "macroy.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
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:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (pMacro, YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{
char const *yymsgp = YY_("syntax error");
int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (!yymsg)
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
yysyntax_error_status = 2;
}
else
{
yysyntax_error_status = YYSYNTAX_ERROR;
yymsgp = yymsg;
}
}
yyerror (pMacro, yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
}
# undef YYSYNTAX_ERROR
#endif
}
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, pMacro);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead 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 whose 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 (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, pMacro);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
/* 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;
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (pMacro, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, pMacro);
}
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, pMacro);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
return yyresult;
}
#line 719 "macro.y" /* yacc.c:1906 */
/*
** ------------------------------------------------------------------------ **
*/
void yyerror( PHB_MACRO pMacro, const char * s )
{
HB_SYMBOL_UNUSED( pMacro );
HB_SYMBOL_UNUSED( s );
}
/* ************************************************************************* */
#define HB_MEXPR_PREALLOC 8
typedef struct HB_MEXPR_
{
int count;
HB_EXPR Expressions[ HB_MEXPR_PREALLOC ];
struct HB_MEXPR_ *pPrev;
}
HB_MEXPR, * PHB_MEXPR;
typedef struct HB_MIDENT_
{
char * Identifier;
struct HB_MIDENT_ * pPrev;
}
HB_MIDENT, * PHB_MIDENT;
/* Allocates memory for Expression holder structure and stores it
* on the linked list
*/
static PHB_EXPR hb_macroExprAlloc( HB_COMP_DECL )
{
PHB_MEXPR pMExpr = ( PHB_MEXPR ) HB_MACRO_DATA->pExprLst;
if( ! pMExpr || pMExpr->count >= HB_MEXPR_PREALLOC )
{
pMExpr = ( PHB_MEXPR ) hb_xgrab( sizeof( HB_MEXPR ) );
pMExpr->pPrev = ( PHB_MEXPR ) HB_MACRO_DATA->pExprLst;
pMExpr->count = 0;
HB_MACRO_DATA->pExprLst = ( void * ) pMExpr;
}
return &pMExpr->Expressions[ pMExpr->count++ ];
}
char * hb_macroIdentNew( HB_COMP_DECL, char * szIdent )
{
PHB_MIDENT pMIdent = ( PHB_MIDENT ) hb_xgrab( sizeof( HB_MIDENT ) );
pMIdent->Identifier = szIdent;
pMIdent->pPrev = ( PHB_MIDENT ) HB_MACRO_DATA->pIdentLst;
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent;
return szIdent;
}
static PHB_EXPR hb_macroExprNew( HB_COMP_DECL, HB_EXPRTYPE iType )
{
PHB_EXPR pExpr;
HB_TRACE( HB_TR_DEBUG, ( "hb_macroExprNew(%p,%i)", ( void * ) HB_COMP_PARAM, iType ) );
pExpr = hb_macroExprAlloc( HB_COMP_PARAM );
pExpr->ExprType = iType;
pExpr->pNext = NULL;
pExpr->ValType = HB_EV_UNKNOWN;
return pExpr;
}
/* Delete self - all components will be deleted somewhere else
*/
static void hb_macroExprClear( HB_COMP_DECL, PHB_EXPR pExpr )
{
HB_SYMBOL_UNUSED( HB_COMP_PARAM );
pExpr->ExprType = HB_ET_NONE;
}
/* Delete all components and delete self
*/
static void hb_macroExprFree( HB_COMP_DECL, PHB_EXPR pExpr )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_macroExprFree()" ) );
HB_EXPR_USE( pExpr, HB_EA_DELETE );
pExpr->ExprType = HB_ET_NONE;
}
/* Deallocate all memory used by expression optimizer */
static void hb_macroLstFree( PHB_MACRO pMacro )
{
if( pMacro->pExprLst )
{
PHB_MEXPR pMExpr = ( PHB_MEXPR ) pMacro->pExprLst;
do
{
while( pMExpr->count )
hb_macroExprFree( pMacro, &pMExpr->Expressions[ --pMExpr->count ] );
pMExpr = pMExpr->pPrev;
}
while( pMExpr );
do
{
pMExpr = ( PHB_MEXPR ) pMacro->pExprLst;
pMacro->pExprLst = ( void * ) pMExpr->pPrev;
hb_xfree( pMExpr );
}
while( pMacro->pExprLst );
}
while( pMacro->pIdentLst )
{
PHB_MIDENT pMIdent = ( PHB_MIDENT ) HB_MACRO_DATA->pIdentLst;
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent->pPrev;
hb_xfree( pMIdent->Identifier );
hb_xfree( pMIdent );
}
}
static PHB_EXPR hb_macroErrorType( HB_COMP_DECL, PHB_EXPR pExpr )
{
hb_macroError( EG_ARG, HB_COMP_PARAM );
return pExpr;
}
static PHB_EXPR hb_macroErrorSyntax( HB_COMP_DECL, PHB_EXPR 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_macroErrorType,
hb_macroErrorSyntax,
hb_macroErrorDuplVar,
};
int hb_macroYYParse( PHB_MACRO 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 */
HB_BOOL hb_macroLexNew( PHB_MACRO pMacro )
{
pMacro->pLex = ( void * ) hb_pp_lexNew( pMacro->string, pMacro->length );
return pMacro->pLex != NULL;
}
void hb_macroLexDelete( PHB_MACRO pMacro )
{
if( pMacro->pLex )
{
hb_pp_free( ( PHB_PP_STATE ) pMacro->pLex );
pMacro->pLex = NULL;
}
}
int hb_macro_yylex( YYSTYPE * yylval_ptr, PHB_MACRO 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 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS &&
( hb_strnicmp( "_FIELD", pToken->value, pToken->len ) == 0 ||
hb_strnicmp( "FIELD", pToken->value, pToken->len ) == 0 ) )
{
return FIELD;
}
else if( pToken->len == 3 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB &&
hb_stricmp( "IIF", pToken->value ) == 0 )
{
return IIF;
}
else if( pToken->len == 2 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB &&
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_MAXINT 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 = ( HB_UCHAR ) iDec;
yylval_ptr->valDouble.bWidth = ( HB_UCHAR ) iWidth;
return NUM_DOUBLE;
}
else
{
yylval_ptr->valLong.lNumber = lNumber;
yylval_ptr->valLong.bWidth = ( HB_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_TIMESTAMP:
if( ! hb_timeStampStrGetDT( pToken->value,
&yylval_ptr->valTimeStamp.date,
&yylval_ptr->valTimeStamp.time ) )
{
hb_macroError( EG_SYNTAX, pMacro );
}
return TIMESTAMP;
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 */