2000-11-30 18:25 UTC+0800 Ron Pinkas <ron@profit-master.com>

* 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. */
This commit is contained in:
Ron Pinkas
2000-12-01 02:25:20 +00:00
parent fb76d31cbc
commit 0c2228a024
6 changed files with 23 additions and 10 deletions

View File

@@ -1,3 +1,19 @@
2000-11-30 18:25 UTC+0800 Ron Pinkas <ron@profit-master.com>
* 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 <dholm@jsd-llc.com>
* include/hbver.h
% Bumped revision code to j and set date to 2000-11-30 for

View File

@@ -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 );

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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