From: nisikimi Date: Thu, 12 Nov 2009 07:49:11 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: XML-BEFORE-XEX~6 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e821a1a83b04e05c7a8b5ecff0d37db9263710f7;p=m17n%2Fm17n-db.git *** empty log message *** --- diff --git a/FORMATS/IM.txt b/FORMATS/IM.txt index 077588a..695c08e 100644 --- a/FORMATS/IM.txt +++ b/FORMATS/IM.txt @@ -18,10 +18,10 @@ methods. @section im-format SYNTAX and SEMANTICS -The following defines a schema for an input method, written in RelaxNG. -(This schema file can be found at m17n-db-xml/MIM/mim.rng.) -The driver loads a definition from a file, a stream, etc. The definition -is converted into the form of plist in the driver. +The following defines a schema for an input method, written in +RelaxNG. (This schema file can be found at +m17n-db-xml/MIMNEW/mimnew.rng and includes m17n-db-xml/MIMNEW/expr.rng +that defines basic expressions and terms.) @verbatim @@ -33,24 +33,19 @@ is converted into the form of plist in the driver. xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.m17n.org/MIM"> + + - - - - - - - - - + + @@ -59,14 +54,13 @@ is converted into the form of plist in the driver. @endverbatim The top-level node of an input method has a <input-method> tag. +The element <im-declaration> is described in the subsection @ref +im-declaration. -The element <description> can appear in <input-method>, <variable> or -<command>, and specifies the description text of its parent. The -content of the element <get-text> is translated according to the -current locale by "gettext" (if the translation is provided). +Details of <description> can be found in @ref expr. -The element <title> contains a string that is displayed on the screen -when this input method is active. +The element <title> contains a string that is displayed on the +screen when this input method is active. #if EXAMPLE_CODE @@ -81,51 +75,48 @@ Version 2.0 <http://www.thdl.org/collections/langling/ewts/ewts.php>. - t - [a-z]{2,3} - + [a-z]{2,3} - - - nil - - - - - - [^n][^i][^l] - .{1,2} - ....+ - - - - - - + + + nil + + + + + + [^n][^i][^l] + .{1,2} + ....+ + + + + - [0-9]+\.[0-9]+\.[0-9]+ @@ -135,11 +126,11 @@ system, the element <state-list> can be omitted. @endverbatim -The element <tags> specifies for which language the input method is, -and the name of the input method. There is one special input method -file "global.mimx" that declares common variables and commands. The -input method driver always loads this file and other input methods can -inherit its variables and commands. +The element <tags> specifies for which language the input method +is, and the name of the input method. There is one special input +method file "global.mimx" that declares common variables and commands. +The input method driver always loads this file and other input methods +can inherit its variables and commands. When the element <language> has "t" as its content, the use of the input method is not limited to one language. When the content is @@ -178,70 +169,16 @@ level. - - - - - - - - - - - - - - - - string - - - - symbol - - - - integer - - - - - - - - - - - - - - string - - - - symbol - - - - integer - - - - - - - - - - - - + + + @endverbatim <variable-list> declares variables used in this input method. +Details of <defvar> can be found in @ref expr. If a variable is initialized to the default value, or a common variable from "global.mimx" is to be customized by a user, it must be @@ -250,368 +187,381 @@ declaration unless it has a default value or its possible values are limited. The declaration can be used in two ways. One is to introduce a new -variable. In that case, the <value> element in <variable> -must not be omitted. Another is to inherit the variable from what -declared in "global.mimx", and to give the different default value -and/or to make the variable customizable specially for the current -input method. In the latter case, <value> can be omitted. - -Each <variable> declares one variable. A variable, declared -here or not, is referred with the attribute "id". <value> of a -<variable> can be an integer, a symbol, or an M-text value. All -variables are implicitly initialized to the integer value zero. - -The M-text (string) <value> can be referred by the -<insert> action. The symbol <value> can not be referred -directly, but is used the library implicitly -(e.g. candidates-charset). The integer <value> can be set, -modified and referred by the <set>, <add>, <sub>, -<mul>, and <div> action. It can be referred by the the -<insert>, <select>, <undo>, <if>, and -<cond> actions. - -<variable-value-candidate> lists the possible values of the variable. -<c-value> specifies one of the possible value of the variable. It can -be a M-text (string), a symbol or an integer. - -<c-range> specifies a range of integers that the variable can have as -its value. It can be used mixed with <c-value>. The attribute "from" -is the minimum integer value that a variable can take, and the -attribute "to" is the maximum. +variable. In such case <defvar> must specify its value. The +other is to inherit the variable from what declared in "global.mimx", +and to give the different default value and/or to make the variable +customizable specially for the current input method. In this case, +the value can be omitted. #if EXAMPLE_CODE - + Flag to tell whether or not to generate precomposed characters. If 1, generate precomposed characters if available (e.g. "ྲྀ"(U+0F76). If 0, generate only decomposed characters (e.g. "ྲྀ" (U+0FB2 U+0F80). - 0 - - 0 - 1 - - + 0 + + 0 + 1 + + #endif -This code declares one variable "precomposed" whose value can be 0 or -1 and is initially set to 0. - @verbatim - - - predefined - - - handled-keys - predefined-surround-text-flag - @.+ - - - - -@endverbatim - -Predefined-variables are variables whose "type" attribute has the -value "predefined". When "id" attribute has the value "handled-keys", -the value of the variable is the number of handled keys at that -moment. If the "id" attribute has the value -"predefined-surround-text-flag", the value of the variable is -1 if -surrounding text is supported, and -2 if not. - -#if EXAMPLE_CODE - -#endif - -This code refers to the number of handled keys at that moment. - -@verbatim - - - - + + + command-.* - - - + - + + + + + + + + + + + @endverbatim <command-list> declares a command used in the input method. If a command must be bound to the default key sequence, or is to be -customized by a user, it must be declared here. Like <variable-list>, -the declaration can be used in two ways. One is to introduce a new -command. In that case, the <keyseq> element must appear in <command>. -Another is to inherit the command from what declared in "global.mimx", -and to give the different key binding and/or to make the command -customizable specially for the current input method. In the latter -case, <keyseq> can be omitted. +customized by a user, it must be declared here. +Each <defcmd> declares one command. A command is referred with +the attribute "cname" whose value must start with "command-". +<keyseq> contains one or more list/string terms. + +Like <variable-list>, the declaration can be used in two ways. +One is to introduce a new command. In that case, the <keyseq> +element must appear in <command>. Another is to inherit the +command from what declared in "global.mimx", and to give the different +key binding and/or to make the command customizable specially for the +current input method. In the latter case, <keyseq> can be +omitted. -Each <command> declares one command and a command <command> is -referred with the attribute "id". #if EXAMPLE_CODE - - + + Commit - Commit the preedit text +Commit the preedit text - Return - Linefeed - - + Return + Linefeed + + #endif @verbatim - - + - - module-.* - - - - - - function-.* + + + + + .*-function-.* + - + - + - -@endverbatim +@endbatim Each <module> element declares an external module (i.e. dynamic -library). The value of "id" attribute gives the name of the module +library). The value of "id" attribute gives the name of the module. -<function> elements specify function names exported by the module. - -If the "id" attribute has the value "function-init", it is called with -only the default arguments (see <call>) when an input context is -created for the input method. If it has the value "function-fini", it -is called with only the default arguments when the input context is -destroyed. +<defun> elements specify function names exported by the module. +The name of the module, "-function-" and the name of the function +itself consitute the value of the "fname" attribute. If the "fname" +attribute has the value that ends with "init", it is called with only +the default arguments (see <call>) when an input context is +created for the input method. If it has the value that ends with +"fini", it is called with only the default arguments when the input +context is destroyed. #if EXAMPLE_CODE - - - - - - - + + + + + + + #endif -This code declares a module "module-libmimx-anthy" who export six functions. +This code declares a module "libmimx-anthy" that exports six functions. + +Functions of an external modules can be called with the element +<funcall>. The function must return NULL or a list that +represents <funcall>s to execute. + +#if EXAMPLE_CODE + + t + +#endif + +This code calls the function 'resize' of the module 'libmimx-anthy' +with a symbol argument whose value is "t". -@verbatim - - - - - macro-.* - - - - + + + + -@endverbatim +<macro-list> declares macros used in this input method. Details +of <defun> can be found in @ref expr. -<macro-list> declares macros used in this input method. -The element <macro> bundles and names a set of <action>s. The -attribute "id" gives the name of a <macro>, and a macro is referred -with this attribute. #if EXAMPLE_CODE - - - - - - : : ;; more s - + + + + + @-10x200C + @-10x200D + + @-1 + + + + + #endif -This code declares one macro "macro-forward". +This code declares one macro "macro-delete-preceding-zw". -@verbatim - +@subsection im-terms Input Method Terms + +The m17n database has special tags and terms for wrinting input +methods: markers, selectors and key sequences. + +@verbatim + - - + + + - @endverbatim -A marker is a symbol indicating a character position in the preediting -buffer. The element <mark-current-position> assigns a position to -a marker. The position of a marker is referred by the elements -<move-to-marker> and <delete-to-marker>. +These terms can be used in functions defined in expr.rng. @verbatim - - - - - @[0-9] - - @first - @current - @last - @previous - @next - @previous_candidate_list - @next_candidate_list - - + + - @endverbatim -Predefined markers start with @@. @@0, @@1, ... , @@9 mark the 0th, -1st, ... , 9th position respectively. @@first, @@current, @@last, -@@previous and @@next mark the first, current, last, previous and next -position in the preediting buffer respectively. -@@previous_candidate_list mark -the previous position where a candidate list changes. -@@next_candidate_list mark the next position where a candidate list -changes. +A marker is a symbol indicating a character position in the preediting +buffer. The element <mark> assigns a position to a marker. The +position of a marker is referred by the elements <move>, +<delete> and <char-at>. + +Some markers that starts with @@ have special meanings. @@0, @@1, +... , @@9 mark the 0th, 1st, ... , 9th position in the preedit buffer +respectively. @@<, @@=, @@>, @@- and @@+ mark the first, +current, last, previous and next position in the preediting buffer +respectively. @@[ marks the previous position where a candidate list +changes. @@] marks the next position where a candidate list changes. + +@@+N and @@-N (N is an positive integer) mark the N-th preceding or +following position, and are used to specify a character inside or +outside of the preedit buffer. +If the number of preceding or following +characters in the preedit buffer is less than N, it marks the (N minus +the number of characters)th preceding or following character from the +input spot. + +Other marker should not start with @@. #if EXAMPLE_CODE - + @< #endif This code deletes character between the first position and the current position in the buffer. -@verbatim +#if EXAMPLE_CODE + T +#endif - - - [^@].* - +This code moves the marker to the user defined position T. + +#if EXAMPLE_CODE + @-5 +#endif + +This code refers to the 5th previous character wherever it is. + +@verbatim + + + + + + +@endverbatim +A <markerterm> is a term whose value is a marker. That is, if a +<varref> appears as a <markerterm>, its value must be a +marker and a <funcall> appears as a <markerterm>, it must +return a marker. + +@verbatim + + + + @first + @current + @last + @previous + @next + @previous-candidate-change + @next-candidate-change + + + @endverbatim -User-defined markers may not start with @@. +Selectors specify positions in a candidate list. They are used in the +element <select>. @first, @current and @last specifies the +first, the current and last position in the list. @@previous means +the previous position, and if the current candidate is the first one +in the current candidate group, this value means the last candidate in +the previous candidate group. @@next means the next position, and if +the current candidate is the last one in the current candidate group, +this value means the first candidate in the next candidate group. +@@previous_candidate_list specifies the candidate in the previous +candidate group having the same candidate index as the current one, +and @@next_candidate_list specifies the candidate in the next +candidate group having the same candidate index as the current one. + +<select> accepts an integer, too. An integer N specifies the +Nth position in a candidate list. #if EXAMPLE_CODE - + #endif -This code moves the marker to the user defined position T. +This code selects the previous candidate. @verbatim + + + + + + + +@endverbatim + +A <selectorterm> is a term whose value is a selector. That is, +if a <varref> appears as a <selectorterm>, its value must +be a selector and a <funcall> appears as a <selectorterm>, +it must return a selector. - - - +@verbatim + + + - - + + - + - @endverbatim -The element <predefined-nth-previous-or-following-character> specifies -a character inside or outside of the preedit buffer. - -When the value of the attribute "position" is a negative integer -N, -the element <predefined-nth-previous-or-following-character> means the -Nth previous character in the preedit buffer. If there are only M (M<N) -previous characters in it, the value is the (N-M)th previous -character from the inputting spot. +<strterm> in the <keyseq> element consists of characters +that can be generated by a keyboard. Therefore it usually contains +only ASCII characters. However, if the input method is intended to be +used, for instance, with a West European keyboard, the value may +contain Latin-1 characters. + +The element in the <listterm> in the <keyseq> must be +either an intterm whose value is a valid character code, or a symterm +whose value is the return value of the minput_event_to_key () +function. Under the X window system, you can quickly check the value +using the @c xev command. For example, the return key, the backspace +key, and the 0 key on the keypad are represented as @c Return, @c +BackSpace, @c KP_0 respectively. If the shift, control, meta, alt, +super, and hyper modifiers are used, they are represented by the S- , +C- , M- , A- , s-, and H- prefixes respectively in this order. Thus, +"return with shift with meta with hyper" is @c S-M-H-Return. Note +that "a with shift" .. "z with shift" are represented simply as A +.. Z. Thus "a with shift with meta with hyper" is @c M-H-A. -When the value of the attribute "position" is a positive integer N, -the element <predefined-nth-previous-or-following-character> means the -Nth following character in the preedit buffer. If there are only M -(M<N) following characters in it, the value is the (N-M)th following -character from the inputting spot. #if EXAMPLE_CODE - + + + 0x6F + S-@ + + + +ma #endif -This code refers to the previous character. +These are both valid key sequences. @verbatim - - - @[0-9] - @first - @current - @last - @previous - @next - @previous_candidate_list - @next_candidate_list - + + + + + + - @endverbatim -Predefined-selectors specify positions in a candidate list. They are -used in the element <select>. - -@@0, @@1, ... , @@9 specify the 0th, 1st, ... 9th position -respectively. @first and @last specify the first and last position in -the list. @@previous means the previous position, and if the current -candidate is the first one in the current candidate group, this value -means the last candidate in the previous candidate group. @@next means -the next position, and if the current candidate is the last one in the -current candidate group, this value means the first candidate in the -next candidate group. @@previous_candidate_list specifies the -candidate in the previous candidate group having the same candidate -index as the current one, and @@next_candidate_list specifies the -candidate in the next candidate group having the same candidate index -as the current one. - -#if EXAMPLE_CODE -@first + #endif -This code deletes one following character. +Both of these codes select the first candidate in the list. @verbatim - - - - - - - - - - - - variable - - - - - - + @endverbatim -The element <select> first checks if the character just before the -current position belongs to a string that is associated with a -candidate list. If it is, the action replaces that string with a -candidate specified by the attribute. The value of the attribute -"selector" is a predefined-selector that specifies a new candidate in -the candidate list. The value of the attribute "index" specifies a -position in the candidate list, and the candidate at the position is -selected. When the value is "variable", the variable referred must -have an integer value that specifies the position in the candidate -list. - -#if EXAMPLE_CODE - -#endif - -These code selects the previous or the first candidate respectively. +The element <show-candidates> instructs the input method driver to +display a candidate list associated with the string before the current +position. @verbatim + +@endverbatim - - - - - - +The element <hide-candidates> instructs the input method driver to +hide the currently displayed candidate list. +@verbatim + @endverbatim -These two <action>s move the current position. The element -<move-to-marker> moves the current position to the position of -the specified marker. The element <move-to-character-position> -treats its content integer value as a character position, and moves -the current position there. +The element <move> moves the current position. When a +markerterm is given, the current position is moved to the position of +the marker. When an intterm is given, its value is a character +position and the current position is moved to the character postion. #if EXAMPLE_CODE - -0 +@@< +0 #endif -These codes moves the current position to the previous position and -the first position in the buffer respectively. +Both of these codes move the current position to the first position in +the buffer. @verbatim - - - - - - - + @endverbatim -The element <mark-current-position> sets the position of the specified marker -to the current position. +The element <mark> puts a specified marker to the current +position. #if EXAMPLE_CODE - +M #endif This code sets the marker "M" to the current position. @verbatim - - - - - - - - - - + @endverbatim -These two <action>s pushes back key events to the event queue. The -element <pushback-n-events> pushes back the latest key events. If the -value of the attribute "n" is positive integer, it specifies how many -key events should be pushed back. If the value is zero, all key -events are pushed back. The element <pushback-keyseq> pushes back -keys specified by <keyseq;gt;. +The element <pushback> pushes back key events to the event +queue. When a keyseqterm is given, it pushes back specified keys. An +intterm given to this element must not be negative. If it is zero, +all key events are pushed back. If it is a positive integer N, the +latest N key events are pushed back. #if EXAMPLE_CODE - +b #endif This code pushes back a "b". @verbatim - - - - - - - - - - - - - - - - - + @endverbatim -The element <undo> cancels the last two key events (i.e. the one that -invoked this command, and the previous one) when no attirubute is -given. If the value of the attribute "target-of-undo" is a positive -integer NUM, from the NUMth to the last events are canceled. If it is -a negative integer NUM, the last (- NUM) events are canceled. When a -variable appears, it must be resolved to an nonzero integer and the -integer is treated as above. - -#if EXAMPLE_CODE - -#endif +The element <pop> pops the first key event that is not yet handled +from the event queue. @verbatim - - - - - - - - - - - - string - - - - integer - - \?. - [0#]x[0-9A-F]{1,6} - [0-9]{1,7} - - - - plist - - - - symbol - - - - - - - - + @endverbatim -The element <call> calls a function of an external module. The -function must return NULL or a value of the type (#MPlist *) that -represents a list of actions to take. - -The value of the attribute "id" specifies an external module. It must -appear in the element <module-list>. The element -<function-reference> specifies a function to be called. It must -appear in the element <module-list>. - -The function can be called with an argument of the type (#MPlist *). -The key of the first element of the list is #Mt and its value is a -pointer to an object of the type #MInputContext. The key of the -second element of the list is #Msymbol and its value is the current -state name. The element <argument> specifies the value of the -third element or later. Their keys are determined by the "type" -argument; if its value is "integer", the corresponding key is -#Minteger; if it is "symbol", the corresponding key is #Msymbol, etc. +The element <undo> cancels the last two key events (i.e. the one +that invoked this command, and the previous one) when it has no +content. An intterm given to this element must not be zero. If its +value is a positive integer N, from the Nth to the last events are +canceled. If its value is a negative integer -N, the last N events +are canceled. #if EXAMPLE_CODE - - - - - - +-1 #endif -This code calls the function function-resize of the module -module-libmimx-anthy with a symbol argument whose value is "t". +This code cancels the last event. @verbatim - - - - - - - - - - - - - [0#]x[0-9A-F]{1,6} - \?. - - - - - - - - - + @endverbatim -An <expr>ession can be - @li a zero or more <expr>essions combined with an operator, - @li an integer value. - @li a character at a specified position. - @li a variable. - -#if EXAMPLE_CODE - - - 0x0D91 - -#endif - -This code is an expression as a whole, and it contains two (the second -and the third line) expressions. +The element <commit> explicitly commits the current preedit. +The current preedit is also committed whenever the input method driver +transits to the intial <state>. (See @ref imstate.) @verbatim - - - - - - - - - - + @endverbatim -The element <variable-reference> has the same effect that the value of -the referred <variable> would have, if appeared in its place. - -#if EXAMPLE_CODE - - -#endif +The element <unhandle> commits the current preedit and returns the last key as +unhandled. @verbatim - - - - + - - - * - / - | - & - ! - = - < - > - <= - >= - - - + + @endverbatim -These are the operators that can appear in <expr>essions. The -operators @c +, @c -, @c *, @c / does arithmetics. @c |, @c &, @c -! are OR, AND, NOT operators. The operators @c =, @c <, @c >, -@c <=, @c >= take two arguments and compare them. +The element <shift> shifts the current state (See @ref imstate.) +to the one specified by the value of the given symterm". The value +must appear in <state-list>. The element <shiftback> +shifts the current state to the previous one. @verbatim - - - - - - = - < - > - <= - >= - - - - - - - - - - + @endverbatim -The element <if> performs actions in <if-true-action-list> if the -relation between its two <expr>essions meets the attribute -"condition". If not, <if> performs actions in the element -<if-not-true-action-list> (if it exists.) +The element <char-at> returns the integer value +C, where C is the character in the preedit text or +the surrounding text at the postion specified by the given markerterm. -#if EXAMPLE_CODE - - 0 - - -#endif +@verbatim + +@endverbatim -This code performs the <shift-to> action if the variable @c C is negative. +The element <key-count> returns the integer value +N, where N is the number of currently handled keys @verbatim + - - - - - - - - - - - + - @endverbatim -The element <conditional> checks the <expr>s in the -<case>s one by one, and when it finds the first <case> -whose <expr> has a nonzero value, <saction>s in that -<case> are performed. - -#if EXAMPLE_CODE - - - - - - 0x0E24 - - - - 1 - - : : - - -#endif - -This code performs the actions in the second <case> unless the -second previous character is Thai character RU (whose character code -is 0x0E24). +The element <surrounding-text-flag> returns 1 +if surrounding text handling is supported or 0 if +not. @subsection imstate Input Method States and Transitions @@ -1341,25 +868,27 @@ is 0x0E24). - + state-.* - + - + + + - + - + - + @@ -1373,13 +902,14 @@ is 0x0E24). The input method driver is always in one of the <state>s of an <input-method> and may transit to another <state> when processing an input. The same input sequence can trigger different -<saction>s and produce different results in different -<state>s. +<funcall>s and produce different results in different +<state>s. -The attribute "id" gives the name of a <state>. The element -<state-title-text> specifies a title text displayed on the -screen when the input method is in this state. When this element is -omitted, the content of the <title> element is used instead. +The attribute "sname" gives the name of a <state>. The element +<title> in the <state> element specifies a title text +displayed on the screen when the input method is in this state. When +this element is omitted, the content of the <title> element in +the <input-method> used instead. When an input context is created, i.e. the input method is invoked, the input method driver is in the first <state> of the @@ -1387,139 +917,61 @@ the input method driver is in the first <state> of the Each <state> has zero or more <branch>es. Each <branch> corresponds to a <map> in a <map-list>. -The value of the attribute "branch-selecting-map" specifies a -<map>'s "id" value. When the input sequence matches one of the -<keyseq> (or <command-reference>) of a <rule> of the -<map>, the corresponding <branch> is selected, -<action>s in the <rule> are executed, <saction>s in -that <branch> are executed, and the input method driver shifts -to the initial condition of the current state. +The value of the attribute "mname" specifies a <map>'s "mname" +value. When the input sequence matches one of the <keyseq> (or +<command-reference>) of a <rule> of the <map>, the +corresponding <branch> is selected, <funcall>s in the +<rule> are executed, <funcall>s specified in that +<branch> are executed, and the input method driver shifts to the +initial condition of the current state. Whenever the input method driver shifts to the initial condition of the first <state>, it commits all characters in the preedit -buffer and clears the preedit buffer, without explicit <commit>. +buffer and clears the preedit buffer, without explicit call to +<commit>. -Optional element <state-hook> specifies <sactions> +Optional element <state-hook> specifies <funcall>s executed when the input method driver is shifted to the current <state>. Remember that when an input context of the input method is created, the input method is "shifted" to the first <state> in the <state-list> element, and the -<saction>s in the <state-hook> of the first <state> +<funcall>s in the <state-hook> of the first <state> will be executed. When an input sequence does not match with any of the <branch>s in the current <state>, @li If the <catch-all-branch> element exists, - <saction>s in the <catch-all-branch> is executed. - @li If <catch-all-branch> is omitted, + <funcall>s in the <catch-all-branch> is executed. + @li If there is no <catch-all-branch> element, the input method transits to the initial state. #if EXAMPLE_CODE - - - - - : : - - - - - - - - - - : : - - - - - - - + + + + state-second + + + + + + state-init + + + state-init + + + + #endif This code defines state transitions in an input method. It has two -states "state-init" and "state-join". The state "state-init" has -three <branchglt;s. When an input sequence belonging to -"map-consonant", "map-misc" and "map-join" is given, the corresponding -branch is selected and its <saction>s are executed. When the -branch with "map-join" is selected, the state is shift to -"state-join". The state "state-join" has one branch for input -sequences from "map-consonant" and one catch-all-branch for everything -else, both shifting the state to "state-init". - -@verbatim - - - - - - - - - -@endverbatim - -<saction>s (state-actions) are <action>s and state transitions. - -The element <shift-to> shifts the current state to the one specified -by the value of the attribute "id". The value must appear in -<state-list>. The element <shift-back> shifts the current state to -the previous one. - -@subsection implist Plist - -plistObject used in the element <call> is defined as below. - -@verbatim - - - - - - - - string - - - - symbol - - - - integer - - \?. - [0#]x[0-9A-F]{1,6} - [0-9]{1,7} - - - - - - - - - - - - - - - - - - - - - - - - - - -@endverbatim +states "state-init" and "state-second". The state "state-init" has +two <branchglt;s: "map-consonant" and "map-independent". When an +input sequence belonging to "map-consonant" is given, the state is +shifted to "state-second", after executing <funcall>s in the +<rule> for the input sequence. The state "state-second" has +three branches, two of which shift the state back to the "state-init". @verbatim @@ -1549,7 +1001,7 @@ you will get this: @endif The definition of the input method is very simple as below, and it is -quite straight forward to extend it to cover all Latin characters. +quite straightforward to extend it to cover all Latin characters. @verbatim @@ -1560,39 +1012,39 @@ quite straight forward to extend it to cover all Latin characters. latin-postfix - - - - - - - - - - - - - - - - - - - - - - - - - + + AÁ + a'á + A''A' + a''a' + C,Ç + c,ç + C,,C, + c,,c, + E'É + e'é + E''E' + e''e' + I'Í + i'í + I''I' + i''i' + O'Ó + o'ó + O''O' + o''o' + U'Ú + u'ú + U''U' + u''u' - - + + - + @endverbatim @@ -1616,7 +1068,7 @@ you will get this (Unicode arrow symbols): @endverbatim @endif -The definition utilizes and as below: +The definition utilizes and as below: @verbatim @@ -1626,72 +1078,51 @@ The definition utilizes and as below: UNICODE - - C-U + + C-UU+ - - - + + 00 + 11 : : - - - + 99 + AA + BB : : - + fF - - - 0 - 0 - + + + 0 + 0 + state-unicode - - - - - - - - 65 - - 48 - - - 1 - 55 - - - - - - - 16 - - - - - - - - 1 - - - - - - - 4 - - - - - - - - + + + @- + + 65 + + 48 + + + 55 + + + 16 + + 1 + + 4 + + @< + + state-init + + @@ -1713,81 +1144,81 @@ you will get: 你好北京 @endverbatim -The definition utilizes and to choose one of them. Note that this is +just an example, and it ignores such important key as Backspace. @verbatim .. "拼" - + - - + a + b : : - + z - + - - 被北备背悲辈杯倍贝碑... ... - - 好号毫豪浩耗皓嚎昊郝... ... - - 经京精境警竟静惊景敬... ... - - 你呢尼泥逆倪匿拟腻妮... ... + bei + 被北备背悲辈杯倍贝碑... >... + hao + 好号毫豪浩耗皓嚎昊郝... >... + jing + 经京精境警竟静惊景敬... >... + ni + 你呢尼泥逆倪匿拟腻妮... >... - + 1 + 2 : : - + 9 + 0 - + - + - - + 1 + state-main - + - - + + state-select - + state-init - + - + state-init" - + state-init @@ -1838,3 +1269,5 @@ Boston, MA 02110-1301, USA. /* Local Variables: */ /* coding: utf-8 */ /* End: */ + +