summaryrefslogtreecommitdiff
path: root/tex/context/third/transliterator/trans_tables_gr.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-12-24 14:48:09 +0100
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-12-24 14:48:09 +0100
commit26ae25dbea9b066eae665f8aefb2b046ac67d431 (patch)
tree56e70d092f1463c072fcad3923aedd4150615c03 /tex/context/third/transliterator/trans_tables_gr.lua
parente4e6366ff5882efcb7bbefe8b2a0cd3e0fc2029a (diff)
downloadtransliterator-26ae25dbea9b066eae665f8aefb2b046ac67d431.tar.gz
using context’s builtin pattern for utf8 characters
Diffstat (limited to 'tex/context/third/transliterator/trans_tables_gr.lua')
-rw-r--r--tex/context/third/transliterator/trans_tables_gr.lua19
1 files changed, 2 insertions, 17 deletions
diff --git a/tex/context/third/transliterator/trans_tables_gr.lua b/tex/context/third/transliterator/trans_tables_gr.lua
index bed775a..084478d 100644
--- a/tex/context/third/transliterator/trans_tables_gr.lua
+++ b/tex/context/third/transliterator/trans_tables_gr.lua
@@ -644,23 +644,8 @@ translit.tables["Greek transliteration archaic characters"] = translit.gr_other
function translit.dogreek (mode, text)
local P, R, S, V, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs
-
-
- -- http://lua-users.org/lists/lua-l/2009-06/msg00343.html
- local utfchar = R("\000\127") +
- R("\194\223") * R("\128\191") +
- R("\224\240") * R("\128\191") * R("\128\191") +
- R("\241\244") * R("\128\191") * R("\128\191") * R("\128\191")
-
- -- Add keys of a dictionary to a ruleset.
- function addrules (dict, rules)
- for i, _ in pairs(dict) do
- if rules == nil then rules = P(i)
- else rules = rules + P(i)
- end
- end
- return rules
- end
+ local addrules = translit.addrules
+ local utfchar = lpeg.patterns.utf8char
if mode == "gr" or mode == "gr_n" then