ChangeLog 20000210-13:20 GMT+1

This commit is contained in:
Ryszard Glab
2000-02-10 12:05:07 +00:00
parent a72ec7dc0c
commit d1209bb4bc
5 changed files with 52 additions and 6 deletions

View File

@@ -1,3 +1,18 @@
20000210-13:20 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*source/compiler/harbour.l
* fixed syntax for RETURN statement
*source/compiler/hbgenerr.c
* changed warning level for 'unreachable code' - it will be generated
if /w2 option is used
*source/genc.c
* fixed 'unused "wSym" variable' warning
*tests/keywords.prg
* added some more code related to RETURN statement
20000209-22:37 EST Paul Tucker <ptucker@sympatico.ca>
* source/rtl/tone.c
* change _Windows to _WINDOWS_

View File

@@ -106,7 +106,6 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
if( ! hb_comp_bStartProc )
pSym = pSym->pNext; /* starting procedure is always the first symbol */
wSym = 0; /* symbols counter */
while( pSym )
{
if( pSym->szName[ 0 ] == '(' )
@@ -148,7 +147,6 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
else
fprintf( yyc, ", 0, 0 }" ); /* memvar */
}
++wSym;
if( pSym != hb_comp_symbols.pLast )
fprintf( yyc, ",\n" );

View File

@@ -1084,7 +1084,7 @@ Separator {SpaceTab}
yylval.string = hb_strupr( hb_strdup( yytext ) );
BEGIN RETURN_;
}
<RETURN_>{Separator}+[\[\"\'\.\!\&\{\;\:_a-zA-Z0-9] { /* an identifier after RETURN, macro, or .NOT., or string, or EOL */
<RETURN_>{Separator}+[\&_a-zA-Z0-9] { /* an identifier, numbers or macro */
unput( yytext[ yyleng-1 ] );
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
if( hb_comp_iState == LOOKUP )
@@ -1099,7 +1099,23 @@ Separator {SpaceTab}
return IDENTIFIER;
}
}
<RETURN_>{Separator}*[\n\(] { /* '(' after RETURN or end of line */
<RETURN_>{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;
}
<RETURN_>{Separator}*("::") { /* SELF operator */
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
hb_xfree( (void *) yylval.string );
hb_comp_iState = RETURN;
unput( yytext[ yyleng-1 ] );
unput( yytext[ yyleng-2 ] );
return RETURN;
}
<RETURN_>{Separator}*[\n\;\(\[\{\"\'\.\-\+\!] {
/* EOL or '()', '[]', '{}', '""', "''" , '.T.', '-', '+', '!' */
unput( yytext[ yyleng-1 ] );
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
if( hb_comp_iState == LOOKUP )
@@ -1114,7 +1130,7 @@ Separator {SpaceTab}
return IDENTIFIER;
}
}
<RETURN_>{Separator}*. { /* any character after RETURN */
<RETURN_>{Separator}*. { /* any other character after RETURN */
unput( yytext[ yyleng-1 ] );
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
hb_comp_iState =IDENTIFIER;

View File

@@ -106,7 +106,7 @@ char * hb_comp_szWarnings[] =
"3Suspicious operand type: \'UnKnown\' expected: \'Logical\'",
"3Suspicious operand type: \'UnKnown\' expected: \'Numeric\'",
"0Meaningless use of expression: \'%s\'",
"1Unreachable code",
"2Unreachable code",
"1Redundant \'ANNOUNCE %s\' statement ignored"
};

View File

@@ -842,6 +842,23 @@ PRIVATE &return
ENDIF
return := return( return )
return += return
return-=return
return->return ^= 3
return:return()
return::return
return ::return
return-1
return -1
return+2
return +2
return++
return--
++return
--return
return!return
return &return
DO WHILE return
++return