From: handa Date: Mon, 21 Nov 2005 01:11:02 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: REL-1-3-0~54 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=421b2d7845da8c241c1f57cb3ec5ca3c847fc413;p=m17n%2Fm17n-db.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 4d2f730..0aa1884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-21 Kenichi Handa + + * unicode.mim (backspace): New map. + (init-hex): Use cond and expressions. + + * mdb.dir: Delete an entry for "im-cmd.tbl". + 2005-11-08 Kenichi Handa * zh-py.mim, zh-tonepy.mim, zh-quick.mim, zh-cangjie.mim: Don't diff --git a/FORMATS/IM.txt b/FORMATS/IM.txt index eecadde..2ef4991 100644 --- a/FORMATS/IM.txt +++ b/FORMATS/IM.txt @@ -104,7 +104,7 @@ MAP-ACTION ::= ACTION ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK | SHOW | HIDE | PUSHBACK | UNDO | SHIFT | CALL - | SET | IF | '(' MACRO-NAME ')' + | SET | IF | COND | '(' MACRO-NAME ')' PREDEFINED-SYMBOL ::= '@0' | '@1' | '@2' | '@3' | '@4' @@ -391,43 +391,42 @@ The function must return NULL or a value of the type (#MPlist *) that represents a list of actions to take. @verbatim -SET ::= '(' OPERAND SYMBOL1 [ INTEGER | SYMBOL2 ] ')' +SET ::= '(' CMD SYMBOL1 EXPRESSION ')' + +CMD ::= 'set' | 'add' | 'sub' | 'mul' | 'div' + +EXPRESSION ::= INTEGER | SYMBOL2 | '(' OPERAND EXPRESSION * ')' + +OPERAND ::= '+' | '-' | '*' | '/' | '|' | '&' | '!' | '=' | '<' | '>' -OPERAND ::= 'set' | 'add' | 'sub' | 'mul' | 'div' @endverbatim This action treats @c SYMBOL1 and @c SYMBOL2 as variables and sets the value of @c SYMBOL1 as below. -If @c OPERAND is 'set', it sets the value of @c SYMBOL1 to @c INTEGER or the -value of @c SYMBOL2. +If @c CMD is 'set', it sets the value of @c SYMBOL1 to the value of @c +EXPRESSION. -If @c OPERAND is 'add', it increments the value of @c SYMBOL1 by @c INTEGER -or the value of @c SYMBOL2. +If @c CMD is 'add', it increments the value of @c SYMBOL1 by the value +of @c EXPRESSION. -If @c OPERAND is 'sub', it decrements the value of @c SYMBOL1 by @c INTEGER -or the value of @c SYMBOL2. +If @c CMD is 'sub', it decrements the value of @c SYMBOL1 by the value +of @c EXPRESSION. -If @c OPERAND is 'mul', it multiplies the value of @c SYMBOL1 by @c INTEGER -or the value of @c SYMBOL2. +If @c CMD is 'mul', it multiplies the value of @c SYMBOL1 by the value +of @c EXPRESSION. -If @c OPERAND is 'div', it divides the value of @c SYMBOL1 by @c INTEGER or -the value of @c SYMBOL2. +If @c CMD is 'div', it divides the value of @c SYMBOL1 by the value of +@c EXPRESSION. @verbatim IF ::= '(' CONDITION ACTION-LIST1 ACTION-LIST2 ')' -CONDITION ::= OPERAND VAL1 VAL2 +CONDITION ::= [ '=' | '<' | '>' ] EXPRESSION1 EXPRESSION2 ACTION-LIST1 ::= '(' ACTION * ')' ACTION-LIST2 ::= '(' ACTION * ')' - -OPERAND ::= '=' '<' '>' - -VAL1 ::= [ INTEGER1 | SYMBOL1 ] - -VAL2 ::= [ INTEGER2 | SYMBOL2 ] @endverbatim This action performs actions in @c ACTION-LIST1 if @c CONDITION is @@ -435,6 +434,13 @@ true, and performs @c ACTION-LIST2 (if any) otherwise. @c SYMBOL1 and @c SYMBOL2 are treated as variables. +@verbatim +COND ::= '(' 'cond' [ '(' EXPRESSION ACTION * ') ] * ')' +@endverbatim + +This action performs the first actions @c ACTION whose corresponding +@c EXPRESSION has nonzero value. + @ifnot FOR-MAN @section im-example1 EXAMPLE 1