[ZPT] CVS: Packages/TAL - README.txt:1.10 TALDefs.py:1.14 TALGenerator.py:1.26 TALInterpreter.py:1.26
guido@digicool.com
guido@digicool.com
Mon, 26 Mar 2001 12:02:51 -0500 (EST)
Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv15641
Modified Files:
README.txt TALDefs.py TALGenerator.py TALInterpreter.py
Log Message:
Add a version to the generated intermediate code. This is simply a
new opcode, "version", whose argument is the new constant
TALDefs.TAL_VERSION (currently "1.0"). The opcode implementation
currently asserts that the correct version is given; future
implementations can implement backwards compatible behavior.
--- Updated File README.txt in package Packages/TAL --
--- README.txt 2001/03/24 21:06:32 1.9
+++ README.txt 2001/03/26 17:02:50 1.10
@@ -86,14 +86,6 @@
- TALInterpreter currently always uses an XML parser to parse inserted
structure; it should use a parser appropriate to the mode.
-- The HTML parser currently returns <img ismap> as if it said <img
- ismap="ismap">. This will break with old browsers. I see two ways
- to fix this: (1) change the API to return None for the value in this
- case, and then generate different code; or (2) special-case the
- generator to recognize that the value is the same as the attribute
- name for specific attribute names (the list is BOOLEAN_HTML_ATTRS in
- TALInterpreter).
-
- HTMLTALParser.py and TALParser.py are silly names. Should be
HTMLTALCompiler.py and XMLTALCompiler.py (or maybe shortened,
without "TAL"?)
--- Updated File TALDefs.py in package Packages/TAL --
--- TALDefs.py 2001/03/23 21:35:49 1.13
+++ TALDefs.py 2001/03/26 17:02:50 1.14
@@ -86,6 +86,8 @@
Common definitions used by TAL and METAL compilation an transformation.
"""
+TAL_VERSION = "1.0"
+
XML_NS = "http://www.w3.org/XML/1998/namespace" # URI for XML namespace
XMLNS_NS = "http://www.w3.org/2000/xmlns/" # URI for XML NS declarations
--- Updated File TALGenerator.py in package Packages/TAL --
--- TALGenerator.py 2001/03/26 16:48:32 1.25
+++ TALGenerator.py 2001/03/26 17:02:50 1.26
@@ -110,6 +110,7 @@
self.slots = {}
self.slotStack = []
self.xml = xml
+ self.emit("version", TAL_VERSION)
def getCode(self):
return self.optimize(self.program), self.macros
--- Updated File TALInterpreter.py in package Packages/TAL --
--- TALInterpreter.py 2001/03/26 16:48:32 1.25
+++ TALInterpreter.py 2001/03/26 17:02:50 1.26
@@ -97,7 +97,7 @@
from StringIO import StringIO
from XMLParser import XMLParser
-from TALDefs import TALError, TALESError, quote
+from TALDefs import TALError, TALESError, quote, TAL_VERSION
BOOLEAN_HTML_ATTRS = [
# List of Boolean attributes in HTML that should be rendered in
@@ -176,6 +176,9 @@
method = getattr(self, methodName)
apply(method, args)
self.level = self.level - 1
+
+ def do_version(self, version):
+ assert version == TAL_VERSION
def do_setPosition(self, position):
self.position = position