summaryrefslogtreecommitdiff
path: root/luaotfload-database.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-01-14 05:27:37 -0800
committerPhilipp Gesang <phg42.2a@gmail.com>2014-01-14 05:27:37 -0800
commit09316ec5b7eb2cc2b507aa9105e4197a90d29071 (patch)
tree94034001ec4076782e2b5ce3ab0c4df7eb5ab954 /luaotfload-database.lua
parent55578e73e588594cefbced5f345399f7d9106a75 (diff)
parent17fdb59546dda7c2294f2445c5e9a9402a3bfead (diff)
downloadluaotfload-09316ec5b7eb2cc2b507aa9105e4197a90d29071.tar.gz
Merge pull request #181 from phi-gamma/texlive2014
move font request parser into parsers file
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r--luaotfload-database.lua27
1 files changed, 6 insertions, 21 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 32197cc..3f321d2 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -36,15 +36,13 @@ if not modules then modules = { } end modules ['luaotfload-database'] = {
--doc]]--
-local lpeg = require "lpeg"
+local lpeg = require "lpeg"
+local P, Cc, lpegmatch = lpeg.P, lpeg.Cc, lpeg.match
-local P, R, S, lpegmatch
- = lpeg.P, lpeg.R, lpeg.S, lpeg.match
-
-local C, Cc, Cf, Cg, Cs, Ct
- = lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Cs, lpeg.Ct
-
-local read_fonts_conf = luaotfload.parsers.read_fonts_conf
+local parsers = luaotfload.parsers
+local read_fonts_conf = parsers.read_fonts_conf
+local stripslashes = parsers.stripslashes
+local splitcomma = parsers.splitcomma
--- Luatex builtins
local load = load
@@ -62,7 +60,6 @@ local iolines = io.lines
local ioopen = io.open
local iopopen = io.popen
local kpseexpand_path = kpse.expand_path
-local kpseexpand_var = kpse.expand_var
local kpsefind_file = kpse.find_file
local kpselookup = kpse.lookup
local kpsereadable_file = kpse.readable_file
@@ -183,18 +180,6 @@ if not luaotfloadconfig.termwidth then
luaotfloadconfig.termwidth = tw
end
-names.patterns = { }
-local patterns = names.patterns
-
-local trailingslashes = P"/"^1 * P(-1)
-local stripslashes = C((1 - trailingslashes)^0)
-patterns.stripslashes = stripslashes
-
-local comma = P","
-local noncomma = 1-comma
-local splitcomma = Ct((C(noncomma^1) + comma)^1)
-patterns.splitcomma = splitcomma
-
local format_precedence = {
"otf", "ttc", "ttf",
"dfont", "afm", "pfb",