From: ntakahas Date: Wed, 14 May 2008 07:26:50 +0000 (+0000) Subject: Move the "macro" section before "map". X-Git-Tag: REL-1-5-2~33 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e6112d962a4e848c2e90259168717463323e883c;p=m17n%2Fm17n-db.git Move the "macro" section before "map". --- diff --git a/MIM/si-wijesekera.mim b/MIM/si-wijesekera.mim index a927553..2c241ba 100644 --- a/MIM/si-wijesekera.mim +++ b/MIM/si-wijesekera.mim @@ -30,6 +30,51 @@ This input method requires surrounding text support. (title "සි") +(macro + ;; prototype + (forward (set x 0)) + (backward (set x 0)) + (delete-preceding-zw (set x 0)) + (delete-following-zw (set x 0)) + + ;; skip following (virama zwj consonant)* sequence + (forward + (set cc3 @+3) + (cond + ((& (= @+1 0x0DCA) (= @+2 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6)) + (delete @+3) + 0x0DCA 0x200D + (insert cc3) + (forward)))) + + (backward + (set cc1 @-1) + (cond + ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6)) + (delete @-3) + 0x0DCA + 0x200D + (insert cc1) + (move @<) + (backward)))) + + (delete-preceding-zw + (cond + ((| (= @-1 0x200C) (= @-1 0x200D)) + (delete @-1) + (delete-preceding-zw)))) + + (delete-following-zw + (cond + ((| (= @+1 0x200C) (= @+1 0x200D)) + (delete @+1) + (delete-following-zw)))) + + (merge-kombuva + (delete @-1) + (delete @+2) + (insert c1))) + (map (consonant ("l" "ක") ; 0D9A @@ -497,51 +542,6 @@ This input method requires surrounding text support. ("\\" (shift join)))) -(macro - ;; prototype - (forward (set x 0)) - (backward (set x 0)) - (delete-preceding-zw (set x 0)) - (delete-following-zw (set x 0)) - - ;; skip following (virama zwj consonant)* sequence - (forward - (set cc3 @+3) - (cond - ((& (= @+1 0x0DCA) (= @+2 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6)) - (delete @+3) - 0x0DCA 0x200D - (insert cc3) - (forward)))) - - (backward - (set cc1 @-1) - (cond - ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6)) - (delete @-3) - 0x0DCA - 0x200D - (insert cc1) - (move @<) - (backward)))) - - (delete-preceding-zw - (cond - ((| (= @-1 0x200C) (= @-1 0x200D)) - (delete @-1) - (delete-preceding-zw)))) - - (delete-following-zw - (cond - ((| (= @+1 0x200C) (= @+1 0x200D)) - (delete @+1) - (delete-following-zw)))) - - (merge-kombuva - (delete @-1) - (delete @+2) - (insert c1))) - (state (init (consonant diff --git a/MIM/th-kesmanee.mim b/MIM/th-kesmanee.mim index 7b01c4e..bffe9d9 100644 --- a/MIM/th-kesmanee.mim +++ b/MIM/th-kesmanee.mim @@ -38,121 +38,6 @@ The level of character sequence acceptance defined in WTT 2.0. (title "ท") -(map - (map - ("!" "+") - ("\"" ".") - ("#" "๒") - ("$" "๓") - ("%" "๔") - ("&" "฿") - ("'" "ง") - ("(" "๖") - (")" "๗") - ("*" "๕") - ("+" "๙") - ("," "ม") - ("-" "ข") - ("." "ใ") - ("/" "ฝ") - ("0" "จ") - ("1" "ๅ") - ("2" "/") - ("3" "-") - ("4" "ภ") - ("5" "ถ") - ("6" "ุ") - ("7" "ึ") - ("8" "ค") - ("9" "ต") - (":" "ซ") - (";" "ว") - ("<" "ฒ") - ("=" "ช") - (">" "ฬ") - ("?" "ฦ") - ("@" "๑") - ("A" "ฤ") - ("B" "ฺ") - ("C" "ฉ") - ("D" "ฏ") - ("E" "ฎ") - ("F" "โ") - ("G" "ฌ") - ("H" "็") - ("I" "ณ") - ("J" "๋") - ("K" "ษ") - ("L" "ศ") - ("M" "?") - ("N" "์") - ("O" "ฯ") - ("P" "ญ") - ("Q" "๐") - ("R" "ฑ") - ("S" "ฆ") - ("T" "ธ") - ("U" "๊") - ("V" "ฮ") - ("W" "\"") - ("X" ")") - ("Y" "ํ") - ("Z" "(") - ("[" "บ") - ("\\" "ฃ") - ("]" "ล") - ("^" "ู") - ("_" "๘") - ("`" "_") - ("a" "ฟ") - ("b" "ิ") - ("c" "แ") - ("d" "ก") - ("e" "ำ") - ("f" "ด") - ("g" "เ") - ("h" "้") - ("i" "ร") - ("j" "่") - ("k" "า") - ("l" "ส") - ("m" "ท") - ("n" "ื") - ("o" "น") - ("p" "ย") - ("q" "ๆ") - ("r" "พ") - ("s" "ห") - ("t" "ะ") - ("u" "ี") - ("v" "อ") - ("w" "ไ") - ("x" "ป") - ("y" "ั") - ("z" "ผ") - ("{" "ฐ") - ("|" "ฅ") - ("}" ",") - ("~" "%"))) - -;; CTRL : 0000..0020, 007F..009F -;; NON : 0021..007E, 00A0..0E00 -;; CONS : 0E01..0E23, 0E25, 0E27..0E2E -;; LV : 0E40..0E44 -;; FV1 : 0E30, 0E32, 0E33 -;; FV2 : 0E45 -;; FV3 : 0E24, 0E26 -;; BV1 : 0E38 -;; BV2 : 0E39 -;; BD : 0E3A -;; TONE : 0E48..0E4B -;; AD1 : 0E4C, 0E4D -;; AD2 : 0E47 -;; AD3 : -;; AV1 : 0E34 -;; AV2 : 0E31, 0E36 -;; AV3 : 0E35, 0E37 - (macro ;; input global variables : arg1, arg2 @@ -283,6 +168,121 @@ The level of character sequence acceptance defined in WTT 2.0. (! (= arg1 0x0E26))) (set ret 1))))))) +(map + (map + ("!" "+") + ("\"" ".") + ("#" "๒") + ("$" "๓") + ("%" "๔") + ("&" "฿") + ("'" "ง") + ("(" "๖") + (")" "๗") + ("*" "๕") + ("+" "๙") + ("," "ม") + ("-" "ข") + ("." "ใ") + ("/" "ฝ") + ("0" "จ") + ("1" "ๅ") + ("2" "/") + ("3" "-") + ("4" "ภ") + ("5" "ถ") + ("6" "ุ") + ("7" "ึ") + ("8" "ค") + ("9" "ต") + (":" "ซ") + (";" "ว") + ("<" "ฒ") + ("=" "ช") + (">" "ฬ") + ("?" "ฦ") + ("@" "๑") + ("A" "ฤ") + ("B" "ฺ") + ("C" "ฉ") + ("D" "ฏ") + ("E" "ฎ") + ("F" "โ") + ("G" "ฌ") + ("H" "็") + ("I" "ณ") + ("J" "๋") + ("K" "ษ") + ("L" "ศ") + ("M" "?") + ("N" "์") + ("O" "ฯ") + ("P" "ญ") + ("Q" "๐") + ("R" "ฑ") + ("S" "ฆ") + ("T" "ธ") + ("U" "๊") + ("V" "ฮ") + ("W" "\"") + ("X" ")") + ("Y" "ํ") + ("Z" "(") + ("[" "บ") + ("\\" "ฃ") + ("]" "ล") + ("^" "ู") + ("_" "๘") + ("`" "_") + ("a" "ฟ") + ("b" "ิ") + ("c" "แ") + ("d" "ก") + ("e" "ำ") + ("f" "ด") + ("g" "เ") + ("h" "้") + ("i" "ร") + ("j" "่") + ("k" "า") + ("l" "ส") + ("m" "ท") + ("n" "ื") + ("o" "น") + ("p" "ย") + ("q" "ๆ") + ("r" "พ") + ("s" "ห") + ("t" "ะ") + ("u" "ี") + ("v" "อ") + ("w" "ไ") + ("x" "ป") + ("y" "ั") + ("z" "ผ") + ("{" "ฐ") + ("|" "ฅ") + ("}" ",") + ("~" "%"))) + +;; CTRL : 0000..0020, 007F..009F +;; NON : 0021..007E, 00A0..0E00 +;; CONS : 0E01..0E23, 0E25, 0E27..0E2E +;; LV : 0E40..0E44 +;; FV1 : 0E30, 0E32, 0E33 +;; FV2 : 0E45 +;; FV3 : 0E24, 0E26 +;; BV1 : 0E38 +;; BV2 : 0E39 +;; BD : 0E3A +;; TONE : 0E48..0E4B +;; AD1 : 0E4C, 0E4D +;; AD2 : 0E47 +;; AD3 : +;; AV1 : 0E34 +;; AV2 : 0E31, 0E36 +;; AV3 : 0E35, 0E37 + (state (init diff --git a/MIM/th-pattachote.mim b/MIM/th-pattachote.mim index 79cf673..2f36c78 100644 --- a/MIM/th-pattachote.mim +++ b/MIM/th-pattachote.mim @@ -38,6 +38,8 @@ The level of character sequence acceptance defined in WTT 2.0. (title "ท") +(include (th kesmanee) macro) + (map (map ("!" "+") @@ -135,8 +137,6 @@ The level of character sequence acceptance defined in WTT 2.0. ("}" "ฦ") ("~" "฿"))) -(include (th kesmanee) macro) - (state (init diff --git a/MIM/th-tis820.mim b/MIM/th-tis820.mim index f01ecf0..a1dcf87 100644 --- a/MIM/th-tis820.mim +++ b/MIM/th-tis820.mim @@ -38,6 +38,8 @@ The level of character sequence acceptance defined in WTT 2.0. (title "ท") +(include (th kesmanee) macro) + (map (map ("!" "ๅ") @@ -135,8 +137,6 @@ The level of character sequence acceptance defined in WTT 2.0. ("}" ",") ("~" "๛"))) -(include (th kesmanee) macro) - (state (init