diff options
author | lanfer <lanfer@0888f3d4-9f52-45d2-93bc-d00801ff5e46> | 2000-08-29 13:20:19 +0000 |
---|---|---|
committer | lanfer <lanfer@0888f3d4-9f52-45d2-93bc-d00801ff5e46> | 2000-08-29 13:20:19 +0000 |
commit | dd2840d2a3e17ccee2b7522bae2ee73f62b958d4 (patch) | |
tree | eadc1ce7952066b1a6816f7bff47b87c9df12014 /src | |
parent | ebfdbd420f2fe7f201d14264d0b4cf499591b8d7 (diff) |
fixing the regex: origin brings its own regex and does not understand extended expressions. The = around the varname can now be omitted
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@30 0888f3d4-9f52-45d2-93bc-d00801ff5e46
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, |