diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5456e644f4..23e4306be3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,14 @@ +2000-10-22 09:05 UTC+0800 Ron Pinkas + * source/compiler/simplex.c + ! Corrrected bug reported by Luiz regarding menuto.prg + + * source/compiler/harbour.slx + ! Corrected 1 debug trace message. + + * contrib/dot/pp.prg + ! Corrected "Unbalanced '{'" warning reported by John. + ! Corrected 2 typos in variable names reported by John. + 2000-10-21 23:02 GMT+2 Maurilio Longo * source/vm/hvm.c + Added an exception handler to be able to print a full harbour level stack trace upon diff --git a/harbour/contrib/dot/pp.prg b/harbour/contrib/dot/pp.prg index 7a9ac05475..593697bc43 100644 --- a/harbour/contrib/dot/pp.prg +++ b/harbour/contrib/dot/pp.prg @@ -1193,7 +1193,7 @@ FUNCTION MatchRule( sKey, sLine, aRules, aResults, bStatement, bUpper ) nOptional := aMP[2] sPreStoppers := sWorkLine - sPrimaryStoper := NextToken( @sWorkLine, .F. ) + sPrimaryStopper := NextToken( @sWorkLine, .F. ) IF sPrimaryStopper == NIL @@ -1318,9 +1318,9 @@ FUNCTION MatchRule( sKey, sLine, aRules, aResults, bStatement, bUpper ) IF bDbgMatch IF sAnchor == NIL - ? nMatch, 'of', nMatches, "NO Anchore!", nMarkerId, nOptional, aMP[2], sMultiStoppers + ? nMatch, 'of', nMatches, "NO Anchore!", nMarkerId, nOptional, aMP[2], sMultiStopper ELSE - ? nMatch, 'of', nMatches, "Searching for Anchore: '" + sAnchor + "'", nMarkerId, nOptional, aMP[2], sMultiStoppers + ? nMatch, 'of', nMatches, "Searching for Anchore: '" + sAnchor + "'", nMarkerId, nOptional, aMP[2], sMultiStopper ENDIF WAIT ENDIF @@ -1897,7 +1897,7 @@ FUNCTION NextToken( sLine, bCheckRules ) FOR Counter := 1 TO nLen cChar := SubStr( sLine, Counter, 1 ) - IF cChar $ "+-*/:=^!&()[]{}@," + IF cChar $ "+-*/:=^!&()[]{}@,|" sReturn := Left( sLine, Counter - 1 ) EXIT @@ -2115,7 +2115,7 @@ FUNCTION NextExp( sLine, cType, aWords, aExp, sNextAnchor ) ELSE sTemp := NextExp( @sLine, ',', NIL, NIL, sNextAnchor ) // Content IF sTemp == NIL - Alert( "ERROR! Unbalanced '{|'" ) + Alert( "ERROR! Unbalanced '{|...'" ) ELSE sExp += sTemp ENDIF @@ -2124,7 +2124,7 @@ FUNCTION NextExp( sLine, cType, aWords, aExp, sNextAnchor ) sLine := SubStr( sLine, 2 ) sExp += ExtractLeadingWS( @sLine ) ELSE - Alert( "ERROR! Unbalanced '{|'" ) + Alert( "ERROR! Unbalanced '{|...|'" ) ENDIF ENDIF diff --git a/harbour/source/compiler/harbour.slx b/harbour/source/compiler/harbour.slx index a85db24dd4..eaf20c6f12 100644 --- a/harbour/source/compiler/harbour.slx +++ b/harbour/source/compiler/harbour.slx @@ -397,7 +397,7 @@ LANGUAGE_RULES_ARE { IF_SEQUENCE_IS( '&' , '"' , 0 , 0 ) REDUCE_TO( HB_MACRO_ERR , 0 ), IF_SEQUENCE_IS( '&' , '[' , 0 , 0 ) REDUCE_TO( HB_MACRO_ERR , 0 ), - IF_SEQUENCE_IS( _QOUT_LIT , 0 , 0 , 0 ) REDUCE_TO( HB_RET_QOUT_LIT , 0 ) + IF_SEQUENCE_IS( _QOUT_LIT , 0 , 0 , 0 ) REDUCE_TO( HB_RET_QOUT_LIT , 0 ) }; /* ------------------------------------------------- End of Language Definitions. ------------------------------------------------ */ @@ -706,7 +706,7 @@ static int hb_comp_SLX_ElementToken( char* szToken, unsigned int iTokenLen ) iRet += DONT_REDUCE; } - DEBUG_INFO( printf( "Element \"%s\" is %i\n", sToken, iRet ) ); + DEBUG_INFO( printf( "Element \"%s\" is %i\n", szToken, iRet ) ); return iRet; } diff --git a/harbour/source/compiler/simplex.c b/harbour/source/compiler/simplex.c index d5d82eeff5..4e9d90975c 100644 --- a/harbour/source/compiler/simplex.c +++ b/harbour/source/compiler/simplex.c @@ -1017,6 +1017,13 @@ int Reduce( int iToken ) { DEBUG_INFO( printf( "Processing Tentative: %i\n", iTentative ) ); + while( iMatched > 1 && aiRules[i][iMatched - 1] && aiRules[iTentative][iMatched - 1] == 0 ) + { + DEBUG_INFO( printf( "Reclaimed Token: %i\n", aiRules[i][iMatched - 1] ) ); + aiHold[iHold++] = aiRules[i][iMatched - 1]; + iMatched--; + } + if( aiRules[iTentative][MAX_MATCH] ) { DEBUG_INFO( printf( "Reducing Rule: %i Found %i Tokens\n", iTentative, iMatched ) );