1 ;;; DO NOT MODIFY THIS FILE
2 (if (featurep 'mule-autoloads) (error "Already loaded"))
4 ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program declare-ccl-program ccl-dump ccl-compile) "mule-ccl" "mule/mule-ccl.el")
6 (autoload 'ccl-compile "mule-ccl" "\
7 Return a compiled code of CCL-PROGRAM as a vector of integer." nil nil)
9 (autoload 'ccl-dump "mule-ccl" "\
10 Disassemble compiled CCL-CODE." nil nil)
12 (autoload 'declare-ccl-program "mule-ccl" "\
13 Declare NAME as a name of CCL program.
15 This macro exists for backward compatibility. In the old version of
16 Emacs, to compile a CCL program which calls another CCL program not
17 yet defined, it must be declared as a CCL program in advance. But,
18 now CCL program names are resolved not at compile time but before
21 Optional arg VECTOR is a compiled CCL code of the CCL program." nil 'macro)
23 (autoload 'define-ccl-program "mule-ccl" "\
24 Set NAME the compiled code of CCL-PROGRAM.
26 CCL-PROGRAM has this form:
31 BUFFER_MAGNIFICATION is an integer value specifying the approximate
32 output buffer magnification size compared with the bytes of input data
33 text. If the value is zero, the CCL program can't execute `read' and
36 CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE
37 executed at first. If there's no more input data when `read' command
38 is executed in CCL_MAIN_CODE, CCL_EOF_CODE is executed. If
39 CCL_MAIN_CODE is terminated, CCL_EOF_CODE is not executed.
41 Here's the syntax of CCL program code in BNF notation. The lines
42 starting by two semicolons (and optional leading spaces) describe the
45 CCL_MAIN_CODE := CCL_BLOCK
47 CCL_EOF_CODE := CCL_BLOCK
49 CCL_BLOCK := STATEMENT | (STATEMENT [STATEMENT ...])
52 SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE | CALL
55 SET := (REG = EXPRESSION)
56 | (REG ASSIGNMENT_OPERATOR EXPRESSION)
57 ;; The following form is the same as (r0 = integer).
60 EXPRESSION := ARG | (EXPRESSION OPERATOR ARG)
62 ;; Evaluate EXPRESSION. If the result is nonzeor, execute
63 ;; CCL_BLOCK_0. Otherwise, execute CCL_BLOCK_1.
64 IF := (if EXPRESSION CCL_BLOCK_0 CCL_BLOCK_1)
66 ;; Evaluate EXPRESSION. Provided that the result is N, execute
68 BRANCH := (branch EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1 ...])
70 ;; Execute STATEMENTs until (break) or (end) is executed.
71 LOOP := (loop STATEMENT [STATEMENT ...])
73 ;; Terminate the most inner loop.
77 ;; Jump to the head of the most inner loop.
79 ;; Same as: ((write [REG | integer | string])
81 | (write-repeat [REG | integer | string])
82 ;; Same as: ((write REG [ARRAY])
85 | (write-read-repeat REG [ARRAY])
86 ;; Same as: ((write integer)
89 | (write-read-repeat REG integer)
91 READ := ;; Set REG_0 to a byte read from the input text, set REG_1
92 ;; to the next byte read, and so on.
93 (read REG_0 [REG_1 ...])
94 ;; Same as: ((read REG)
95 ;; (if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1))
96 | (read-if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1)
97 ;; Same as: ((read REG)
98 ;; (branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...]))
99 | (read-branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...])
100 ;; Read a character from the input text while parsing
101 ;; multibyte representation, set REG_0 to the charset ID of
102 ;; the character, set REG_1 to the code point of the
103 ;; character. If the dimension of charset is two, set REG_1
104 ;; to ((CODE0 << 8) | CODE1), where CODE0 is the first code
105 ;; point and CODE1 is the second code point.
106 | (read-multibyte-character REG_0 REG_1)
109 ;; Write REG_0, REG_1, ... to the output buffer. If REG_N is
110 ;; a multibyte character, write the corresponding multibyte
112 (write REG_0 [REG_1 ...])
113 ;; Same as: ((r7 = EXPRESSION)
116 ;; Write the value of `integer' to the output buffer. If it
117 ;; is a multibyte character, write the corresponding multibyte
120 ;; Write the byte sequence of `string' as is to the output
121 ;; buffer. It is encoded by binary coding system, thus,
122 ;; by this operation, you cannot write multibyte string
125 ;; Same as: (write string)
127 ;; Provided that the value of REG is N, write Nth element of
128 ;; ARRAY to the output buffer. If it is a multibyte
129 ;; character, write the corresponding multibyte
132 ;; Write a multibyte representation of a character whose
133 ;; charset ID is REG_0 and code point is REG_1. If the
134 ;; dimension of the charset is two, REG_1 should be ((CODE0 <<
135 ;; 8) | CODE1), where CODE0 is the first code point and CODE1
136 ;; is the second code point of the character.
137 | (write-multibyte-character REG_0 REG_1)
139 ;; Call CCL program whose name is ccl-program-name.
140 CALL := (call ccl-program-name)
142 ;; Terminate the CCL program.
145 ;; CCL registers that can contain any integer value. As r7 is also
146 ;; used by CCL interpreter, its value is changed unexpectedly.
147 REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7
152 ;; Normal arithmethic operators (same meaning as C code).
155 ;; Bitwize operators (same meaning as C code)
158 ;; Shifting operators (same meaning as C code)
161 ;; (REG = ARG_0 <8 ARG_1) means:
162 ;; (REG = ((ARG_0 << 8) | ARG_1))
165 ;; (REG = ARG_0 >8 ARG_1) means:
166 ;; ((REG = (ARG_0 >> 8))
167 ;; (r7 = (ARG_0 & 255)))
170 ;; (REG = ARG_0 // ARG_1) means:
171 ;; ((REG = (ARG_0 / ARG_1))
172 ;; (r7 = (ARG_0 % ARG_1)))
175 ;; Normal comparing operators (same meaning as C code)
176 | < | > | == | <= | >= | !=
178 ;; If ARG_0 and ARG_1 are higher and lower byte of Shift-JIS
179 ;; code, and CHAR is the corresponding JISX0208 character,
180 ;; (REG = ARG_0 de-sjis ARG_1) means:
183 ;; where CODE0 is the first code point of CHAR, CODE1 is the
184 ;; second code point of CHAR.
187 ;; If ARG_0 and ARG_1 are the first and second code point of
188 ;; JISX0208 character CHAR, and SJIS is the correponding
190 ;; (REG = ARG_0 en-sjis ARG_1) means:
193 ;; where HIGH is the higher byte of SJIS, LOW is the lower
197 ASSIGNMENT_OPERATOR :=
198 ;; Same meaning as C code
199 += | -= | *= | /= | %= | &= | `|=' | ^= | <<= | >>=
201 ;; (REG <8= ARG) is the same as:
206 ;; (REG >8= ARG) is the same as:
207 ;; ((r7 = (REG & 255))
210 ;; (REG //= ARG) is the same as:
211 ;; ((r7 = (REG % ARG))
215 ARRAY := `[' integer ... `]'
219 (translate-character REG(table) REG(charset) REG(codepoint))
220 | (translate-character SYMBOL REG(charset) REG(codepoint))
222 (iterate-multiple-map REG REG MAP-IDs)
223 | (map-multiple REG REG (MAP-SET))
224 | (map-single REG REG MAP-ID)
225 MAP-IDs := MAP-ID ...
226 MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET
230 (autoload 'check-ccl-program "mule-ccl" "\
231 Check validity of CCL-PROGRAM.
232 If CCL-PROGRAM is a symbol denoting a CCL program, return
233 CCL-PROGRAM, else return nil.
234 If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied,
235 register CCL-PROGRAM by name NAME, and return NAME." nil 'macro)
237 (autoload 'ccl-execute-with-args "mule-ccl" "\
238 Execute CCL-PROGRAM with registers initialized by the remaining args.
239 The return value is a vector of resulting CCL registers.
241 See the documentation of `define-ccl-program' for the detail of CCL program." nil nil)
245 (provide 'mule-autoloads)