Commit 2dd74f80 authored by Martin Claus's avatar Martin Claus

Fixed parsing of arrays

parent a436be61
......@@ -77,7 +77,7 @@ class Namelist(DictClass):
tmpstr = tmpstr[:-1]
retstr += tmpstr + " &\n"
tmpstr = ""
retstr = retstr + tmpstr[:-1] + "/)\n"
retstr = retstr + tmpstr[:-1] + " /)\n"
else:
if isinstance(v, bool):
if v:
......@@ -212,7 +212,8 @@ def _tokenize(text):
hashed_tokens[hashed] = match.group(0)
text = re.sub(match.group(0), fs+hashed+fs, text, 1)
for char, rep in zip(('\n', r',', ' ', '=', ), (fs, fs, fs, fs+'='+fs)):
for char, rep in zip(('\n', r',', ' ', '=', '(/', '/)'),
(fs, fs, fs, fs+'='+fs, fs, fs)):
text = text.replace(char, rep)
text = text.split(fs)
tokens = [token.strip() for token in text if token.strip() != '']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment