diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9034c9e299..a7d57f90ad 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,19 @@ +2000-11-30 18:25 UTC+0800 Ron Pinkas + * include/hbmacro.h + * source/macro/macro.y + * source/vm/macro.c + ! Renamed hb_compParse() to hb_macroYYParse(). We already have hb_macroParse() and hcompparse() + + * source/compiler/harbour.y + * Added token GET (not used) just so that harboury.h is compatible with harbour.sly + + * source/rtl/tgetint.prg + * Reverted to use _1 and == NIL to not break Clipper compatibility. + + /* Ryszard, if you want to re-introduce PCount() and HB_PVALUE(), I'll ask (since I wrote this original code) + that you protect it with #ifdef FLEX etc. If you do I would suggest you further protect it with #ifdef STRICT... + becuase this will defintly break strict compatability. */ + 2000-11-30 15:30 UTC-0500 David G. Holm * include/hbver.h % Bumped revision code to j and set date to 2000-11-30 for diff --git a/harbour/include/hbmacro.h b/harbour/include/hbmacro.h index d675143b35..082f9a0fa0 100644 --- a/harbour/include/hbmacro.h +++ b/harbour/include/hbmacro.h @@ -86,7 +86,7 @@ extern "C" { /* Global functions */ extern void hb_macroError( int iError, HB_BISON_PTR pMacro ); -extern int hb_compParse( HB_MACRO_PTR pMacro ); +extern int hb_macroYYParse( HB_MACRO_PTR pMacro ); extern void hb_compGenPCode1( BYTE byte, HB_BISON_PTR pMacro ); extern void hb_compGenPCode2( BYTE byte1, BYTE byte2, HB_BISON_PTR pMacro ); diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 2de2e2a5f7..c5962ef786 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -160,7 +160,7 @@ static void hb_compDebugStart( void ) { }; %token MACROVAR MACROTEXT %token AS_ARRAY AS_BLOCK AS_CHARACTER AS_CLASS AS_DATE AS_LOGICAL AS_NUMERIC AS_OBJECT AS_VARIANT DECLARE OPTIONAL DECLARE_CLASS DECLARE_MEMBER %token AS_ARRAY_ARRAY AS_BLOCK_ARRAY AS_CHARACTER_ARRAY AS_CLASS_ARRAY AS_DATE_ARRAY AS_LOGICAL_ARRAY AS_NUMERIC_ARRAY AS_OBJECT_ARRAY -%token PROCREQ +%token PROCREQ GET /*the lowest precedence*/ /*postincrement and postdecrement*/ @@ -245,6 +245,7 @@ Source : Crlf | Statement | Line | ProcReq + | GET {/* Dummy - We need to use the GET token which is used by harbour.sly so both will generate same harboury.h */} | error Crlf { yyclearin; } | Source Crlf | Source VarDefs diff --git a/harbour/source/macro/macro.y b/harbour/source/macro/macro.y index be6f7a733a..ebbdf8d681 100644 --- a/harbour/source/macro/macro.y +++ b/harbour/source/macro/macro.y @@ -735,7 +735,7 @@ IfInline : IIF '(' Expression ',' EmptyExpression ',' ** ------------------------------------------------------------------------ ** */ -int hb_compParse( HB_MACRO_PTR pMacro ) +int hb_macroYYParse( HB_MACRO_PTR pMacro ) { int iResult; void * lexBuffer; diff --git a/harbour/source/rtl/tgetint.prg b/harbour/source/rtl/tgetint.prg index bae9130a84..98dfea51fc 100644 --- a/harbour/source/rtl/tgetint.prg +++ b/harbour/source/rtl/tgetint.prg @@ -50,15 +50,11 @@ FUNCTION __GET( bSetGet, cVarName, cPicture, bValid, bWhen ) LOCAL oGet IF( bSetGet == NIL ) - //Alert( "No Block for: " + cVarName ) - IF __ISMV( cVarName ) - bSetGet := {|_1| IIF( PCOUNT()==0, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) } + bSetGet := {|_1| IIF( _1 == NIL, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) } ELSE - //Alert( "Not MemVar: " + cVarName ) - /* "{|_1| IIF( _1 == NIL, &cVarName, &cVarName := _1 )" */ - bSetGet := &( "{|| IIF( PCOUNT()==0, " + cVarName + ", " + cVarName + " := HB_PVALUE(1) ) }" ) + bSetGet := &( "{|_1| IIF( _1 == NIL, " + cVarName + ", " + cVarName + " := _1 ) ) }" ) ENDIF ENDIF diff --git a/harbour/source/vm/macro.c b/harbour/source/vm/macro.c index 53d126cccd..c29554675e 100644 --- a/harbour/source/vm/macro.c +++ b/harbour/source/vm/macro.c @@ -82,7 +82,7 @@ static int hb_macroParse( HB_MACRO_PTR pMacro, char * szString ) */ pMacro->exprType = HB_ET_NONE; - return hb_compParse( pMacro ); + return hb_macroYYParse( pMacro ); } /* releases all memory allocated for macro evaluation