adding hex literals
authorVolker Birk <vb@pep-project.org>
Tue, 05 Feb 2019 17:45:35 +0100
changeset 28 e9a51b1d5587
parent 27 0cdfe84ef643
child 29 6a8a7951d8e6
adding hex literals
yml2.py
--- a/yml2.py	Tue Jan 29 11:23:36 2019 +0100
+++ b/yml2.py	Tue Feb 05 17:45:35 2019 +0100
@@ -1,4 +1,4 @@
-# YML 2.5.9 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)