diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ParseGeometry.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ParseGeometry.c b/src/ParseGeometry.c index e065438..fa5cd63 100644 --- a/src/ParseGeometry.c +++ b/src/ParseGeometry.c @@ -10,7 +10,10 @@ #include "util_String.h" #include "StreamedHDF5GH.h" - + +/* Do not apply the USE marcro, parser will get confused + by curly braces in quoted strings */ + /* CCTK_NO_AUTOUSE_MACRO */ /*#define HEAVYDEBUG*/ @@ -21,7 +24,7 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) DECLARE_CCTK_PARAMETERS regmatch_t pmatch[3],gmatch[6]; - int matched,ierr=0,retval=0, verb=0, deb=0; + int matched, ierr=0,retval=0, verb=0, deb=0; const char *argument; char *varname=NULL, *geo_s=NULL; @@ -45,11 +48,8 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) sprintf(info,"\n\nGeometryParser \nargument: >%s<\n",before); if((matched = CCTK_RegexMatch(before, - "\\=(.*)\\=\\[?(.*)?\\]?", 3, pmatch)) != 0) { - -/* Regex broken on origin: \\w not matched */ -/* "(\\w*::\\w*)\\[?(.*)?\\]?", 3, pmatch)) != 0) {*/ - + "([A-Za-z][A-Za-z0-9_]*::[A-Za-z][A-Za-z0-9_]*)\\[?(.*)?\\]?", 3, pmatch)) != 0) { + if (matched<0) CCTK_WARN(1,"Error matching in GeometryParser"); #ifdef HEAVYDEBUG printf("matched %d rm_so/rm_eo: %d %d; %d %d\n", matched, |