* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* harbour/source/macro/macrolex.c
* added support for extended string (e"...") to macro compiler and
strings with embedded ASCII NUL character (chr(0))
* harbour/source/rtl/valtostr.c
* added HB_STRTOEXP() function which converts string item to valid
expression which can be compiled by macro compiler. String may
contain any characters.
* harbour/source/rtl/persist.prg
* use HB_STRTOEXP() for sting conversion and 0d....... for date
constants
* harbour/source/rtl/readvar.prg
* harbour/source/rtl/xsavescr.c
* minor cleanup
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 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
|
|
|
|
|
|
|