Browse Source

adding hex literals

pypackage
Volker Birk 3 years ago
parent
commit
2597eddbf2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      yml2.py

+ 2
- 2
yml2.py View File

@ -1,4 +1,4 @@
# YML 2.5.9 language definition
# YML 2.5.10 language definition
# written by VB.
@ -51,7 +51,7 @@ _xmlSymbol = u"(" + NameStartChar + u")(" + NameChar + u")*"
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)


Loading…
Cancel
Save