2007-01-08 00:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexpra.c
! fixed GPF which can appear on syntax error during compilation
one of enumerator message
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* accept the folowing syntax: (@var):msg
With this modification FOR EACH overloading is completed.
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-01-08 00:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexpra.c
|
||||
! fixed GPF which can appear on syntax error during compilation
|
||||
one of enumerator message
|
||||
|
||||
* harbour/source/compiler/harbour.y
|
||||
* harbour/source/compiler/harbour.yyc
|
||||
* accept the folowing syntax: (@var):msg
|
||||
With this modification FOR EACH overloading is completed.
|
||||
|
||||
2007-01-07 19:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/vm/hvm.c
|
||||
* small modification to protect against creating long references chains
|
||||
|
||||
@@ -618,18 +618,21 @@ HB_EXPR_PTR hb_compExprNewSend( HB_EXPR_PTR pObject, char * szMessage,
|
||||
{
|
||||
pExpr->value.asMessage.szMessage = szMessage;
|
||||
pExpr->value.asMessage.pMessage = NULL;
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
if( (strcmp( "__ENUMINDEX", szMessage ) == 0) ||
|
||||
(strcmp( "__ENUMBASE", szMessage ) == 0 ) ||
|
||||
(strcmp( "__ENUMVALUE", szMessage ) == 0 ) )
|
||||
#ifndef HB_MACRO_SUPPORT
|
||||
if( pObject && szMessage[ 0 ] == '_' )
|
||||
{
|
||||
if( pObject->ExprType == HB_ET_VARIABLE )
|
||||
if( strcmp( "__ENUMINDEX", szMessage ) == 0 ||
|
||||
strcmp( "__ENUMBASE", szMessage ) == 0 ||
|
||||
strcmp( "__ENUMVALUE", szMessage ) == 0 )
|
||||
{
|
||||
if( ! hb_compForEachVarError( HB_COMP_PARAM, pObject->value.asSymbol ) )
|
||||
if( pObject->ExprType == HB_ET_VARIABLE )
|
||||
{
|
||||
/* pExpr->value.asMessage.pObject = hb_compExprNewVarRef( pObject->value.asSymbol, HB_COMP_PARAM ); */
|
||||
/* NOTE: direct type change */
|
||||
pObject->ExprType = HB_ET_VARREF;
|
||||
if( ! hb_compForEachVarError( HB_COMP_PARAM, pObject->value.asSymbol ) )
|
||||
{
|
||||
/* pExpr->value.asMessage.pObject = hb_compExprNewVarRef( pObject->value.asSymbol, HB_COMP_PARAM ); */
|
||||
/* NOTE: direct type change */
|
||||
pObject->ExprType = HB_ET_VARREF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ extern void yyerror( HB_COMP_DECL, char * ); /* parsing error management fun
|
||||
%type <asExpr> AliasId AliasVar AliasExpr
|
||||
%type <asExpr> VariableAt VariableAtAlias
|
||||
%type <asExpr> FunIdentCall FunCall FunCallAlias FunRef
|
||||
%type <asExpr> ObjectData ObjectDataAlias
|
||||
%type <asExpr> ObjectData ObjectDataAlias ObjectRef
|
||||
%type <asExpr> ObjectMethod ObjectMethodAlias
|
||||
%type <asExpr> IfInline IfInlineAlias IfExpression
|
||||
%type <asExpr> PareExpList PareExpListAlias
|
||||
@@ -745,18 +745,22 @@ ExtArgument : EPSILON { $$ = hb_compExprNewArgRef( HB_COMP_PARAM ); }
|
||||
|
||||
/* Object's instance variable
|
||||
*/
|
||||
SendId : IdentName { $$.value.string = $1; $$.bMacro=FALSE; }
|
||||
| MacroVar { $$.value.macro = $1; $$.bMacro=TRUE; }
|
||||
| MacroExpr { $$.value.macro = $1; $$.bMacro=TRUE; }
|
||||
;
|
||||
|
||||
ObjectData : LeftExpression ':' SendId { $$ = ($3.bMacro ? hb_compExprNewSend( $1, NULL, $3.value.macro, HB_COMP_PARAM ) : hb_compExprNewSend( $1, $3.value.string, NULL, HB_COMP_PARAM )); }
|
||||
| ObjectRef ':' SendId { $$ = ($3.bMacro ? hb_compExprNewSend( $1, NULL, $3.value.macro, HB_COMP_PARAM ) : hb_compExprNewSend( $1, $3.value.string, NULL, HB_COMP_PARAM )); }
|
||||
| ':' SendId { if( HB_COMP_PARAM->wWithObjectCnt == 0 )
|
||||
hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_WITHOBJECT, NULL, NULL );
|
||||
$$ = ($2.bMacro ? hb_compExprNewSend( NULL, NULL, $2.value.macro, HB_COMP_PARAM ) : hb_compExprNewSend( NULL, $2.value.string, NULL, HB_COMP_PARAM ));
|
||||
}
|
||||
;
|
||||
|
||||
SendId : IdentName { $$.value.string = $1; $$.bMacro=FALSE; }
|
||||
| MacroVar { $$.value.macro = $1; $$.bMacro=TRUE; }
|
||||
| MacroExpr { $$.value.macro = $1; $$.bMacro=TRUE; }
|
||||
;
|
||||
|
||||
ObjectRef : '(' '@' IdentName ')' { $$ = hb_compExprNewVarRef( $3, HB_COMP_PARAM ); }
|
||||
|
||||
|
||||
ObjectDataAlias : ObjectData ALIASOP
|
||||
;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user