From 2ead60b53ac87a3f712e94335ff1c89b9f4e23e5 Mon Sep 17 00:00:00 2001 From: nisikimi Date: Thu, 4 Mar 2010 04:20:57 +0000 Subject: [PATCH] *** empty log message *** --- FORMATS/EXPR.ja.txt | 4 +- FORMATS/EXPR.txt | 111 ++++++++++++++++++++++++++++---------------- FORMATS/IM.ja.txt | 10 ++-- FORMATS/IM.txt | 128 +++++++++++++++++++++++++++------------------------ MIM/mim.rng | 5 +- 5 files changed, 149 insertions(+), 109 deletions(-) diff --git a/FORMATS/EXPR.ja.txt b/FORMATS/EXPR.ja.txt index 83e15f0..f67686f 100644 --- a/FORMATS/EXPR.ja.txt +++ b/FORMATS/EXPR.ja.txt @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2009 +/* Copyright (C) 2009 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 See the end for copying conditions. */ @@ -704,7 +704,7 @@ inclusive or), 排他的論理和(logical exclusive or)を求める。結果が */ /* -Copyright (C) 2003, 2004, 2005, 2009 +Copyright (C) 2009 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 diff --git a/FORMATS/EXPR.txt b/FORMATS/EXPR.txt index edd6e2d..cb2439e 100644 --- a/FORMATS/EXPR.txt +++ b/FORMATS/EXPR.txt @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2009 +/* Copyright (C) 2009 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 See the end for copying conditions. */ @@ -91,7 +91,8 @@ variables. Basic terms in the m17n database are integers, strings, symbols, lists, variable references and function calls. The schema file for -Input Method or Font Layout Table may define other kind of terms. +Input Method or Font Layout Table may extend these definitions or +define other kind of terms. Decimal character codes, hexadecimal character codes, and characters represented with special syntax (a question mark followed by the @@ -112,7 +113,7 @@ specified with the "vname" attribute. #endif -This code referes to the variable "handled-keys". +This code refers to the variable "handled-keys". @verbatim @@ -168,7 +169,7 @@ arguments. @endverbatim A <defmacro> element defines a macro whose name is specified -with the "fname" attribute. Unlike <defmacro>, <args> +with the "fname" attribute. Unlike <defun>, its arguments must be already evaluated when the macro is called. @verbatim @@ -230,7 +231,7 @@ implicitly initialized to the integer value zero. When a <defvar> specifies a value, it may have the <possible-value> element that lists the possible values of the variable. The type (one of integer, symbol, string) of the possible -values must be same with that of the specifeid value. +values must be same with that of the specified value. When the type of the specified value is integer, <possible-value> may have one or more <range> elements. A @@ -273,9 +274,9 @@ A <funcall> element calls a function or a macro specified by the The m17n database has some predefined functions, too. In function definitions, arguments are often restricted to a certain -type. For example, arithmetic operations would require integers, not -strings. The following four elements are defined to represent such -restrictions. +type. For example, arithmetic operations would require integers, and +would not accept strings. The following four elements are defined to +represent such restrictions. @verbatim @@ -291,7 +292,7 @@ A <intterm> is a term whose value is an integer. That is, if a <varref> appears as a <intterm>, its value must be an integer and if a <funcall> appears as a <intterm>, it must return an integer. The schema file for Input Method or Font Layout -Table may define other kind of intterms. +Table may define other kind of <intterm>. @verbatim @@ -320,7 +321,7 @@ Table may define other kind of intterms. @endverbatim A <strterm>, <symterm> or <listterm> is a term whose -value is a string, a symbol or a list respecivelly. That is, if a +value is a string, a symbol or a list respectively. That is, if a <varref> appears as a <strterm>, its value must be an string and if a <funcall> appears as a <symterm>, it must return a symbol. @@ -393,7 +394,7 @@ If the given terms have the same object, the value of this funcall is If the first term equals to the second term, the value of this funcall is <integer>1</integer>. Otherwise, -<integer>0</integer>. The equality of terms is defind as +<integer>0</integer>. The equality of terms is defined as below: An integer equals to another integer iff they contain the same integer value. A string equals to another string iff they contain strings of the same characters. A symbol equals to another symbol iff @@ -415,7 +416,7 @@ string. A symbol matches with another symbol iff they contain the same symbol. A list matches with another list iff the first list is no longer than the second, and the Nth element of the first list equals to the Nth element of the second list. An error matches with -another error iif the first eroor's error type is or is the +another error iff the first error's error type is <symbol/> or is the same as the second error's error type. @endverbatim @@ -426,10 +427,10 @@ same as the second error's error type. @endverbatim These elements take two integer terms and compare them. The value of -this funcall is <integer>1</integer> when when first -integer is less than, less than or equal to, equal to, greater than or -equal to, greater than, and not equal to the second value, -respectivelly. Otherwise, <integer>0</integer>. +this funcall is <integer>1</integer> when first integer is +less than, less than or equal to, greater than or equal to, greater +than the second value, respectively. Otherwise, +<integer>0</integer>. @verbatim @@ -468,7 +469,7 @@ This code increments @c C-AFTER-V by 1. When the attribute "vname" is given, this element calculates the remaindar when the value of the variable "vname" is divided by the given integer term, and the result becomes the value of the funcall. -When the attribute is not given, this element calculates the remaindar +When the attribute is not given, this element calculates the remainder when the first integer term is divided by the second integer term. @verbatim @@ -484,10 +485,10 @@ when the first integer term is divided by the second integer term. @endverbatim When the attribute "vname" is given, these elements perform "logical -and", "logcal inclusive or", or "logical exclusive or" of the value of -the variable "vname" and the given integer term(s). The result +and", "logical inclusive or", or "logical exclusive or" of the value of +the variable "vname" and the given integer term(s), respectively. The result becomes the value of the funcall. When the attribute is not given, -these elements perform "logical and", "logcal inclusive or", or +these elements perform "logical and", "logical inclusive or", or "logical exclusive or" of the given integer term(s). @verbatim @@ -510,12 +511,12 @@ term to the left by the count specified with the second integer term. @endverbatim -When the attribute "vname" is given, its value must be a list and that -list is modified destructively by concatinating all the elements of -the given terms if it is a list, or the element itself if not, in the -specified order. When no attribute is given, a list is made by -concatinating all the given terms in the same manner. The resulting -list becomes the value of the funcall. +When the attribute "vname" is given, the value of the variable "vname" +must be a list. This element modifies the list destructively by +concatenating all the elements of the given terms if it is a list, or +the term itself if not, in the specified order. When no attribute is +given, a list is made by concatenating all the given terms in the same +manner. The resulting list becomes the value of the funcall. @verbatim @@ -525,12 +526,12 @@ list becomes the value of the funcall. @endverbatim When the attribute "vname" is given, its value must be a string and -that string is modified destructively by concatinating all the given +that string is modified destructively by concatenating all the given term(s). If a term is a string term, the string is to be concatinated. If a term is a integer term, a string of a character whose code is its integer value is to be concatinated. If If a term -is a list term, its elements must be interger terms and a string -containing characters whose codes are their integer values is to be +is a list term, its elements must be interger terms, and a string +containing characters whose codes are the integer values is to be concatinated. When no attribute is given, a string is made by concatinating all the @@ -600,7 +601,7 @@ evaluated. state-init #endif -This code performs the <shift> action if the variable @c C is negative. +This code performs the <shift> if the variable @c C is negative. @verbatim @@ -612,7 +613,7 @@ If the first term is evaluated to be true, this element evaluates the rest. @endverbatim -This <cond> evaluates the first element of the given lists, one +This element evaluates the first element of the given lists, one by one, and and when it finds the first list whose first element is evaluated to be true, other elements in the list are evaluated. @@ -629,7 +630,7 @@ evaluated to be true, other elements in the list are evaluated. #endif -This code sets the varialbe "ret" to the integer value 1 when the +This code sets the variable "ret" to the integer value 1 when the variable "level" has value 0, otherwise, calls "macro-cp12". @verbatim @@ -643,7 +644,7 @@ This element repeatedly executes the given terms. @endverbatim This element evaluate the first term and if true, evaluate the rest. -This processs repeats until the first term becomes not true. +This process repeats until the first term becomes not true. @verbatim @@ -653,7 +654,7 @@ This processs repeats until the first term becomes not true. @endverbatim This element repeatedly evaluate terms for each element of the string -or list term. The attribute "vname" specifies the varialve that the +or list term. The attribute "vname" specifies the variable that the current element is assigned to, on each loop. @verbatim @@ -676,7 +677,7 @@ This element exits executions and returns the term if it is given. @endverbatim -Thie element evalustes the given terms one by one, until a term +This element evaluates the given terms one by one, until a term matching with the specified symbol or error is thrown by >throw/<. If such an item is thrown, the value of this element is >integer<1>/integer<, otherwise @@ -694,7 +695,7 @@ its value is set to the last evaluated term. It is the value of @endverbatim -This element throws to the catch for the specified symbol or eroor. +This element throws to the catch for the specified symbol or error. The value of this element is the term (if any) or the symbol, or the error. @@ -716,9 +717,41 @@ This element evaluates the given term. @endverbatim -This element shows the type of the given term. The type is -one of the followings: integer, string, -symbol, list, error. +This element shows the type of the given term. The type is one of the +followings: <symbol>integer</symbol>, +<symbol>string</symbol>, +<symbol>symbol</symbol>, +<symbol>list</symbol>, <symbol>error</symbol> + +@section im-seealso SEE ALSO +@ref mdbGeneral "mdbGeneral(5)" +*/ + +/* +Copyright (C) 2009 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H15PRO112 + +This file is part of the m17n database; a sub-part of the m17n +library. + +The m17n library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public License +as published by the Free Software Foundation; either version 2.1 of +the License, or (at your option) any later version. + +The m17n library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public +License along with the m17n library; if not, write to the Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. +*/ +/* Local Variables: */ +/* coding: utf-8 */ +/* End: */ diff --git a/FORMATS/IM.ja.txt b/FORMATS/IM.ja.txt index 85326d7..a5157b5 100644 --- a/FORMATS/IM.ja.txt +++ b/FORMATS/IM.ja.txt @@ -3,7 +3,7 @@ Registration Number H15PRO112 See the end for copying conditions. */ -/***en +/***ja @page mdbIM インプットメソッド @@ -17,9 +17,9 @@ m17n ライブラリは、m17n データベースから動的にロードでき @section im-format 文法と意味 -以下に RelaxNG で書かれた入力メソッド定義用スキーマを示す。(このスキー -マファイルは m17n-db-xml/MIMNEW/mimnew.rng にあり、 -基本的な表現や項を定義する m17n-db-xml/MIMNEW/mimnew.rng も利用する。) +以下に RelaxNG で書かれた入力メソッド定義用スキーマを示す。(このファイ +ルは m17n-db-xml/MIMNEW/mimnew.rng にある。またこのスキーマは、基本的な +表現や項を定義する m17n-db-xml/MIMNEW/expr.rng を継承して利用する。) @verbatim @@ -966,7 +966,7 @@ preeditバッファ中の全ての文字をコミットし、preeditバッファ */ /* -Copyright (C) 2003, 2004, 2005 +Copyright (C) 2003, 2004, 2005, 2009 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 diff --git a/FORMATS/IM.txt b/FORMATS/IM.txt index 5388d86..5d2742d 100644 --- a/FORMATS/IM.txt +++ b/FORMATS/IM.txt @@ -210,6 +210,9 @@ the value can be omitted. #endif +This code declares a variable "precomposed" whose possible values are +integer 0 or 1 and the default value is 0. + @verbatim @@ -247,7 +250,7 @@ the attribute "cname" whose value must start with "command-". 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 +element must appear in <defcmd>. 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 @@ -285,7 +288,7 @@ Commit the preedit text -@endbatim +@endverbatim Each <module> element declares an external module (i.e. dynamic library). The value of "id" attribute gives the name of the module. @@ -294,10 +297,9 @@ library). The value of "id" attribute gives the name of 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. +the default arguments 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 @@ -327,7 +329,7 @@ represents <funcall>s to execute. This code calls the function 'resize' of the module 'libmimx-anthy' with a symbol argument whose value is "t". - +@verbatim @@ -335,6 +337,7 @@ with a symbol argument whose value is "t". +@endbatim <macro-list> declares macros used in this input method. Details of <defun> can be found in @ref expr. @@ -363,8 +366,8 @@ This code declares one macro "macro-delete-preceding-zw". @subsection im-terms Input Method Terms -The m17n database has special tags and terms for wrinting input -methods: markers, selectors and key sequences. +The m17n database has special terms for wrinting input methods: +markers, selectors and key sequences. @verbatim @@ -376,7 +379,7 @@ methods: markers, selectors and key sequences. @endverbatim -These terms can be used in functions defined in expr.rng. +These terms can be used in functions defined in mimnew.rng. @verbatim @@ -392,8 +395,8 @@ position of a marker is referred by the elements <move>, 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 +current, last, preceding and following position in the preediting buffer +respectively. @@[ marks the preceding 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 @@ -513,17 +516,18 @@ 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. +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. #if EXAMPLE_CODE @@ -627,7 +631,7 @@ value would have, if appeared in its place. This code calls the command "command-start". -@subsection imfuncalls Input Method Function Calls +@subsection imfuncalls Input Method Functions In addion to those defined in expr.rng, the m17n database prepares several functions for writing input methods. @@ -640,8 +644,8 @@ several functions for writing input methods. The element <insert> inserts a character or a M-text before the current position. -When its content is a strterm, its value is the M-text to be inserted. -When an intterm is given, its value is the code of a character to be +When its content is a <strterm>, its value is the M-text to be inserted. +When an <intterm> is given, its value is the code of a character to be inserted. The marker positions affected by the insertion are automatically relocated. @@ -663,12 +667,13 @@ These codes insert the same character "á". The element <insert-candidates> specifies characters or strings to be possibly inserted before the current position. -When a listterm is glven, each item in this list is a candidate string -to be inserted. When a strterm is given, each character in the string -is a candidate character to be inserted. <insert> inserts the -first candidate before the current position. The inserted character -or string is associated with the list of candidates and the -information indicating the currently selected candidate. +When a <listterm> is glven, each item in this list is a +candidate string to be inserted. When a <strterm> is given, +each character in the string is a candidate character to be inserted. +<insert-candidates> inserts the first candidate before the current +position. The inserted character or string is associated with the +list of candidates and the information indicating the currently +selected candidate. #if EXAMPLE_CODE @@ -690,7 +695,7 @@ of five items with it. @endverbatim -When a markerterm is given, this element deletes characters between +When a <markerterm> is given, this element deletes characters between the current position and the specified marker position. #if EXAMPLE_CODE @@ -698,9 +703,9 @@ the current position and the specified marker position. #endif This code deletes the character between the current position and the -previous position. +preceding position. -When a intterm is given, the element <delete> treats it as a +When a <intterm> is given, the element <delete> treats it as a character position, and deletes characters between the current position and the character position. @@ -711,11 +716,12 @@ automatically relocated. @endverbatim -The element <select> first checks if the character just before -the current position belongs to a string that is associated with a +The element <select> first checks if the string just before the +current position belongs to a string that is associated with a candidate list. If so, it replaces that string with a candidate -specified by the selectorterm or the intterm. If a intterm is given, -it specifies a position in the candidate list. +specified by the <selectorterm> or the <intterm>. If a +<intterm> is given, it specifies a position in the candidate +list. #if EXAMPLE_CODE @@ -744,8 +750,8 @@ hide the currently displayed candidate list. @endverbatim 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 +<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 @@ -774,8 +780,8 @@ This code sets the marker "M" to the current position. @endverbatim 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, +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. @@ -830,7 +836,7 @@ unhandled. @endverbatim The element <shift> shifts the current state (See @ref imstate.) -to the one specified by the value of the given symterm". The value +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. @@ -839,8 +845,8 @@ shifts the current state to the previous one. @endverbatim 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. +<integer>C</integer>, where C is the character in the preedit text or +the surrounding text at the postion specified by the given <markerterm>. @verbatim @@ -856,9 +862,10 @@ The element <key-count> returns the integer value @endverbatim -The element <surrounding-text-flag> returns 1 -if surrounding text handling is supported or 0 if -not. +<surrounding-text-flag> returns <integer>1</integer> +if surrounding text handling is supported or +<integer>0</integer> if not. + @subsection imstate Input Method States and Transitions @@ -916,13 +923,13 @@ the input method driver is in the first <state> of the <state-list>. Each <state> has zero or more <branch>es. Each -<branch> corresponds to a <map> in a <map-list>. -The value of the attribute "mname" specifies a <map>'s "mname" -value. When the input sequence matches one of the <keyseq> (or +<branch> corresponds to a <map> in a <map-list> +whose "mname" value is the same with the branch'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 +corresponding <branch> is selected. The input method driver +first executes <funcall>s in the <rule>, then +<funcall>s specified in that <branch>, and shifts to the initial condition of the current state. Whenever the input method driver shifts to the initial condition of @@ -967,11 +974,12 @@ When an input sequence does not match with any of the <branch>s in the cur This code defines state transitions in an input method. It has two 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". +two <branchglt;s corresponding to "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 diff --git a/MIM/mim.rng b/MIM/mim.rng index 85312b4..87be5ef 100644 --- a/MIM/mim.rng +++ b/MIM/mim.rng @@ -70,8 +70,8 @@ - + @@ -273,8 +273,7 @@ - - + state-.* -- 1.7.10.4