summaryrefslogtreecommitdiff
path: root/numpy/f2py/lib/splitline.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-06-29 09:33:15 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-06-29 09:33:15 +0000
commit109772b31ff4c3e755fc21eb2ef3c0db267002ef (patch)
treef7b4b3c7dfb52bc871f4c0f872378aa71abdd6af /numpy/f2py/lib/splitline.py
parent9913769d0719b6cfca1b3d51baee8421ba7cf288 (diff)
downloadnumpy-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.py6
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)