diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1a91db2de6..f93bd7ce91 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-08-10 17:33 UTC+0100 Ryszard Glab + + *source/compiler/harbour.l + * fixed DO DECLARE syntax + 2000-08-10 11:50 UTC+0100 Ryszard Glab *source/compiler/harbour.l diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index a9645af3bf..dae3422ecd 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -359,8 +359,14 @@ Separator {SpaceTab} %} "decl"|"decla"|"declar"|"declare" { - BEGIN DECLARE_; yylval.string = hb_compIdentifierNew( hb_strupr( yytext ), TRUE ); + if( hb_comp_iState == DO ) + { + hb_comp_iState = IDENTIFIER; + return IDENTIFIER; + } + else + BEGIN DECLARE_; } {Separator}+[_a-zA-Z] { /* an Identifier after DECLARE */ unput( yytext[ yyleng-1 ] ); @@ -403,9 +409,9 @@ Separator {SpaceTab} /* ************************************************************************ */ %} "opti"|"optio"|"option"|"optiona"|"optional" { - yylval.string = hb_compIdentifierNew( hb_strupr( yytext ), TRUE ); - return OPTIONAL; - } + yylval.string = hb_compIdentifierNew( hb_strupr( yytext ), TRUE ); + return OPTIONAL; +} %{ /* ************************************************************************ */ %}