summaryrefslogtreecommitdiff
path: root/tex/context/base/syst-aux.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
commit965214d981e6129b782c67adcaf3a81aedcb0bac (patch)
tree84f5945aae8efc9b6eb1898b873be5453cafe43d /tex/context/base/syst-aux.lua
parente7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff)
downloadcontext-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz
stable 2013.05.28 00:36
Diffstat (limited to 'tex/context/base/syst-aux.lua')
-rw-r--r--tex/context/base/syst-aux.lua32
1 files changed, 1 insertions, 31 deletions
diff --git a/tex/context/base/syst-aux.lua b/tex/context/base/syst-aux.lua
index 9ef28996a..b0fb8483b 100644
--- a/tex/context/base/syst-aux.lua
+++ b/tex/context/base/syst-aux.lua
@@ -16,8 +16,7 @@ local commands, context = commands, context
local settings_to_array = utilities.parsers.settings_to_array
local format = string.format
local utfsub = utf.sub
-local P, S, C, Cc, Cs, Carg, lpegmatch, utf8char = lpeg.P, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Carg, lpeg.match, lpeg.patterns.utf8char
-
+local P, C, Carg, lpegmatch, utf8char = lpeg.P, lpeg.C, lpeg.Carg, lpeg.match, lpeg.patterns.utf8char
local setvalue = context.setvalue
@@ -29,15 +28,6 @@ function commands.getfirstcharacter(str)
setvalue("remainingcharacters",rest)
end
-function commands.thefirstcharacter(str)
- local first, rest = lpegmatch(pattern,str)
- context(first)
-end
-function commands.theremainingcharacters(str)
- local first, rest = lpegmatch(pattern,str)
- context(rest)
-end
-
local pattern = C(utf8char^-1)
function commands.doiffirstcharelse(chr,str)
@@ -88,23 +78,3 @@ end
-- \gdef\setpercentdimen#1#2%
-- {#1=\ctxcommand{percentageof("#2",\number#1)}\relax}
-
-local spaces = P(" ")^0/""
-
-local pattern = Cs(
- ( P("global") / "\\global" )^0
- * spaces
- * ( P("unexpanded") / "\\unexpanded" )^0
- * spaces
- * Cc("\\expandafter\\")
- * spaces
- * ( P("expanded") / "e" )^0
- * spaces
- * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" )
- * spaces
- * Cs( (P("##")/"#" + P(1))^0 )
-)
-
-function commands.thetexdefinition(str)
- context(lpegmatch(pattern,str))
-end