From 26ae25dbea9b066eae665f8aefb2b046ac67d431 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 24 Dec 2010 14:48:09 +0100 Subject: =?UTF-8?q?using=20context=E2=80=99s=20builtin=20pattern=20for=20u?= =?UTF-8?q?tf8=20characters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tex/context/third/transliterator/trans_tables_gr.lua | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'tex/context/third/transliterator/trans_tables_gr.lua') 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 -- cgit v1.2.3