# HG changeset patch # User Volker Birk # Date 1505972187 -7200 # Node ID d937e9d7c4fed0185d033ef08ca382f757081732 # Parent 57c1866bd87b0daa0e0755b4bb654bb551755a6e Version 2.5.6 diff -r 57c1866bd87b -r d937e9d7c4fe backend.py --- a/backend.py Thu Sep 21 07:36:15 2017 +0200 +++ b/backend.py Thu Sep 21 07:36:27 2017 +0200 @@ -626,6 +626,28 @@ result += codegen(Symbol(u'lineQuote', u'| ' + l[space:])) return code(result) + elif ctype == "textsectionu": + result = u'' + ll = obj[1].splitlines() + space = len(ll[-1]) - 2 + for l in ll[1:-1]: + m = re.match(bqq, l) + if m: + cmd = m.group(1) + try: + r, x = parseLine(cmd, _inner, [], True, comment) + if x: raise SyntaxError(cmd) + result += _finish(r) + except SyntaxError: + if included: + raise SyntaxError(u"in " + included + u":" + u(line) + u": syntax error in executing command: " + cmd.strip()) + else: + raise SyntaxError(u"in " + u(line) + u": syntax error in executing command: " + cmd.strip()) + else: + if result != u'': result += u' ' + result += codegen(Symbol(u'quote', [u'> ' + l[space:]])) + return code(result) + elif ctype == "lineQuote" or ctype == "quote": m, text, base, inds = None, u"", 0, 0 diff -r 57c1866bd87b -r d937e9d7c4fe heading.en.yhtml2 --- a/heading.en.yhtml2 Thu Sep 21 07:36:15 2017 +0200 +++ b/heading.en.yhtml2 Thu Sep 21 07:36:27 2017 +0200 @@ -13,7 +13,7 @@ div id=headline { p > YML – Why a Markup Language?! div class=small { - "YML 2.5.5 of We Aug 24 2016 – Copyleft 2007-2016, " + "YML 2.5.6 of We Aug 24 2016 – Copyleft 2007-2017, " a "http://blog.fdik.org", "Volker Birk"; " – " a "http://fdik.org/yml2.tar.bz2", "Download YML 2"; diff -r 57c1866bd87b -r d937e9d7c4fe yml2.py --- a/yml2.py Thu Sep 21 07:36:15 2017 +0200 +++ b/yml2.py Thu Sep 21 07:36:27 2017 +0200 @@ -1,4 +1,4 @@ -# YML 2.5.3 language definition +# YML 2.5.6 language definition # written by VB. @@ -77,12 +77,13 @@ 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'(\|\|(\>*).*?\|\|(\>*))', re.S) +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 def funclist(): return listing(func) _cmd = funclist, 0, [";", "."] -_inner = [include, textsection, pythonCall, _cmd, quote, lineQuote, tagQuote, pyExp] +_inner = [include, textsection, textsectionu, pythonCall, _cmd, quote, lineQuote, tagQuote, pyExp] _cc = "{", -1, _inner, "}" def content_plain(): return [ (_l, 0, _p, 0, _b, 0, _cc), (_p, 0, _b, 0, _cc), (_b, 0, _cc), _cc ] content_plain.__name__ = "content"