5 (defvar its-pinyin-cn-open-braket "
\e$A!8
\e(B" "*[") ; "
\e$A#[
\e(B"
6 (defvar its-pinyin-cn-close-braket "
\e$A!9
\e(B" "*]") ; "
\e$A#]
\e(B"
8 (defvar its-pinyin-tw-open-braket "
\e$(G!V
\e(B" "*[") ; "
\e$(G!b
\e(B "
9 (defvar its-pinyin-tw-close-braket "
\e$(G!W
\e(B" "*]") ; "
\e$(G!c
\e(B"
12 (defvar its-quanjiao-escape "Z")
13 (defvar its-banjiao-escape "X")
15 (defconst its-pinyin-term
16 (char-to-string (make-char 'chinese-sisheng ?@)))
18 (defsubst its-defoutput* (input display)
19 (its-set-output (its-goto-state input nil t) display))
21 (defun its-prev-terminal-state (input)
22 (let ((len (length input))
23 (state (its-get-start-state its-current-map))
24 (i 0) (ret nil) kst ks)
26 (setq state (its-get-next-state state (aref input i))))
27 (if (or (null (its-kst-p (setq kst (its-get-kst/t state))))
28 (mapcan (lambda (eob) (if (eq (its-eob-back eob) -1) (list t)))
30 (and (setq ks (assq -1 (car kst)))
31 (null (its-get-kst/t (cdr ks)))))
36 (defun its-define-qingsheng (shengmu yunmu &optional s y)
37 (let ((input (concat shengmu yunmu))
38 (output (concat (if s s (capitalize shengmu))
41 state term kst i len c+b)
42 (setq state (its-goto-state input nil t))
43 (its-make-next-state state -1 input output)
44 (its-make-next-state state ? (concat input " ") output)
45 (its-make-next-state state ?0 (concat input "0") output)
47 state (its-make-otherwise output its-otherwise-back-one))
48 (setq term (its-prev-terminal-state (substring input 0 -1)))
51 (setq len (length (its-get-keyseq term))
53 output (car (rassoc '(nil . -1) (cdr (its-get-kst/t term)))))
55 (eq (setq term (its-get-next-state term (aref input i)))
57 (setq i (1+ i) kst (its-get-kst/t term))
58 (if (null (assq -1 (car kst)))
59 (its-make-next-state term -1
60 (its-get-keyseq term) output (- len i)))
61 (setq c+b (its-make-class+back nil (1- (- len i))))
62 (if (null (rassoc c+b (cdr kst)))
63 (its-define-otherwise term
64 (its-make-otherwise output c+b))))))
67 (defmacro its-do-sisheng-table (list)
68 `(progn ,@(mapcar (lambda (syl)
69 `(its-define-sisheng ,(car syl) ,(cdr syl)))
72 (defmacro its-define-sisheng (shengmu yunmu)
73 `(let ((qing (nth 5 ,yunmu)) (y (car ,yunmu))
74 (ss (list ,@shengmu)) s cs state i)
78 state (its-define-qingsheng s y cs qing))
81 (its-make-next-state state (+ ?0 i)
83 (concat cs (nth i ,yunmu) its-pinyin-term))
87 (defmacro its-define-pinyin-table ()
88 '(let ((- "") (B "b") (C "c") (D "d") (F "f") (G "g") (H "h")
89 (J "j") (K "k") (L "l") (M "m") (N "n") (P "p") (Q "q")
90 (R "r") (S "s") (T "t") (W "w") (X "x") (Y "y") (Z "z")
91 (CH "ch") (SH "sh") (ZH "zh")
93 (A '("a" "
\e(0!
\e(B" "
\e(0"
\e(B" "
\e(0#
\e(B" "
\e(0$
\e(B" "a" ))
94 (AI '("ai" "
\e(0!
\e(Bi" "
\e(0"
\e(Bi" "
\e(0#
\e(Bi" "
\e(0$
\e(Bi" "ai" ))
95 (AN '("an" "
\e(0!
\e(Bn" "
\e(0"
\e(Bn" "
\e(0#
\e(Bn" "
\e(0$
\e(Bn" "an" ))
96 (ANG '("ang" "
\e(0!
\e(Bng" "
\e(0"
\e(Bng" "
\e(0#
\e(Bng" "
\e(0$
\e(Bng" "ang" ))
97 (AO '("ao" "
\e(0!
\e(Bo" "
\e(0"
\e(Bo" "
\e(0#
\e(Bo" "
\e(0$
\e(Bo" "ao" ))
98 (E '("e" "
\e(0%
\e(B" "
\e(0&
\e(B" "
\e(0'
\e(B" "
\e(0(
\e(B" "e" ))
99 (EI '("ei" "
\e(0%
\e(Bi" "
\e(0&
\e(Bi" "
\e(0'
\e(Bi" "
\e(0(
\e(Bi" "ei" ))
100 (EN '("en" "
\e(0%
\e(Bn" "
\e(0&
\e(Bn" "
\e(0'
\e(Bn" "
\e(0(
\e(Bn" "en" ))
101 (ENG '("eng" "
\e(0%
\e(Bng" "
\e(0&
\e(Bng" "
\e(0'
\e(Bng" "
\e(0(
\e(Bng" "eng" ))
102 (ER '("er" "
\e(0%
\e(Br" "
\e(0&
\e(Br" "
\e(0'
\e(Br" "
\e(0(
\e(Br" "er" ))
103 (I '("i" "
\e(0)
\e(B" "
\e(0*
\e(B" "
\e(0+
\e(B" "
\e(0,
\e(B" "i" ))
104 (IA '("ia" "i
\e(0!
\e(B" "i
\e(0"
\e(B" "i
\e(0#
\e(B" "i
\e(0$
\e(B" "ia" ))
105 (IAN '("ian" "i
\e(0!
\e(Bn" "i
\e(0"
\e(Bn" "i
\e(0#
\e(Bn" "i
\e(0$
\e(Bn" "ian" ))
106 (IANG '("iang" "i
\e(0!
\e(Bng" "i
\e(0"
\e(Bng" "i
\e(0#
\e(Bng" "i
\e(0$
\e(Bng" "iang"))
107 (IAO '("iao" "i
\e(0!
\e(Bo" "i
\e(0"
\e(Bo" "i
\e(0#
\e(Bo" "i
\e(0$
\e(Bo" "iao" ))
108 (IE '("ie" "i
\e(0%
\e(B" "i
\e(0&
\e(B" "i
\e(0'
\e(B" "i
\e(0(
\e(B" "ie" ))
109 (IN '("in" "
\e(0)
\e(Bn" "
\e(0*
\e(Bn" "
\e(0+
\e(Bn" "
\e(0,
\e(Bn" "in" ))
110 (ING '("ing" "
\e(0)
\e(Bng" "
\e(0*
\e(Bng" "
\e(0+
\e(Bng" "
\e(0,
\e(Bng" "ing" ))
111 (IONG '("iong" "i
\e(0-
\e(Bng" "i
\e(0.
\e(Bng" "i
\e(0/
\e(Bng" "i
\e(00
\e(Bng" "iong"))
112 (IU '("iu" "i
\e(01
\e(B" "i
\e(02
\e(B" "i
\e(03
\e(B" "i
\e(04
\e(B" "iu" ))
113 (O '("o" "
\e(0-
\e(B" "
\e(0.
\e(B" "
\e(0/
\e(B" "
\e(00
\e(B" "o" ))
114 (ONG '("ong" "
\e(0-
\e(Bng" "
\e(0.
\e(Bng" "
\e(0/
\e(Bng" "
\e(00
\e(Bng" "ong" ))
115 (OU '("ou" "
\e(0-
\e(Bu" "
\e(0.
\e(Bu" "
\e(0/
\e(Bu" "
\e(00
\e(Bu" "ou" ))
116 (U '("u" "
\e(01
\e(B" "
\e(02
\e(B" "
\e(03
\e(B" "
\e(04
\e(B" "u" ))
117 (V '("v" "
\e(05
\e(B" "
\e(06
\e(B" "
\e(07
\e(B" "
\e(08
\e(B" "
\e(09
\e(B" ))
118 (UA '("ua" "u
\e(0!
\e(B" "u
\e(0"
\e(B" "u
\e(0#
\e(B" "u
\e(0$
\e(B" "ua" ))
119 (UAI '("uai" "u
\e(0!
\e(Bi" "u
\e(0"
\e(Bi" "u
\e(0#
\e(Bi" "u
\e(0$
\e(Bi" "uai" ))
120 (UAN '("uan" "u
\e(0!
\e(Bn" "u
\e(0"
\e(Bn" "u
\e(0#
\e(Bn" "u
\e(0$
\e(Bn" "uan" ))
121 (UANG '("uang" "u
\e(0!
\e(Bng" "u
\e(0"
\e(Bng" "u
\e(0#
\e(Bng" "u
\e(0$
\e(Bng" "uang"))
122 (UE '("ue" "u
\e(0%
\e(B" "u
\e(0&
\e(B" "u
\e(0'
\e(B" "u
\e(0(
\e(B" "ue" ))
123 (VE '("ve" "
\e(09%
\e(B" "
\e(09&
\e(B" "
\e(09'
\e(B" "
\e(09(
\e(B" "
\e(09
\e(Be" ))
124 (UI '("ui" "u
\e(0)
\e(B" "u
\e(0*
\e(B" "u
\e(0+
\e(B" "u
\e(0,
\e(B" "ui" ))
125 (UN '("un" "
\e(01
\e(Bn" "
\e(02
\e(Bn" "
\e(03
\e(Bn" "
\e(04
\e(Bn" "un" ))
126 (UO '("uo" "u
\e(0-
\e(B" "u
\e(0.
\e(B" "u
\e(0/
\e(B" "u
\e(00
\e(B" "uo" )))
128 (its-do-sisheng-table
129 (((- B C D F G H K L M N P S T W Y Z CH SH ZH ) . A)
130 ((- B C D G H K L M N P S T W Z CH SH ZH ) . AI)
131 ((- B C D F G H K L M N P R S T W Y Z CH SH ZH ) . AN)
132 ((- B C D F G H K L M N P R S T W Y Z CH SH ZH ) . ANG)
133 ((- B C D G H K L M N P R S T Y Z CH SH ZH ) . AO)
134 ((- C D G H K L M N R S T Y Z CH SH ZH ) . E)
135 ((- B C D F G H K L M N P T W Z SH ZH ) . EI)
136 ((- B C D F G H K M N P R S W Z CH SH ZH ) . EN)
137 ((- B C D F G H K L M N P R S T W Z CH SH ZH ) . ENG)
139 (( B C D J L M N P Q R S T X Y Z CH SH ZH ) . I)
141 (( B D J L M N P Q T X ) . IAN)
142 (( J L N Q X ) . IANG)
143 (( B D J L M N P Q T X ) . IAO)
144 (( B D J L M N P Q T X ) . IE)
145 (( B J L M N P Q X Y ) . IN)
146 (( B D J L M N P Q T X Y ) . ING)
148 (( D J L M N Q X ) . IU)
149 ((- B F L M P W Y ) . O)
150 (( C D G H K L N R S T Y Z CH ZH ) . ONG)
151 ((- C D F G H K L M N P R S T Y Z CH SH ZH ) . OU)
152 (( B C D F G H J K L M N P Q R S T W X Y Z CH SH ZH ) . U)
154 (( G H K R CH SH ZH ) . UA)
155 (( G H K CH SH ZH ) . UAI)
156 (( C D G H J K L N Q R S T X Y Z CH SH ZH ) . UAN)
157 (( G H K CH SH ZH ) . UANG)
160 (( C D G H K R S T Z CH SH ZH ) . UI)
161 (( C D G H J K L Q R S T X Y Z CH SH ZH ) . UN)
162 (( C D G H K L N R S T Z CH SH ZH ) . UO)
164 ((J Q X) . (cons "a" (cdr IA )))
165 ((J Q X) . (cons "ai" (cdr IA )))
166 ((J Q X) . (cons "an" (cdr IAN )))
167 ((J Q X) . (cons "ang" (cdr IANG)))
168 ((J Q X) . (cons "ao" (cdr IAO )))
169 ((J Q X) . (cons "e" (cdr IE )))
170 ((J Q X) . (cons "ei" (cdr IE )))
171 ((J Q X) . (cons "en" (cdr IN )))
172 ((J Q X) . (cons "eng" (cdr ING )))
173 ((J Q X) . (cons "ou" (cdr IU )))))
175 (its-define-qingsheng "hm" "")
176 (its-define-qingsheng "hng" "")
177 (its-define-qingsheng "" "ng")
179 (its-define-qingsheng "" "m")
180 (its-define-qingsheng "" "n")
181 (its-defrule "n2" "
\e(0=@
\e(B")
182 (its-defrule "n3" "
\e(0>@
\e(B")
183 (its-defrule "n4" "
\e(0?@
\e(B"))))
185 (define-its-state-machine its-pinyin-cn-map
186 "pinyin-cn" "
\e$AF4
\e(BG" "Chinese-GB"
187 "Map for Pinyin input. (Chinese-GB)"
188 (its-define-pinyin-table)
189 (its-defoutput* "b " "
\e$A2;
\e(B")
190 (its-defoutput* "c " "
\e$A2E
\e(B")
191 (its-defoutput* "ch " "
\e$A3v
\e(B")
192 (its-defoutput* "d " "
\e$A5D
\e(B")
193 (its-defoutput* "f " "
\e$A74
\e(B")
194 (its-defoutput* "g " "
\e$A8v
\e(B")
195 (its-defoutput* "h " "
\e$A:M
\e(B")
196 (its-defoutput* "i " "
\e$AR;
\e(B")
197 (its-defoutput* "j " "
\e$A>M
\e(B")
198 (its-defoutput* "k " "
\e$A?I
\e(B")
199 (its-defoutput* "l " "
\e$AAK
\e(B")
200 (its-defoutput* "m " "
\e$AC?
\e(B")
201 (its-defoutput* "n " "
\e$ADj
\e(B")
202 (its-defoutput* "p " "
\e$AEz
\e(B")
203 (its-defoutput* "q " "
\e$AH%
\e(B")
204 (its-defoutput* "r " "
\e$AHU
\e(B")
205 (its-defoutput* "s " "
\e$AJG
\e(B")
206 (its-defoutput* "sh " "
\e$AIO
\e(B")
207 (its-defoutput* "t " "
\e$AK{
\e(B")
208 (its-defoutput* "w " "
\e$ANR
\e(B")
209 (its-defoutput* "x " "
\e$AOr
\e(B")
210 (its-defoutput* "y " "
\e$ASV
\e(B")
211 (its-defoutput* "z " "
\e$ATZ
\e(B")
212 (its-defoutput* "zh " "
\e$AWE
\e(B")
214 (dolist (ascii '(("0" . "
\e$A#0
\e(B") ("1" . "
\e$A#1
\e(B") ("2" . "
\e$A#2
\e(B") ("3" . "
\e$A#3
\e(B")
215 ("4" . "
\e$A#4
\e(B") ("5" . "
\e$A#5
\e(B") ("6" . "
\e$A#6
\e(B") ("7" . "
\e$A#7
\e(B")
216 ("8" . "
\e$A#8
\e(B") ("9" . "
\e$A#9
\e(B")
217 (" " . "
\e$A!!
\e(B") ("!" . "
\e$A#!
\e(B") ("@" . "
\e$A#@
\e(B") ("#" . "
\e$A##
\e(B")
218 ("$" . "
\e$A!g
\e(B") ("%" . "
\e$A#%
\e(B") ("^" . "
\e$A#^
\e(B") ("&" . "
\e$A#&
\e(B")
219 ("*" . "
\e$A#*
\e(B") ("(" . "
\e$A#(
\e(B") (")" . "
\e$A#)
\e(B")
220 ("-" . "
\e$A#-
\e(B") ("=" . "
\e$A#=
\e(B") ("`" . "
\e$A#`
\e(B") ("\\" . "
\e$A#\
\e(B")
221 ("|" . "
\e$A#|
\e(B") ("_" . "
\e$A#_
\e(B") ("+" . "
\e$A#+
\e(B") ("~" . "
\e$A!+
\e(B")
222 ("[" . "
\e$A#[
\e(B") ("]" . "
\e$A#]
\e(B") ("{" . "
\e$A#{
\e(B") ("}" . "
\e$A#}
\e(B")
223 (":" . "
\e$A#:
\e(B") (";" . "
\e$A#;
\e(B") ("\"" . "
\e$A#"
\e(B") ("'" . "
\e$A#'
\e(B")
224 ("<" . "
\e$A#<
\e(B") (">" . "
\e$A#>
\e(B") ("?" . "
\e$A#?
\e(B") ("/" . "
\e$A#/
\e(B")
225 ("," . "
\e$A#,
\e(B") ("." . "
\e$A#.
\e(B")
226 ("a" . "
\e$A#a
\e(B") ("b" . "
\e$A#b
\e(B") ("c" . "
\e$A#c
\e(B") ("d" . "
\e$A#d
\e(B")
227 ("e" . "
\e$A#e
\e(B") ("f" . "
\e$A#f
\e(B") ("g" . "
\e$A#g
\e(B") ("h" . "
\e$A#h
\e(B")
228 ("i" . "
\e$A#i
\e(B") ("j" . "
\e$A#j
\e(B") ("k" . "
\e$A#k
\e(B") ("l" . "
\e$A#l
\e(B")
229 ("m" . "
\e$A#m
\e(B") ("n" . "
\e$A#n
\e(B") ("o" . "
\e$A#o
\e(B") ("p" . "
\e$A#p
\e(B")
230 ("q" . "
\e$A#q
\e(B") ("r" . "
\e$A#r
\e(B") ("s" . "
\e$A#s
\e(B") ("t" . "
\e$A#t
\e(B")
231 ("u" . "
\e$A#u
\e(B") ("v" . "
\e$A#v
\e(B") ("w" . "
\e$A#w
\e(B") ("x" . "
\e$A#x
\e(B")
232 ("y" . "
\e$A#y
\e(B") ("z" . "
\e$A#z
\e(B")
233 ("A" . "
\e$A#A
\e(B") ("B" . "
\e$A#B
\e(B") ("C" . "
\e$A#C
\e(B") ("D" . "
\e$A#D
\e(B")
234 ("E" . "
\e$A#E
\e(B") ("F" . "
\e$A#F
\e(B") ("G" . "
\e$A#G
\e(B") ("H" . "
\e$A#H
\e(B")
235 ("I" . "
\e$A#I
\e(B") ("J" . "
\e$A#J
\e(B") ("K" . "
\e$A#K
\e(B") ("L" . "
\e$A#L
\e(B")
236 ("M" . "
\e$A#M
\e(B") ("N" . "
\e$A#N
\e(B") ("O" . "
\e$A#O
\e(B") ("P" . "
\e$A#P
\e(B")
237 ("Q" . "
\e$A#Q
\e(B") ("R" . "
\e$A#R
\e(B") ("S" . "
\e$A#S
\e(B") ("T" . "
\e$A#T
\e(B")
238 ("U" . "
\e$A#U
\e(B") ("V" . "
\e$A#V
\e(B") ("W" . "
\e$A#W
\e(B") ("X" . "
\e$A#X
\e(B")
239 ("Y" . "
\e$A#Y
\e(B") ("Z" . "
\e$A#Z
\e(B")))
240 (let ((in (car ascii)) (out (cdr ascii)))
241 (if (and (or (string< in "a") (string< "z" in))
242 (null (equal in " "))
243 (null (equal in its-banjiao-escape))
244 (null (equal in its-quanjiao-escape)))
247 (its-defrule (concat (downcase its-banjiao-escape) in) in)
248 (its-defrule (concat (downcase its-quanjiao-escape) in) out)))
249 (its-defrule (concat its-banjiao-escape in) in)
250 (its-defrule (concat its-quanjiao-escape in) out)))
252 (its-defrule "," "
\e$A#,
\e(B" nil t)
253 (its-defrule "." "
\e$A!#
\e(B" nil t)
254 (its-defrule "/" "
\e$A!"
\e(B" nil t)
255 (its-defrule ":" "
\e$A#:
\e(B" nil t)
256 (its-defrule ";" "
\e$A#;
\e(B" nil t)
257 (its-defrule "?" "
\e$A#?
\e(B" nil t)
258 (its-defrule "!" "
\e$A#!
\e(B" nil t)
259 (its-defrule "-" "
\e$A!*
\e(B" nil t))
261 (define-its-state-machine its-pinyin-tw-map
262 "pinyin-tw" "
\e$(GQ;
\e(BC" "Chinese-CNS"
263 "Map for Pinyin input."
264 (its-define-pinyin-table)
265 (its-defoutput* "b " "
\e$(GDb
\e(B")
266 (its-defoutput* "c " "
\e$(GD_
\e(B")
267 (its-defoutput* "ch " "
\e$(GEx
\e(B")
268 (its-defoutput* "d " "
\e$(GN{
\e(B")
269 (its-defoutput* "f " "
\e$(GE0
\e(B")
270 (its-defoutput* "g " "
\e$(GT6
\e(B")
271 (its-defoutput* "h " "
\e$(GLO
\e(B")
272 (its-defoutput* "i " "
\e$(GD!
\e(B")
273 (its-defoutput* "j " "
\e$(G^s
\e(B")
274 (its-defoutput* "k " "
\e$(GF+
\e(B")
275 (its-defoutput* "l " "
\e$(GD'
\e(B")
276 (its-defoutput* "m " "
\e$(GJd
\e(B")
277 (its-defoutput* "n " "
\e$(GH!
\e(B")
278 (its-defoutput* "p " "
\e$(GJG
\e(B")
279 (its-defoutput* "q " "
\e$(GF*
\e(B")
280 (its-defoutput* "r " "
\e$(GEJ
\e(B")
281 (its-defoutput* "s " "
\e$(GQR
\e(B")
282 (its-defoutput* "sh " "
\e$(GD8
\e(B")
283 (its-defoutput* "t " "
\e$(GEl
\e(B")
284 (its-defoutput* "w " "
\e$(GJ<
\e(B")
285 (its-defoutput* "x " "
\e$(GGW
\e(B")
286 (its-defoutput* "y " "
\e$(GD4
\e(B")
287 (its-defoutput* "z " "
\e$(GGc
\e(B")
288 (its-defoutput* "zh " "
\e$(Gaa
\e(B")
290 (dolist (ascii '(("0" . "
\e$(G$!
\e(B") ("1" . "
\e$(G$"
\e(B") ("2" . "
\e$(G$#
\e(B") ("3" . "
\e$(G$$
\e(B")
291 ("4" . "
\e$(G$%
\e(B") ("5" . "
\e$(G$&
\e(B") ("6" . "
\e$(G$'
\e(B") ("7" . "
\e$(G$(
\e(B")
292 ("8" . "
\e$(G$)
\e(B") ("9" . "
\e$(G$*
\e(B")
293 (" " . "
\e$(G!!
\e(B") ("!" . "
\e$(G!*
\e(B") ("@" . "
\e$(G"i
\e(B") ("#" . "
\e$(G!l
\e(B")
294 ("$" . "
\e$(G"c
\e(B") ("%" . "
\e$(G"h
\e(B") ("^" . "
\e$(G!T
\e(B") ("&" . "
\e$(G!m
\e(B")
295 ("*" . "
\e$(G!n
\e(B") ("(" . "
\e$(G!>
\e(B") (")" . "
\e$(G!?
\e(B")
296 ("-" . "
\e$(G"1
\e(B") ("=" . "
\e$(G"8
\e(B") ("`" . "
\e$(G!j
\e(B") ("\\" . "
\e$(G"b
\e(B")
297 ("|" . "
\e$(G"^
\e(B") ("_" . "
\e$(G"%
\e(B") ("+" . "
\e$(G"0
\e(B") ("~" . "
\e$(G"D
\e(B")
298 ("[" . "
\e$(G!b
\e(B") ("]" . "
\e$(G!c
\e(B") ("{" . "
\e$A#{
\e(B") ("}" . "
\e$(G!a
\e(B")
299 (":" . "
\e$(G!(
\e(B") (";" . "
\e$(G!'
\e(B") ("\"" . "
\e$(G!i
\e(B") ("'" . "
\e$(G!k
\e(B")
300 ("<" . "
\e$(G"6
\e(B") (">" . "
\e$(G"7
\e(B") ("?" . "
\e$(G!)
\e(B") ("/" . "
\e$(G"a
\e(B")
301 ("," . "
\e$(G!"
\e(B") ("." . "
\e$(G!%
\e(B")
302 ("a" . "
\e$(G$[
\e(B") ("b" . "
\e$(G$\
\e(B") ("c" . "
\e$(G$]
\e(B") ("d" . "
\e$(G$^
\e(B")
303 ("e" . "
\e$(G$_
\e(B") ("f" . "
\e$(G$`
\e(B") ("g" . "
\e$(G$a
\e(B") ("h" . "
\e$(G$b
\e(B")
304 ("i" . "
\e$(G$c
\e(B") ("j" . "
\e$(G$d
\e(B") ("k" . "
\e$(G$e
\e(B") ("l" . "
\e$(G$f
\e(B")
305 ("m" . "
\e$(G$g
\e(B") ("n" . "
\e$(G$h
\e(B") ("o" . "
\e$(G$i
\e(B") ("p" . "
\e$(G$j
\e(B")
306 ("q" . "
\e$(G$k
\e(B") ("r" . "
\e$(G$l
\e(B") ("s" . "
\e$(G$m
\e(B") ("t" . "
\e$(G$n
\e(B")
307 ("u" . "
\e$(G$o
\e(B") ("v" . "
\e$(G$p
\e(B") ("w" . "
\e$(G$q
\e(B") ("x" . "
\e$(G$r
\e(B")
308 ("y" . "
\e$(G$s
\e(B") ("z" . "
\e$(G$t
\e(B")
309 ("A" . "
\e$(G$A
\e(B") ("B" . "
\e$(G$B
\e(B") ("C" . "
\e$(G$C
\e(B") ("D" . "
\e$(G$D
\e(B")
310 ("E" . "
\e$(G$E
\e(B") ("F" . "
\e$(G$F
\e(B") ("G" . "
\e$(G$G
\e(B") ("H" . "
\e$(G$H
\e(B")
311 ("I" . "
\e$(G$I
\e(B") ("J" . "
\e$(G$J
\e(B") ("K" . "
\e$(G$K
\e(B") ("L" . "
\e$(G$L
\e(B")
312 ("M" . "
\e$(G$M
\e(B") ("N" . "
\e$(G$N
\e(B") ("O" . "
\e$(G$O
\e(B") ("P" . "
\e$(G$P
\e(B")
313 ("Q" . "
\e$(G$Q
\e(B") ("R" . "
\e$(G$R
\e(B") ("S" . "
\e$(G$S
\e(B") ("T" . "
\e$(G$T
\e(B")
314 ("U" . "
\e$(G$U
\e(B") ("V" . "
\e$(G$V
\e(B") ("W" . "
\e$(G$W
\e(B") ("X" . "
\e$(G$X
\e(B")
315 ("Y" . "
\e$(G$Y
\e(B") ("Z" . "
\e$(G$Z
\e(B")))
316 (let ((in (car ascii)) (out (cdr ascii)))
317 (if (and (or (string< in "a") (string< "z" in))
318 (null (equal in " "))
319 (null (equal in its-banjiao-escape))
320 (null (equal in its-quanjiao-escape)))
323 (its-defrule (concat (downcase its-banjiao-escape) in) in)
324 (its-defrule (concat (downcase its-quanjiao-escape) in) out)))
325 (its-defrule (concat its-banjiao-escape in) in)
326 (its-defrule (concat its-quanjiao-escape in) out)))
328 (its-defrule "," "
\e$(G!"
\e(B" nil t)
329 (its-defrule "." "
\e$(G!$
\e(B" nil t)
330 (its-defrule "/" "
\e$(G!#
\e(B" nil t)
331 (its-defrule ":" "
\e$(G!(
\e(B" nil t)
332 (its-defrule ";" "
\e$(G!'
\e(B" nil t)
333 (its-defrule "?" "
\e$(G!)
\e(B" nil t)
334 (its-defrule "!" "
\e$(G!*
\e(B" nil t)
335 (its-defrule "-" "
\e$(G"1
\e(B" nil t)
336 (its-defrule "[" "
\e$(G!V
\e(B" nil t)
337 (its-defrule "]" "
\e$(G!W
\e(B" nil t))
339 (define-its-state-machine-append its-pinyin-cn-map
340 (its-defrule "[" its-pinyin-cn-open-braket nil t)
341 (its-defrule "]" its-pinyin-cn-close-braket nil t))
343 (define-its-state-machine-append its-pinyin-tw-map
344 (its-defrule "[" its-pinyin-tw-open-braket nil t)
345 (its-defrule "]" its-pinyin-tw-close-braket nil t))
347 (provide 'its/pinyin)