diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-28 13:42:27 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-28 13:42:27 +0200 |
commit | a10bc5d5ed9ab1c11c951ad1edd90967e93f6ad3 (patch) | |
tree | 36ee3e62b1faf3f9f6d0a933870fccc75a17fb08 /luaotfload-database.lua | |
parent | aac8e130427d977fc84282bc18d511430ea5fe77 (diff) | |
download | luaotfload-a10bc5d5ed9ab1c11c951ad1edd90967e93f6ad3.tar.gz |
[db] setup common lpeg patterns
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r-- | luaotfload-database.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index a49e575..a0a532e 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -117,9 +117,17 @@ end local report = logs.names_report +names.patterns = { } +local patterns = names.patterns + local trailingslashes = P"/"^1 * P(-1) local stripslashes = C((1 - trailingslashes)^0) -names.patterns = { stripslashes = stripslashes } +patterns.stripslashes = stripslashes + +local comma = P"," +local noncomma = 1-comma +local splitcomma = Ct((C(noncomma^1) + comma)^1) +patterns.splitcomma = splitcomma --[[doc-- We use the functions in the cache.* namespace that come with the |