2000-06-22 03:30 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>

* include/hbclass.ch
     ! Uncommented  #xtranslate that was not pre-processing correctly, before recent fixes to ppcore.c and now works correctly.

   * source/compiler/harbour.c
     ! Fixed hb_compLinePush() to generate correct Run-Time Line Numbers.

   * source/pp/ppcomp.c
     - Removed one // comment.

   * source/pp/ppcore.c
     * Increased MAX_EXP to 2048 as requested by Brian Hays.
This commit is contained in:
Ron Pinkas
2000-06-22 10:38:30 +00:00
parent 35075a112c
commit baf6469d63
5 changed files with 67 additions and 12 deletions

View File

@@ -1,3 +1,16 @@
2000-06-22 03:30 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* include/hbclass.ch
! Uncommented #xtranslate that was not pre-processing correctly, before recent fixes to ppcore.c and now works correctly.
* source/compiler/harbour.c
! Fixed hb_compLinePush() to generate correct Run-Time Line Numbers.
* source/pp/ppcomp.c
- Removed one // comment.
* source/pp/ppcore.c
* Increased MAX_EXP to 2048 as requested by Brian Hays.
2000-06-21 21:35 UTC-0800 Ron Pinkas <Ron@Profit-Master.com>
* source/pp/ppcore.c
! getExpReal() Fixed silly typo introduced this morning in previous fix, that broke the PP.

View File

@@ -99,8 +99,7 @@
#xtranslate := <name>{ [<p,...>] } => := <name>():New( <p> )
#xtranslate = <name>{ [<p,...>] } => = <name>():New( <p> )
// This rule is generating preprocess matching errors.
// #xtranslate , <name>{ [<p,...>] } => , <name>():New( <p> )
#xtranslate , <name>{ [<p,...>] } => , <name>():New( <p> )
#xtranslate EXPORTED: => nScope := HB_OO_CLSTP_EXPORTED
#xtranslate VISIBLE: => nScope := HB_OO_CLSTP_EXPORTED

View File

@@ -89,7 +89,7 @@ PCOMCLASS hb_comp_pLastClass;
char * hb_comp_szFromClass;
PCOMDECLARED hb_comp_pLastMethod;
int hb_comp_iLine; /* currently processed line number */
int hb_comp_iLine; /* currently processed line number (globaly) */
PFUNCTION hb_comp_pInitFunc;
PHB_FNAME hb_comp_pFileName = NULL;
@@ -1933,17 +1933,57 @@ void hb_compLinePush( void ) /* generates the pcode with the currently compiled
{
if( hb_comp_bLineNumbers && ! hb_comp_bDontGenLineNum )
{
if( ( ( hb_comp_functions.pLast->lPCodePos - hb_comp_ulLastLinePos ) > 3 ) || hb_comp_bDebugInfo )
int iLine = hb_comp_iLine;
if( hb_comp_files.iFiles == 1 )
{
hb_comp_ulLastLinePos = hb_comp_functions.pLast->lPCodePos;
hb_compGenPCode3( HB_P_LINE, HB_LOBYTE( hb_comp_iLine ), HB_HIBYTE( hb_comp_iLine ), ( BOOL ) 0 );
iLine = hb_comp_files.pLast->iLine ;
}
else
{
hb_comp_functions.pLast->pCode[ hb_comp_ulLastLinePos +1 ] = HB_LOBYTE( hb_comp_iLine );
hb_comp_functions.pLast->pCode[ hb_comp_ulLastLinePos +2 ] = HB_HIBYTE( hb_comp_iLine );
PFILE tmpFile = hb_comp_files.pLast;
while( tmpFile->pPrev )
{
tmpFile = tmpFile->pPrev;
}
if( tmpFile )
{
iLine = tmpFile->iLine;
}
}
if( yytext[0] == '\n' )
{
if( hb_pp_nEmptyStrings )
{
iLine -= ( hb_pp_nEmptyStrings + 2 );
}
else
{
iLine--;
}
}
else
{
iLine--;
}
#if 0
printf( "\nLine: %i Empty: %i >%s<\n", iLine, hb_pp_nEmptyStrings, yytext );
#endif
if( ( ( hb_comp_functions.pLast->lPCodePos - hb_comp_ulLastLinePos ) > 3 ) || hb_comp_bDebugInfo )
{
hb_comp_ulLastLinePos = hb_comp_functions.pLast->lPCodePos;
hb_compGenPCode3( HB_P_LINE, HB_LOBYTE( iLine ), HB_HIBYTE( iLine ), ( BOOL ) 0 );
}
else
{
hb_comp_functions.pLast->pCode[ hb_comp_ulLastLinePos +1 ] = HB_LOBYTE( iLine );
hb_comp_functions.pLast->pCode[ hb_comp_ulLastLinePos +2 ] = HB_HIBYTE( iLine );
}
}
if( hb_comp_functions.pLast->bFlags & FUN_BREAK_CODE )
{
/* previous line contained RETURN/BREAK/LOOP/EXIT statement */
@@ -3769,9 +3809,9 @@ int hb_compAutoOpen( char * szPrg, BOOL * pbSkipGen )
{
int i = hb_comp_iExitLevel ;
BOOL b = hb_comp_bAnyWarning;
yyparse();
hb_comp_iExitLevel = ( i > hb_comp_iExitLevel ? i : hb_comp_iExitLevel );
hb_comp_bAnyWarning = ( b ? b : hb_comp_bAnyWarning );
}

View File

@@ -229,7 +229,10 @@ int hb_pp_Internal( FILE * handl_o, char * sOut )
*( sOut + lens ) = '\0';
hb_comp_files.pLast->iLine += hb_pp_nEmptyStrings;
//hb_pp_nEmptyStrings = 0;
#if 0
printf( "Line: %i >%s<\n", hb_comp_files.pLast->iLine, sOut );
#endif
if( handl_o )
hb_pp_WrStr( handl_o, sOut );

View File

@@ -133,7 +133,7 @@ static BOOL s_bTracePragma = FALSE;
#define ISNAME( c ) ( isalnum( ( int ) c ) || ( c ) == '_' || ( c ) > 0x7E )
#define MAX_NAME 255
#define MAX_EXP 1024
#define MAX_EXP 2048
#define PATTERN_SIZE 2048
#define STATE_INIT 0