From e7f150194c6d56f7ff626d1a521514f89ded6bbd Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Thu, 6 Jun 2002 03:54:13 +0000 Subject: [PATCH] 2002-06-05 20:52 UTC-0800 Ron Pinkas * make_b32.bat - Commented SET BISON_SIMPLE line as it causes incompatibility with current version of Bison. * source/compiler/harbour.sly * source/macro/macro.y + Added missing ; as per Bison 1.35 warnings. --- harbour/ChangeLog | 9 +++++++++ harbour/make_b32.bat | 2 +- harbour/source/compiler/harbour.sly | 21 +++++++++++++++------ harbour/source/macro/macro.y | 5 +++-- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3d13c13f4e..fb7eecedfb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,15 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + +2002-06-05 20:52 UTC-0800 Ron Pinkas + * make_b32.bat + - Commented SET BISON_SIMPLE line as it causes incompatibility with current version of Bison. + + * source/compiler/harbour.sly + * source/macro/macro.y + + Added missing ; as per Bison 1.35 warnings. + 2002-06-05 18:00 UTC-0400 David G. Holm * source/rtl/gtwin/gtwin.c ! Fixed Esc key translation problem that only occurred in some diff --git a/harbour/make_b32.bat b/harbour/make_b32.bat index de0396dc42..b1ef5106cc 100644 --- a/harbour/make_b32.bat +++ b/harbour/make_b32.bat @@ -16,7 +16,7 @@ if "%1" == "CLEAN" goto CLEAN :BUILD - SET BISON_SIMPLE=source\compiler\harbour.simple + REM SET BISON_SIMPLE=source\compiler\harbour.simple make -fmakefile.bc %1 %2 %3 > make_b32.log if errorlevel 1 goto BUILD_ERR diff --git a/harbour/source/compiler/harbour.sly b/harbour/source/compiler/harbour.sly index 28acb2e9e6..661049e5c9 100644 --- a/harbour/source/compiler/harbour.sly +++ b/harbour/source/compiler/harbour.sly @@ -55,6 +55,14 @@ extern void yy_delete_buffer( void * ); /* yacc functions to manage multiple fil #endif /* lex & yacc related prototypes */ +#if !defined(__GNUC__) && !defined(__IBMCPP__) + #if 0 + /* This makes BCC 551 fail with Bison 1.30, even with the + supplied harbour.simple file, which makes Bison 1.30 blow. + [vszakats] */ + void __yy_memcpy ( char*, const char*, unsigned int ); /* to satisfy Borland compiler */ + #endif +#endif extern int yyparse( void ); /* main yacc parsing function */ extern void yyerror( char * ); /* parsing error management function */ extern int yylex( void ); /* main lex token function, called by yyparse() */ @@ -472,8 +480,9 @@ LiteralValue : LITERAL { $$ = hb_compExprNewString( $1 ); pBaseArrayName = hb_compExprNewString( pCopy ); } bTrancuateBaseArray = FALSE; -; } + } } + ; LiteralAlias : LiteralValue ALIASOP { $$ = $1; } ; @@ -1321,14 +1330,14 @@ ExtVarDef : VarDef } | MacroVar DimList { - USHORT uCount = hb_compExprListLen( $2 ); + USHORT uCount = (USHORT) hb_compExprListLen( $2 ); hb_compExprDelete( hb_compExprGenPush( $2 ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, $1 ), TRUE ); } | MacroVar DimList AsArray { - USHORT uCount = hb_compExprListLen( $2 ); + USHORT uCount = (USHORT) hb_compExprListLen( $2 ); hb_compExprDelete( hb_compExprGenPush( $2 ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, $1 ), TRUE ); @@ -2255,7 +2264,7 @@ static void hb_compVariableDim( char * szName, HB_EXPR_PTR pInitValue ) { if( hb_comp_iVarScope == VS_PUBLIC || hb_comp_iVarScope == VS_PRIVATE ) { - USHORT uCount = hb_compExprListLen( pInitValue ); + USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); hb_compVariableAdd( szName, 'A' ); hb_compExprDelete( hb_compExprGenPush( pInitValue ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); @@ -2263,7 +2272,7 @@ static void hb_compVariableDim( char * szName, HB_EXPR_PTR pInitValue ) } else if( hb_comp_iVarScope == VS_STATIC ) { - USHORT uCount = hb_compExprListLen( pInitValue ); + USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); HB_EXPR_PTR pVar = hb_compExprNewVar( szName ); HB_EXPR_PTR pAssign; @@ -2283,7 +2292,7 @@ static void hb_compVariableDim( char * szName, HB_EXPR_PTR pInitValue ) } else { - USHORT uCount = hb_compExprListLen( pInitValue ); + USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); hb_compVariableAdd( szName, 'A' ); hb_compExprDelete( hb_compExprGenPush( pInitValue ) ); diff --git a/harbour/source/macro/macro.y b/harbour/source/macro/macro.y index 89aed61795..08dcd3ba49 100644 --- a/harbour/source/macro/macro.y +++ b/harbour/source/macro/macro.y @@ -80,7 +80,7 @@ #if !defined(__GNUC__) && !defined(__IBMCPP__) #if 0 - /* This makes BCC 551 fail with Bison 1.30, even with the + /* This makes BCC 551 fail with Bison 1.30, even with the supplied harbour.simple file, which makes Bison 1.30 blow. [vszakats] */ void __yy_memcpy ( char*, const char*, unsigned int ); /* to satisfy Borland compiler */ @@ -488,7 +488,7 @@ Expression : SimpleExpression { $$ = $1; HB_MACRO_CHECK( $$ ); } | PareExpList { $$ = $1; HB_MACRO_CHECK( $$ ); } ; -RootParamList : EmptyExpression ',' { +RootParamList : EmptyExpression ',' { if( !(HB_MACRO_DATA->Flags & HB_MACRO_GEN_LIST) ) { HB_TRACE(HB_TR_DEBUG, ("macro -> invalid expression: %s", HB_MACRO_DATA->string)); @@ -501,6 +501,7 @@ RootParamList : EmptyExpression ',' { HB_MACRO_DATA->iListElements = 1; $$ = hb_compExprAddListExpr( ( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PARE ) ? hb_compExprNewList( $1 ) : hb_compExprNewArgList( $1 ), $4 ); } + ; AsParamList : RootParamList { $$ = $1; } | AsParamList ',' EmptyExpression { HB_MACRO_DATA->iListElements++; $$ = hb_compExprAddListExpr( $1, $3 ); }