aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-06-20 03:01:00 +0000
committerKenichi Handa1998-06-20 03:01:00 +0000
commit9b27b20d214538d6f903626ced7ee9b7f3a01331 (patch)
treece8b75c0ea68fc1e7e99454cf3e85a667784e5ad /src
parent8ea691a60ba4a3feb4a7e7b89a315f256184ee83 (diff)
downloademacs-9b27b20d214538d6f903626ced7ee9b7f3a01331.tar.gz
emacs-9b27b20d214538d6f903626ced7ee9b7f3a01331.zip
Comment for CCL_MapMultiple modified..
Diffstat (limited to 'src')
-rw-r--r--src/ccl.c48
1 files changed, 29 insertions, 19 deletions
diff --git a/src/ccl.c b/src/ccl.c
index 9c9215af7d6..1cd1f3b11af 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -484,7 +484,7 @@ Lisp_Object Vccl_program_table;
484/* Map the code in reg[rrr] by MAPs starting from the Nth (N = 484/* Map the code in reg[rrr] by MAPs starting from the Nth (N =
485 reg[RRR]) map. 485 reg[RRR]) map.
486 486
487 MAPs are suppried in the succeeding CCL codes as follows: 487 MAPs are supplied in the succeeding CCL codes as follows:
488 488
489 When CCL program gives this nested structure of map to this command: 489 When CCL program gives this nested structure of map to this command:
490 ((MAP-ID11 490 ((MAP-ID11
@@ -496,25 +496,25 @@ Lisp_Object Vccl_program_table;
496 MAP-ID22)), 496 MAP-ID22)),
497 the compiled CCL codes has this sequence: 497 the compiled CCL codes has this sequence:
498 CCL_MapMultiple (CCL code of this command) 498 CCL_MapMultiple (CCL code of this command)
499 16 (total number of MAPs and SEPARATERs) 499 16 (total number of MAPs and SEPARATORs)
500 -7 (1st SEPARATER) 500 -7 (1st SEPARATOR)
501 MAP-ID11 501 MAP-ID11
502 MAP-ID12 502 MAP-ID12
503 -3 (2nd SEPARATER) 503 -3 (2nd SEPARATOR)
504 MAP-ID121 504 MAP-ID121
505 MAP-ID122 505 MAP-ID122
506 MAP-ID123 506 MAP-ID123
507 MAP-ID13 507 MAP-ID13
508 -7 (3rd SEPARATER) 508 -7 (3rd SEPARATOR)
509 MAP-ID21 509 MAP-ID21
510 -4 (4th SEPARATER) 510 -4 (4th SEPARATOR)
511 MAP-ID211 511 MAP-ID211
512 -1 (5th SEPARATER) 512 -1 (5th SEPARATOR)
513 MAP_ID2111 513 MAP_ID2111
514 MAP-ID212 514 MAP-ID212
515 MAP-ID22 515 MAP-ID22
516 516
517 A value of each SEPARATER follows this rule: 517 A value of each SEPARATOR follows this rule:
518 MAP-SET := SEPARATOR [(MAP-ID | MAP-SET)]+ 518 MAP-SET := SEPARATOR [(MAP-ID | MAP-SET)]+
519 SEPARATOR := -(number of MAP-IDs and SEPARATORs in the MAP-SET) 519 SEPARATOR := -(number of MAP-IDs and SEPARATORs in the MAP-SET)
520 520
@@ -524,28 +524,38 @@ Lisp_Object Vccl_program_table;
524 reg[rrr]), the mapping is treated as identity. 524 reg[rrr]), the mapping is treated as identity.
525 525
526 The mapping is iterated for all maps in each map set (set of maps 526 The mapping is iterated for all maps in each map set (set of maps
527 separators by a SEPARATOR) except the case that lambda is 527 separated by SEPARATOR) except in the case that lambda is
528 encountered (see below). 528 encountered. More precisely, the mapping proceeds as below:
529
530 At first, VAL0 is set to reg[rrr], and it is translated by the
531 first map to VAL1. Then, VAL1 is translated by the next map to
532 VAL2. This mapping is iterated until the last map is used. The
533 result of the mapping is the last value of VAL?.
534
535 But, when VALm is mapped to VALn and VALn is not a number, the
536 mapping proceed as below:
537
538 If VALn is nil, the lastest map is ignored and the mapping of VALm
539 proceed to the next map.
540
541 In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm
542 proceed to the next map.
543
544 If VALn is lambda, the whole mapping process terminates, and VALm
545 is the result of this mapping.
529 546
530 Each map is a Lisp vector of the following format (a) or (b): 547 Each map is a Lisp vector of the following format (a) or (b):
531 (a)......[STARTPOINT VAL1 VAL2 ...] 548 (a)......[STARTPOINT VAL1 VAL2 ...]
532 (b)......[t VAL STARTPOINT ENDPOINT], 549 (b)......[t VAL STARTPOINT ENDPOINT],
533 where 550 where
534 STARTPOINT is an offset to be used for indexing a map, 551 STARTPOINT is an offset to be used for indexing a map,
535 ENDPOINT is a maxmum index number of a map, 552 ENDPOINT is a maximum index number of a map,
536 VAL and VALn is a number, nil, t, or lambda. 553 VAL and VALn is a number, nil, t, or lambda.
537 554
538 Valid index range of a map of type (a) is: 555 Valid index range of a map of type (a) is:
539 STARTPOINT <= index < STARTPOINT + map_size - 1 556 STARTPOINT <= index < STARTPOINT + map_size - 1
540 Valid index range of a map of type (b) is: 557 Valid index range of a map of type (b) is:
541 STARTPOINT <= index < ENDPOINT 558 STARTPOINT <= index < ENDPOINT */
542
543 If VALn is nil, the map is ignored and mapping proceed to the next
544 map.
545 In VALn is t, reg[rrr] is reverted to the original value and
546 mapping proceed to the next map.
547 If VALn is lambda, mapping in the current MAP-SET finishes
548 and proceed to the upper level MAP-SET. */
549 559
550#define CCL_MapMultiple 0x11 /* Mapping by multiple code conversion maps 560#define CCL_MapMultiple 0x11 /* Mapping by multiple code conversion maps
551 1:ExtendedCOMMNDXXXRRRrrrXXXXX 561 1:ExtendedCOMMNDXXXRRRrrrXXXXX