From cfbd3181c7dfe2529075773ced474a5266039e8f Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Mon, 24 Apr 2000 17:33:06 +0000 Subject: [PATCH] ChangeLog 20000424-19:40 GMT+1 --- harbour/ChangeLog | 5 +++++ harbour/source/compiler/harbour.l | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9e59c9bb54..73ba303607 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +20000424-19:40 GMT+1 Ryszard Glab + + *source/compiler/harbour.l + * fixed recognition of WHILE abbreviation (WHIL) + 20000424-19:15 GMT+1 Ryszard Glab *source/compiler/hbfix.c diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 17227f155d..9c2b8ab052 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -370,6 +370,14 @@ Separator {SpaceTab} hb_comp_iState =DO; yyless( yyleng-5 ); } +{Separator}+"whil" { /* DO WHILE found -move it to WHILE state */ + /* NOTE: we cannot decide here if it is DO WHILE + * or DO while [WITH ] + */ + if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; + hb_comp_iState =DO; + yyless( yyleng-5 ); + } {Separator}+[_a-zA-Z\&] { /* an identifier 'DO id WITH' or 'DO &id WITH' */ if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; unput( yytext[ yyleng-1 ] ); @@ -1172,7 +1180,7 @@ Separator {SpaceTab} %{ /* ************************************************************************ */ %} -"while" BEGIN WHILE_; +"while"|"whil" BEGIN WHILE_; {Separator}*\n { /* end of line */ if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; unput( '\n' );