Commit 335ecf37 authored by Martin Claus's avatar Martin Claus

Removed non-standard comment character

parent 6ba780d8
......@@ -23,7 +23,7 @@ quote = re.compile(r"([\'\"]{1}.*[\'\"]{1})")
namelistname = re.compile(r"&(" + varname + r")")
paramname = re.compile(r"^(" + varname + r")")
namlistend = re.compile(r'^(&(end)?|/)$', re.I)
comment = re.compile(r"[#!].*")
comment = re.compile(r"!.*")
equalsign = re.compile(r"^=$")
computation = re.compile(r"^([0-9\.e]+\s*[\*\+\-/]{1}\s*)+[0-9\.e]+", re.I)
......
......@@ -12,6 +12,8 @@ from context import namelist
['&n', 'val1', '=', '34', 'val2', '=', '35/']),
("&n val1=34,\nval2=35 /",
['&n', 'val1', '=', '34', 'val2', '=', '35', '/']),
("&n val1=34,!this is a comment\nval2=35 /",
['&n', 'val1', '=', '34', 'val2', '=', '35', '/']),
]
)
def test_tokenize(string, res):
......
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