diff options
| author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-12-24 00:36:00 +0100 | 
|---|---|---|
| committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-12-24 00:36:00 +0100 | 
| commit | 1702a800ec09c99e514185a34becb53309da7054 (patch) | |
| tree | 175817af96a7ebb5a33825c1f15bb5f46ab97554 /tex/context/third | |
| parent | 07ded7bc27e19ad200c5e14fd632a7ae8a36ac82 (diff) | |
| download | transliterator-1702a800ec09c99e514185a34becb53309da7054.tar.gz | |
comments for orientation
Diffstat (limited to 'tex/context/third')
| -rw-r--r-- | tex/context/third/transliterator/transliterator.lua | 30 | 
1 files changed, 20 insertions, 10 deletions
diff --git a/tex/context/third/transliterator/transliterator.lua b/tex/context/third/transliterator/transliterator.lua index 1bcbb32..4b64d82 100644 --- a/tex/context/third/transliterator/transliterator.lua +++ b/tex/context/third/transliterator/transliterator.lua @@ -47,11 +47,14 @@ translit.ru_consonants = {"б", "в", "г", "д", "ж", "з", "к", "л", "м",  -- and  -- trans_tables_trsc.lua.} +--------------------------------------------------------------------------------  -- Metatables allow for lazy concatenation. +--------------------------------------------------------------------------------  do      -- This returns the Union of both key sets for the “+” operator. -    -- The values of the first table will be updated (read: overridden) by those given in the second. +    -- The values of the first table will be updated (read: overridden) by +    -- those given in the second.      local Dict_add = {          __add = function (dict_a, dict_b)              assert (type(dict_a) == "table" and type(dict_b) == "table") @@ -73,6 +76,10 @@ do      end  end +-------------------------------------------------------------------------------- +-- Auxiliary Functions +-------------------------------------------------------------------------------- +  -- We might want to have all the table data nicely formatted by \CONTEXT\   -- itself, here's how we'll do it.  \type{translit.show_tab(t)} handles a  -- single table \type{t}, builds a Natural TABLE out of its content and @@ -96,8 +103,6 @@ local strempty = function (s)      end  end ---function translit.show_tab (tab_name) -    --local tab = translit[tab_name]  function translit.show_tab (tab)      -- Output a transliteration table, nicely formatted with natural tables.      -- Lots of calls to context() but as it’s only a goodie this doesn’t @@ -173,6 +178,18 @@ function translit.show_all_tabs ()      end  end +-- for internal use only + +translit.debug_count = 0 + +function translit.debug_next () +    translit.debug_count = translit.debug_count + 1 +    context("\\tfxx{\\bf translit debug msg. nr.~" .. translit.debug_count ..  "}") +end + +-------------------------------------------------------------------------------- +-- User-level Function +--------------------------------------------------------------------------------  -- \type{translit.transliterate(m, t)} constitutes the  -- metafunction that is called by the \type{\transliterate} command. @@ -211,10 +228,3 @@ function translit.transliterate (method, text)      end      context (text)  end - -translit.debug_count = 0 --- for internal use only -function translit.debug_next () -    translit.debug_count = translit.debug_count + 1 -    context("\\tfxx{\\bf translit debug msg. nr.~" .. translit.debug_count ..  "}") -end  | 
