comparison lisp/mule/tibetan.el @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents
children 2923009caf47
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
1 ;;; tibetan.el --- Support for Tibetan language -*- coding: iso-2022-7bit; -*-
2
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5
6 ;; Keywords: multilingual, Tibetan
7
8 ;; This file is part of XEmacs.
9
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 ;; 02111-1307, USA.
24
25 ;;; Synched up with: Emacs 21.0.103 (language/tibetan.el).
26
27 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch>
28
29 ;; Created: Feb. 17. 1997
30
31 ;; History:
32 ;; 1997.03.13 Modification for special signs and punctuations.
33
34 ;;; Code:
35
36 ;;; Tibetan Character set.
37 ;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9
38 ;;; with a slight modification. And there are some subjoined
39 ;;; consonants which are not specified in Unicode.
40 ;;; I hope I can add missing characters later.
41 ;;;
42 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
43 ;;;2120 // $(7!!(B $(7!"(B $(7!#(B $(7!$(B $(7!%(B $(7!&(B $(7!'(B $(7!((B $(7!)(B $(7!*(B $(7!+(B $(7!,(B $(7!-(B $(7!.(B $(7!/(B ; obsolete glyphs (2123-5)
44 ;;;2130 $(7!0(B $(7!1(B $(7!2(B $(7!3(B $(7!4(B $(7!5(B $(7!6(B $(7!7(B $(7!8(B $(7!9(B $(7!:(B $(7!;(B $(7!<(B $(7!=(B $(7!>(B $(7!?(B ; Punctuations,
45 ;;;2140 $(7!@(B $(7!A(B $(7!B(B $(7!C(B $(7!D(B $(7!E(B $(7!F(B $(7!G(B $(7!H(B $(7!I(B $(7!J(B $(7!K(B $(7!L(B $(7!M(B $(7!N(B $(7!O(B ; Digits and
46 ;;;2150 $(7!P(B $(7!Q(B $(7!R(B $(7!S(B $(7!T(B $(7!U(B $(7!V(B $(7!W(B $(7!X(B $(7!Y(B $(7!Z(B $(7![(B $(7!\(B $(7!](B $(7!^(B $(7!_(B ; Special signs.
47 ;;;2160 $(7!`(B $(7!a(B $(7!b(B $(7!c(B $(7!d(B $(7!e(B $(7!f(B $(7!g(B $(7!h(B $(7!i(B $(7!j(B $(7!k(B $(7!l(B $(7!m(B $(7!n(B $(7!o(B ;
48 ;;;2170 $(7!p(B $(7!q(B $(7!r(B $(7!s(B $(7!t(B $(7!u(B $(7!v(B $(7!w(B $(7!x(B $(7!y(B $(7!z(B $(7!{(B $(7!|(B $(7!}(B $(7!~(B // ;
49 ;;;
50 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
51 ;;;2220 // $(7"!(B $(7""(B $(7"#(B $(7"$(B $(7"%(B $(7"&(B $(7"'(B $(7"((B $(7")(B $(7"*(B $(7"+(B $(7",(B $(7"-(B $(7".(B $(7"/(B ; Base consonants
52 ;;;2230 $(7"0(B $(7"1(B $(7"2(B $(7"3(B $(7"4(B $(7"5(B $(7"6(B $(7"7(B $(7"8(B $(7"9(B $(7":(B $(7";(B $(7"<(B $(7"=(B $(7">(B $(7"?(B ; and
53 ;;;2240 $(7"@(B $(7"A(B $(7"B(B $(7"C(B $(7"D(B $(7"E(B $(7"F(B $(7"G(B $(7"H(B $(7"I(B $(7"J(B $(7"K(B $(7"L(B $(7"M(B $(7"N(B $(7"O(B ; Vowel signs.
54 ;;;2250 $(7"P(B $(7"Q(B $(7"R(B $(7"S(B $(7"T(B $(7"U(B $(7"V(B $(7"W(B $(7"X(B $(7"Y(B $(7"Z(B $(7"[(B $(7"\(B $(7"](B $(7"^(B $(7"_(B ; (\x2251 = vowel a)
55 ;;;2260 $(7"`(B $(7"a(B $(7"b(B $(7"c(B $(7"d(B $(7"e(B $(7"f(B $(7"g(B $(7"h(B $(7"i(B $(7"j(B $(7"k(B $(7"l(B $(7"m(B $(7"n(B $(7"o(B ; Long vowels and
56 ;;;2270 $(7"p(B $(7"q(B $(7"r(B $(7"s(B $(7"t(B $(7"u(B $(7"v(B $(7"w(B $(7"x(B $(7"y(B $(7"z(B $(7"{(B $(7"|(B $(7"}(B $(7"~(B // ; vocalic r, l ARE
57 ;;; ; atomically
58 ;;; ; encoded.
59 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
60 ;;;2320 // $(7#!(B $(7#"(B $(7##(B $(7#$(B $(7#%(B $(7#&(B $(7#'(B $(7#((B $(7#)(B $(7#*(B $(7#+(B $(7#,(B $(7#-(B $(7#.(B $(7#/(B ; Subjoined consonants
61 ;;;2330 $(7#0(B $(7#1(B $(7#2(B $(7#3(B $(7#4(B $(7#5(B $(7#6(B $(7#7(B $(7#8(B $(7#9(B $(7#:(B $(7#;(B $(7#<(B $(7#=(B $(7#>(B $(7#?(B ;
62 ;;;2340 $(7#@(B $(7#A(B $(7#B(B $(7#C(B $(7#D(B $(7#E(B $(7#F(B $(7#G(B $(7#H(B $(7#I(B $(7#J(B $(7#K(B $(7#L(B $(7#M(B $(7#N(B $(7#O(B ;
63 ;;;2350 $(7#P(B $(7#Q(B $(7#R(B $(7#S(B $(7#T(B $(7#U(B $(7#V(B $(7#W(B $(7#X(B $(7#Y(B $(7#Z(B $(7#[(B $(7#\(B $(7#](B $(7#^(B $(7#_(B ; Hereafter, the chars
64 ;;;2360 $(7#`(B $(7#a(B $(7#b(B $(7#c(B $(7#d(B $(7#e(B $(7#f(B $(7#g(B $(7#h(B $(7#i(B $(7#j(B $(7#k(B $(7#l(B $(7#m(B $(7#n(B $(7#o(B ; are not specified
65 ;;;2370 $(7#p(B $(7#q(B $(7#r(B $(7#s(B $(7#t(B $(7#u(B $(7#v(B $(7#w(B $(7#x(B $(7#y(B $(7#z(B $(7#{(B $(7#|(B $(7#}(B $(7#~(B // ; in Unicode.
66 ;;;
67 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
68 ;;;2420 // $(7$!(B $(7$"(B $(7$#(B $(7$$(B $(7$%(B $(7$&(B $(7$'(B $(7$((B $(7$)(B $(7$*(B $(7$+(B $(7$,(B $(7$-(B $(7$.(B $(7$/(B ; Precomposed
69 ;;;2430 $(7$0(B $(7$1(B $(7$2(B $(7$3(B $(7$4(B $(7$5(B $(7$6(B $(7$7(B $(7$8(B $(7$9(B $(7$:(B $(7$;(B $(7$<(B $(7$=(B $(7$>(B $(7$?(B ; consonants for
70 ;;;2440 $(7$@(B $(7$A(B $(7$B(B $(7$C(B $(7$D(B $(7$E(B $(7$F(B $(7$G(B $(7$H(B $(7$I(B $(7$J(B $(7$K(B $(7$L(B $(7$M(B $(7$N(B $(7$O(B ; ordinary Tibetan.
71 ;;;2450 $(7$P(B $(7$Q(B $(7$R(B $(7$S(B $(7$T(B $(7$U(B $(7$V(B $(7$W(B $(7$X(B $(7$Y(B $(7$Z(B $(7$[(B $(7$\(B $(7$](B $(7$^(B $(7$_(B ; They are decomposed
72 ;;;2460 $(7$`(B $(7$a(B $(7$b(B $(7$c(B $(7$d(B $(7$e(B $(7$f(B $(7$g(B $(7$h(B $(7$i(B $(7$j(B $(7$k(B $(7$l(B $(7$m(B $(7$n(B $(7$o(B ; into base and
73 ;;;2470 $(7$p(B $(7$q(B $(7$r(B $(7$s(B $(7$t(B $(7$u(B $(7$v(B $(7$w(B $(7$x(B $(7$y(B $(7$z(B $(7${(B $(7$|(B $(7$}(B $(7$~(B // ; subjoined consonants
74 ;;; ; when written on a
75 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan
76 ;;;2520 // $(7%!(B $(7%"(B $(7%#(B $(7%$(B $(7%%(B $(7%&(B $(7%'(B $(7%((B $(7%)(B $(7%*(B $(7%+(B $(7%,(B $(7%-(B $(7%.(B $(7%/(B ; coding system.
77 ;;;2530 $(7%0(B $(7%1(B $(7%2(B $(7%3(B $(7%4(B $(7%5(B $(7%6(B $(7%7(B $(7%8(B $(7%9(B $(7%:(B $(7%;(B $(7%<(B $(7%=(B $(7%>(B $(7%?(B ;
78 ;;;2540 $(7%@(B $(7%A(B $(7%B(B $(7%C(B $(7%D(B $(7%E(B $(7%F(B $(7%G(B $(7%H(B $(7%I(B $(7%J(B $(7%K(B $(7%L(B $(7%M(B $(7%N(B $(7%O(B ;
79 ;;;2550 $(7%P(B $(7%Q(B $(7%R(B $(7%S(B $(7%T(B $(7%U(B $(7%V(B $(7%W(B $(7%X(B $(7%Y(B $(7%Z(B $(7%[(B $(7%\(B $(7%](B $(7%^(B $(7%_(B ;
80 ;;;2560 $(7%`(B $(7%a(B $(7%b(B $(7%c(B $(7%d(B $(7%e(B $(7%f(B $(7%g(B $(7%h(B $(7%i(B $(7%j(B $(7%k(B $(7%l(B $(7%m(B $(7%n(B $(7%o(B ;
81 ;;;2570 $(7%p(B $(7%q(B $(7%r(B $(7%s(B $(7%t(B $(7%u(B $(7%v(B $(7%w(B $(7%x(B $(7%y(B $(7%z(B $(7%{(B $(7%|(B $(7%}(B $(7%~(B // ;
82 ;;;
83
84
85 ; (make-coding-system
86 ; 'tibetan-iso-8bit 2 ?Q
87 ; "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)"
88 ; '(ascii tibetan nil nil
89 ; nil nil)
90 ; '((safe-charsets ascii tibetan)
91 ; (post-read-conversion . tibetan-post-read-conversion)
92 ; (pre-write-conversion . tibetan-pre-write-conversion)))
93
94 (make-coding-system
95 'tibetan-iso-8bit 'iso2022 "Tibetan/8-bit"
96 '(charset-g0 ascii
97 charset-g1 tibetan
98 mnemonic "Tibetan"
99 safe-charsets (ascii tibetan)
100 post-read-conversion tibetan-post-read-conversion
101 pre-write-conversion tibetan-pre-write-conversion
102 documentation "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)"))
103
104 (define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
105
106 (set-language-info-alist
107 "Tibetan" '((charset tibetan tibetan-1-column)
108 (coding-system tibetan-iso-8bit)
109 (coding-priority iso-2022-7bit tibetan-iso-8bit)
110 (input-method . "tibetan-wylie")
111 (features tibet-util)
112 (documentation . t)
113 (sample-text
114 . (tibetan-compose-string
115 (copy-sequence
116 "Tibetan (4$(7"7r'"]0"7"]14"20"21!;4%P0"G#!"Q14"20"21!;(B) $(7!4!5!5!>4"70"714$P0"!#C"Q1!;4"Er'"S0"E"S14"G0"G1!;4"70"714"2r'"[0"2"[1!;4"Dr'"[0"D"[14"#0"#14"G0"G1!>4"Ir'"]r'"_0"I"]"_1!;4"90"9"Q1!;4"/r'"S0"/"S1!;4"50"5"Q14#2x!#9r'"[0"2#9"[1!;4"Hx!"Rx!"Ur'"c0"H"A"U"c1!>(B")))))
117
118
119 ;; `$(7"A(B' is included in the pattern for subjoined consonants because we
120 ;; treat it specially in tibetan-add-components.
121 ;; modified by Tomabechi 1999/12/10
122 ;; modified by Tomabechi 2000/06/08
123 ;; To allow infinite addition of vowels/modifiers
124 ;; as specified in Unicode v.3
125 ;; $(7"A(B is removed from the class of subjoined. Tomabechi 2000/06/08
126 ;; (for Unicode support)
127 (defconst tibetan-composable-pattern
128 "[$(7"!(B-$(7"J"K(B][$(7#!(B-$(7#J#K#L#M(B]*[$(7"Q"R"S(B-$(7"^"a"b"e(B]*[$(7"_"c"d"g(B-$(7"l!I!e!g(B]*"
129 "Regexp matching a composable sequence of Tibetan characters.")
130
131 ;; Register a function to compose Tibetan characters.
132 (aset composition-function-table (make-char 'tibetan)
133 (list (cons tibetan-composable-pattern 'tibetan-composition-function)))
134
135 ;;;
136 ;;; Definitions of conversion data.
137 ;;;
138
139
140 ;;; alists for tibetan char <-> transcription conversion
141 ;;; longer transcription should come first
142 (defconst tibetan-consonant-transcription-alist
143 '(("tsh" . "$(7";(B")
144 ("dzh" . "$(7"=(B")
145 ("kSH" . "$(7"J(B")
146 ("kh" . "$(7""(B")
147 ("gh" . "$(7"$(B")
148 ("ng" . "$(7"%(B")
149 ("ch" . "$(7"'(B")
150 ("ny" . "$(7"*(B")
151 ("TH" . "$(7",(B")
152 ("DH" . "$(7".(B")
153 ("th" . "$(7"1(B")
154 ("dh" . "$(7"3(B")
155 ("ph" . "$(7"6(B")
156 ("bh" . "$(7"8(B")
157 ("ts" . "$(7":(B")
158 ("dz" . "$(7"<(B")
159 ("zh" . "$(7"?(B")
160 ("sh" . "$(7"E(B")
161 ("SH" . "$(7"F(B")
162 ("k" . "$(7"!(B")
163 ("g" . "$(7"#(B")
164 ("c" . "$(7"&(B")
165 ("j" . "$(7"((B")
166 ("T" . "$(7"+(B")
167 ("D" . "$(7"-(B")
168 ("N" . "$(7"/(B")
169 ("t" . "$(7"0(B")
170 ("d" . "$(7"2(B")
171 ("n" . "$(7"4(B")
172 ("p" . "$(7"5(B")
173 ("b" . "$(7"7(B")
174 ("m" . "$(7"9(B")
175 ("w" . "$(7">(B")
176 ("z" . "$(7"@(B")
177 ("'" . "$(7"A(B")
178 ("y" . "$(7"B(B")
179 ("r" . "$(7"C(B")
180 ("l" . "$(7"D(B")
181 ("s" . "$(7"G(B")
182 ("h" . "$(7"H(B")
183 ("H" . "$(7"H(B")
184 ("A" . "$(7"I(B")
185 ;; Added by Tomabechi 1999/12/10
186 ("R" . "$(7"K(B") ;; fixed form RA
187 ))
188
189
190 (defconst tibetan-vowel-transcription-alist
191 '(
192 ;; Composite Vowels
193 ;; Added by Tomabechi 2000/06/08
194 ("frr" . "$(7"X(B")
195 ("fll" . "$(7"Z(B")
196 ("fa" . "$(7"R(B")
197 ("fi" . "$(7"T(B")
198 ("fu" . "$(7"V(B")
199 ("fr" . "$(7"W(B")
200 ("fl" . "$(7"Y(B")
201 ("fI" . "$(7"b(B")
202 ;; Normal Vowels
203 ("ai" . "$(7"\(B")
204 ("au" . "$(7"^(B")
205 ("ee" . "$(7"\(B")
206 ("oo" . "$(7"^(B")
207 ("a" . "$(7"Q(B") ; invisible vowel sign (\x2251)
208 ("i" . "$(7"S(B")
209 ("u" . "$(7"U(B")
210 ("e" . "$(7"[(B")
211 ("o" . "$(7"](B")
212 ("E" . "$(7"\(B")
213 ("O" . "$(7"^(B")
214 ("I" . "$(7"a(B")
215 ("," . "$(7"e(B") ; idem.
216 ))
217
218 (defconst tibetan-modifier-transcription-alist
219 '(("M" . "$(7"_(B")
220 ("~" . "$(7"c(B")
221 ("`" . "$(7"d(B")
222 ("x" . "$(7"i(B")
223 ("X" . "$(7"j(B")
224 ("v" . "$(7"g(B")
225 ("V" . "$(7"h(B")
226 ("q" . "$(7"k(B")
227 ("Q" . "$(7"l(B")
228 ("_/" . "$(7!I(B")
229 ("_o" . "$(7!g(B")
230 ("_O" . "$(7!e(B")))
231
232 (defconst tibetan-precomposed-transcription-alist
233 '(("phyw" . "$(7$G(B")
234 ("tshw" . "$(7$)(B")
235 ("rtsw" . "$(7%.(B")
236 ("khw" . "$(7$"(B")
237 ("nyw" . "$(7$%(B")
238 ("tsw" . "$(7$((B")
239 ("zhw" . "$(7$*(B")
240 ("shw" . "$(7$.(B")
241 ("khy" . "$(7$A(B")
242 ("phy" . "$(7$D(B")
243 ("khr" . "$(7$Q(B")
244 ("thr" . "$(7$T(B")
245 ("phr" . "$(7$W(B")
246 ("shr" . "$(7$Z(B")
247 ("dzr" . "$(7$^(B")
248 ("grw" . "$(7$_(B")
249 ("rng" . "$(7%#(B")
250 ("rny" . "$(7%%(B")
251 ("rts" . "$(7%+(B")
252 ("rdz" . "$(7%,(B")
253 ("rgw" . "$(7%-(B")
254 ("rky" . "$(7%0(B")
255 ("rgy" . "$(7%1(B")
256 ("rmy" . "$(7%2(B")
257 ("lng" . "$(7%B(B")
258 ("sng" . "$(7%R(B")
259 ("sny" . "$(7%S(B")
260 ("sts" . "$(7%Z(B")
261 ("sky" . "$(7%`(B")
262 ("sgy" . "$(7%a(B")
263 ("spy" . "$(7%b(B")
264 ("sby" . "$(7%c(B")
265 ("smy" . "$(7%d(B")
266 ("skr" . "$(7%p(B")
267 ("sgr" . "$(7%q(B")
268 ("snr" . "$(7%r(B")
269 ("spr" . "$(7%s(B")
270 ("sbr" . "$(7%t(B")
271 ("smr" . "$(7%u(B")
272 ("kw" . "$(7$!(B")
273 ("gw" . "$(7$#(B")
274 ("cw" . "$(7$$(B")
275 ("tw" . "$(7$&(B")
276 ("dw" . "$(7$'(B")
277 ("zw" . "$(7$+(B")
278 ("rw" . "$(7$,(B")
279 ("lw" . "$(7$-(B")
280 ("sw" . "$(7$/(B")
281 ("hw" . "$(7$0(B")
282 ("ky" . "$(7$@(B")
283 ("gy" . "$(7$B(B")
284 ("py" . "$(7$C(B")
285 ("by" . "$(7$E(B")
286 ("my" . "$(7$F(B")
287 ("kr" . "$(7$P(B")
288 ("gr" . "$(7$R(B")
289 ("tr" . "$(7$S(B")
290 ("dr" . "$(7$U(B")
291 ("pr" . "$(7$V(B")
292 ("brk" . "$(7"7%!(B")
293 ("brg" . "$(7"7%"(B")
294 ("brng" . "$(7"7%#(B")
295 ("brj" . "$(7"7%$(B")
296 ("brny" . "$(7"7%%(B")
297 ("brt" . "$(7"7%&(B")
298 ("brd" . "$(7"7%'(B")
299 ("brn" . "$(7"7%((B")
300 ("brts" . "$(7"7%+(B")
301 ("brdz" . "$(7"7%,(B")
302 ("brl" . "$(7"7$d(B")
303 ("br" . "$(7$X(B")
304 ("mr" . "$(7$Y(B")
305 ("sr" . "$(7$[(B")
306 ("hr" . "$(7$\(B")
307 ("jr" . "$(7$](B")
308 ("kl" . "$(7$`(B")
309 ("gl" . "$(7$a(B")
310 ("blt" . "$(7"7%E(B")
311 ("bld" . "$(7"7%F(B")
312 ("bl" . "$(7$b(B")
313 ("zl" . "$(7$c(B")
314 ("rl" . "$(7$d(B")
315 ("sl" . "$(7$e(B")
316 ("rk" . "$(7%!(B")
317 ("rg" . "$(7%"(B")
318 ("rj" . "$(7%$(B")
319 ("rt" . "$(7%&(B")
320 ("rd" . "$(7%'(B")
321 ("rn" . "$(7%((B")
322 ("rb" . "$(7%)(B")
323 ("rm" . "$(7%*(B")
324 ("lk" . "$(7%@(B")
325 ("lg" . "$(7%A(B")
326 ("lc" . "$(7%C(B")
327 ("lj" . "$(7%D(B")
328 ("lt" . "$(7%E(B")
329 ("ld" . "$(7%F(B")
330 ("ln" . "$(7!!(B") ; dummy \x2121
331 ("lp" . "$(7%G(B")
332 ("lb" . "$(7%H(B")
333 ("lh" . "$(7%I(B")
334 ("sk" . "$(7%P(B")
335 ("sg" . "$(7%Q(B")
336 ("st" . "$(7%T(B")
337 ("sd" . "$(7%U(B")
338 ("sn" . "$(7%V(B")
339 ("sp" . "$(7%W(B")
340 ("sb" . "$(7%X(B")
341 ("sm" . "$(7%Y(B"))
342 )
343
344
345 (defconst tibetan-subjoined-transcription-alist
346 (sort '(("+k" . "$(7#!(B")
347 ("+kh" . "$(7#"(B")
348 ("+g" . "$(7##(B")
349 ("+gh" . "$(7#$(B")
350 ("+ng" . "$(7#%(B")
351 ("+c" . "$(7#&(B")
352 ("+ch" . "$(7#'(B")
353 ("+j" . "$(7#((B")
354 ("+ny" . "$(7#*(B")
355 ("+T" . "$(7#+(B")
356 ("+TH" . "$(7#,(B")
357 ("+D" . "$(7#-(B")
358 ("+DH" . "$(7#.(B")
359 ("+N" . "$(7#/(B")
360 ("+t" . "$(7#0(B")
361 ("+th" . "$(7#1(B")
362 ("+d" . "$(7#2(B")
363 ("+dh" . "$(7#3(B")
364 ("+n" . "$(7#4(B")
365 ("+p" . "$(7#5(B")
366 ("+ph" . "$(7#6(B")
367 ("+b" . "$(7#7(B")
368 ("+bh" . "$(7#8(B")
369 ("+m" . "$(7#9(B")
370 ("+ts" . "$(7#:(B")
371 ("+tsh" . "$(7#;(B")
372 ("+dz" . "$(7#<(B")
373 ("+dzh" . "$(7#=(B")
374 ("+w" . "$(7#>(B")
375 ("+zh" . "$(7#?(B")
376 ("+z" . "$(7#@(B")
377 ("+'" . "$(7#A(B")
378 ("+y" . "$(7#B(B")
379 ("+r" . "$(7#C(B")
380 ("+l" . "$(7#D(B")
381 ("+sh" . "$(7#E(B")
382 ("+SH" . "$(7#F(B")
383 ("+s" . "$(7#G(B")
384 ("+h" . "$(7#H(B")
385 ("+A" . "$(7#I(B")
386 ("+kSH" . "$(7#J(B")
387 ;; Added by Tomabechi 1999/12/10
388 ("+W" . "$(7#K(B") ;; fixed form subscribed WA
389 ("+Y" . "$(7#L(B") ;; fixed form subscribed YA
390 ("+R" . "$(7#M(B") ;; fixed form subscribed RA
391 )
392 (lambda (x y) (> (length (car x)) (length (car y))))))
393
394 ;;;
395 ;;; alist for Tibetan base consonant <-> subjoined consonant conversion.
396 ;;;
397 (defconst tibetan-base-to-subjoined-alist
398 '(("$(7"!(B" . "$(7#!(B")
399 ("$(7""(B" . "$(7#"(B")
400 ("$(7"#(B" . "$(7##(B")
401 ("$(7"$(B" . "$(7#$(B")
402 ("$(7"%(B" . "$(7#%(B")
403 ("$(7"&(B" . "$(7#&(B")
404 ("$(7"'(B" . "$(7#'(B")
405 ("$(7"((B" . "$(7#((B")
406 ("$(7"*(B" . "$(7#*(B")
407 ("$(7"+(B" . "$(7#+(B")
408 ("$(7",(B" . "$(7#,(B")
409 ("$(7"-(B" . "$(7#-(B")
410 ("$(7".(B" . "$(7#.(B")
411 ("$(7"/(B" . "$(7#/(B")
412 ("$(7"0(B" . "$(7#0(B")
413 ("$(7"1(B" . "$(7#1(B")
414 ("$(7"2(B" . "$(7#2(B")
415 ("$(7"3(B" . "$(7#3(B")
416 ("$(7"4(B" . "$(7#4(B")
417 ("$(7"5(B" . "$(7#5(B")
418 ("$(7"6(B" . "$(7#6(B")
419 ("$(7"7(B" . "$(7#7(B")
420 ("$(7"8(B" . "$(7#8(B")
421 ("$(7"9(B" . "$(7#9(B")
422 ("$(7":(B" . "$(7#:(B")
423 ("$(7";(B" . "$(7#;(B")
424 ("$(7"<(B" . "$(7#<(B")
425 ("$(7"=(B" . "$(7#=(B")
426 ("$(7">(B" . "$(7#>(B")
427 ("$(7"?(B" . "$(7#?(B")
428 ("$(7"@(B" . "$(7#@(B")
429 ("$(7"A(B" . "$(7#A(B")
430 ("$(7"B(B" . "$(7#B(B")
431 ("$(7"C(B" . "$(7#C(B")
432 ("$(7"D(B" . "$(7#D(B")
433 ("$(7"E(B" . "$(7#E(B")
434 ("$(7"F(B" . "$(7#F(B")
435 ("$(7"G(B" . "$(7#G(B")
436 ("$(7"H(B" . "$(7#H(B")
437 ("$(7"I(B" . "$(7#I(B")
438 ("$(7"J(B" . "$(7#J(B")
439 ;; Added by Tomabechi 1999/12/10
440 ("$(7"K(B" . "$(7#M(B") ;; Fixed form RA (224B->234D)
441 ))
442
443 ;;; alist for Tibetan composite vowels (long i, vocalic r, etc.)
444 ;;; New varialble. created by Tomabechi 2000/06/08
445 (defconst tibetan-composite-vowel-alist
446 '(;; LONG A
447 ;; ("$(7"R(B" . ((bc . tc) ?$(7"R(B))
448 ;; LONG I
449 ("$(7"T(B" . (?$(7"R(B (tc . bc) ?$(7"S(B))
450 ;; LONG U
451 ("$(7"V(B" . (?$(7"R(B (bc . tc) ?$(7"U(B))
452 ;; VOCALIC R
453 ("$(7"W(B" . (?$(7#C(B (tc . bc) ?$(7"a(B))
454 ;; LONG VOCALIC R
455 ("$(7"X(B" . (?$(7#C(B (bc . tc) ?$(7"R(B (tc . bc) ?$(7"a(B))
456 ;; VOCALIC L
457 ("$(7"Y(B" . (?$(7#D(B (tc . bc) ?$(7"a(B))
458 ;;$(7!;(BLONG VOCALIC L
459 ("$(7"Z(B" . (?$(7#D(B (bc . tc) ?$(7"R(B (tc . bc) ?$(7"a(B))
460 ;; LONG REVERSE I
461 ("$(7"b(B" . (?$(7"R(B (tc . bc) ?$(7"a(B))
462 ))
463
464
465
466 ;;;
467 ;;; alist for Tibetan consonantic components <-> precomposed glyph conversion.
468 ;;; (includes some punctuation conversion rules)
469 ;;;
470 (defconst tibetan-precomposition-rule-alist
471 `(("$(7"6#B#>(B" . "$(7$G(B")
472 ("$(7"##C#>(B" . "$(7$_(B")
473 ("$(7";#>(B" . "$(7$)(B")
474 ("$(7"C#:#>(B" . "$(7%.(B")
475 ("$(7"C###>(B" . "$(7%-(B")
476 ("$(7"C#!#B(B" . "$(7%0(B")
477 ("$(7"C###B(B" . "$(7%1(B")
478 ("$(7"C#9#B(B" . "$(7%2(B")
479 ("$(7"G#!#B(B" . "$(7%`(B")
480 ("$(7"G###B(B" . "$(7%a(B")
481 ("$(7"G#5#B(B" . "$(7%b(B")
482 ("$(7"G#7#B(B" . "$(7%c(B")
483 ("$(7"G#9#B(B" . "$(7%d(B")
484 ("$(7"G#!#C(B" . "$(7%p(B")
485 ("$(7"G###C(B" . "$(7%q(B")
486 ("$(7"G#4#C(B" . "$(7%r(B")
487 ("$(7"G#5#C(B" . "$(7%s(B")
488 ("$(7"G#7#C(B" . "$(7%t(B")
489 ("$(7"G#9#C(B" . "$(7%u(B")
490 ("$(7""#>(B" . "$(7$"(B")
491 ("$(7"*#>(B" . "$(7$%(B")
492 ("$(7":#>(B" . "$(7$((B")
493 ("$(7"?#>(B" . "$(7$*(B")
494 ("$(7"E#>(B" . "$(7$.(B")
495 ("$(7""#B(B" . "$(7$A(B")
496 ("$(7"6#B(B" . "$(7$D(B")
497 ("$(7""#C(B" . "$(7$Q(B")
498 ("$(7"1#C(B" . "$(7$T(B")
499 ("$(7"6#C(B" . "$(7$W(B")
500 ("$(7"E#C(B" . "$(7$Z(B")
501 ("$(7"<#C(B" . "$(7$^(B")
502 ("$(7"C#%(B" . "$(7%#(B")
503 ("$(7"C#*(B" . "$(7%%(B")
504 ("$(7"C#:(B" . "$(7%+(B")
505 ("$(7"C#<(B" . "$(7%,(B")
506 ("$(7"D#%(B" . "$(7%B(B")
507 ("$(7"G#%(B" . "$(7%R(B")
508 ("$(7"G#*(B" . "$(7%S(B")
509 ("$(7"G#:(B" . "$(7%Z(B")
510 ("$(7"!#>(B" . "$(7$!(B")
511 ("$(7"##>(B" . "$(7$#(B")
512 ("$(7"&#>(B" . "$(7$$(B")
513 ("$(7"0#>(B" . "$(7$&(B")
514 ("$(7"2#>(B" . "$(7$'(B")
515 ("$(7"@#>(B" . "$(7$+(B")
516 ("$(7"C#>(B" . "$(7$,(B")
517 ("$(7"D#>(B" . "$(7$-(B")
518 ("$(7"G#>(B" . "$(7$/(B")
519 ("$(7"H#>(B" . "$(7$0(B")
520 ("$(7"!#B(B" . "$(7$@(B")
521 ("$(7"##B(B" . "$(7$B(B")
522 ("$(7"5#B(B" . "$(7$C(B")
523 ("$(7"7#B(B" . "$(7$E(B")
524 ("$(7"9#B(B" . "$(7$F(B")
525 ("$(7"!#C(B" . "$(7$P(B")
526 ("$(7"##C(B" . "$(7$R(B")
527 ("$(7"0#C(B" . "$(7$S(B")
528 ("$(7"2#C(B" . "$(7$U(B")
529 ("$(7"5#C(B" . "$(7$V(B")
530 ("$(7"7#C(B" . "$(7$X(B")
531 ("$(7"9#C(B" . "$(7$Y(B")
532 ("$(7"G#C(B" . "$(7$[(B")
533 ("$(7"H#C(B" . "$(7$\(B")
534 ("$(7"(#C(B" . "$(7$](B")
535 ("$(7"!#D(B" . "$(7$`(B")
536 ("$(7"##D(B" . "$(7$a(B")
537 ("$(7"7#D(B" . "$(7$b(B")
538 ("$(7"@#D(B" . "$(7$c(B")
539 ("$(7"C#D(B" . "$(7$d(B")
540 ("$(7"G#D(B" . "$(7$e(B")
541 ("$(7"C#!(B" . "$(7%!(B")
542 ("$(7"C##(B" . "$(7%"(B")
543 ("$(7"C#((B" . "$(7%$(B")
544 ("$(7"C#0(B" . "$(7%&(B")
545 ("$(7"C#2(B" . "$(7%'(B")
546 ("$(7"C#4(B" . "$(7%((B")
547 ("$(7"C#7(B" . "$(7%)(B")
548 ("$(7"C#9(B" . "$(7%*(B")
549 ("$(7"D#!(B" . "$(7%@(B")
550 ("$(7"D##(B" . "$(7%A(B")
551 ("$(7"D#4(B" . "$(7!!(B") ; dummy 0x2121 added 2000/06/08 for transition l -> lng
552 ("$(7"D#&(B" . "$(7%C(B")
553 ("$(7"D#((B" . "$(7%D(B")
554 ("$(7"D#0(B" . "$(7%E(B")
555 ("$(7"D#2(B" . "$(7%F(B")
556 ("$(7"D#5(B" . "$(7%G(B")
557 ("$(7"D#7(B" . "$(7%H(B")
558 ("$(7"D#H(B" . "$(7%I(B")
559 ("$(7"G#!(B" . "$(7%P(B")
560 ("$(7"G##(B" . "$(7%Q(B")
561 ("$(7"G#0(B" . "$(7%T(B")
562 ("$(7"G#2(B" . "$(7%U(B")
563 ("$(7"G#4(B" . "$(7%V(B")
564 ("$(7"G#5(B" . "$(7%W(B")
565 ("$(7"G#7(B" . "$(7%X(B")
566 ("$(7"G#9(B" . "$(7%Y(B")))
567
568 (defconst tibetan-obsolete-glyphs
569 `(("$(7!=(B" . "$(8!=(B") ; 2 col <-> 1 col
570 ("$(7!?(B" . "$(8!?(B")
571 ("$(7!@(B" . "$(8!@(B")
572 ("$(7!A(B" . "$(8!A(B")
573 ("$(7"`(B" . "$(8"`(B")
574 ("$(7!;(B" . "$(8!;(B")
575 ("$(7!D(B" . "$(8!D(B")
576 ;; Yes these are dirty. But ...
577 ("$(7!>(B $(7!>(B" . ,(compose-string "$(7!>(B $(7!>(B" 0 3 [?$(7!>(B (Br . Bl) ? (Br . Bl) ?$(7!>(B]))
578 ("$(7!4!5!5(B" . ,(compose-string
579 "$(7#R#S#S#S(B" 0 4
580 [?$(7#R(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B]))
581 ("$(7!4!5(B" . ,(compose-string "$(7#R#S#S(B" 0 3 [?$(7#R(B (Br . Bl) ?$(7#S(B (Br . Bl) ?$(7#S(B]))
582 ("$(7!6(B" . ,(compose-string "$(7#R#S!I(B" 0 3 [?$(7#R(B (Br . Bl) ?$(7#S(B (br . tr) ?$(7!I(B]))
583 ("$(7!4(B" . ,(compose-string "$(7#R#S(B" 0 2 [?$(7#R(B (Br . Bl) ?$(7#S(B]))))
584
585 (defconst tibetan-regexp
586 (let ((l (list tibetan-precomposed-transcription-alist
587 tibetan-consonant-transcription-alist
588 tibetan-vowel-transcription-alist
589 tibetan-modifier-transcription-alist
590 tibetan-subjoined-transcription-alist))
591 (separator "\\|")
592 tail pattern)
593 (while l
594 (setq tail (car l) l (cdr l))
595 (while tail
596 (setq pattern (cons separator (cons (car (car tail)) pattern))
597 tail (cdr tail))))
598 (apply 'concat (nreverse (cdr pattern))))
599 "Regexp matching a Tibetan transcription of a composable Tibetan sequence.
600 The result of matching is to be used for indexing alists at conversion
601 from a roman transcription to the corresponding Tibetan character.")
602
603 (defvar tibetan-precomposed-regexp
604 (let ((l tibetan-precomposed-transcription-alist)
605 temp)
606 (setq temp "^\\(")
607 (setq temp
608 (concat temp (car (car l))))
609 (setq l (cdr l))
610 (while l
611 (setq temp
612 (concat temp "\\|" (car (car l))))
613 (setq l (cdr l)))
614 (concat temp "\\)"))
615 "Regexp string to match a romanized Tibetan complex consonant.
616 The result of matching is to be used for indexing alists when the input key
617 from an input method is converted to the corresponding precomposed glyph.")
618
619 (defvar tibetan-precomposition-rule-regexp
620 (let ((l tibetan-precomposition-rule-alist)
621 temp)
622 (setq temp "\\(")
623 (setq temp (concat temp (car (car l))))
624 (setq l (cdr l))
625 (while l
626 (setq temp (concat temp "\\|" (car (car l))))
627 (setq l (cdr l)))
628 (concat temp "\\)"))
629 "Regexp string to match a sequence of Tibetan consonantic components, i.e.,
630 one base consonant and one or more subjoined consonants.
631 The result of matching is to be used for indexing alist when the component
632 sequence is converted to the corresponding precomposed glyph.
633 This also matches some punctuation characters which need conversion.")
634
635 (defvar tibetan-decomposed nil)
636 (defvar tibetan-decomposed-temp nil)
637
638 (provide 'tibetan)
639
640 ;;; language/tibetan.el ends here