summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-lpt.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-08-28 20:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2012-08-28 20:00:00 +0200
commit4e31ff5b5b5322618162608319002fc1c3ef0e0e (patch)
tree9c2e05d1cc5676844e55a72f6aa6449d19d17ed7 /tex/context/base/lxml-lpt.lua
parent5ba69e2aad5e677b2b69e8d4cef737552a30d24d (diff)
downloadcontext-4e31ff5b5b5322618162608319002fc1c3ef0e0e.tar.gz
beta 2012.08.28 20:00
Diffstat (limited to 'tex/context/base/lxml-lpt.lua')
-rw-r--r--tex/context/base/lxml-lpt.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 9c784d3f5..426e07b15 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -542,11 +542,9 @@ local lp_attribute = (P("@") + P("attribute::")) / "" * Cc("(ll.at and ll.at['")
-- lp_fastpos_p = (P("+")^0 * R("09")^1 * P(-1)) / function(s) return "l==" .. s end
-- lp_fastpos_n = (P("-") * R("09")^1 * P(-1)) / function(s) return "(" .. s .. "<0 and (#list+".. s .. "==l))" end
---
--- Cs really needed here:
-lp_fastpos_p = C(P("+")^0 * R("09")^1 * P(-1)) / "l==%1"
-lp_fastpos_n = C(P("-") * R("09")^1 * P(-1)) / "(%1<0 and (#list+%1==l))"
+lp_fastpos_p = P("+")^0 * R("09")^1 * P(-1) / "l==%0"
+lp_fastpos_n = P("-") * R("09")^1 * P(-1) / "(%0<0 and (#list+%0==l))"
local lp_fastpos = lp_fastpos_n + lp_fastpos_p
@@ -556,7 +554,7 @@ local lp_reserved = C("and") + C("or") + C("not") + C("div") + C("mod") + C("tr
-- return t .. "("
-- end
-local lp_lua_function = C(R("az","AZ","__")^1 * (P(".") * R("az","AZ","__")^1)^1) * ("(") / "%1("
+local lp_lua_function = (R("az","AZ","__")^1 * (P(".") * R("az","AZ","__")^1)^1) * ("(") / "%0("
local lp_function = C(R("az","AZ","__")^1) * P("(") / function(t) -- todo: better . handling
if expressions[t] then