ChangeLog 20000505-19:15 GMT+1

This commit is contained in:
Ryszard Glab
2000-05-05 17:09:46 +00:00
parent cc20b69b05
commit bb1ba3c1d1
6 changed files with 33 additions and 3 deletions

View File

@@ -1,3 +1,14 @@
20000505-19:15 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*include/hbapi.h
*include/hbexprop.h
*source/common/expropt1.c
*source/macro/macro.y
*source/vm/macro.c
* added int exprType for HB_MACRO structure
* TYPE( "{|| NotLinked()}" ) returns now 'B' instead of 'UI'
20000505-17:53 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*include/hbcomp.h

View File

@@ -491,6 +491,7 @@ typedef struct HB_MACRO_ /* a macro compiled pcode container */
void * pParseInfo; /* data needed by the parser - it should be 'void *' to allow different implementation of macr compiler */
USHORT uiNameLen; /* the maximum symbol name length */
BOOL bShortCuts; /* are we using logical shorcuts (in OR/AND) */
int exprType; /* type of successfully compiled expression */
} HB_MACRO, * HB_MACRO_PTR;
extern void hb_macroGetValue( HB_ITEM_PTR );

View File

@@ -329,6 +329,7 @@ HB_EXPR_PTR hb_compExprAssignStatic( HB_EXPR_PTR, HB_EXPR_PTR );
ULONG hb_compExprListLen( HB_EXPR_PTR );
void hb_compExprClear( HB_EXPR_PTR );
char * hb_compExprDescription( HB_EXPR_PTR );
int hb_compExprType( HB_EXPR_PTR );
void hb_compExprFree( HB_EXPR_PTR, HB_MACRO_DECL );
void hb_compExprErrorType( HB_EXPR_PTR, HB_MACRO_DECL );

View File

@@ -33,8 +33,6 @@
*
*/
/* TOFIX: Split the code, since MSC8 can't compile it, even in Huge model. */
/* TODO:
* - Correct post- and pre- operations to correctly handle the following code
* a[ i++ ]++
@@ -144,6 +142,11 @@ char * hb_compExprDescription( HB_EXPR_PTR pExpr )
return s_OperTable[ 0 ];
}
int hb_compExprType( HB_EXPR_PTR pExpr )
{
return ( int ) pExpr->ExprType;
}
/* ************************************************************************* */
HB_EXPR_PTR hb_compExprNewEmpty( void )

View File

@@ -189,6 +189,7 @@ int yylex( YYSTYPE *, HB_MACRO_PTR );
%%
Main : Expression '\n' {
HB_MACRO_DATA->exprType = hb_compExprType( $1 );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_compExprDelete( hb_compExprGenPush( $1, HB_MACRO_PARAM ), HB_MACRO_PARAM );
else
@@ -197,6 +198,7 @@ Main : Expression '\n' {
}
| Expression {
HB_MACRO_DATA->exprType = hb_compExprType( $1 );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_compExprDelete( hb_compExprGenPush( $1, HB_MACRO_PARAM ), HB_MACRO_PARAM );
else

View File

@@ -74,6 +74,11 @@ static int hb_macroParse( HB_MACRO_PTR pMacro, char * szString )
pMacro->pCodeInfo->pPrev = NULL;
HB_TRACE(HB_TR_DEBUG, ("hb_macroParse.(%p, %s)", pMacro, szString));
pMacro->pCodeInfo->pCode = ( BYTE * ) hb_xgrab( HB_PCODE_SIZE );
/* reset the type of compiled expression - this should be filled after
* successfully compilation
*/
pMacro->exprType = HB_ET_NONE;
return hb_compParse( pMacro );
}
@@ -661,7 +666,14 @@ char * hb_macroGetType( HB_ITEM_PTR pItem )
{
/* passed string was successfully compiled
*/
if( struMacro.status & HB_MACRO_UNKN_SYM )
if( struMacro.exprType == HB_ET_CODEBLOCK )
{
/* Clipper ignores any undeclared symbols or UDFs if the
* compiled expression is a valid codeblock
*/
szType ="B";
}
else if( struMacro.status & HB_MACRO_UNKN_SYM )
{
/* request for a symbol that is not in a symbol table
*/