2000-07-29 07:40 UTC+0800 Ron Pinkas <ron@profit-master.com>

* source/compiler/harbour.slx
    + Added 2 rules to support DECLARE MACROVAR and DECLARE MACRO TEXT

  * tests/testdecl.prg
    ! Fixed to allow it to be run without RT Error
This commit is contained in:
Ron Pinkas
2000-07-29 14:54:10 +00:00
parent 2493328906
commit 8ba6374685
3 changed files with 16 additions and 7 deletions

View File

@@ -1,8 +1,15 @@
2000-07-29 07:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
+ Added 2 rules to support DECLARE MACROVAR and DECLARE MACRO TEXT
* tests/testdecl.prg
! Fixed to allow it to be run without RT Error
2000-07-29 15:55 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*source/compiler/harbour.l
* fixed to properly support 'DECLARE var' statement
*tests/Makefile
*tests/testdecl.prg
* added testdecl.prg to Makefile
@@ -12,7 +19,7 @@
*include/hbcomp.h
* removed declaration of hb_comp_iCompiled and hb_comp_EOL
*source/compiler/harbour.c
*source/compiler/harbour.l
*source/compiler/harbour.y

View File

@@ -297,10 +297,10 @@ LANGUAGE_WORDS_ARE {
#define _CASE_WITH 3005
#define _WHL_ID_CR 3006
#define _WHL_ID_SEMI 3007
#define _INC_CR 3007
#define _INC_SEMI 3008
#define _DEC_CR 3008
#define _DEC_SEMI 3009
#define _INC_CR 3008
#define _INC_SEMI 3009
#define _DEC_CR 3010
#define _DEC_SEMI 3011
LANGUAGE_RULES_ARE {
IF_SEQUENCE_IS( '^' , 0 , 0 , 0 ) REDUCE_TO( POWER , 0 ),
@@ -408,6 +408,8 @@ LANGUAGE_RULES_ARE {
IF_SEQUENCE_IS( DECLARE , IDENTIFIER , '(' , 0 ) PASS_THROUGH(),
IF_SEQUENCE_IS( DECLARE , IDENTIFIER , HB_ID_ON_HOLD, 0 ) PASS_THROUGH(),
IF_SEQUENCE_IS( DECLARE , IDENTIFIER , 0 , 0 ) REDUCE_TO( PRIVATE , IDENTIFIER ),
IF_SEQUENCE_IS( DECLARE , MACROVAR , 0 , 0 ) REDUCE_TO( PRIVATE , MACROVAR ),
IF_SEQUENCE_IS( DECLARE , MACROTEXT , 0 , 0 ) REDUCE_TO( PRIVATE , MACROTEXT ),
IF_SEQUENCE_IS( DECLARE , 0 , 0 , 0 ) REDUCE_TO( HB_DECLARE_ID , 0 ),
IF_SEQUENCE_IS( PUBLIC , TO , 0 , 0 ) REDUCE_TO( HB_PUBLIC_ID , TO ),

View File

@@ -17,7 +17,7 @@ Function Main()
DECLARE Var1
DECLARE Var2 := 2
DECLARE aVar[2]
DECLARE Var3, Var4, aVar5[1]
DECLARE Var3 := 'Var9', Var4, aVar5[1]
DECLARE Var6, Var7:=7, aVar8[8]
DECLARE &var3
DECLARE &Var3.