summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-lpt.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-08-27 18:20:19 +0300
committerMarius <mariausol@gmail.com>2012-08-27 18:20:19 +0300
commit47d1a628ec1cbebf26ac6eeac1cdbdb71009e3fc (patch)
tree03b44a3953c1c3ae1665f96556bc7022a3eb81aa /tex/context/base/lxml-lpt.lua
parentef3bfc9ea7ed3326ea07cd48ccf2c3d8d55ea435 (diff)
downloadcontext-47d1a628ec1cbebf26ac6eeac1cdbdb71009e3fc.tar.gz
beta 2012.08.27 17:12
Diffstat (limited to 'tex/context/base/lxml-lpt.lua')
-rw-r--r--tex/context/base/lxml-lpt.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index b04c80550..9c784d3f5 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -540,10 +540,13 @@ local lp_builtin = P (
local lp_attribute = (P("@") + P("attribute::")) / "" * Cc("(ll.at and ll.at['") * ((R("az","AZ") + S("-_:"))^1) * Cc("'])")
------ 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
-local lp_fastpos_p = (P("+")^0 * R("09")^1 * P(-1)) / "l==%1"
-local lp_fastpos_n = (P("-") * R("09")^1 * P(-1)) / "(%1<0 and (#list+%1==l))"
+-- 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))"
local lp_fastpos = lp_fastpos_n + lp_fastpos_p