From e025c159ab64dd9da34934fce7c24f360a764dae Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Fri, 22 Jun 2001 01:25:02 +0000 Subject: [PATCH] 2001-06-21 18:20 UTC-0800 Ron Pinkas * source/pp/ppcore.c * Reinstated test for continuation token at the end of an Expression in isExpress() /* Clipper does not validate extracted expression like that, but Harbour PP has internal dependancy due to matching logic. Alexander, Clipper stops an expression when encountering the Anchor of the next NON optional Match Marker. Clipper accepts that expression even if it ends with continuation token (like '*'). */ --- harbour/ChangeLog | 8 ++++++++ harbour/source/pp/ppcore.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ada13e0876..38baaa6b62 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +2001-06-21 18:20 UTC-0800 Ron Pinkas + * source/pp/ppcore.c + * Reinstated test for continuation token at the end of an Expression in isExpress() + /* Clipper does not validate extracted expression like that, but Harbour PP has internal dependancy due to matching logic. + Alexander, Clipper stops an expression when encountering the Anchor of the next NON optional Match Marker. + Clipper accepts that expression even if it ends with continuation token (like '*'). + */ + 2001-06-21 14:55 UTC-0800 Ron Pinkas * source/pp/ppcore.c * Commented out test for continuation token at the end of an Expression in isExpress() diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 41304dd13c..26bfb0b361 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -1761,6 +1761,11 @@ static int WorkMarkers( char ** ptrmp, char ** ptri, char * ptro, int * lenres, else { lenreal = stroncpy( expreal, *ptri, ipos-1 ); + + #if 0 + printf( "\nExpr: '%s' ptrtemp: '%s' exppat: '%s'\n", expreal, ptrtemp, exppatt ); + #endif + if( ipos > 1 && isExpres( expreal ) ) { /* @@ -2318,7 +2323,7 @@ static BOOL isExpres( char * stroka ) return ( l1 <= l2 ); */ - return ( l1 <= l2 /*&& ! IsInStr( ( stroka - l2 )[l1-1], ":/+*-%^=(<>[{" ) */ ); + return ( l1 <= l2 && ! IsInStr( ( stroka - l2 )[l1-1], ":/+*-%^=(<>[{" ) ); } static BOOL TestOptional( char *ptr1, char *ptr2 )