summaryrefslogtreecommitdiff
path: root/tex/context/base/util-prs.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-04-11 16:45:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-04-11 16:45:00 +0200
commit612f23ed1b01240fdc9ca5132dbd3164e96ed570 (patch)
tree8eafde3944b1b46eae32e68b240a5eb9cf5f71fc /tex/context/base/util-prs.lua
parent0bd8dee4e7e38cfb027bf788505de24aca28261c (diff)
downloadcontext-612f23ed1b01240fdc9ca5132dbd3164e96ed570.tar.gz
beta 2011.04.11 16:45
Diffstat (limited to 'tex/context/base/util-prs.lua')
-rw-r--r--tex/context/base/util-prs.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/tex/context/base/util-prs.lua b/tex/context/base/util-prs.lua
index 617dc0c78..591453760 100644
--- a/tex/context/base/util-prs.lua
+++ b/tex/context/base/util-prs.lua
@@ -6,18 +6,20 @@ if not modules then modules = { } end modules ['util-prs'] = {
license = "see context related readme files"
}
+local P, R, V, C, Ct, Carg = lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Carg
+local lpegmatch = lpeg.match
+local concat, format, gmatch = table.concat, string.format, string.gmatch
+local tostring, type, next = tostring, type, next
+
utilities = utilities or {}
utilities.parsers = utilities.parsers or { }
local parsers = utilities.parsers
parsers.patterns = parsers.patterns or { }
--- we could use a Cf Cg construct
+local setmetatableindex = table.setmetatableindex
+local sortedhash = table.sortedhash
-local P, R, V, C, Ct, Carg = lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Carg
-local lpegmatch = lpeg.match
-local concat, format, gmatch = table.concat, string.format, string.gmatch
-local tostring, type, next, setmetatable = tostring, type, next, setmetatable
-local sortedhash = table.sortedhash
+-- we could use a Cf Cg construct
local escape, left, right = P("\\"), P('{'), P('}')
@@ -216,7 +218,7 @@ function parsers.getparameters(self,class,parentclass,settings)
sp = { }
self[parentclass] = sp
end
- setmetatable(sc, { __index = sp })
+ setmetatableindex(sc,sp)
end
end
parsers.settings_to_hash(settings,sc)