diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-01-14 13:21:20 +0100 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-01-14 13:21:20 +0100 |
commit | cbf1a28451ad42a7f8c2a9256810868f378e4631 (patch) | |
tree | b14244826ff599ca66bd624e90c5b4fe1ce77e40 /luaotfload-parsers.lua | |
parent | 6232768122e63018a69bfd6159514b60020b75bb (diff) | |
download | luaotfload-cbf1a28451ad42a7f8c2a9256810868f378e4631.tar.gz |
[db,tool,diagnose,parsers] move miscellaneous patterns into luaotfload-parsers
Diffstat (limited to 'luaotfload-parsers.lua')
-rw-r--r-- | luaotfload-parsers.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/luaotfload-parsers.lua b/luaotfload-parsers.lua index 89e3bc9..0789c42 100644 --- a/luaotfload-parsers.lua +++ b/luaotfload-parsers.lua @@ -49,6 +49,10 @@ local lfs = lfs local lfsisfile = lfs.isfile local lfsisdir = lfs.isdir +------------------------------------------------------------------------------- +--- FONTCONFIG +------------------------------------------------------------------------------- + --[[doc-- For fonts installed on the operating system, there are several @@ -296,3 +300,19 @@ end luaotfload.parsers.read_fonts_conf = read_fonts_conf + +------------------------------------------------------------------------------- +--- MISC PARSERS +------------------------------------------------------------------------------- + + +local trailingslashes = P"/"^1 * P(-1) +local stripslashes = C((1 - trailingslashes)^0) +parsers.stripslashes = stripslashes + +local comma = P"," +local noncomma = 1-comma +local splitcomma = Ct((C(noncomma^1) + comma)^1) +parsers.splitcomma = splitcomma + + |