From: ntakahas Date: Thu, 23 Feb 2006 08:03:57 +0000 (+0000) Subject: Add Delete handling. X-Git-Tag: REL-1-3-4~151 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c85fbdcded354d05d33c7ca799f35c2d5e8ec72b;p=m17n%2Fm17n-db.git Add Delete handling. Use <= and >= rather than < and > when appropriate. --- diff --git a/si-wijesekera.mim b/si-wijesekera.mim index 467b66e..cc84476 100644 --- a/si-wijesekera.mim +++ b/si-wijesekera.mim @@ -1,4 +1,4 @@ -;; Copyright (C) 2005 +;; Copyright (C) 2005, 2006 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H15PRO112 @@ -210,7 +210,7 @@ ("f" (set c @+1) (cond - ((& (> c 0x0D99) (< c 0x0DC7)) + ((& (>= c 0x0D9A) (<= c 0x0DC6)) (delete @+1) (insert c) (forward) @@ -243,7 +243,7 @@ (| (< @-2 0x0D9A) (> @-2 0x0DC6))) (delete @-1) 0x0DDB) - ((& (> @-1 0x0D99) (< @-1 0xDC7)) + ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x200C 0x0DD9) (1 0x0DD9))) @@ -276,7 +276,7 @@ (1 (set c 0))) (cond - ((& (> @-1 0x0D99) (< @-1 0x0DC6)) + ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x0DCA 0x200D 0x0DBA)) (cond ((> c 0) @@ -291,7 +291,7 @@ (1 (set c 0))) (cond - ((& (> @-1 0x0D99) (< @-1 0x0DC7)) + ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x0DCA 0x200D 0x0DBB)) (cond ((> c 0) @@ -307,7 +307,7 @@ ;; (set c 0))) ;; (backward) ;; (cond -;; ((& (> @-1 0x0D99) (< @-1 0x0DC7)) +;; ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) ;; (set c1 @-1) ;; (delete @-1) ;; (insert c1) @@ -341,14 +341,14 @@ ((= c 0x0D92) 0x0D8F) ((= c 0x0D93) - (cond ((& (> @-1 0x0D99) (< @-1 0x0DC7)) 0x200C)) + (cond ((& (>= @-1 0x0D9A) (<= @-1 0x0DC6)) 0x200C)) 0x0DD9) ((= c 0x0D95) 0x0D94) ((= c 0x0D96) 0x0D94) - ((& (> c 0x0D99) (< c 0x0DC7) (= @-2 0x0DCA) (= @-1 0x200D)) + ((& (>= c 0x0D9A) (<= c 0x0DC6) (= @-2 0x0DCA) (= @-1 0x200D)) (delete @-2)) ((= c 0x0DD9) @@ -358,7 +358,7 @@ (delete @-1) (delete @+1) 0x0D93) - ((& (> @+1 0x0D99) (< @+1 0x0DC7)) + ((& (>= @+1 0x0D9A) (<= @+1 0x0DC6)) (set c1 @+1) (cond ((= @+2 0x0DD9) @@ -378,11 +378,11 @@ (delete @+1) (insert c1) 0x0DD9))) - ((& (> @-2 0x0D99) (< @-2 0x0DC7)) + ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6)) (delete @-1) 0x200C 0x0DD9) - ((& (> @-4 0x0D99) (< @-4 0x0DC7) (= @-3 0x0DCA) (= @-2 0x200D)) + ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D)) (delete @-3) 0x0DD9) (1 @@ -396,11 +396,11 @@ (cond ((| (< @-1 0x0D9A) (> @-1 0x0DC6)) 0x0DD9) - ((& (> @-2 0x0D99) (< @-2 0x0DC7)) + ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6)) (delete @-1) 0x200C 0x0DDB) - ((& (> @-4 0x0D99) (< @-4 0x0DC7) (= @-3 0x0DCA) (= @-2 0x200D)) + ((& (>= @-4 0x0D9A) (<= @-4 0x0DC6) (= @-3 0x0DCA) (= @-2 0x200D)) (delete @-3) 0x0DDB) (1 @@ -417,11 +417,72 @@ 0x0DD8)) (cond - ((& (> @-1 0x0D99) - (< @-1 0x0DC7) + ((& (>= @-1 0x0D9A) + (<= @-1 0x0DC6) (| (= @+1 0x0DD9) (= @+1 0x0DDB))) 0x200C))) + ((Delete) + (delete-following-zw) + (set c @+1) + (cond + ((< c 0) + (unhandle))) + (delete @+1) + (cond + ((= c 0x0D86) + 0x0DCF) + ((= c 0x0D87) + 0x0DD0) + ((= c 0x0D88) + 0x0DD1) + ((= c 0x0D8C) + 0x0DDF) + ((= c 0x0D8E) + 0x0DD8) + ((= c 0x0D90) + 0x0DDF) + ((= c 0x0D92) + 0x0DCA) + ((= c 0x0D93) + 0x0D91) + + ((= c 0x0D9A) + (insert "A") + (delete @+1)) + + ((& (>= c 0x0D9A) (<= c 0x0DC6)) + (forward) + (cond + ((= @+1 0x0DD9) + (delete @+1) + (move @<) + (insert c)) + ((= @+1 0x0DDB) + (delete @+1) + 0x0DD9 + (move @<) + (insert c)) + ((= @+1 0x0DDA) + (delete @+1) + 0x0DCA + (move @<) + (insert c)) + ((= @+1 0x0DDC) + (delete @+1) + 0x0DCF + (move @<) + (insert c)) + ((= @+1 0x0DDE) + (delete @+1) + 0x0DDF + (move @<) + (insert c)) + (1 + (delete @<)))) + ((= c 0x0DDB) + 0x0DD9))) + ("\\" (shift join)))) (macro @@ -429,12 +490,13 @@ (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 0x0D99) (< cc3 0x0DC7)) + ((& (= @+1 0x0DCA) (= @+2 0x200D) (>= cc3 0x0D9A) (<= cc3 0x0DC6)) (delete @+3) 0x0DCA 0x200D (insert cc3) @@ -443,7 +505,7 @@ (backward (set cc1 @-1) (cond - ((& (= @-3 0x0DCA) (= @-2 0x200D) (> cc1 0x0D99) (< cc1 0x0DC7)) + ((& (= @-3 0x0DCA) (= @-2 0x200D) (>= cc1 0x0D9A) (<= cc1 0x0DC6)) (delete @-3) 0x0DCA 0x200D @@ -457,6 +519,12 @@ (delete @-1) (delete-preceding-zw)))) + (delete-following-zw + (cond + ((| (= @+1 0x200C) (= @+1 0x200D)) + (delete @+1) + (delete-following-zw)))) + (merge-combuva (delete @-1) (delete @+2) @@ -490,13 +558,13 @@ (cond ((| (= c 0x0DD9) (= c 0x0DDB)) (cond - ((& (> @-2 0x0D99) (< @-2 0x0DC7)) + ((& (>= @-2 0x0D9A) (<= @-2 0x0DC6)) (delete @-1) (move @<) 0x0DCA 0x200D (move @>) (insert c)))) - ((& (> c 0x0D99) (< c 0x0DC7)) + ((& (>= c 0x0D9A) (<= c 0x0DC6)) (move @<) 0x0DCA 0x200D)) (shift init))