From 4681708b37a0613a8d8f369ee89758552fd09408 Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Mon, 9 Aug 1999 07:59:32 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 7 ++++++- harbour/source/compiler/harbour.l | 14 ++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f30a8f6eb4..478d334e29 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,5 +1,10 @@ +19990809-03:47 EDT Paul Tucker + * source/compiler/harbour.l + + added DECLARE statement - treated as PRIVATE + (Don't recall the exact rules for DECLARE) + 19990809-03:23 EDT Paul Tucker - * source/rtl/filesys.c + * source/rtl/filesys.c"source/rtl/filesys" * hb_fsLock implimented for msvc 19990809-07:40 GMT+1 Victor Szel diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 130822440f..1aa72665ac 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -115,7 +115,7 @@ Separator {SpaceTab} %x STRING1 STRING2 STRING3 %x NEXT_ BREAK_ CASE_ DO_ WHILE_ WITH_ END_ EXIT_ EXTERNAL_ FIELD_ -%x FOR_ FUNCTION_ IIF_ IF_ IN_ INIT_ LOCAL_ LOOP_ +%x FOR_ FUNCTION_ IIF_ IF_ IN_ INIT_ LOCAL_ LOOP_ DECLARE_ %x MEMVAR_ PARAM_ PRIVATE_ PUBLIC_ %s INDEX @@ -315,6 +315,12 @@ Separator {SpaceTab} %{ /* ************************************************************************ */ %} +"decl"("are"|"ar"|"a")? { BEGIN PRIVATE_; + yylval.string = yy_strupr( yy_strdup( yytext ) ); + } +%{ +/* ************************************************************************ */ +%} "do" BEGIN DO_; {Separator}+"case" { /* DO CASE statement */ if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; @@ -894,10 +900,10 @@ Separator {SpaceTab} %{ /* ************************************************************************ */ %} -"priv"|"priva"|"privat"|"private" { BEGIN PRIVATE_; +"priv"("ate"|"at"|"a")? { BEGIN PRIVATE_; yylval.string = yy_strupr( yy_strdup( yytext ) ); } -{Separator}+[_a-zA-Z] { /* an identifier after PRIVATE */ +{Separator}+[_a-zA-Z] { /* an Identifier after PRIVATE */ unput( yytext[ yyleng-1 ] ); if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0; if( _iState == LOOKUP ) @@ -926,7 +932,7 @@ Separator {SpaceTab} %{ /* ************************************************************************ */ %} -"publ"|"publi"|"public" { BEGIN PUBLIC_; +"publ"("ic"|"i")? { BEGIN PUBLIC_; yylval.string = yy_strupr( yy_strdup( yytext ) ); } {Separator}+[_a-zA-Z] { /* an identifier after PUBLIC */