diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-06-29 09:33:15 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-06-29 09:33:15 +0000 |
commit | 109772b31ff4c3e755fc21eb2ef3c0db267002ef (patch) | |
tree | f7b4b3c7dfb52bc871f4c0f872378aa71abdd6af /numpy/f2py/lib/splitline.py | |
parent | 9913769d0719b6cfca1b3d51baee8421ba7cf288 (diff) | |
download | numpy-109772b31ff4c3e755fc21eb2ef3c0db267002ef.tar.gz |
Finished impl. Fortran 77-2003 parse pattern classes.
Diffstat (limited to 'numpy/f2py/lib/splitline.py')
-rw-r--r-- | numpy/f2py/lib/splitline.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/f2py/lib/splitline.py b/numpy/f2py/lib/splitline.py index c5d6869b0..b95e0d014 100644 --- a/numpy/f2py/lib/splitline.py +++ b/numpy/f2py/lib/splitline.py @@ -28,12 +28,12 @@ def split2(line, lower=False): """ return LineSplitter(line,lower=lower).split2() -_f2py_str_findall = re.compile(r' _F2PY_STRING_CONSTANT_\d+_ ').findall +_f2py_str_findall = re.compile(r"'_F2PY_STRING_CONSTANT_\d+_'").findall def string_replace_map(line, lower=False, _cache={'index':0,'pindex':0}): """ - 1) Replaces string constants with symbol ` _F2PY_STRING_CONSTANT_<index>_ ` + 1) Replaces string constants with symbol `'_F2PY_STRING_CONSTANT_<index>_'` 2) Replaces (expression) with symbol `(F2PY_EXPR_TUPLE_<index>)` Returns a new line and the replacement map. """ @@ -46,7 +46,7 @@ def string_replace_map(line, lower=False, if key is None: _cache['index'] += 1 index = _cache['index'] - key = ' _F2PY_STRING_CONSTANT_%s_ ' % (index) + key = "'_F2PY_STRING_CONSTANT_%s_'" % (index) string_map[key] = item rev_string_map[item] = key items.append(key) |