20000514-10:07 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
! Fixed parse error when DO OPTIONAL WITH 1 or " or other non alpha charcaters
! Fixed parse error when FOR Var := OPTIONAL TO ...
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
20000514-10:07 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
|
||||
|
||||
* source/compiler/harbour.l
|
||||
! Fixed parse error when DO OPTIONAL WITH 1 or " or other non alpha charcaters
|
||||
! Fixed parse error when FOR Var := OPTIONAL TO ...
|
||||
|
||||
20000514-09:45 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
|
||||
|
||||
* source/compiler/harbour.y
|
||||
|
||||
@@ -360,7 +360,7 @@ Separator {SpaceTab}
|
||||
|
||||
<INITIAL>"optional" { BEGIN OPTIONAL_; }
|
||||
|
||||
<OPTIONAL_>{Separator}+"with"{Separator}+[_a-zA-Z\&] { unput( yytext[ yyleng-1 ] );
|
||||
<OPTIONAL_>{Separator}+"with"{Separator}+[^ .] { unput( yytext[ yyleng-1 ] );
|
||||
unput( ' ' );
|
||||
unput( 'h' );
|
||||
unput( 't' );
|
||||
@@ -372,6 +372,16 @@ Separator {SpaceTab}
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
<OPTIONAL_>{Separator}+"to"{Separator}+[^ .] { unput( yytext[ yyleng-1 ] );
|
||||
unput( ' ' );
|
||||
unput( 'o' );
|
||||
unput( 't' );
|
||||
if( i_INDEX_STATE ) BEGIN INDEX; else BEGIN 0;
|
||||
yylval.string = hb_strdup( "OPTIONAL" );
|
||||
hb_comp_iState = IDENTIFIER;
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
<OPTIONAL_>{Separator}+[_a-zA-Z\&] { unput( yytext[ yyleng-1 ] ); BEGIN 0; return OPTIONAL; }
|
||||
|
||||
<OPTIONAL_>{Separator}*(.|\n) { /* end of line or any operator */
|
||||
|
||||
@@ -89,9 +89,11 @@ PROCEDURE THEMAIN( optional )
|
||||
|
||||
PRIVATE TEST AS CHAR
|
||||
|
||||
DO Optional WITH cVar
|
||||
DO Proc WITH
|
||||
|
||||
FOR Conter := 1 TO 10
|
||||
DO Optional WITH
|
||||
|
||||
FOR Conter := Optional TO 10
|
||||
? "For with End"
|
||||
End
|
||||
|
||||
|
||||
Reference in New Issue
Block a user