Commit 32ec6e8b authored by Guido van Rossum's avatar Guido van Rossum

Fixed two more regular expressions using .* without DOTALL.

parent f9dd0c60
......@@ -205,7 +205,7 @@ class TALGenerator:
def emitDefines(self, defines, position):
for part in splitParts(defines):
m = re.match(
r"\s*(?:(global|local)\s+)?(%s)\s+(.*)" % NAME_RE, part)
r"(?s)\s*(?:(global|local)\s+)?(%s)\s+(.*)\Z" % NAME_RE, part)
if not m:
raise TALError("invalid define syntax: " + `part`,
position)
......@@ -223,7 +223,7 @@ class TALGenerator:
self.emit("condition", cexpr, program)
def emitRepeat(self, arg):
m = re.match("\s*(%s)\s+(.*)" % NAME_RE, arg)
m = re.match("(?s)\s*(%s)\s+(.*)\Z" % NAME_RE, arg)
if not m:
raise TALError("invalid repeat syntax: " + `repeat`)
name, expr = m.group(1, 2)
......
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