diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5a64bebc31..b3ad41d8a6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +2001-06-20 22:10 UTC-0800 Ron Pinkas + * hb_slex.vc + * makefile.vc + * Synched make files. + + * contrib/libmisc/makefile.vc + ! Corrected BIN_DIR to ../../bin/vc + + * source/compiler/simplex.c + * Revised 1 debug message. + * source/compiler/harbour.slx + * Improved yytext handling. + + * source/compiler/harbour.sly + * source/compiler/harbour.y + + Added after to enable reporting of errors on consecutive lines. (only first line was reported!) + 2001-06-20 14:50 UTC-0400 David G. Holm * include/hbvm.h diff --git a/harbour/contrib/libmisc/makefile.vc b/harbour/contrib/libmisc/makefile.vc index aa590aff2f..a3ecf9ab46 100644 --- a/harbour/contrib/libmisc/makefile.vc +++ b/harbour/contrib/libmisc/makefile.vc @@ -52,7 +52,7 @@ MK_FLAGS = $(MAKEFLAGS: =) OBJ_DIR = ..\..\obj\vc LIB_DIR = ..\..\lib\vc -BIN_DIR = ..\..\bin +BIN_DIR = ..\..\bin\vc # # Directory macros. These should never have to change. diff --git a/harbour/hb_slex.vc b/harbour/hb_slex.vc index 3e086613e8..8a53f96bca 100644 --- a/harbour/hb_slex.vc +++ b/harbour/hb_slex.vc @@ -548,6 +548,7 @@ COMMON_LIB_OBJS = \ {$(VM_DIR)}.asm{$(OBJ_DIR)}.obj: rem lib /extract:$(OBJ_DIR)\symbols.obj /out:$(OBJ_DIR)\symbols.obj \harb35\lib\vm.lib + rem $(AS) $< $@ nul nul $(AS) /c /Fo$@ $< {$(VM_DIR)}.c{$(OBJ_DIR)}.obj: diff --git a/harbour/makefile.vc b/harbour/makefile.vc index 40f51aeddc..eb3396685e 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -83,7 +83,7 @@ HBPDF_DIR = contrib\pdflib # C compiler definition and C flags. These should never have to change. # -AS = masm +AS = ML CFLAGS = -I$(INCLUDE_DIR) -TP -W3 -nologo $(C_USR) $(CFLAGS) CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS) CLIBFLAGSDEBUG = -Zi $(CLIBFLAGS) @@ -548,7 +548,8 @@ COMMON_LIB_OBJS = \ {$(VM_DIR)}.asm{$(OBJ_DIR)}.obj: rem lib /extract:$(OBJ_DIR)\symbols.obj /out:$(OBJ_DIR)\symbols.obj \harb35\lib\vm.lib - $(AS) $< $@ nul nul + rem $(AS) $< $@ nul nul + $(AS) /c /Fo$@ $< {$(VM_DIR)}.c{$(OBJ_DIR)}.obj: $(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $< diff --git a/harbour/source/compiler/harbour.slx b/harbour/source/compiler/harbour.slx index 73e791ad59..a27ce2e68e 100644 --- a/harbour/source/compiler/harbour.slx +++ b/harbour/source/compiler/harbour.slx @@ -508,16 +508,16 @@ LANGUAGE_RULES_ARE { int hb_comp_SLX_InterceptAction( int iRet, char *sToken ) { extern char *yytext; + extern int yyleng; if( iRet < 256 ) { yytext[0] = iRet; yytext[1] = '\0'; + yyleng = 1; } else if( iRet < 512 ) { - yytext = sToken; - if( iRet == IDENTIFIER ) { if( iIdentifier > 0 ) @@ -525,10 +525,16 @@ int hb_comp_SLX_InterceptAction( int iRet, char *sToken ) iIdentifier--; } } + else if( yylval.string == NULL ) + { + yytext = sToken; + yyleng = strlen( yytext ); + } } else { yytext = sToken; + yyleng = strlen( yytext ); if( iRet == WANTS_EXP ) { iRet = iWantsEXP; } diff --git a/harbour/source/compiler/harbour.sly b/harbour/source/compiler/harbour.sly index 16bbcd6c98..cae29e1c29 100644 --- a/harbour/source/compiler/harbour.sly +++ b/harbour/source/compiler/harbour.sly @@ -258,7 +258,7 @@ Source : Crlf | Statement | Line | ProcReq - | error Crlf { yyclearin; } + | error Crlf { yyclearin; yyerrok; } | Source Crlf | Source VarDefs | Source FieldsDef @@ -268,7 +268,7 @@ Source : Crlf | Source Statement | Source Line | Source ProcReq - | Source error Crlf { yyclearin; } + | Source error Crlf { yyclearin; yyerrok; } ; Line : LINE NUM_INTEGER LITERAL Crlf diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index a26cdc2f5e..95f14171b9 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -246,7 +246,7 @@ Source : Crlf | 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; } + | error Crlf { yyclearin; yyerrok; } | Source Crlf | Source VarDefs | Source FieldsDef @@ -256,7 +256,7 @@ Source : Crlf | Source Statement | Source Line | Source ProcReq - | Source error Crlf { yyclearin; } + | Source error Crlf { yyclearin; yyerrok; } ; Line : LINE NUM_INTEGER LITERAL Crlf diff --git a/harbour/source/compiler/simplex.c b/harbour/source/compiler/simplex.c index b72829cfcd..0d10eaff35 100644 --- a/harbour/source/compiler/simplex.c +++ b/harbour/source/compiler/simplex.c @@ -217,7 +217,7 @@ static int iRet; static BOOL bTmp, bIgnoreWords = FALSE, bRecursive = FALSE; /* Lex emulation */ -char * yytext; +char * yytext = (char *) sToken; int yyleng; /* NewLine Support. */ @@ -479,8 +479,10 @@ static int rulecmp( const void * pLeft, const void * pRight ); \ if( iRet ) \ { \ - INTERCEPT_ACTION(iRet); \ DEBUG_INFO( printf( "Returning: %i\n", iRet ) ); \ + \ + INTERCEPT_ACTION(iRet); \ + \ return iRet; \ } \ else \ @@ -789,7 +791,7 @@ int SimpLex_GetNextToken( void ) NEW_LINE_ACTION(); } - DEBUG_INFO( printf( "Reducing Delimiter: '%c' As: %i\n", chr, iRet ) ); + DEBUG_INFO( printf( "Reducing Delimiter: '%c' As: %i\n", chr, acReturn[(int)chr] ) ); return acReturn[(int)chr]; } }