From 06b138f1e7eeb67f2b9539a6c38a5aed94a9fed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Mon, 15 Jun 2020 07:01:40 +0200 Subject: [PATCH] Less engine bug workarounds --- luametalatex-init.lua | 18 +----------------- luametaplain.ini | 3 --- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/luametalatex-init.lua b/luametalatex-init.lua index a094390..a24a2ec 100644 --- a/luametalatex-init.lua +++ b/luametalatex-init.lua @@ -79,28 +79,12 @@ do end end callback_register('read_data_file', function(name) error[[TODO]]return kpse.find_file(name, 'tex', true) end) -local input_pattern do - local hex = lpeg.R('09', 'af') - local hexx = hex * hex - local tonumber = tonumber - local char = utf8.char - local sub = string.sub - local char = lpeg.Cg('^^' * ( - ('^^' * ('^^' * hexx)^-1 * hexx)^-1 * hexx/function(s) - local cp = tonumber(sub(s, #s/2), 16) - return cp == 0 and '^^@' or char(cp) - end - -- + lpeg.R'\0\63' / function(s) return char(s:byte()+64) end - -- + lpeg.R'\63\127' / function(s) return char(s:byte()-64) end - )) + 1 - input_pattern = lpeg.Cs(char^0) -end callback_register('open_data_file', function(name) local f = io.open(name) return setmetatable({ reader = function() local line = f:read() - return line and input_pattern:match(line) + return line end, close = function()error[[1]] return f:close() end, }, { diff --git a/luametaplain.ini b/luametaplain.ini index b189cb4..07f3795 100644 --- a/luametaplain.ini +++ b/luametaplain.ini @@ -15,9 +15,6 @@ \global\def\eTeXrevision{.2} \endgroup \input load-unicode-data.tex -\showthe\mathcode`\1 \input etex.src -\showthe\mathcode`\1 \input luametalatex-baseregisters -\showthe\mathcode`\1 \dump