From 4b444c48122138b024559e47db3629cdf4acf078 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Sat, 4 Aug 2001 20:50:06 +0000 Subject: [PATCH] 2001-08-04 13:50 UTC-0800 Ron Pinkas * source/compiler/harbour.l * source/compiler/harbour.slx * Added inline c support for hb_comp_iLanguage == LANG_OBJ_MODULE * source/compiler/harbour.sly * Added support for HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) in Statement : ( MacroVar and MacroExpr ) to sync with harbour.y --- harbour/ChangeLog | 8 ++++++++ harbour/source/compiler/harbour.l | 4 ++-- harbour/source/compiler/harbour.slx | 2 +- harbour/source/compiler/harbour.sly | 12 ++++++++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c25bb22ac8..899176fe28 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +2001-08-04 13:50 UTC-0800 Ron Pinkas + * source/compiler/harbour.l + * source/compiler/harbour.slx + * Added inline c support for hb_comp_iLanguage == LANG_OBJ_MODULE + + * source/compiler/harbour.sly + * Added support for HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) in Statement : ( MacroVar and MacroExpr ) to sync with harbour.y + 2001-08-04 11:00 UTC-0800 Ron Pinkas * source/vm/macro.c ! Added missing ; in line 956 diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index c4a6879ff3..bfe04d50de 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -101,7 +101,7 @@ Identifier (([a-zA-Z])|([_a-zA-Z][_a-zA-Z0-9]+)) MacroVar \&{Identifier}[\.]? MacroEnd \&{Identifier}\.([_a-zA-Z0-9]*) %{ -/* +/* MacroId ({Identifier}\&(({Identifier}[\.]?)|({Identifier}\.([_a-zA-Z0-9]*)))) */ %} @@ -906,7 +906,7 @@ Separator {SpaceTab} } else { - if( hb_comp_iLanguage != LANG_C ) + if( hb_comp_iLanguage != LANG_C && hb_comp_iLanguage != LANG_OBJ_MODULE ) { hb_compGenError( hb_comp_szErrors, 'F', HB_COMP_ERR_REQUIRES_C, NULL, NULL ); hb_xfree( ( void * ) pInline->pCode ); diff --git a/harbour/source/compiler/harbour.slx b/harbour/source/compiler/harbour.slx index a018003475..7423c8154a 100644 --- a/harbour/source/compiler/harbour.slx +++ b/harbour/source/compiler/harbour.slx @@ -1181,7 +1181,7 @@ int hb_comp_SLX_CustomAction( int x, int aiHold[], int *ptr_iHold, BOOL *ptr_bIg } else { - if( hb_comp_iLanguage != LANG_C ) + if( hb_comp_iLanguage != LANG_C && hb_comp_iLanguage != LANG_OBJ_MODULE ) { hb_compGenError( hb_comp_szErrors, 'F', HB_COMP_ERR_REQUIRES_C, NULL, NULL ); hb_xfree( ( void * ) pInline->pCode ); diff --git a/harbour/source/compiler/harbour.sly b/harbour/source/compiler/harbour.sly index 81b722dd5b..a82ba735bd 100644 --- a/harbour/source/compiler/harbour.sly +++ b/harbour/source/compiler/harbour.sly @@ -337,8 +337,16 @@ Statement : ExecFlow CrlfStmnt { } | FunCall CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } | AliasExpr CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } | ObjectMethod CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } - | MacroVar CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } - | MacroExpr CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } + | MacroVar CrlfStmnt { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) + hb_compExprDelete( hb_compExprGenStatement( $1 ) ); + else + hb_compExprDelete( hb_compErrorSyntax( $1 ) ); + } + | MacroExpr CrlfStmnt { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) + hb_compExprDelete( hb_compExprGenStatement( $1 ) ); + else + hb_compExprDelete( hb_compErrorSyntax( $1 ) ); + } | PareExpList CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } | ExprPreOp CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); } | ExprPostOp CrlfStmnt { hb_compExprDelete( hb_compExprGenStatement( $1 ) ); }