[ZPT] CVS: Packages/TAL - TALGenerator.py:1.20

guido@digicool.com guido@digicool.com
Fri, 16 Mar 2001 22:56:27 -0500 (EST)


Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv6742

Modified Files:
	TALGenerator.py 
Log Message:
Fixed two more regular expressions using .* without DOTALL.



--- Updated File TALGenerator.py in package Packages/TAL --
--- TALGenerator.py	2001/03/17 03:27:51	1.19
+++ TALGenerator.py	2001/03/17 03:56:27	1.20
@@ -205,7 +205,7 @@
     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 @@
         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)