ChangeLog 19990926-14:10 GMT+2
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
19990926-14:10 GMT+2 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
*source/compiler/harbour.y
|
||||
* fixed generation of invalid pcodes when nested IIF were used
|
||||
* added an error message when any statements are used after
|
||||
DO CASE and before the first CASE or the OTHERWISE
|
||||
|
||||
*include/hberrors.h
|
||||
* added ERR_MAYHEM_IN_CASE error code
|
||||
|
||||
19990925-11:10 GMT+3 Alexander Kresin
|
||||
* source/hbpp/hbpp.c
|
||||
* Fixed some bugs, noted by Victor Szel, Andi Jahja and Antonio Linares
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#define ERR_BADOPTION 34
|
||||
#define ERR_BADPARAM 35
|
||||
#define ERR_BADFILENAME 36
|
||||
#define ERR_MAYHEM_IN_CASE 37
|
||||
|
||||
#define WARN_AMBIGUOUS_VAR 1
|
||||
#define WARN_MEMVAR_ASSUMED 2
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
* 7) Change the pcode generated by ::cVar from Self:cVar to QSELF():cVar
|
||||
* 8) Support this syntax: _FIELD->c->mmezo := mt
|
||||
* 9) Support this syntax: nPtr := @Hello()
|
||||
*10) Support for syntax: FOR [ array | object | alias_expr | other ] := value
|
||||
*/
|
||||
|
||||
/* Compile using: bison -d -v harbour.y */
|
||||
@@ -332,7 +333,8 @@ char * _szCErrors[] =
|
||||
"Can't create preprocessed output file: \'%s\'",
|
||||
"Bad command line option: \'%s\'",
|
||||
"Bad command line parameter: \'%s\'",
|
||||
"Invalid filename: \'%s\'"
|
||||
"Invalid filename: \'%s\'",
|
||||
"Mayhem in CASE handler"
|
||||
};
|
||||
|
||||
/* Table with parse warnings */
|
||||
@@ -637,19 +639,19 @@ Statement : ExecFlow Crlf {}
|
||||
|
||||
| BREAK { GenBreak(); } Crlf { Do( 0 ); }
|
||||
| BREAK { GenBreak(); } Expression Crlf { Do( 1 ); }
|
||||
| RETURN Crlf {
|
||||
if( _wSeqCounter )
|
||||
{ --iLine;
|
||||
GenError( _szCErrors, 'E', ERR_EXIT_IN_SEQUENCE, "RETURN", NULL );
|
||||
| RETURN Crlf {
|
||||
if( _wSeqCounter )
|
||||
{ --iLine;
|
||||
GenError( _szCErrors, 'E', ERR_EXIT_IN_SEQUENCE, "RETURN", NULL );
|
||||
}
|
||||
GenPCode1( HB_P_ENDPROC );
|
||||
}
|
||||
| RETURN Expression Crlf {
|
||||
if( _wSeqCounter )
|
||||
| RETURN Expression Crlf {
|
||||
if( _wSeqCounter )
|
||||
{ --iLine;
|
||||
GenError( _szCErrors, 'E', ERR_EXIT_IN_SEQUENCE, "RETURN", NULL );
|
||||
GenError( _szCErrors, 'E', ERR_EXIT_IN_SEQUENCE, "RETURN", NULL );
|
||||
}
|
||||
GenPCode1( HB_P_RETVALUE ); GenPCode1( HB_P_ENDPROC );
|
||||
GenPCode1( HB_P_RETVALUE ); GenPCode1( HB_P_ENDPROC );
|
||||
}
|
||||
| PUBLIC { iVarScope = VS_PUBLIC; } VarList Crlf
|
||||
| PRIVATE { iVarScope = VS_PRIVATE; } VarList Crlf
|
||||
@@ -836,7 +838,7 @@ IndexList : Expression
|
||||
|
||||
/*NOTE: If _bRValue is TRUE then the expression is on the right side of assignment
|
||||
* operator (or +=, -= ...) - in this case a variable is not pushed by
|
||||
* a reference it is a part of DO <proc> WITH ... statement
|
||||
* a reference if it is a part of DO <proc> WITH ... statement
|
||||
*/
|
||||
VarAssign : IDENTIFIER INASSIGN { _bRValue = TRUE; } Expression { PopId( $1 ); PushId( $1 ); }
|
||||
| IDENTIFIER PLUSEQ { PushId( $1 ); _bRValue = TRUE; } Expression { GenPCode1( HB_P_PLUS ); PopId( $1 ); PushId( $1 ); }
|
||||
@@ -1138,7 +1140,11 @@ EndCase : ENDCASE { --_wCaseCounter; }
|
||||
| END { --_wCaseCounter; }
|
||||
;
|
||||
|
||||
DoCaseBegin : DOCASE { ++_wCaseCounter; } Crlf { Line(); }
|
||||
DoCaseStart : DOCASE { ++_wCaseCounter; } Crlf { Line(); }
|
||||
;
|
||||
|
||||
DoCaseBegin : DoCaseStart { }
|
||||
| DoCaseStart Statements { --iLine; GenError( _szCErrors, 'E', ERR_MAYHEM_IN_CASE, NULL, NULL ); }
|
||||
;
|
||||
|
||||
Cases : CASE Expression Crlf { $<iNumber>$ = JumpFalse( 0 ); Line(); } CaseStmts { $$ = GenElseIf( 0, Jump( 0 ) ); JumpHere( $<iNumber>4 ); Line(); }
|
||||
@@ -2387,7 +2393,8 @@ void ExpListPush( void )
|
||||
_pExpList->pNext = pExp;
|
||||
pExp->pPrev = _pExpList;
|
||||
/* save currently used pcode buffer */
|
||||
_pExpList->exprSize = functions.pLast->lPCodePos;
|
||||
_pExpList->exprSize = functions.pLast->lPCodePos;
|
||||
_pExpList->exprPCode = functions.pLast->pCode;
|
||||
}
|
||||
_pExpList = pExp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user