diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 99526ddff4..726153a687 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000502-16:22 GMT+1 Ryszard Glab + + *source/compiler/harbour.l + * fixed syntax: + RETURN ++variable + 20000502-16:07 GMT+1 Ryszard Glab *source/compiler/hbpcode.c diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 90b34dd9d0..c51181fb58 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -1107,13 +1107,29 @@ Separator {SpaceTab} return IDENTIFIER; } } -{Separator}*("+="|"-="|"->"|"++"|"--") { /* operators */ +{Separator}*("+="|"-="|"->") { /* operators */ if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; hb_comp_iState =IDENTIFIER; unput( yytext[ yyleng-1 ] ); unput( yytext[ yyleng-2 ] ); return IDENTIFIER; } +{Separator}*("++"|"--") { /* operators */ + if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; + unput( yytext[ yyleng-1 ] ); + unput( yytext[ yyleng-2 ] ); + if( hb_comp_iState == LOOKUP ) + { /* it is the first item in the line */ + hb_xfree( (void *) yylval.string ); + hb_comp_iState = RETURN; + return RETURN; + } + else + { /* there is another item in line already */ + hb_comp_iState =IDENTIFIER; + return IDENTIFIER; + } + } {Separator}*("::") { /* SELF operator */ if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; hb_xfree( (void *) yylval.string );