m17n-db/si-wijesekera_surrounding_to_preedit.patch

685 lines
14 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- m17n-db-1.3.3/si-wijesekera.mim.orig 2006-11-28 12:51:48.000000000 +0530
+++ m17n-db-1.3.3/si-wijesekera.mim 2006-10-16 18:47:08.000000000 +0530
@@ -1,4 +1,4 @@
-;; Copyright (C) 2005
+;; Copyright (C) 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
@@ -20,491 +20,231 @@
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;; 02111-1307, USA.
-(input-method si wijesekera)
+(input-method si wijesekera)
(description "Sinhala input method based on SLS 1134 Rev. 2:2004.
- <http://http://www.fonts.lk/doc/sin-kbd-layout4.pdf>
+
+Reference URL : http://http://www.fonts.lk/doc/sin-kbd-layout4.pdf
+
+This input method uses preedit rather than surrounding text.
+
+Key Summary :
+ඳ --> alt-gr+o
+ඟ --> alt-gr+.
+ඬ --> alt-gr+v
+ඦ --> alt-gr+c
+ඃ --> alt-gr+x
+෴ --> alt-gr+'
+
+Key summary: Tyronne Wickramarathne <tywickra@redhat.com>
+
")
-(title "Wijesekera")
+(title "සි")
(map
(consonant
- ("l" "ක") ; 0D9A
- ("L" "ඛ") ; 0D9B
- ("." "ග") ; 0D9C
- (">" "ඝ") ; 0D9D
- ("X" "ඞ") ; 0D9E
- ((A-.) "ඟ") ; 0D9F
- ("p" "ච") ; 0DA0
- ("P" "ඡ") ; 0DA1
- ("c" "ජ") ; 0DA2
- ("C" "ඣ") ; 0DA3
- ("\[" "ඤ") ; 0DA4
- ("{" "ඥ") ; 0DA5
- ((A-c) "ඦ") ; 0DA6
- ("g" "ට") ; 0DA7
- ("G" "ඨ") ; 0DA8
- ("v" "ඩ") ; 0DA9
- ("V" "ඪ") ; 0DAA
- ("K" "ණ") ; 0DAB
- ((A-v) "ඬ") ; 0DAC
- (";" "ත") ; 0DAD
- (":" "ථ") ; 0DAE
- ("o" "ද") ; 0DAF
- ("O" "ධ") ; 0DB0
- ("k" "න") ; 0DB1
- ((A-o) "ඳ") ; 0DB3
- ("m" "ප") ; 0DB4
- ("M" "ඵ") ; 0DB5
- ("n" "බ") ; 0DB6
- ("N" "භ") ; 0DB7
- ("u" "ම") ; 0DB8
- ("U" "ඹ") ; 0DB9
- ("h" "ය") ; 0DBA
- ("r" "ර") ; 0DBB
- ("," "ල") ; 0DBD
- ("j" "ව") ; 0DC0
- ("Y" "ශ") ; 0DC1
- ("I" "ෂ") ; 0DC2
- ("i" "ස") ; 0DC3
- ("y" "හ") ; 0DC4
- ("<" "ළ") ; 0DC5
- ("F" "ෆ") ; 0DC6
- )
+ ("l" "ක") ; 0D9A
+ ("L" "ඛ") ; 0D9B
+ ("." "ග") ; 0D9C
+ (">" "ඝ") ; 0D9D
+ ("X" "ඞ") ; 0D9E
+ ((A-.) "ඟ") ((0x2E A-z) "ඟ") ; 0D9F
+ ("p" "ච") ; 0DA0
+ ("P" "ඡ") ; 0DA1
+ ("c" "ජ") ; 0DA2
+ ("C" "ඣ") ; 0DA3
+ ("\[" "ඤ") ; 0DA4
+ ("{" "ඥ") ; 0DA5
+ ((A-c) "ඦ") ((0x63 A-z) "ඦ") ; 0DA6
+ ("g" "ට") ; 0DA7
+ ("G" "ඨ") ; 0DA8
+ ("v" "ඩ") ; 0DA9
+ ("V" "ඪ") ; 0DAA
+ ("K" "ණ") ; 0DAB
+ ((A-v) "ඬ") ((0x76 A-z) "ඬ") ; 0DAC
+ (";" "ත") ; 0DAD
+ (":" "ථ") ; 0DAE
+ ("o" "ද") ; 0DAF
+ ("O" "ධ") ; 0DB0
+ ("k" "න") ; 0DB1
+ ((A-o) "ඳ") ((0x6F A-z) "ඳ") ; 0DB3
+ ("m" "ප") ; 0DB4
+ ("M" "ඵ") ; 0DB5
+ ("n" "බ") ; 0DB6
+ ("N" "භ") ; 0DB7
+ ("u" "ම") ; 0DB8
+ ("U" "ඹ") ; 0DB9
+ ("h" "ය") ; 0DBA
+ ("r" "ර") ; 0DBB
+ ("," "ල") ; 0DBD
+ ("j" "ව") ; 0DC0
+ ("Y" "ශ") ; 0DC1
+ ("I" "ෂ") ; 0DC2
+ ("i" "ස") ; 0DC3
+ ("y" "හ") ; 0DC4
+ ("<" "ළ") ; 0DC5
+ ("F" "ෆ") ; 0DC6
+
+ ("<q" "ළු") ; muurdhaja lu (0DC5 0DD4)
+ ("<qE" "ළූ") ; 0DC5 0DD6
+ )
- (misc
+ (others
("x" "") ; 0D82
((A-x) "ඃ") ; 0D83
("w" "අ") ; 0D85
+ ("wd" "ආ") ; 0D86
+ ("we" "ඇ") ; 0D87
+ ("wE" "ඈ") ; 0D88
("b" "ඉ") ; 0D89
("B" "ඊ") ; 0D8A
("W" "උ") ; 0D8B
+ ("WA" "ඌ") ; 0D8C
("R" "ඍ") ; 0D8D
+ ("RD" "ඎ") ; 0D8E
((A-,) "ඏ") ; 0D8F
+ ((A-, 0x41) "ඐ") ; 0D90
+ ("t" "එ") ; 0D91
+ ("ta" "ඒ") ; 0D92
("T" "ඔ") ; 0D94
+ ("Ta" "ඕ") ; 0D95
+ ("TA" "ඖ") ; 0D96
+
+ ("a" "්") ; 0DCA
+
+ ("d" "ා") ; 0DCF
+ ("e" "ැ") ; 0DD0
+ ("E" "ෑ") ; 0DD1
- ("s" "ි") ; 0DD2
- ("S" "ී") ; 0DD3
("q" "ු") ; 0DD4
("Q" "ූ") ; 0DD6
+ ("D" "ෘ") ; 0DD8
+
+ ("A" "ෟ") ; 0DDF
+
+ ("DD" "ෲ") ; 0DF2
((A-a) "ෳ") ; 0DF3
((A-') "෴") ; 0DF4
+ ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
+ ("JE" "ළූ") ; 0DC5 0DD6
+
+ ((S-\ ) " ") ; NBSP (00A0)
+ ((A-\ ) "") ; ZWNJ (200C)
+
+ ("H" "්‍ය") ; yansaya (0DCA 200D 0DBA)
+ ("`" "්‍ර") ; rakaransaya (0DCA 200D 0DBB)
+ ("~" "ර්‍") ; repaya (0DBB 0DCA 200D)
+
("\]" ";")
("}" ":")
("'" ".")
("\"" ",")
("z" "'")
("Z" "\"")
+ )
- ("|" "‍්") ; touch (ZWJ 0DCA)
- ("J" "ළු") ; muurdhaja lu (0DC5 0DD4)
- ((S-\ ) " ") ; NBSP
- ((A-\ ) "") ; ZWNJ
+ (is-pilla
+ ("s" "ි") ; 0DD2
+ ("S" "ී")) ; 0DD3
- ("t"
- (set c @-2)
- (cond
- ((= @-1 0x0DD9)
- (cond
- ((= c 0x200C)
- (delete @-2)
- 0x0D93)
- ((| (< c 0x0D9A) (> c 0x0DC6))
- (delete @-1)
- 0x0D93)
- (1
- 0x0D91)))
- (1
- 0x0D91)))
-
- ("a"
- (set c @-1)
- (cond
- ((= c 0x0D91)
- (delete @-1)
- 0x0D92)
- ((= c 0x0D94)
- (delete @-1)
- 0x0D95)
- ((= c 0x0DD9)
- (delete @-1)
- 0x0DDA)
- ((= c 0x0DDC)
- (delete @-1)
- 0x0DDD)
- (1
- 0x0DCA)))
-
- ("d"
- (set c @-1)
- (cond
- ((= c 0x0D85)
- (delete @-1)
- 0x0D86)
- ((= c 0x0DD9)
- (delete @-1)
- 0x0DDC)
- (1
- 0x0DCF)))
-
- ("e"
- (cond
- ((= @-1 0x0D85)
- (delete @-1)
- 0x0D87)
- (1
- 0x0DD0)))
-
- ("E"
- (set c @-1)
- (cond
- ((= c 0x0D85)
- (delete @-1)
- 0x0D88)
- ((= c 0x0DD4)
- (cond
- ((= @-2 0x0DC5)
- (delete @-1)
- 0x0DD6)
- (1
- 0x0DD1)))
- (1
- 0x0DD1)))
-
- ("D"
- (set c @-1)
- (cond
- ((= c 0x0D8D)
- (delete @-1)
- 0x0D8E)
- ((= c 0x0DD8)
- (delete @-1)
- 0x0DF2)
- (1
- 0x0DD8)))
-
- ("A"
- (set c @-1)
- (cond
- ((= c 0x0D8B)
- (delete @-1)
- 0x0D8C)
- ((= c 0x0D8F)
- (delete @-1)
- 0x0D90)
- ((= c 0x0D94)
- (delete @-1)
- 0x0D96)
- ((= c 0x0DD9)
- (delete @-1)
- 0x0DDE)
- (1
- 0x0DDF)))
-
- ("f"
- (set c @+1)
- (cond
- ((& (> c 0x0D99) (< c 0x0DC7))
- (delete @+1)
- (insert c)
- (forward)
- (set c @+1)
- (cond
- ((= c 0x0DCA)
- (delete @+1)
- 0x0DDA)
- ((= c 0x0DD9)
- (delete @+1)
- 0x0DDB)
- ((= c 0x0DCF)
- (delete @+1)
- 0x0DDC)
- ((= c 0x0DDF)
- (delete @+1)
- 0x0DDE)
- (1
- 0x0DD9)))
- ((= c 0x0D91)
- (delete @+1)
- 0x0D93)
- ((= c 0x0DD9)
- (delete @+1)
- 0x0DDB)
- ((& (= c 0x200C) (= @+2 0x0DD9))
- (delete @+2)
- 0x200C 0x0DDB)
- ((& (= @-1 0x0DD9)
- (| (< @-2 0x0D9A) (> @-2 0x0DC6)))
- (delete @-1)
- 0x0DDB)
- ((& (> @-1 0x0D99) (< @-1 0xDC7))
- 0x200C 0x0DD9)
- (1
- 0x0DD9)))
-
- ;; sanyaka letters
- ((A-z)
- (set c @-1)
- (cond
- ((= c 0x0DAF)
- (delete @-1)
- 0x0DB3)
- ((= c 0x0D9C)
- (delete @-1)
- 0x0D9F)
- ((= c 0x0DA9)
- (delete @-1)
- 0x0DAC)
- ((= c 0x0DA2)
- (delete @-1)
- 0x0DA6)))
-
- ;; yansaya
- ("H"
- (set c @-1)
- (cond
- ((= c 0x0DD9)
- (delete @-1))
- ((= c 0x0DDB)
- (delete @-1))
- (1
- (set c 0)))
- (cond
- ((& (> @-1 0x0D99) (< @-1 0x0DC6))
- 0x0DCA 0x200D 0x0DBA))
- (cond
- ((> c 0)
- (insert c))))
-
- ;; rakaransaya
- ("`"
- (set c @-1)
- (cond
- ((| (= c 0x0DD9) (= c 0x0DDB) (= c 0x0DD2) (= c 0x0DD3))
- (delete @-1))
- (1
- (set c 0)))
- (cond
- ((& (> @-1 0x0D99) (< @-1 0x0DC7))
- 0x0DCA 0x200D 0x0DBB))
- (cond
- ((> c 0)
- (insert c))))
-
-;; Repaya is disabled.
-;; ("~"
-;; (set c @-1)
-;; (cond
-;; ((| (= c 0x0DD9) (= c 0x0DDB))
-;; (delete @-1))
-;; (1
-;; (set c 0)))
-;; (backward)
-;; (cond
-;; ((& (> @-1 0x0D99) (< @-1 0x0DC7))
-;; (set c1 @-1)
-;; (delete @-1)
-;; (insert c1)
-;; (move @<)
-;; 0x0DBB 0x0DCA 0x200D))
-;; (cond
-;; ((> c 0)
-;; (move @>)
-;; (insert c))))
-
- ((BackSpace)
- (delete-preceding-zw)
- (set c @-1)
- (cond
- ((< c 0)
- (unhandle)))
- (delete @-1)
- (cond
- ((= c 0x0D86)
- 0x0D85)
- ((= c 0x0D87)
- 0x0D85)
- ((= c 0x0D88)
- 0x0D85)
- ((= c 0x0D8C)
- 0x0D8B)
- ((= c 0x0D8E)
- 0x0D8D)
- ((= c 0x0D90)
- 0x0D8F)
- ((= c 0x0D92)
- 0x0D8F)
- ((= c 0x0D93)
- (cond ((& (> @-1 0x0D99) (< @-1 0x0DC7)) 0x200C))
- 0x0DD9)
- ((= c 0x0D95)
- 0x0D94)
- ((= c 0x0D96)
- 0x0D94)
-
- ((& (> c 0x0D99) (< c 0x0DC7) (= @-2 0x0DCA) (= @-1 0x200D))
- (delete @-2))
-
- ((= c 0x0DD9)
- (cond
- ((| (< @-1 0x0D9A) (> @-1 0x0DC6)))
- ((= @+1 0x0D91)
- (delete @-1)
- (delete @+1)
- 0x0D93)
- ((& (> @+1 0x0D99) (< @+1 0x0DC7))
- (set c1 @+1)
- (cond
- ((= @+2 0x0DD9)
- (merge-combuva)
- 0x0DDB)
- ((= @+2 0x0DCA)
- (merge-combuva)
- 0x0DDA)
- ((= @+2 0x0DCF)
- (merge-combuva)
- 0x0DDC)
- ((= @+2 0x0DDF)
- (merge-combuva)
- 0x0DDE)
- (1
- (delete @-1)
- (delete @+1)
- (insert c1)
- 0x0DD9)))
- ((& (> @-2 0x0D99) (< @-2 0x0DC7))
- (delete @-1)
- 0x200C
- 0x0DD9)
- ((& (> @-4 0x0D99) (< @-4 0x0DC7) (= @-3 0x0DCA) (= @-2 0x200D))
- (delete @-3)
- 0x0DD9)
- (1
- (delete @-1)
- 0x0DD9)))
-
- ((= c 0x0DDA)
- 0x0DD9)
-
- ((= c 0x0DDB)
- (cond
- ((| (< @-1 0x0D9A) (> @-1 0x0DC6))
- 0x0DD9)
- ((& (> @-2 0x0D99) (< @-2 0x0DC7))
- (delete @-1)
- 0x200C
- 0x0DDB)
- ((& (> @-4 0x0D99) (< @-4 0x0DC7) (= @-3 0x0DCA) (= @-2 0x200D))
- (delete @-3)
- 0x0DDB)
- (1
- (delete @-1)
- 0x0DDB)))
-
- ((= c 0x0DDC)
- 0x0DD9)
- ((= c 0x0DDD)
- 0x0DDC)
- ((= c 0x0DDE)
- 0x0DD9)
- ((= c 0x0DF2)
- 0x0DD8))
-
- (cond
- ((& (> @-1 0x0D99)
- (< @-1 0x0DC7)
- (| (= @+1 0x0DD9) (= @+1 0x0DDB)))
- 0x200C)))
-
- ("\\" (shift join))))
-
-(macro
- ;; prototype
- (forward (set x 0))
- (backward (set x 0))
- (delete-preceding-zw (set x 0))
-
- ;; skip following (virama zwj consonant)* sequence
- (forward
- (set cc3 @+3)
- (cond
- ((& (= @+1 0x0DCA) (= @+2 0x200D) (> cc3 0x0D99) (< cc3 0x0DC7))
- (delete @+3)
- 0x0DCA 0x200D
- (insert cc3)
- (forward))))
-
- (backward
- (set cc1 @-1)
- (cond
- ((& (= @-3 0x0DCA) (= @-2 0x200D) (> cc1 0x0D99) (< cc1 0x0DC7))
- (delete @-3)
- 0x0DCA
- 0x200D
- (insert cc1)
- (move @<)
- (backward))))
-
- (delete-preceding-zw
- (cond
- ((| (= @-1 0x200C) (= @-1 0x200D))
- (delete @-1)
- (delete-preceding-zw))))
-
- (merge-combuva
- (delete @-1)
- (delete @+2)
- (insert c1)))
+ (kombuva
+ ("f" "ෙ")) ; 0DD9
-(state
- (init
- (consonant
- (cond
- ((= @-1 0x0DD9)
- (cond
- ((= @-2 0x200C)
- (delete @-2)
- 0x0DD9)
- ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
- (delete @-1)
- 0x0DD9)))
- ((= @-1 0x0DDB)
- (cond
- ((= @-2 0x200C)
- (delete @-2)
- 0x0DDB)
- ((| (< @-2 0x0D9A) (> @-2 0x0DC6))
- (delete @-1)
- 0x0DDB)))))
- (misc))
+ (yansaka
+ ("H"))
+
+ (rakaransaya
+ ("`"))
+
+ (repaya
+ ("~"))
+
+ (eyanna
+ ("w"))
+
+ (al-lakuna
+ ("a"))
+
+ (aela-pilla
+ ("d"))
+
+ (gayanukitta
+ ("A"))
(join
- (consonant
- (set c @-1)
- (cond
- ((| (= c 0x0DD9) (= c 0x0DDB))
- (cond
- ((& (> @-2 0x0D99) (< @-2 0x0DC7))
- (delete @-1)
- (move @<)
- 0x0DCA 0x200D
- (move @>)
- (insert c))))
- ((& (> c 0x0D99) (< c 0x0DC7))
- (move @<)
- 0x0DCA 0x200D))
- (shift init))
+ ("\\")
+ ("|"))
+
+ (backspace
+ ((BackSpace)))
+ )
- (nil
- (shift init))))
+(state
+ (init
+ (consonant (shift consonant))
+ (others)
+ (is-pilla (shift is-pilla))
+ (kombuva (shift kombuva)))
+
+ (consonant
+ (rakaransaya 0x0DCA 0x200D 0x0DBB)
+ (yansaya 0x0DCA 0x200D 0x0DBA)
+ (repaya (move @-) 0x0DBB 0x0DCA 0x200D (move @+))
+ (is-pilla (shift is-pilla))
+ (join 0x0DCA 0x200D (shift consonant+join)))
+
+ (consonant+join
+ (consonant (shift consonant))
+ (backspace (undo)))
+
+ (is-pilla
+ (rakaransaya (move @-) 0x0DCA 0x200D 0x0DBB (shift init)))
+
+ (kombuva
+ (eyanna (delete @<) 0x0D93 (shift init))
+ (al-lakuna (delete @<) 0x0DDA (shift init))
+ (kombuva (delete @<) 0x0DDB (shift combu_deka))
+ (aela-pilla (delete @<) 0x0DDC (shift kombuva_haa_aela-pilla))
+ (gayanukitta (delete @<) 0x0DDE (shift init))
+ (consonant (move @1) (delete @0) (move @>) 0x0DD9 (shift consonant+kombuva))
+ (backspace (undo)))
+
+ (combu_deka
+ (consonant (move @1) (delete @0) (move @>) 0x0DDB (shift init))
+ (backspace (undo)))
+
+ (kombuva_haa_aela-pilla
+ (al-lakuna (delete @<) 0x0DDD (shift init))
+ (backspace (undo)))
+
+ (consonant+kombuva
+ (al-lakuna (delete @-) 0x0DDA (shift init))
+ (aela-pilla (delete @-) 0x0DDC (shift consonant+kombuva_haa_aela-pilla))
+ (gayanukitta (delete @-) 0x0DDE (shift init))
+ (yansaka (move @-) 0x0DCA 0x200D 0x0DBA (move @>))
+ (rakaransaya (move @-) 0x0DCA 0x200D 0x0DBB (move @>))
+ (join (shift consonant+join+kombuva))
+ (touch (move @-) 0x200D 0x0DCA (move @>))
+ (backspace (undo)))
+
+ (consonant+kombuva_haa_aela-pilla
+ (al-lakuna (delete @-) 0x0DDD (shift init))
+ (backspace (undo)))
+
+ (consonant+join+kombuva
+ (consonant (move @-) (delete @-) 0x0DCA 0x200D (move @+) 0x0DD9
+ (shift consonant+kombuva))
+ (backspace (undo)))
+ )
;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; End:
+