Mercurial > emacs
comparison lisp/international/ccl.el @ 21977:fe7ef7cd642a
Cancel the previous change for
customization, customized variables are changed to constant.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 07 May 1998 06:41:35 +0000 |
parents | 9861518505cb |
children | dc00ef92855c |
comparison
equal
deleted
inserted
replaced
21976:42c00d12d8d0 | 21977:fe7ef7cd642a |
---|---|
107 (defgroup ccl nil | 107 (defgroup ccl nil |
108 "CCL (Code Conversion Language) compiler." | 108 "CCL (Code Conversion Language) compiler." |
109 :prefix "ccl-" | 109 :prefix "ccl-" |
110 :group 'i18n) | 110 :group 'i18n) |
111 | 111 |
112 (defcustom ccl-command-table | 112 (defconst ccl-command-table |
113 [if branch loop break repeat write-repeat write-read-repeat | 113 [if branch loop break repeat write-repeat write-read-repeat |
114 read read-if read-branch write call end | 114 read read-if read-branch write call end |
115 read-multibyte-character write-multibyte-character | 115 read-multibyte-character write-multibyte-character |
116 unify-character | 116 unify-character |
117 iterate-multiple-map translate-multiple-map translate-single-map] | 117 iterate-multiple-map translate-multiple-map translate-single-map] |
118 "*Vector of CCL commands (symbols)." | 118 "Vector of CCL commands (symbols).") |
119 :type '(vector (repeat :inline t symbol)) | |
120 :group 'ccl) | |
121 | 119 |
122 ;; Put a property to each symbol of CCL commands for the compiler. | 120 ;; Put a property to each symbol of CCL commands for the compiler. |
123 (let (op (i 0) (len (length ccl-command-table))) | 121 (let (op (i 0) (len (length ccl-command-table))) |
124 (while (< i len) | 122 (while (< i len) |
125 (setq op (aref ccl-command-table i)) | 123 (setq op (aref ccl-command-table i)) |
126 (put op 'ccl-compile-function (intern (format "ccl-compile-%s" op))) | 124 (put op 'ccl-compile-function (intern (format "ccl-compile-%s" op))) |
127 (setq i (1+ i)))) | 125 (setq i (1+ i)))) |
128 | 126 |
129 (defcustom ccl-code-table | 127 (defconst ccl-code-table |
130 [set-register | 128 [set-register |
131 set-short-const | 129 set-short-const |
132 set-const | 130 set-const |
133 set-array | 131 set-array |
134 jump | 132 jump |
158 jump-cond-expr-register | 156 jump-cond-expr-register |
159 read-jump-cond-expr-const | 157 read-jump-cond-expr-const |
160 read-jump-cond-expr-register | 158 read-jump-cond-expr-register |
161 ex-cmd | 159 ex-cmd |
162 ] | 160 ] |
163 "*Vector of CCL compiled codes (symbols)." | 161 "Vector of CCL compiled codes (symbols).") |
164 :type '(vector (repeat :inline t symbol)) | 162 |
165 :group 'ccl) | 163 (defconst ccl-extended-code-table |
166 | |
167 (defcustom ccl-extended-code-table | |
168 [read-multibyte-character | 164 [read-multibyte-character |
169 write-multibyte-character | 165 write-multibyte-character |
170 unify-character | 166 unify-character |
171 unify-character-const-tbl | 167 unify-character-const-tbl |
172 nil nil nil nil nil nil nil nil nil nil nil nil ; 0x04-0x0f | 168 nil nil nil nil nil nil nil nil nil nil nil nil ; 0x04-0x0f |
173 iterate-multiple-map | 169 iterate-multiple-map |
174 translate-multiple-map | 170 translate-multiple-map |
175 translate-single-map | 171 translate-single-map |
176 ] | 172 ] |
177 "Vector of CCL extended compiled codes (symbols)." | 173 "Vector of CCL extended compiled codes (symbols).") |
178 :type '(vector (repeat :inline t symbol)) | |
179 :group 'ccl | |
180 :version "20.3") | |
181 | 174 |
182 ;; Put a property to each symbol of CCL codes for the disassembler. | 175 ;; Put a property to each symbol of CCL codes for the disassembler. |
183 (let (code (i 0) (len (length ccl-code-table))) | 176 (let (code (i 0) (len (length ccl-code-table))) |
184 (while (< i len) | 177 (while (< i len) |
185 (setq code (aref ccl-code-table i)) | 178 (setq code (aref ccl-code-table i)) |
206 (let ((l ccl-jump-code-list)) | 199 (let ((l ccl-jump-code-list)) |
207 (while l | 200 (while l |
208 (put (car l) 'jump-flag t) | 201 (put (car l) 'jump-flag t) |
209 (setq l (cdr l)))) | 202 (setq l (cdr l)))) |
210 | 203 |
211 (defcustom ccl-register-table | 204 (defconst ccl-register-table |
212 [r0 r1 r2 r3 r4 r5 r6 r7] | 205 [r0 r1 r2 r3 r4 r5 r6 r7] |
213 "*Vector of CCL registers (symbols)." | 206 "Vector of CCL registers (symbols).") |
214 :type '(vector (repeat :inline t symbol)) | |
215 :group 'ccl) | |
216 | 207 |
217 ;; Put a property to indicate register number to each symbol of CCL. | 208 ;; Put a property to indicate register number to each symbol of CCL. |
218 ;; registers. | 209 ;; registers. |
219 (let (reg (i 0) (len (length ccl-register-table))) | 210 (let (reg (i 0) (len (length ccl-register-table))) |
220 (while (< i len) | 211 (while (< i len) |
221 (setq reg (aref ccl-register-table i)) | 212 (setq reg (aref ccl-register-table i)) |
222 (put reg 'ccl-register-number i) | 213 (put reg 'ccl-register-number i) |
223 (setq i (1+ i)))) | 214 (setq i (1+ i)))) |
224 | 215 |
225 (defcustom ccl-arith-table | 216 (defconst ccl-arith-table |
226 [+ - * / % & | ^ << >> <8 >8 // nil nil nil | 217 [+ - * / % & | ^ << >> <8 >8 // nil nil nil |
227 < > == <= >= != de-sjis en-sjis] | 218 < > == <= >= != de-sjis en-sjis] |
228 "*Vector of CCL arithmetic/logical operators (symbols)." | 219 "Vector of CCL arithmetic/logical operators (symbols).") |
229 :type '(vector (repeat :inline t symbol)) | |
230 :group 'ccl) | |
231 | 220 |
232 ;; Put a property to each symbol of CCL operators for the compiler. | 221 ;; Put a property to each symbol of CCL operators for the compiler. |
233 (let (arith (i 0) (len (length ccl-arith-table))) | 222 (let (arith (i 0) (len (length ccl-arith-table))) |
234 (while (< i len) | 223 (while (< i len) |
235 (setq arith (aref ccl-arith-table i)) | 224 (setq arith (aref ccl-arith-table i)) |
236 (if arith (put arith 'ccl-arith-code i)) | 225 (if arith (put arith 'ccl-arith-code i)) |
237 (setq i (1+ i)))) | 226 (setq i (1+ i)))) |
238 | 227 |
239 (defcustom ccl-assign-arith-table | 228 (defconst ccl-assign-arith-table |
240 [+= -= *= /= %= &= |= ^= <<= >>= <8= >8= //=] | 229 [+= -= *= /= %= &= |= ^= <<= >>= <8= >8= //=] |
241 "*Vector of CCL assignment operators (symbols)." | 230 "Vector of CCL assignment operators (symbols).") |
242 :type '(vector (repeat :inline t symbol)) | |
243 :group 'ccl) | |
244 | 231 |
245 ;; Put a property to each symbol of CCL assignment operators for the compiler. | 232 ;; Put a property to each symbol of CCL assignment operators for the compiler. |
246 (let (arith (i 0) (len (length ccl-assign-arith-table))) | 233 (let (arith (i 0) (len (length ccl-assign-arith-table))) |
247 (while (< i len) | 234 (while (< i len) |
248 (setq arith (aref ccl-assign-arith-table i)) | 235 (setq arith (aref ccl-assign-arith-table i)) |