Track changes of 2.5.10
authorClaudio Luck <claudio.luck@pep.foundation>
Wed, 27 Feb 2019 14:43:35 +0100
changeset 57 2f4ad3800a3f
parent 56 d48cf08cf448
child 58 a218553807ab
Track changes of 2.5.10
.hgignore
samples/adresslist.yml2
samples/gen.bas
samples/gen_addr_sql.ysl2
samples/sample.yml2
yml2/backend.py
yml2/yml2.py
yml2/yml2proc.py
--- a/.hgignore	Tue Sep 04 17:09:43 2018 +0200
+++ b/.hgignore	Wed Feb 27 14:43:35 2019 +0100
@@ -1,2 +1,3 @@
 syntax: glob
 *.pyc
+*.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/adresslist.yml2	Wed Feb 27 14:43:35 2019 +0100
@@ -0,0 +1,12 @@
+list {
+    address {
+        name "Meier";
+        street "Uhlmannstrasse 42";
+        village "Laupheim";
+    }
+    address {
+        name "Schmidt";
+        street "Haupstrasse 23";
+        village "Bad Waldsee";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/gen.bas	Wed Feb 27 14:43:35 2019 +0100
@@ -0,0 +1,6 @@
+110 DATA "Meier", "Uhlmannstrasse 42", "Laupheim"
+120 DATA "Schmidt", "Haupstrasse 23", "Bad Waldsee"
+1000 FOR I=1 TO 2 STEP 1
+1010 READ NAME$, STREET$, VILLAGE$
+1020 PRINT "INSERT INTO address (name, street, village) VALUES ('" + NAME$ + "', '" + STREET$ + "', '" + VILLAGE$ + "');"
+1030 NEXT I
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/gen_addr_sql.ysl2	Wed Feb 27 14:43:35 2019 +0100
@@ -0,0 +1,15 @@
+include yslt.yml2
+
+tstylesheet {
+    template "/list" {
+        apply "address", 0;
+        | 1000 FOR I=1 TO 2 STEP 1
+        | 1010 READ NAME$, STREET$, VILLAGE$
+        | 1020 PRINT "INSERT INTO address (name, street, village) VALUES ('" + NAME$ + "', '" + STREET$ + "', '" + VILLAGE$ + "');"
+        | 1030 NEXT I
+    }
+    template "address" {
+        | «position() * 10 + 100» DATA "«name»", "«street»", "«village»"
+    }
+}
+
--- a/samples/sample.yml2	Tue Sep 04 17:09:43 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-include idl.yml2
-
-module blub {
-    interface bla {
-        int f(in long a, out long b);
-    }
-}
--- a/yml2/backend.py	Tue Sep 04 17:09:43 2018 +0200
+++ b/yml2/backend.py	Wed Feb 27 14:43:35 2019 +0100
@@ -1,4 +1,4 @@
-# 2.5.8 backend
+# 2.5.10 backend
 
 # written by VB.
 
--- a/yml2/yml2.py	Tue Sep 04 17:09:43 2018 +0200
+++ b/yml2/yml2.py	Wed Feb 27 14:43:35 2019 +0100
@@ -1,4 +1,4 @@
-# YML 2.5.8 language definition
+# YML 2.5.10 language definition
 
 # written by VB.
 
@@ -51,7 +51,7 @@
 xmlSymbol = r(_xmlSymbol)
 aliasSymbol = r(ur"-|(" + _xmlSymbol + ur")")
 
-literal = [r(r'""".*?"""', re.S), r(r"'''.*?'''", re.S), r(r"""-?\d+\.\d*|-?\.\d+|-?\d+|".*?"|'.*?'""")]
+literal = [r(r'""".*?"""', re.S), r(r"'''.*?'''", re.S), r(r"""0x[a-f0-9]+|-?\d+\.\d*|-?\.\d+|-?\d+|".*?"|'.*?'""")]
 filename = [("'", r(r"[^']*"), "'"), ('"', r(r'[^"]*'), '"'), r(r"[^\s;]+")]
 ws = r(r"\s+", re.U)
 
@@ -77,7 +77,7 @@
 def constant():     return 0, keyword("define"), [pointer, symbol], "=", literal, 0, [";", "."]
 def in_ns():        return keyword("in"), xmlSymbol, [_decl, ("{", -2, _decl, "}")]
 _decl = keyword("decl"), listing(decl), [";", "."]
-def textsection():  return r(r'(\|\|(\>*).*?\|\|(\>*))', re.S)
+def textsection():  return r(r'(\|\|(\>*)(.*?)\|\|(\>*))\s*$', re.S | re.M)
 def textsectionu(): return r(r'(\>\>.*?\>\>)', re.S)
 def include():      return keyword("include"), 0, reverse, 0, [ktext, kxml], filename, 0, [";", "."]
 def func():         return _func, 0, content
--- a/yml2/yml2proc.py	Tue Sep 04 17:09:43 2018 +0200
+++ b/yml2/yml2proc.py	Wed Feb 27 14:43:35 2019 +0100
@@ -2,8 +2,8 @@
 # vim: set fileencoding=utf-8 :
 
 """\
-YML/YSLT 2 processor version 5.8
-Copyleft (c), 2009-2011 Volker Birk  http://fdik.org/yml/
+YML/YSLT 2 processor version 5.10
+Copyleft (c), 2009-2018 Volker Birk  http://fdik.org/yml/
 
 """