* harbour/include/hbapi.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbdefs.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/common/hbstr.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/rtl/console.c
* harbour/source/rtl/isprint.c
* harbour/source/rtl/left.c
* harbour/source/rtl/right.c
* harbour/source/rtl/strtran.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* general PCODE cleanup and address most of TODO/TOFIX notes in
source code:
! fixed GPF traps when too long string or codeblock is generatd
+ added support for 16MB codeblocks and strings
! removed macrocompiler limitation for jumps range
! fixed GPF when more then 255 local variables is used and added
support for 2^15 locals
! removed all strtok() functions
% added optimization for all +=, -=, *=, %=, ^=, **= operations
when left side of expression is variable or array item
% added optimization for all +=, -=, *=, %=, ^=, **= operations
when left side of expression is object method and updated ++, --
for new code. It's still disabled until we will not add support
for late evaluated reference items to HVM
! fixed a[++i]++ and similar operations (a[++i]*=2, ...). Now ++i is
executed only once. It's not Clipper compatible but it was in
TODO note in source code. It can be disabled by -kc option
* finished support to xHarbour like #pragma TEXTHIDDEN(1)
! fixed local add int optimization when PARAMETERS used after
optimization changed local variable number over 255
! fixed GPF trap when in HB_P_<op>EQ PCODEs when executed for
direct values
* others
! fixed problems reported by Chen
* optimized strtran(), left(), right() to not create new string copy
when the same value is returned
161 lines
4.2 KiB
Plaintext
161 lines
4.2 KiB
Plaintext
/* A Bison parser, made by GNU Bison 2.3. */
|
|
|
|
/* Skeleton interface for Bison's Yacc-like parsers in C
|
|
|
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
|
Free Software Foundation, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Boston, MA 02110-1301, USA. */
|
|
|
|
/* As a special exception, you may create a larger work that contains
|
|
part or all of the Bison parser skeleton and distribute that work
|
|
under terms of your choice, so long as that work isn't itself a
|
|
parser generator using the skeleton or a modified version thereof
|
|
as a parser skeleton. Alternatively, if you modify or redistribute
|
|
the parser skeleton itself, you may (at your option) remove this
|
|
special exception, which will cause the skeleton and the resulting
|
|
Bison output files to be licensed under the GNU General Public
|
|
License without this special exception.
|
|
|
|
This special exception was added by the Free Software Foundation in
|
|
version 2.2 of Bison. */
|
|
|
|
/* Tokens. */
|
|
#ifndef YYTOKENTYPE
|
|
# define YYTOKENTYPE
|
|
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
know about them. */
|
|
enum yytokentype {
|
|
IDENTIFIER = 258,
|
|
NIL = 259,
|
|
NUM_DOUBLE = 260,
|
|
INASSIGN = 261,
|
|
NUM_LONG = 262,
|
|
NUM_DATE = 263,
|
|
IIF = 264,
|
|
IF = 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,
|
|
SELF = 278,
|
|
LE = 279,
|
|
GE = 280,
|
|
FIELD = 281,
|
|
MACROVAR = 282,
|
|
MACROTEXT = 283,
|
|
PLUSEQ = 284,
|
|
MINUSEQ = 285,
|
|
MULTEQ = 286,
|
|
DIVEQ = 287,
|
|
POWER = 288,
|
|
EXPEQ = 289,
|
|
MODEQ = 290,
|
|
POST = 291,
|
|
UNARY = 292,
|
|
PRE = 293
|
|
};
|
|
#endif
|
|
/* Tokens. */
|
|
#define IDENTIFIER 258
|
|
#define NIL 259
|
|
#define NUM_DOUBLE 260
|
|
#define INASSIGN 261
|
|
#define NUM_LONG 262
|
|
#define NUM_DATE 263
|
|
#define IIF 264
|
|
#define IF 265
|
|
#define LITERAL 266
|
|
#define TRUEVALUE 267
|
|
#define FALSEVALUE 268
|
|
#define AND 269
|
|
#define OR 270
|
|
#define NOT 271
|
|
#define EQ 272
|
|
#define NE1 273
|
|
#define NE2 274
|
|
#define INC 275
|
|
#define DEC 276
|
|
#define ALIASOP 277
|
|
#define SELF 278
|
|
#define LE 279
|
|
#define GE 280
|
|
#define FIELD 281
|
|
#define MACROVAR 282
|
|
#define MACROTEXT 283
|
|
#define PLUSEQ 284
|
|
#define MINUSEQ 285
|
|
#define MULTEQ 286
|
|
#define DIVEQ 287
|
|
#define POWER 288
|
|
#define EXPEQ 289
|
|
#define MODEQ 290
|
|
#define POST 291
|
|
#define UNARY 292
|
|
#define PRE 293
|
|
|
|
|
|
|
|
|
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
typedef union YYSTYPE
|
|
#line 120 "macro.y"
|
|
{
|
|
char * string; /* to hold a string returned by lex */
|
|
int iNumber; /* to hold a temporary integer number */
|
|
HB_LONG lNumber; /* to hold a temporary long number */
|
|
void * pVoid; /* to hold any memory structure we may need */
|
|
HB_EXPR_PTR asExpr;
|
|
struct
|
|
{
|
|
char * string;
|
|
int length;
|
|
} valChar;
|
|
struct
|
|
{
|
|
int iNumber; /* to hold a number returned by lex */
|
|
} valInteger;
|
|
struct
|
|
{
|
|
HB_LONG lNumber; /* to hold a long number returned by lex */
|
|
UCHAR bWidth; /* to hold the width of the value */
|
|
} valLong;
|
|
struct
|
|
{
|
|
double dNumber; /* to hold a double number returned by lex */
|
|
UCHAR bWidth; /* to hold the width of the value */
|
|
UCHAR bDec; /* to hold the number of decimal points in the value */
|
|
} valDouble;
|
|
}
|
|
/* Line 1529 of yacc.c. */
|
|
#line 153 "macroy.h"
|
|
YYSTYPE;
|
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
# define YYSTYPE_IS_DECLARED 1
|
|
# define YYSTYPE_IS_TRIVIAL 1
|
|
#endif
|
|
|
|
|
|
|