* harbour/include/hbcomp.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/ppcomp.c
* harbour/source/macro/Makefile
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* harbour/source/vm/macro.c
* harbour/source/vm/memvars.c
* harbour/source/vm/memvclip.c
* keep prefix definition for bison public symbols in *.y files instead
of passing them as bison arguments to avoid possible mistakes during
*.yy[hc] file generation
! fixed iif() reduction when used as single function parameter
+ add -kM compiler switch - turn off macrotext substitution
* updated <string> + <string> optimization and other macrotext usage
to keep more Clipper compatible behavior
! fixed typo in expression type checking in IIF() reduction - it was
working because wrongly used macros has the same values as the valid
ones
- removed compiler switches and macros for old HB_INLINE() syntax - it
was not supported after last months modifications. Only:
HB_INLINE([params,...]) { C code }
is supported.
! fixed passing parameters by reference in IIF() statement and macro
compiler. The following valid Clipper code:
&("myfunc(<exp>, @var1, @var2)")
was not supported
! do not allow to use references or empty expressions in expression list
AFAIK it's Clipper compatible. If I'm wrong then please fix me but
Clipper allows to use references only as function arguments, 2-nd and
3-rd IIF() argument and as directly created array items ( {...@var...} )
DO ... WITH ... is a special case of function call.
! Changed grammar rules to accept only Clipper compatible parameters.
! fixed typo in macro name in hb_memvarNewParameter() function.
* use HB_FUNC_EXEC(...) instead of HB_FUNCNAME(...)()
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,
|
|
LITERAL = 265,
|
|
TRUEVALUE = 266,
|
|
FALSEVALUE = 267,
|
|
AND = 268,
|
|
OR = 269,
|
|
NOT = 270,
|
|
EQ = 271,
|
|
NE1 = 272,
|
|
NE2 = 273,
|
|
INC = 274,
|
|
DEC = 275,
|
|
ALIASOP = 276,
|
|
SELF = 277,
|
|
LE = 278,
|
|
GE = 279,
|
|
FIELD = 280,
|
|
MACROVAR = 281,
|
|
MACROTEXT = 282,
|
|
PLUSEQ = 283,
|
|
MINUSEQ = 284,
|
|
MULTEQ = 285,
|
|
DIVEQ = 286,
|
|
POWER = 287,
|
|
EXPEQ = 288,
|
|
MODEQ = 289,
|
|
EPSILON = 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 LITERAL 265
|
|
#define TRUEVALUE 266
|
|
#define FALSEVALUE 267
|
|
#define AND 268
|
|
#define OR 269
|
|
#define NOT 270
|
|
#define EQ 271
|
|
#define NE1 272
|
|
#define NE2 273
|
|
#define INC 274
|
|
#define DEC 275
|
|
#define ALIASOP 276
|
|
#define SELF 277
|
|
#define LE 278
|
|
#define GE 279
|
|
#define FIELD 280
|
|
#define MACROVAR 281
|
|
#define MACROTEXT 282
|
|
#define PLUSEQ 283
|
|
#define MINUSEQ 284
|
|
#define MULTEQ 285
|
|
#define DIVEQ 286
|
|
#define POWER 287
|
|
#define EXPEQ 288
|
|
#define MODEQ 289
|
|
#define EPSILON 290
|
|
#define POST 291
|
|
#define UNARY 292
|
|
#define PRE 293
|
|
|
|
|
|
|
|
|
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
typedef union YYSTYPE
|
|
#line 121 "macro.y"
|
|
{
|
|
char * string; /* to hold a string returned by lex */
|
|
int iNumber; /* to hold a temporary integer number */
|
|
HB_LONG lNumber; /* to hold a temporary long number */
|
|
void * pVoid; /* to hold any memory structure we may need */
|
|
HB_EXPR_PTR asExpr;
|
|
struct
|
|
{
|
|
char * string;
|
|
int length;
|
|
} valChar;
|
|
struct
|
|
{
|
|
int iNumber; /* to hold a number returned by lex */
|
|
} valInteger;
|
|
struct
|
|
{
|
|
HB_LONG lNumber; /* to hold a long number returned by lex */
|
|
UCHAR bWidth; /* to hold the width of the value */
|
|
} valLong;
|
|
struct
|
|
{
|
|
double dNumber; /* to hold a double number returned by lex */
|
|
UCHAR bWidth; /* to hold the width of the value */
|
|
UCHAR bDec; /* to hold the number of decimal points in the value */
|
|
} valDouble;
|
|
}
|
|
/* Line 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
|
|
|
|
|
|
|