*** empty log message ***
[m17n/m17n-docs.git] / data / dbformat.txt
1 /* -*- coding: euc-jp; -*- */
2 /***en @page m17nDBFormat Data format of the m17n database
3
4 This section describes formats of these data supplied by the m17n
5 database.
6
7 <ul>
8 <li> @ref mdbGeneral "General" -- General Format
9 <li> @ref mdbCharsetList "CharsetList" -- List of character set definitions 
10 <li> @ref mdbCodingList "CodingList" -- List of coding system definitions
11 <li> @ref mdbDir "Dir" -- List of data in a database directory.
12 <li> @ref mdbFLT "FLT" -- Font Layout Table
13 <li> @ref mdbFontEncoding "FontEncoding" -- Font Encoding
14 <li> @ref mdbFontSize "FontSize" -- Font Size
15 <li> @ref mdbFontset "Fontset" -- Fontset
16 <li> @ref mdbIM "IM" -- Input Method
17 </ul>
18 */
19 /***ja @page m17nDBFormat M17N ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¡¼¥¿¡¦¥Õ¥©¡¼¥Þ¥Ã¥È
20
21 ¤³¤³¤Ç¤Ï¡¢M17N ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÇÄ󶡤µ¤ì¤ë³Æ¥Ç¡¼¥¿¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò²òÀ⤹
22 ¤ë¡£
23
24 <ul>
25 <li> @ref mdbGeneral "General" -- °ìÈÌŪ¤Ê¥Õ¥©¡¼¥Þ¥Ã¥È
26 <li> @ref mdbCharsetList "CharsetList" -- Ê¸»ú¥»¥Ã¥ÈÄêµÁ¤Î¥ê¥¹¥È
27 <li> @ref mdbCodingList "CodingList" -- ¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È
28 <li> @ref mdbDir "Dir" -- ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¥Ç¡¼¥¿¤Î¥ê¥¹¥È
29 <li> @ref mdbFLT "FLT" -- ¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë
30 <li> @ref mdbFontEncoding "FontEncoding" -- ¥Õ¥©¥ó¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°
31 <li> @ref mdbFontSize "FontSize" -- ¥Õ¥©¥ó¥È¥µ¥¤¥º
32 <li> @ref mdbFontset "Fontset" -- ¥Õ¥©¥ó¥È¥»¥Ã¥È
33 <li> @ref mdbIM "IM" -- ¥¤¥ó¥×¥Ã¥È¥á¥½¥Ã¥É
34 </ul>
35 */
36 /***ja
37
38 @section mdbGeneral °ìÈÌŪ¤Ê¥Õ¥©¡¼¥Þ¥Ã¥È
39
40 @subsection general-description ÀâÌÀ
41
42 ´Ø¿ô mdatabase_load () ¤Ï¡¢Âè°ì¥¿¥°¤¬ @c Mchartable ¤« @c Mcharset ¤Ç
43 ¤Ê¤¤¸Â¤ê¡¢¥¿¥°¤Ç»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿¤ò¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î·Á¤ÇÊÖ¤¹¡£ÊÖ¤µ¤ì¤ë
44 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥­¡¼¤Ï<tt>Minteger</tt>, <tt>Msymbol</tt>,
45 <tt>Mtext</tt>, <tt>Mplist</tt> ¤Ë¸Â¤ë¡£Ãͤη¿¤Ï¥­¡¼¤Ë¤è¤Ã¤ÆÛ£ËæÀ­¤Ê¤¯
46 ·èÄꤵ¤ì¤ë¡£¥­¡¼¤¬ <tt>Minteger</tt> ¤Ê¤é¤ÐÃͤÏÀ°¿ôÃͤǤ¢¤ê¡¢¥­¡¼¤¬ 
47 <tt>Msymbol</tt> ¤Ê¤éÃͤϥ·¥ó¥Ü¥ë¡¢<tt>Mtext</tt> ¤Ê¤é¤Ð M-text¡¢
48 <tt>Mplist</tt> ¤Ê¤é¤Ð¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ë¡£
49
50 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ò¼¨¤¹¤¿¤á¤Ë¤Ï¤µ¤Þ¤¶¤Þ¤Êɽ¸½·Á¼°¤¬²Äǽ¤Ç¤¢¤ë¡£¤¿¤È¤¨¤Ð
51 <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> ¤È¤¤¤¦·Á¤Ç¡¢ºÇ½é¤ÎK1 ¤È V1¡¢Æó¤ÄÌÜ
52 ¤Î¥­¡¼¤ÈÃͤ¬K2 ¤È V2 ¤È¤¤¤Ã¤¿¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤òɽ¸½¤¹¤ë¤³¤È¤â¤Ç¤­¤ë¡£
53 ¤·¤«¤·¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÇÍѤ¤¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥¿¥¤¥×¤Ï¤«¤Ê¤ê
54 ¸ÂÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¤â¤Ã¤Èñ½ã¤Êɽ¸½·Á¼°¤òÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
55
56 ¤³¤ì°Ê¹ß¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¼¨¤¹¤¿¤á¤Ë¤Ï S ¼°¤ËÎà»÷¤·¤¿É½¸½¤òÍѤ¤¤ë¡£
57 (¼ÂºÝ m17n ¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥í¡¼¥À¤Ï¤³¤Îɽ¸½¤Ç½ñ¤«
58 ¤ì¤¿¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤òÆɤà¤è¤¦¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£)
59
60 ¤³¤Îɽ¸½·Á¼°¤Ï 1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i>Í×ÁÇ (element)</i> ¤«¤é¤Ê¤ë¡£¸Ä¡¹
61 ¤ÎÍ×ÁǤϥץí¥Ñ¥Æ¥£¤¹¤Ê¤ï¤Á¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î°ì¤Ä¤ÎÍ×ÁǤòɽ¤¹¡£
62
63 Í×ÁǴ֤Ϡ1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i> ¶õÇò (whitespace)</i> ¤¹¤Ê¤ï¤Á¥¹¥Ú¡¼¥¹
64 (code 32)¡¢¥¿¥Ö (code 9)¡¢²þ¹Ô (code 10) ¤Î¤¤¤º¤ì¤«¤Ç¶èÀÚ¤é¤ì¤ë¡£¥»¥ß
65 ¥³¥í¥ó(<tt>;</tt>) ¤Ç»Ï¤Þ¤ë¹Ô¤Ï¥³¥á¥ó¥È¤Ç¤¢¤ë¡£
66
67 ³Æ¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤ÈÃͤϡ¢Í×ÁǤΥ¿¥¤¥×¤Ë´ð¤Å¤¤¤Æ°Ê²¼¤Î¤è¤¦¤Ë·èÄꤵ¤ì¤ë¡£
68
69 <ul>
70
71 <li> À°¿ô
72
73 Àµµ¬É½¸½<tt>-?[0-9]+</tt> ¤Þ¤¿¤Ï<tt>0[xX][0-9A-Fa-f]+</tt> ¤Ë¹çÃפ¹¤ë
74 Í×ÁǤϡ¢¥­¡¼¤¬<tt>Minteger</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£ºÇ½é¤ÎÀµµ¬É½¸½
75 ¤È¹çÃפ¹¤ë¤â¤Î¤Ï 10 ¿Ê¤ÎÀ°¿ô¡¢¸å¤ÎÀµµ¬É½¸½¤È¹çÃפ¹¤ë¤â¤Î¤Ï 16 ¿Ê¤ÎÀ°¿ô
76 ¤È²ò¼á¤·¡¢¤½¤Î²ò¼á¤Î·ë²Ì¤¬¥×¥í¥Ñ¥Æ¥£¤ÎÃͤǤ¢¤ë¡£
77
78 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>0xA0</tt> ¤Ï10 ¿Ê¤Ç 160 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
79
80 <li> ¥·¥ó¥Ü¥ë
81
82 Àµµ¬É½¸½<tt>[^-0-9(]([^\\()]|\\.)+</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥­¡¼¤¬<tt>
83 Msymbol</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£Í×ÁÇÃæ¤Î <tt>\\t</tt>,
84 <tt>\\n</tt>, <tt>\\r</tt>, <tt>\\e</tt> ¤Ï¤½¤ì¤¾¤ì¡¢¥¿¥Ö (code 9)¡¢²þ
85 ¹Ô (code 10)¡¢Éüµ¢(code 13)¡¢¥¨¥¹¥±¡¼¥× (code 27) ¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£¥Ð¥Ã
86 ¥¯¥¹¥é¥Ã¥·¥å¤Ë³¤¯Â¾¤Îʸ»ú¤Ï¤½¤ì¼«¿È¤È²ò¼á¤µ¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢·ë
87 ²Ì¤È¤·¤ÆÆÀ¤é¤ì¤ëʸ»úÎó¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
88
89 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>abc\ def</tt> ¤Ï "abc def" ¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë
90 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
91
92 <li> MTEXT
93
94 Àµµ¬É½¸½ <tt>"([^"]|\\")*"</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥­¡¼ <tt>Mtext</tt> 
95 ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£¾åµ­¤Î¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Ë¤è¤ë¥¨¥¹¥±¡¼¥×¤Ï¤³¤³¤Ç
96 ¤âÍ­¸ú¤Ç¤¢¤ë¡£¤µ¤é¤Ë¡¢Í×ÁÇÃæ¤ÎÀµµ¬É½¸½
97 <tt>\\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> ¤Ë¹çÃפ¹¤ëÉôʬ¤Ï¡¢16¿Ê¤Ç²ò¼á¤·¤¿
98 ·ë²Ì¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£
99
100 ¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¥¨¥¹¥±¡¼¥×¤ò½èÍý¤·¤¿¾å¤Ç¡¢¥À¥Ö¥ë¥¯¥ª¡¼¥È¤Ë¤Ï¤µ¤Þ¤ì¤¿¥Ð
101 ¥¤¥ÈÎó¤òUTF-8 Îó¤È¤·¤Æ²ò¼á¤·¡¢M-text ¤Ë¥Ç¥³¡¼¥É¤¹¤ë¡£¤³¤Î M-text ¤¬¥×
102 ¥í¥Ñ¥Æ¥£¤ÎÃͤǤ¢¤ë¡£
103
104 <li> PLIST
105
106 Âбþ¤¹¤ë³ç¸Ì¤Ë¤Ï¤µ¤Þ¤ì¤¿ 0 ¸Ä°Ê¾å¤ÎÍ×ÁǤÏ<tt>Mplist</tt> ¤ò¥­¡¼¤È¤¹¤ë
107 ¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£³ç¸Ì¤ÎÁ°¸å¤Î¶õÇò¤Ï¼è¤ê½ü¤«¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥×
108 ¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ê¡¢¤½¤Î³ç¸ÌÆâ¤Î³ÆÍ×ÁǤòºÆµ¢Åª¤Ë²ò¼á¤·¤¿·ë²Ì¤Ç¤¢¤ë¡£
109
110 </ul>
111
112 @subsection general-syntax Ê¸Ë¡¤Îɽµ­
113
114 ¥Ç¡¼¥¿¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¥Õ¥©¡¼¥Þ¥Ã¥È¤ÎÀâÌÀ¤Ç¤Ï¡¢BNFÉ÷¤Îµ­Ë¡¤¬ÍѤ¤¤é¤ì
115 ¤ë¡£¤³¤Îµ­Ë¡¤Ç¤Ï¡¢Èó½ªÃ¼¤ÏÂçʸ»ú¡Ê´Ö¤Ë'-'¤¬Æþ¤Ã¤Æ¤â¤è¤¤¡Ë ¤Ç¡¢½ªÃ¼¤Ï " 
116 ¤Ç°Ï¤Ã¤Æɽ¤µ¤ì¤ë¡£ÆÃÊ̤ÊÈó½ªÃ¼ INTEGER, SYMBOL,
117 MTEXT, PLIST ¤Ï¤½¤ì¤¾¤ìÂбþ¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò°ÕÌ£¤¹¤ë¡£
118
119 @subsection general-example Îã
120
121 ¼¡¤Îñ½ã¤Ê·Á¼°¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ËÆɤ߹þ¤Þ¤ì¤ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¡¼¥¿¤Î
122 °ìÎã¤ò¼¨¤¹¡§
123
124 @verbatim
125 DATA-FORMAT ::=
126     [ INTEGER | SYMBOL | MTEXT | FUNC ] *
127
128 FUNC ::=
129     '(' FUNC-NAME FUNC-ARG * ')'
130
131 FUNC-NAME ::=
132     SYMBOL
133
134 FUNC-ARG ::=
135     INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')'
136 @endverbatim
137
138 ¤¿¤È¤¨¤Ð¡¢¼¡¤Î¥Æ¥­¥¹¥È¤ò´Þ¤à¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Ï¾å¤Îʸˡ¤Ë¹çÃפ¹¤ë¡§
139
140 @verbatim
141 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
142 @endverbatim
143
144 ¤½¤·¤Æ¼¡¤Î¤è¤¦¤Ê¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤ÆÆɤ߹þ¤Þ¤ì¤ë¡§
145
146 @verbatim
147 Â裱Í×ÁÇ: ¥­¡¼: Msymbol,  ÃÍ: abc
148 Â裲Í×ÁÇ: ¥­¡¼: Minteger, ÃÍ: 123
149 Â裳Í×ÁÇ: ¥­¡¼: Mplist,   ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
150     Â裱Í×ÁÇ: ¥­¡¼ Msymbol,  ÃÍ: pgr
151     Â裲Í×ÁÇ: ¥­¡¼ Minteger, ÃÍ: 255
152 Â裴Í×ÁÇ: ¥­¡¼: Mtext,    ÃÍ: m"text
153 Â裵Í×ÁÇ: ¥­¡¼: Mplist,   ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
154     Â裱Í×ÁÇ: ¥­¡¼: Msymbol, ÃÍ: _\_
155     Â裲Í×ÁÇ: ¥­¡¼: Mplist,  ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
156         Â裱Í×ÁÇ: ¥­¡¼: Mtext,    ÃÍ: string
157         Â裲Í×ÁÇ: ¥­¡¼: Msymbol,  ÃÍ: xyz
158         Â裳Í×ÁÇ: ¥­¡¼: Minteger, ÃÍ: -456
159 @endverbatim
160 */
161 /***en
162
163 @section mdbGeneral General Format
164
165 @subsection general-description DESCRIPTION
166
167 The mdatabase_load () function returns the data specified by tags in
168 the form of plist if the first tag is not @c Mchartable nor @c
169 Mcharset.  The keys of the returned plist are limited to
170 <tt>Minteger</tt>, <tt>Msymbol</tt>, <tt>Mtext</tt>, and
171 <tt>Mplist</tt>.  The type of the value is unambiguously determined by
172 the corresponding key.  If the key is <tt>Minteger</tt>, the value is
173 an integer.  If the key is <tt>Msymbol</tt>, the value is a symbol.
174 And so on.
175
176 A number of expressions are possible to represent a plist.  For
177 instance, we can use the form <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> to
178 represent a plist whose first property key and value are K1 and V1,
179 second key and value are K2 and V2, and so on.  However, we can use a
180 simpler expression here because the types of plists used in the m17n
181 database are fairly restricted.
182
183 Hereafter, we use an expression, which is similar to S-expression, to
184 represent a plist.  (Actually, the default database loader of the m17n
185 library is designed to read data files written in this expression.)
186
187 The expression consists of one or more <i>elements</i>.  Each element
188 represents a property, i.e. a single element of a plist.
189
190 Elements are separated by one or more <i>whitespaces</i>, i.e. a space
191 (code 32), a tab (code 9), or a newline (code 10).  Comments begin
192 with a semicolon (<tt>;</tt>) and extend to the end of the line.
193
194 The key and the value of each property are determined based on the
195 type of the element as explained below.
196
197 <ul>
198
199 <li> INTEGER
200
201 An element that matches the regular expression <tt>-?[0-9]+</tt> or
202 <tt>0[xX][0-9A-Fa-f]+</tt> represents a property whose key is
203 <tt>Minteger</tt>.  An element matching the former expression is
204 interpreted as an integer in decimal notation, and one matching the
205 latter is interpreted as an integer in hexadecimal notation.  The
206 value of the property is the result of interpretation.
207
208 For instance, the element <tt>0xA0</tt> represents a property whose
209 value is 160 in decimal.
210
211 <li> SYMBOL
212
213 An element that matches the regular expression
214 <tt>[^-0-9(]([^\\()]|\\.)+</tt> represents a property whose key is
215 <tt> Msymbol</tt>.  In the element, <tt>\\t</tt>, <tt>\\n</tt>,
216 <tt>\\r</tt>, and <tt>\\e</tt> are replaced with tab (code 9), newline
217 (code 10), carriage return (code 13), and escape (code 27)
218 respectively.  Other characters following a backslash is interpreted
219 as it is.  The value of the property is the symbol having the
220 resulting string as its name.
221
222 For instance, the element <tt>abc\ def</tt> represents a property
223 whose value is the symbol having the name "abc def".
224
225 <li> MTEXT
226
227 An element that matches the regular expression <tt>"([^"]|\\")*"</tt>
228 represents a property whose key is <tt>Mtext</tt>.  The backslash
229 escape explained above also applies here.  Moreover, each part in the
230 element matching the regular expression <tt>
231 \\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> is replaced with its hexadecimal
232 interpretation.
233
234 After having resolved the backslash escapes, the byte sequence between
235 the double quotes is interpreted as a UTF-8 sequence and decoded into
236 an M-text.  This M-text is the value of the property.
237
238 <li> PLIST
239
240 Zero or more elements surrounded by a pair of parentheses represent a
241 property whose key is <tt>Mplist</tt>.  Whitespaces before and after a
242 parenthesis can be omitted.  The value of the property is a plist,
243 which is the result of recursive interpretation of the elements
244 between the parentheses.
245
246 </ul>
247
248 @subsection general-syntax SYNTAX NOTATION
249
250 In an explanation of a plist format of data, a BNF-like notation is
251 used.  In the notation, non-terminals are represented by a string of
252 uppercase letters (including '-' in the middle), terminals are
253 represented by a string surrounded by '"'.  Special non-terminals
254 INTEGER, SYMBOL, MTEXT and PLIST represents property integer, symbol,
255 M-text, or plist respectively.
256
257 @subsection general-example EXAMPLE
258
259 Here is an example of database data that is read into a plist of this
260 simple format:
261
262 @verbatim
263 DATA-FORMAT ::=
264     [ INTEGER | SYMBOL | MTEXT | FUNC ] *
265
266 FUNC ::=
267     '(' FUNC-NAME FUNC-ARG * ')'
268
269 FUNC-NAME ::=
270     SYMBOL
271
272 FUNC-ARG ::=
273     INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')'
274 @endverbatim
275
276 For instance, a data file that contains this text matches the above
277 syntax:
278
279 @verbatim
280 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
281 @endverbatim
282
283 and is read into this plist:
284
285 @verbatim
286 1st element: key: Msymbol,  value: abc
287 2nd element: key: Minteger, value: 123
288 3rd element: key: Mplist,   value: a plist of these elements:
289     1st element: key Msymbol,  value: pgr
290     2nd element: key Minteger, value: 255
291 4th element: key: Mtext,    value: m"text
292 5th element: key: Mplist,   value: a plist of these elements:
293     1st element: key: Msymbol, value: _\_
294     2nd element: key: Mplist,  value: a plist of these elements:
295         1st element: key: Mtext,    value: string
296         2nd element: key: Msymbol,  value: xyz
297         3rd element: key: Minteger, value: -456
298 @endverbatim
299 */
300 /***ja
301
302 @section mdbCharsetList Ê¸»ú¥»¥Ã¥ÈÄêµÁ¤Î¥ê¥¹¥È
303
304 @subsection cslist-description ÀâÌÀ
305
306 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢¥¿¥° \<charset-list\> ¤ò»ý¤Ä¥Ç¡¼¥¿¤«¤éʸ»ú¥»¥Ã¥ÈÄêµÁ
307 ¤Î¥ê¥¹¥È¤ò¥í¡¼¥É¤¹¤ë¡£¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·
308 ¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
309
310 @verbatim
311 CHARSET-LIST ::= DEFINITION *
312
313 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
314
315 NAME ::= SYMBOL
316
317 KEY ::= SYMBOL
318
319 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
320 @endverbatim
321
322 @c NAME ¤ÏÄêµÁ¤¹¤ëʸ»ú¥»¥Ã¥È¤Î̾Á°¤Ç¤¢¤ë¡£
323
324 @c KEY ¤È @c VALUE ¤Î¥Ú¥¢¤Ï¡¢´Ø¿ô mchar_define_charset () ¤ËÂ裲°ú¿ô
325 $PLIST ¤ÎÍ×ÁǤȤ·¤ÆÍ¿¤¨¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
326
327 @subsection cslist-seealso SEE ALSO
328
329 @ref mdbGeneral "mdbGeneral(5)", mchar_define_charset ()
330 */
331 /***en
332
333 @section mdbCharsetList List of character set definitions 
334
335 @subsection cslist-description DESCRIPTION
336
337 The m17n library loads a list of charset definitions from the data of
338 tag \<charset-list\>.  The data is loaded as a plist of this format.
339
340 @verbatim
341 CHARSET-LIST ::= DEFINITION *
342
343 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
344
345 NAME ::= SYMBOL
346
347 KEY ::= SYMBOL
348
349 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
350 @endverbatim
351
352 @c NAME is a name of a charset to define.
353
354 @c KEY and @c VALUE pair is a property given to the function
355 mchar_define_charset () as an element of the second argument $PLIST.
356
357 @subsection cslist-seealso SEE ALSO
358
359 @ref mdbGeneral "mdbGeneral(5)", mchar_define_charset ()
360 */
361 /***ja
362
363 @section mdbCodingList ¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È
364
365 @subsection coding-list-description ÀâÌÀ
366
367 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢½é´ü²½¤ÎºÝ m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥¿¥° \<coding-list\> 
368 ¤Î¤Ä¤¤¤¿¥Ç¡¼¥¿¤«¤é¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î
369 ¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
370
371 @verbatim
372 CODING-LIST ::= DEFINITION *
373
374 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
375 NAME ::= SYMBOL
376
377 KEY ::= SYMBOL
378
379 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
380 @endverbatim
381
382 @c NAME ¤ÏÄêµÁ¤¹¤ë¥³¡¼¥É·Ï¤Î̾Á°¤Ç¤¢¤ë¡£
383
384 @c KEY ¤È @c VALUE ¤Î¥Ú¥¢¤Ï¡¢´Ø¿ô mchar_define_coding () ¤Ë£²ÈÖÌܤΰú
385 ¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
386
387 @subsection coding-list-seealso »²¾È
388
389 @ref mdbGeneral "mdbGeneral(5)", mconv_define_coding ()
390 */
391 /***en
392
393 @section mdbCodingList List of coding system definitions
394
395 @subsection coding-list-description DESCRIPTION
396
397 The m17n library loads a list of coding system definitions from the
398 m17n database by the tags \<coding-list\> at initialization time.  The
399 data is loaded as a plist of this format.
400
401 @verbatim
402 CODING-LIST ::= DEFINITION *
403
404 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
405 NAME ::= SYMBOL
406
407 KEY ::= SYMBOL
408
409 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
410 @endverbatim
411
412 @c NAME is a name of a coding system to define.
413
414 @c KEY and @c VALUE pair is a property given to the function
415 mconv_define_coding () as the second argument.
416
417 @subsection coding-list-seealso SEE ALSO
418
419 @ref mdbGeneral "mdbGeneral(5)", mconv_define_coding ()
420 */
421 /***ja
422
423 @section mdbDir ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¥Ç¡¼¥¿¤Î¥ê¥¹¥È
424
425 @subsection dir-description ÀâÌÀ
426
427 m17n ¥é¥¤¥Ö¥é¥ê¤Ï½é´ü²½¤ÎºÝ¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹Ãæ¤Î¥Ç¡¼¥¿ÄêµÁ¤Î¥ê¥¹¥È¤ò
428 ³Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î "mdb.dir" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤«¤é¥í¡¼
429 ¥É¤¹¤ë¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤ª¤±¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï°Ê²¼¤Ç¤¢¤ë¡£
430
431 @verbatim
432 MDB-DIR ::= DEFINITION *
433
434 DEFINITION ::= '(' TAG [ TAG [ TAG [ TAG ] ] ] FILE ')'
435
436 TAG ::= SYMBOL
437
438 FILE ::= MTEXT
439 @endverbatim
440 */
441 /***en
442
443 @section mdbDir List of data in a database directory.
444
445 @subsection dir-description DESCRIPTION
446
447 The m17n library loads a list of definitions of data of the m17n
448 database from files of name "mdb.dir" in each database directory at
449 initialization time.  The plist format of this file is as follows:
450
451 @verbatim
452 MDB-DIR ::= DEFINITION *
453
454 DEFINITION ::= '(' TAG [ TAG [ TAG [ TAG ] ] ] FILE ')'
455
456 TAG ::= SYMBOL
457
458 FILE ::= MTEXT
459 @endverbatim
460 */
461 /***ja
462
463 @section mdbFLT ¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë
464
465 @subsection flt-description ÀâÌÀ
466
467 ñ½ã¤Ê¥¹¥¯¥ê¥×¥È¤Î¾ì¹ç¡¢É½¼¨¥¨¥ó¥¸¥ó¤ÏÁªÂò¤·¤¿¥Õ¥©¥ó¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó
468 ¥°¤Ë±þ¤¸¤Æʸ»ú¥³¡¼¥É¤ò¥°¥ê¥Õ¥³¡¼¥É¤Ë°ìʸ»ú¤º¤ÄÊÑ´¹¤¹¤ë¡£¤·¤«¤·¡¢Ê£»¨¤Ê
469 ¥ì¥¤¥¢¥¦¥È¤òÍ׵᤹¤ëʸ½ñ¡¢¤¿¤È¤¨¤Ð¥¿¥¤¤ä¥¤¥ó¥É·Ï¤Î¥¹¥¯¥ê¥×¥È¤Ê¤É¤Î¾ì¹ç¡¢
470 £±ÂУ±¤ÎÊÑ´¹¤Ç¤ÏÉÔ½½Ê¬¤Ç¤¢¤ë¡£Ê£¿ô¤Îʸ»ú¤¬°ì¤Ä¤Î¥ê¥¬¥Á¥ã¤È¤·¤ÆÉÁ¤«¤ì¤¿¤ê¡¢
471 £²¼¡¸µÅª¤Ë¤º¤é¤·¤¿°ÌÃÖ¤ËÉÁ¤«¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¥°¥ê¥Õ¤¬¤¢¤Ã¤¿¤ê¤¹¤ë¡£
472
473 ¤³¤Î¤è¤¦¤ÊÊ£»¨¤Ê¥¹¥¯¥ê¥×¥È¤ò½èÍý¤¹¤ë¤¿¤á¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Ï¥Õ¥©¥ó¥È¥ì
474 ¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë (û½Ì¤·¤Æ FLT ¤È¸Æ¤Ö¤³¤È¤Ë¤¹¤ë) ¤òÍѤ¤¤ë¡£FLT ¥É¥é¥¤
475 ¥Ð¤Ï FLT ¤ò²ò¼á¤·¡¢Ê¸»úÎó¤òɽ¼¨¥¨¥ó¥¸¥ó¤ËÅϤ¹¤³¤È¤Î¤Ç¤­¤ë¥°¥ê¥ÕÎó¤ËÊÑ
476 ´¹¤¹¤ë¡£
477
478 FLT ¤Ï OpenType Layout Table ¤Ë¸«¤é¤ì¤ë¾ðÊó (CMAP, GSUB, and GPOS) ¤Ë
479 ²Ã¤¨¤Æ¡¢Ê¸»úÎ󤫤é½ñµ­ÁÇ (grapheme) ¥¯¥é¥¹¥¿¤òÃê½Ð¤·¤¿¤ê¡¢¥¯¥é¥¹¥¿Æâ¤Ç
480 ʸ»ú¤òʤÙÊѤ¨¤¿¤ê¤¹¤ë¤¿¤á¤Î¾ðÊó¤ò»ý¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£
481
482 FLT ¤Ï 1 ¤Ä°Ê¾å¤ÎÊÑ´¹¥¹¥Æ¡¼¥¸¤¬Â³¤¤¤¿¤â¤Î¤Ç¤¢¤ë¡£³Æ¥¹¥Æ¡¼¥¸¤Ç¥³¡¼¥ÉÎó
483 ¤ÏÊ̤Τâ¤Î¤ËÊÑ´¹¤µ¤ì¡¢¼¡¤Î¥¹¥Æ¡¼¥¸¤ËÆɤޤì¤ë¡£Îó¤ÎŤµ¤Ï¥¹¥Æ¡¼¥¸Ëè¤Ë°Û
484 ¤Ê¤ë¤³¤È¤¬¤¢¤ë¡£¥³¡¼¥ÉÎó¤Î³ÆÍ×ÁǤϰʲ¼¤ÎÀ°¿ôÃͤΰÀ­¤ò»ý¤Ä¡£
485
486 <ul>
487 <li> ¥³¡¼¥É
488
489 ÊÑ´¹¤ÎºÇ½é¤Î¥¹¥Æ¡¼¥¸¤Ç¤Ï¡¢¸µ¤Îʸ»úÎó¤Îʸ»ú¥³¡¼¥É¡£ºÇ¸å¤Î¥¹¥Æ¡¼¥¸¤Ç¤Ï¡¢
490 ɽ¼¨¥¨¥ó¥¸¥ó¤ËÅϤµ¤ì¤ë¥°¥ê¥Õ¥³¡¼¥É¡£¤½¤ì°Ê³°¤Ç¤ÏÃæ´ÖŪ¤Ê¥°¥ê¥Õ¥³¡¼¥É¡£
491
492 <li> ¥«¥Æ¥´¥ê
493
494 ¤½¤Î¥¹¥Æ¡¼¥¸¤Î @c CATEGORY-TABLE ¤ÇÄêµÁ¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼¥³¡¼¥É¡£
495
496 <li> ·ë¹çµ¬Â§
497
498 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤òÁ°¤Î¤â¤Î¤È¤É¤¦·ë¹ç¤¹¤ë¤«¤ò»ØÄꤹ¤ë¡£
499
500 <li> º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°
501
502 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢É½¼¨´Ø¿ô¤Ë¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤ÎÁ°¤Ë¥¹¥Ú¡¼¥¹¤òÁÞÆþ¤·¤Æ¡¢Á°
503 ¤Î¥°¥ê¥Õ¤È½Å¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤è¤¦»Ø¼¨¤¹¤ë¡£
504
505 <li> ±¦¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°
506
507 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢É½¼¨´Ø¿ô¤Ë¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤Î¸å¤Ë¥¹¥Ú¡¼¥¹¤òÁÞÆþ¤·¤Æ¡¢¸å
508 ¤Î¥°¥ê¥Õ¤È½Å¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤è¤¦»Ø¼¨¤¹¤ë¡£
509
510 </ul>
511
512 ¥ì¥¤¥¢¥¦¥È¥¨¥ó¥¸¥ó¤¬¥Æ¥­¥¹¥È¤òÉÁ¤¯ºÝ¤Ë¤Ï¡¢¤Þ¤º¥Æ¥­¥¹¥È¤Î³Æʸ»ú¤ËÂФ·¤Æ
513 ¤½¤ì¤¾¤ì¥Õ¥©¥ó¥È¤ÈFLT ¤ò·èÄꤹ¤ë¡£Æ±¤¸¥Õ¥©¥ó¥È¤È FLT ¤òÍѤ¤¤ëÉôʬʸ»ú
514 Îó¤Ë´Ø¤·¤Æ¡¢¥ì¥¤¥¢¥¦¥È¥¨¥ó¥¸¥ó¤ÏÂбþ¤¹¤ëÃæ´ÖŪ¤Ê¥°¥ê¥Õ¤ÎÎó¤òÀ¸À®¤¹¤ë¡£
515 Ãæ´ÖŪ¤Ê¥°¥ê¥Õ¥³¡¼¥É¤Î³ÆÍ×ÁǤϡ¢¥³¡¼¥É¤Î°À­¤È¤·¤ÆÂбþ¤¹¤ëʸ»ú¥³¡¼¥É¡¢
516 ¾¤Î°À­¤È¤·¤Æ 0 ¤ò»ý¤Ä¡£¤³¤ÎÎó¤ÏFLT ¤ÎºÇ½é¤Î¥¹¥Æ¡¼¥¸¤Ç¸½¹Ô¤Î @e ¥é¥ó 
517 (ÉôʬÎó) ¤È¤·¤Æ½èÍý¤µ¤ì¤ë¡£
518
519 ³Æ¥¹¥Æ¡¼¥¸¤Ï°Ê²¼¤Î¤è¤¦¤ËƯ¤¯¡£
520
521 ¤Þ¤º¤³¤Î¥¹¥Æ¡¼¥¸¤Ë @c CATEGORY-TABLE ¤¬¤¢¤ì¤Ð¡¢¸½¹Ô¤Î¥é¥ó¤Î¤¹¤Ù¤Æ¤Î¥°
522 ¥ê¥Õ¤Î¥«¥Æ¥´¥ê¤¬¹¹¿·¤µ¤ì¤ë¡£¥«¥Æ¥´¥ê¤Î̵¤¤¥°¥ê¥Õ¤¬¤¢¤ì¤Ð¡¢¥é¥ó¤Ï¤½¤Î¥°
523 ¥ê¥Õ¤ÎÁ°¤Ç½ª¤ë¡£
524
525 ¼¡¤Ë¤³¤Î¥¹¥Æ¡¼¥¸¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¡¢·ë¹çµ¬Â§¡¢º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤¬ 0 
526 ¤Ë½é´ü²½¤µ¤ì¤ë¡£
527
528 ¼¡¤¤¤Ç¡¢¤³¤Î¥¹¥Æ¡¼¥¸¤ÎºÇ½é¤ÎÊÑ´¹µ¬Â§¤¬¸½¹Ô¤Î¥é¥ó¤ËŬÍѤµ¤ì¤ë¡£
529
530 ºÇ¸å¤Ë¸½¹Ô¤Î¥é¥ó¤Ï¿·¤·¤¯ºî¤é¤ì¤¿¡ÊÃæ´Ö¡Ë¥°¥ê¥ÕÎó¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£
531
532 @subsection flt-syntax Ê¸Ë¡¤È°ÕÌ£
533
534 m17n ¥é¥¤¥Ö¥é¥ê ¤Ï m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¥¿¥° \<font, layouter,
535 FLT-NAME\> ¤òÍѤ¤¤Æ FLT ¤ò¥í¡¼¥É¤¹¤ë¡£FLT ¤Î¥Ç¡¼¥¿¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï°Ê²¼¤ÎÄ̤ꡧ
536
537 @verbatim
538 FONT-LAYOUT-TABLE ::= STAGE0 STAGE *
539
540 STAGE0 ::= CATEGORY-TABLE GENERATOR
541
542 STAGE ::= CATEGORY-TABLE ? GENERATOR
543
544 CATEGORY-TABLE ::= '(' 'category' CATEGORY-SPEC + ')'
545
546 CATEGORY-SPEC ::= '(' CODE CATEGORY ')'
547                   | '(' CODE CODE CATEGORY ')'
548
549 CODE ::= INTEGER
550
551 CATEGORY ::= INTEGER
552 @endverbatim
553
554 @c CATEGORY-SPEC ¤ÎÄêµÁÃæ¤Ç¡¢ @c CODE ¤Ï¥°¥ê¥Õ¥³¡¼¥É @c CATEGORY ¤ÏÂç
555 ʸ»ú¤¢¤ë¤¤¤Ï¾®Ê¸»ú¤Î ASCII code¡¢¤¹¤Ê¤ï¤Á 'A', ... 'Z', 'a', .. 'z' ¤Î
556 ¤¤¤º¤ì¤«¤Ç¤¢¤ë¡£
557
558 @c CATEGORY-SPEC ¤ÎºÇ½é¤Î·Á¼°¤Ï¡¢@c CATEGORY ¤ò¥³¡¼¥É @c CODE ¤ò»ý¤Ä¥°
559 ¥ê¥Õ¤Ë³ä¤êÅö¤Æ¡¢Æó¤ÄÌܤηÁ¼°¤Ï @c CATEGORY ¤òÆó¤Ä¤Î @c CODE ¤Î´Ö¤Î¥³¡¼
560 ¥É¤ò»ý¤Ä¥°¥ê¥Õ¤Ë³ä¤êÅö¤Æ¤ë¡£
561
562 @verbatim
563 GENERATOR ::= '(' 'generator' RULE MACRO-DEF * ')'
564
565 RULE ::= REGEXP-BLOCK | MATCH-BLOCK | SUBST-BLOCK | COND-BLOCK
566          | DIRECT-CODE | COMBINING-SPEC | OTF-SPEC
567          | PREDEFINED-RULE | MACRO-NAME
568
569 MACOR-DEF ::= '(' MACRO-NAME RULE + ')'
570 @endverbatim
571
572 ³Æ @c RULE ¤Ï¡¢¾ÃÈñ¤¹¤ë¥°¥ê¥Õ¤ÈÀ¸À®¤¹¤ë¥°¥ê¥Õ¤ò»ØÄꤹ¤ë¡£¡Ö¾ÃÈñ¤µ¤ì¤¿¡×
573 ¥°¥ê¥Õ¤Ï¸½¹Ô¤Î¥é¥ó¤«¤é¼è¤ê½ü¤«¤ì¤ë¡£¥ë¡¼¥ë¤Ï¾õ¶·¤Ë¤è¤Ã¤Æ¤Ï¼ºÇÔ¤¹¤ë¡£ÌÀ
574 ¼¨Åª¤Ë¼ºÇԤȽñ¤«¤ì¤Æ¤¤¤ë¾ì¹ç¤ò¤Î¤¾¤­¡¢À®¸ù¤È¤ß¤Ê¤¹¡£
575
576 @verbatim
577 DIRECT-CODE ::= INTEGER
578 @endverbatim
579
580 ¤³¤Î¥ë¡¼¥ë¤Ï¥°¥ê¥Õ¤ò¾ÃÈñ¤»¤º¡¢°Ê²¼¤Î°À­¤ò»ý¤Ä¥°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£
581
582 <ul>
583 <li> ¥³¡¼¥É : @c INTEGER ¡Ü ¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È
584 <li> ·ë¹çµ¬Â§ : ¥Ç¥Õ¥©¥ë¥ÈÃÍ
585 <li> º¸¥Ñ¥Ç¥¤¥ó¥°¥Õ¥é¥° : ¥Ç¥Õ¥©¥ë¥ÈÃÍ
586 <li> ±¦¥Ñ¥Ç¥¤¥ó¥°¥Õ¥é¥° : 0
587 </ul>
588
589 ¥°¥ê¥ÕÀ¸À®¸å¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¡¢·ë¹çµ¬Â§, º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é
590 ¥° ¤Ï¤¹¤Ù¤Æ 0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
591
592 @verbatim
593 PREDEFINED-RULE ::= '=' | '*' | '<' | '>' | '|' | '[' | ']'
594 @endverbatim
595
596 ¤³¤ì¤é¤Ï°Ê²¼¤Î¤è¤¦¤ËƯ¤¯¡£
597
598 <ul>
599 <li> @c =
600
601 ¸½¹Ô¤Î¥é¥ó¤ÎºÇ½é¤Î¥°¥ê¥Õ¤ò¾ÃÈñ¤·¡¢Æ±¤¸¥°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£¸½¹Ô¤Î¥é¥ó¤¬¶õ
602 ¤Ê¤é¤Ð¼ºÇÔ¤¹¤ë¡£
603
604 <li> @c *
605
606 Á°¤Î¥ë¡¼¥ë¤ò·«¤êÊÖ¤·¼Â¹Ô¤¹¤ë¡£Á°¤Î¥ë¡¼¥ë¤¬¼ºÇÔ¤¹¤ì¤Ð¡¢²¿¤â¤»¤º¼ºÇÔ¤¹¤ë¡£
607
608 <li> @c @<
609
610 ½ñµ­ÁÇ¥¯¥é¥¹¥¿¤Î»Ï¤á¤ò¼¨¤¹¡£
611
612 <li> @c @>
613
614 ½ñµ­ÁÇ¥¯¥é¥¹¥¿¤Î½ª¤ê¤ò¼¨¤¹¡£
615
616 <li> @c @[
617
618 ¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Îº¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤ò 1 ¤Ë¤¹¤ë¡£¥°¥ê¥Õ¤Î¾ÃÈñ¤äÀ¸
619 À®¤Ï¤·¤Ê¤¤¡£
620
621 <li> @c @]
622
623 ¤³¤Îµ¬Â§¤ÏºÇ¶áÀ¸À®¤µ¤ì¤¿¥°¥ê¥Õ¤Î±¦¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤ò 1 ¤Ë¤¹¤ë¡£¥°¥ê¥Õ
624 ¤Î¾ÃÈñ¤äÀ¸À®¤Ï¤·¤Ê¤¤¡£
625
626 <li> @c |
627
628 ¥°¥ê¥Õ¤ò¾ÃÈñ¤»¤º¡¢¥«¥Æ¥´¥ê¤¬ ' ' ¤Ç¾¤Î°À­¤¬ 0 ¤Ç¤¢¤ëÆÃÊ̤ʥ°¥ê¥Õ¤òÀ¸
629 À®¤¹¤ë¡£¤³¤Îµ¬Â§¤À¤±¤¬¤³¤ÎÆÃÊ̤ʥ°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£
630
631 </ul>
632
633 @verbatim
634 REGEXP-BLOCK ::= '(' REGEXP RULE * ')'
635
636 REGEXP ::= MTEXT
637 @endverbatim
638
639 @c MTEXT ¤Ï¸½¹Ô¤Î¥é¥ó¤Î¥«¥Æ¥´¥êÎó¤Ë¹çÃפ¹¤Ù¤­Àµµ¬É½¸½¤Ç¤¢¤ë¡£¹çÃפ¹¤ì
640 ¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þŪ¤Ë¸½¹Ô¤Î¥é¥ó¤ò¹çÃפ·¤¿Éôʬ¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c
641 RULE ¤ò¼Â¹Ô¤¹¤ë¡£¹çÃפ·¤¿Éôʬ¤Ï¤³¤Îµ¬Â§¤Ë¤è¤Ã¤Æ¾ÃÈñ¤µ¤ì¤ë¡£
642
643 ³ç¸Ì¤Î¤Ä¤¤¤¿Éôʬɽ¸½¤¬¤¢¤ì¤Ð¡¢@c RULE ¤ÎÃæ¤Ë½Ð¸½¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤ @c
644 MATCH-BLOCK ¤Ë¤è¤Ã¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Ëµ­Ï¿¤µ¤ì¤ë¡£
645
646 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
647
648 @verbatim
649 MATCH-BLOCK ::= '(' MATCH-INDEX RULE * ')'
650
651 MATCH-INDEX ::= INTEGER
652 @endverbatim
653
654 @c MATCH-INDEX ¤ÏľÁ°¤Î @c REGEXP-BLOCK ¤Ë¤è¤Ã¤Æµ­Ï¿¤µ¤ì¤¿Éôʬɽ¸½¤ò»Ø
655 Äꤹ¤ëÀ°¿ô¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤ÊÉôʬɽ¸½¤¬¤¢¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þŪ¤Ë¸½¹Ô¤Î
656 ¥é¥ó¤ò¹çÃפ·¤¿Éôʬɽ¸½¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c RULE ¤ò¼Â¹Ô¤¹¤ë¡£¹çÃפ·¤¿
657 Éôʬ¤Ï¤³¤Îµ¬Â§¤Ë¤è¤Ã¤Æ¾ÃÈñ¤µ¤ì¤ë¡£
658
659 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
660
661 ¤³¤Îµ¬Â§¤¬¥¹¥Æ¡¼¥¸¤ÎºÇ½é¤Ëµ¬Â§¤Ç¤¢¤ì¤Ð¡¢@c MATCH-INDEX ¤Ï 0 ¤Ç¤¢¤ê¡¢¸½
662 ¹Ô¤Î¥é¥óÁ´ÂΤ˹çÃפ¹¤ë¡£
663
664 @verbatim
665 SUBST-BLOCK ::= '(' SOURCE-PATTERN RULE * ')'
666
667 SOURCE-PATTERN ::= '(' CODE + ')'
668                    | (' 'range' CODE CODE ')'
669 @endverbatim
670
671 ¸½¹Ô¤Î¥é¥ó¤Î¥³¡¼¥ÉÎ󤬠@c SOURCE-PATTERN ¤È¹çÃפ¹¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þ
672 Ū¤Ë¸½¹Ô¤Î¥é¥ó¤ò¹çÃפ·¤¿Éôʬ¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c RULE ¤ò¼Â¹Ô¤¹¤ë¡£
673 ¹çÃפ·¤¿Éôʬ¤Ï¾ÃÈñ¤µ¤ì¤ë¡£
674
675 @c SOURCE-PATTERN ¤ÎºÇ½é¤Î·Á¼°¤Ï¡¢¹çÃפ¹¤ë¥°¥ê¥Õ¥³¡¼¥É¤ÎÎó¤ò»ØÄꤹ¤ë¡£
676 ¤³¤Î¾ì¹ç¡¢¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¤ò 0 ¤Ë¥ê¥»¥Ã¥È¤¹¤ë¡£
677
678 Æó¤Ä¤á¤Î·Á¼°¤Ï¡¢¥³¡¼¥ÉÎó¤ÎºÇ½é¤Î¥°¥ê¥Õ¥³¡¼¥É¤ÎÈϰϤò»ØÄꤹ¤ë¡£¤³¤Î¾ì¹ç¡¢
679 ¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¤òºÇ½é¤Î¥°¥ê¥Õ¥³¡¼¥É¤«¤éÈϰϤò»Ø
680 Äꤹ¤ë½é¤á¤Î @c CODE ¤ò°ú¤¤¤¿¤â¤Î¤ËÀßÄꤹ¤ë¡£
681
682 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
683
684 @verbatim
685 COND-BLOCK ::= '(' 'cond' RULE + ')'
686 @endverbatim
687
688 ¤³¤Îµ¬Â§¤Ï @c RULE ¤ò½ç¤Ë¡¢¤É¤ì¤«¤¬À®¸ù¤¹¤ë¤Þ¤Ç¼Â¹Ô¤¹¤ë¡£¤É¤Î¥ë¡¼¥ë¤â
689 À®¸ù¤·¤Ê¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÀ®¸ù¤Ç¤¢¤ë¡£
690
691 @verbatim
692 OTF-SPEC ::= SYMBOL
693 @endverbatim
694
695 @c OTF-SPEC ¤Ï¡¢OTF ¥É¥é¥¤¥Ð¤Ø¤Î»Ø¼¨¤ò»ØÄꤹ¤ë̾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
696 ̾Á°¤Ï°Ê²¼¤Îʸˡ¤Ë½¾¤¦¡£
697
698 @verbatim
699   OTF-SPEC-NAME ::= 'otf:' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
700
701   SCRIPT ::= SYMBOL
702
703   LANGSYS ::= '/' SYMBOL
704
705   GSUB-FEATURES ::= '=' FEATURE-LIST ?
706
707   GPOS-FEATURES ::= '+' FEATURE-LIST ?
708
709   FEATURE-LIST ::= ( SYMBOL ',' ) * [ SYMBOL | '*' ]
710
711 @endverbatim
712
713 ³Æ @c SYMBOL ¤Ï OpenType specification Ãæ¤Ç¤Î¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£
714
715 @c SCRIPT ¤Ë¤Ä¤¤¤Æ¤Ï¡¢@c SYMBOL ¤Ï¥¹¥¯¥ê¥×¥È¥¿¥°Ì¾¤òɽ¤¹¡£Devanagari 
716 ¤Ï deva ¤Ê¤É¡£)
717
718 @c LANGSYS ¤Î¾ì¹ç¤Ï¡¢@c SYMBOL ¤Ï¸À¸ì¥·¥¹¥Æ¥à¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£@c
719 LANGSYS ¤¬¾Êά¤µ¤ì¤ì¤Ð¡¢¥Ç¥Õ¥©¥ë¥È¤Î¸À¸ì¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤¬»ÈÍѤµ¤ì¤ë¡£
720
721 @c GSUB-FEATURES ¤Ç¤Ï¡¢ @c FEATURE LIST Ãæ¤Î³Æ @c SYMBOL ¤Ï Å¬ÍѤ¹¤ë 
722 GSUB feature ¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£'*' ¤Ï»Ä¤ê¤¹¤Ù¤Æ¤Î feature ¤ò»ØÄꤹ¤ë¤¿
723 ¤á¤ËºÇ¸å¤ÎÍ×ÁǤȤ·¤ÆÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ @c SYMBOL ¤ÎÁ°¤Ë'~' ¤¬¤Ä¤¤¤Æ
724 ¤ª¤ê¡¢ºÇ¸å¤ÎÍ×ÁǤ¬ '*' ¤Ê¤é¤Ð¡¢@c SYMBOL ¤ÏŬÍѤ¹¤ëfeature ¤«¤é½ü¤«¤ì
725 ¤ë¡£@c SYMBOL ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢GSUB feature ¤ÏŬÍѤµ¤ì¤Ê¤¤¡£@c
726 GSUB-FEATURES ¼«ÂΤ¬¾Êά¤µ¤ì¤ì¤Ð¤¹¤Ù¤Æ¤Î GSUB feature ¤¬Å¬ÍѤµ¤ì¤ë¡£
727
728 @c GPOS-FEATURES ¤Î»ØÄê¤Ï @c GSUB-FEATURES ¤Î¾ì¹ç¤ÈƱÍͤǤ¢¤ë¡£
729
730 Á´¤Æ¤Î¥¿¥°Ì¾¤Ï ASCII ¤Î£´Ê¸»ú¤Ç¤¢¤ë¤³¤È¡£
731
732 OpenType ¤Î»ØÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï¼¡¤Î¥Ú¡¼¥¸¤ò»²¾È¤Î¤³¤È¡£\n
733     <http://www.microsoft.com/typography/otspec/default.htm>
734
735 @verbatim
736 COMBINING ::= SYMBOL
737 @endverbatim
738
739 @c COMBINING ¤Ï¡¢ ¼¡¤Î¥°¥ê¥Õ¤òÁ°¤Î¤â¤Î¤È¤É¤¦·ë¹ç¤¹¤ë¤«¤Î»Ø¼¨¤ò̾Á°¤È¤·
740 ¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£¤³¤Î¥ë¡¼¥ë¤Ï¥Ç¥Õ¥©¥ë¥È¤Î·ë¹çµ¬Â§¤ò¥·¥ó¥Ü¥ë̾¸ÇÍ­
741 ¤ÎÀ°¿ô¥³¡¼¥É¤Ë¥»¥Ã¥È¤¹¤ë¡£Ì¾Á°¤Ï°Ê²¼¤Îʸˡ¤Ë½¾¤¦¡£
742 following syntax.
743
744 @verbatim
745   COMBINING-NAME ::= VPOS HPOS OFFSET VPOS HPOS
746
747   VPOS ::= 't' | 'c' | 'b' | 'B'
748
749   HPOS ::= 'l' | 'c' | 'r'
750
751   OFFSET :: = '.' | XOFF | YOFF XOFF ?
752
753   XOFF ::= ('<' | '>') INTEGER ?
754
755   YOFF ::= ('+' | '-') INTEGER ?
756 @endverbatim
757
758 @c VPOS ¤È @c HPOS ¤Ï¼¡¤Î¤è¤¦¤Ë¿âľ¡¢¿åÊ¿°ÌÃÖ¤ò»ØÄꤹ¤ë¡£
759
760 @verbatim
761                                 POINT VPOS HPOS
762                                 ----- ---- ----
763     0----1----2 <---- top       0     t    l
764     |         |                 1     t    c
765     |         |                 2     t    r
766     |         |                 3     B    l
767     9   10   11 <---- center    4     B    c
768     |         |                 5     B    r
769   --3----4----5-- <-- baseline  6     b    l
770     |         |                 7     b    c
771     6----7----8 <---- bottom    8     b    r
772                                 9     c    l
773     |    |    |                10     c    c
774   left center right            11     c    r
775 @endverbatim
776
777 º¸¤Î¿Þ¤Ï¤¢¤ë¥°¥ê¥Õ¤Î 12 ¤Î»²¾ÈÅÀ¤ò 0 ¤«¤é 11 ¤Þ¤Ç¤Î¿ô»ú¤Ç¼¨¤·¤Æ¤¤¤ë¡£
778 »Í³Ñ·Á 0-6-8-2 ¤Ï¥°¥ê¥Õ¤Îɽ¼¨Îΰè¤Ç¤¢¤ê¡¢°ÌÃÖ3, 4, 5 ¤Ï¥Ù¡¼¥¹¥é¥¤¥ó¾å
779 ¤Ë¤¢¤ë¡£ 9 ¤È 11 ¤Ï¤½¤ì¤¾¤ìÀþ0-6 ¤È 2-8 ¤ÎÃæ¿´¤Ç¤¢¤ë¡£1, 10, 4, 7 ¤Ï¤½
780 ¤ì¤¾¤ìÀþ1-2, 3-5, 9-11, 6-8 ¤ÎÃæ¿´¤Ç¤¢¤ë¡£
781
782 ±¦¤Îɽ¤Ï¡¢³Æ»²¾ÈÅÀ¤¬@c VPOS ¤È @c HPOS ¤ÎÁȹ礻¤Ë¤è¤Ã¤Æ¤É¤Î¤è¤¦¤Ë»ØÄê
783 ¤µ¤ì¤ë¤«¤ò¼¨¤·¤Æ¤¤¤ë¡£
784
785 @c COMBINING-NAME ¤ÎÄêµÁÃæ¤ÎºÇ½é¤Î @c VPOS ¤È @c HPOS ¤Ï¡¢Á°¤Î¥°¥ê¥Õ¤Î
786 »²¾ÈÅÀ¤ò¡¢Æó¤ÄÌܤΠ@c VPOS ¤È @c HPOS ¤Ï¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤ò»ØÄꤹ¤ë¡£
787 ¼¡¤Î¥°¥ê¥Õ¤Ï¤³¤ÎÆó¸Ä¤Î»²¾ÈÅÀ¤¬½Å¤Ê¤ë¤è¤¦¤ËÉÁ¤«¤ì¤ë¡£
788
789 @c OFFSET ¤Ï½Å¤Ê¤ê¤«Â¾¤Î¾ÜºÙ¤ò»ØÄꤹ¤ë¡£'.' ¤Ç¤¢¤ì¤Ð¡¢»²¾ÈÅÀÆó¤Ä¤ÏƱ¤¸
790 °ÌÃ֤ˤ¢¤ë¡£
791
792 @c XOFF ¤Ï¡¢¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤Î X ºÂɸ¤ò¡¢Á°¤Î»²¾ÈÅÀ¤«¤é¤É¤ì¤Û¤É±¦ 
793 ('<') ¤¢¤ë¤¤¤Ïº¸ ('>') ¤Ø¤º¤é¤¹¤«»ØÄꤹ¤ë¡£
794
795 @c YOFF ¤Ï¡¢¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤Î Y ºÂɸ¤ò¡¢Á°¤Î»²¾ÈÅÀ¤«¤é¤É¤ì¤Û¤É¾å 
796 ('+') ¤¢¤ë¤¤¤Ï²¼ ('-') ¤Ø¤º¤é¤¹¤«»ØÄꤹ¤ë¡£
797
798 ¤É¤Á¤é¤Î¾ì¹ç¤Ë¤â¡¢@c INTEGER ¤Ï¥Õ¥©¥ó¥È¥µ¥¤¥º¤Î²¿¡ó¤º¤é¤¹¤«¤ò¼¨¤¹ÃͤÇ
799 ¤¢¤ë¡£¤¹¤Ê¤ï¤Á¡¢¤â¤· @c INTEGER ¤¬ 10 ¤Ê¤é¤Ð¥Õ¥©¥ó¥È¥µ¥¤¥º¤Î10% (1/10) 
800 ¤º¤é¤¹¤³¤È¤Ë¤Ê¤ë¡£ @c INTEGER ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢5 ¤¬»ØÄꤵ¤ì¤¿¤â¤Î
801 ¤È¤¹¤ë¡£
802
803 ¼¡¤Î¥°¥ê¥Õ¤¬Á°¤Î¥°¥ê¥Õ¤Ë·ë¹ç¤µ¤ì¤ë¤È¡¢¤½¤ì¤é¤Ï°ì¤Ä¤Î·ë¹ç¥°¥ê¥Õ¤È¤·¤Æ°·
804 ¤ï¤ì¤ë¡£
805
806 @verbatim
807 MACRO-NAME ::= SYMBOL
808 @endverbatim
809
810 @c MACRO-NAME ¤Ï @c MACRO-DEF ¤Î¤¤¤º¤ì¤«¤Ë¸½¤ï¤ì¤ë¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢Âбþ
811 ¤¹¤ë@c RULE ¤ÎÎó¤ËŸ³«¤µ¤ì¤ë¡£
812
813 @subsection flt-context-dependent Ê¸Ì®¤Ë°Í¸¤¹¤ë¿¶Éñ
814
815 ¤³¤³¤Þ¤Ç¤Ï¡¢ÆÃÄê¤Î¥Õ¥©¥ó¥È¤ÇÉÁ¤«¤ì¤ë³Æʸ»ú¡¿¥°¥ê¥ÕÎó¤¬Ê¸Ì®¼«Í³¤Ç¤¢¤ë¤³
816 ¤È¡¢¤¹¤Ê¤ï¤ÁÁ°¸å¤Î¥°¥ê¥Õ¤Ë±Æ¶Á¤µ¤ì¤Ê¤¤¤³¤È¤òÁ°Äó¤È¤·¤Æ¤­¤¿¡£¤³¤ì¤Ï¡¢Îó 
817 S1 ¤¬¥Õ¥©¥ó¥ÈF1 ¤Ë¤è¤Ã¤ÆÉÁ¤«¤ì¡¢Àè¹Ô¤¹¤ëÎó S0 ¤¬¾ï¤Ë¥Õ¥©¥ó¥È F0 ¤òÍ×µá
818 ¤¹¤ë¾ì¹ç¤Ë¤ÏÀµ¤·¤¤¡£
819
820 @verbatim
821   Îó                            S0      S1
822   ¸½¹Ô¤Î¥Õ¥©¥ó¥È                F0      F1
823   ÍøÍѲÄǽ¤Ê¥Õ¥©¥ó¥È            F0      F1
824 @endverbatim
825
826 ¤·¤«¤·»þ¤Ë¤Ï¡¢Îó¤òÌÀ³Î¤Ë¶èÀڤ뤳¤È¤¬¤Ç¤­¤Ê¤¤¾ì¹ç¤â¤¢¤ë¡£Àè¹Ô¤¹¤ëÎó S0
827 ¤¬ F0 ¤À¤±¤Ç¤Ê¤¯ F1 ¤Ç¤âÉÁ¤±¤ë¤È¤·¤è¤¦¡£
828
829 @verbatim
830   Îó                            S0      S1
831   ¸½¹Ô¤Î¥Õ¥©¥ó¥È                F0      F1
832   ÍøÍѲÄǽ¤Ê¥Õ¥©¥ó¥È            F0,F1   F1
833 @endverbatim
834
835 ¤³¤Î¾ì¹ç¡¢Àè¹Ô¤¹¤ë S0 ¤òÉÁ¤¯¤¿¤á¤Ë»È¤ï¤ì¤¿¥°¥ê¥Õ¤¬ S1 ¤Î¥°¥ê¥Õ¤ÎÀ¸À®¤Ë
836 ±Æ¶Á¤òÍ¿¤¨¤ë¤³¤È¤â¤¢¤ë¡£¤½¤³¤Ç S1 ¤Î½èÍý¤ÎºÝ¤Ë¤¹¤Ç¤Ë½èÍý¤Î½ª¤Ã¤¿ S0 ¤Ë
837 ´Ø¤¹¤ë¾ðÊó¤Ë¥¢¥¯¥»¥¹¤¹¤ëɬÍפ¬¤¢¤ë¡£ºÇ½é¤Î¥¹¥Æ¡¼¥¸¡Ê¤³¤Î¥¹¥Æ¡¼¥¸¤Î¤ß¡Ë
838 ¤ÎÀ¸À®µ¬Â§¤Ï¡¢½èÍýºÑ¤ß¤ÎÉôʬ¤Ø¥¢¥¯¥»¥¹¤¹¤ëÆÃÊ̤ÊÀµµ¬É½¸½¤òµö¤·¤Æ¤¤¤ë¡£
839
840 @verbatim
841   "RE0 RE1"
842 @endverbatim
843
844 @c RE0 ¤È @c RE1 ¤ÏÀè¹Ô¤ÎÎó S0 ¤È¸å³¤ÎÎó S1 ¤Ë¤½¤ì¤¾¤ìÂбþ¤¹¤ëÀµµ¬É½
845 ¸½¤Ç¤¢¤ë¡£
846
847 Æó¤Ä¤ÎÀµµ¬É½¸½¤Î´Ö¤Î¥¹¥Ú¡¼¥¹¤ËÃí°Õ¡£¤³¤ì¤ÏÆÃÊ̤ʥ«¥Æ¥´¥ê ' ' ¤ò¼¨¤·¤Æ
848 ¤¤¤ë (¾åµ­»²¾È) ¡£¤³¤ÎÀµµ¬É½¸½¤Ï¥Õ¥©¥ó¥È F1 ¤ò»ÈÍѤ¹¤ë¥°¥ê¥ÕÀ¸À®µ¬Â§¤Ë
849 °¤·¤Æ¤ª¤ê¡¢¤·¤¿¤¬¤Ã¤Æ RE1 ¤À¤±¤Ç¤Ê¤¯RE0 ¤â F1 ÍѤΥ«¥Æ¥´¥ê¤òÍѤ¤¤Æɽ
850 ¸½¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤Ä¤Þ¤ê¡¢Àè¹Ô¤¹¤ëÎóS0 ¤¬ F1 ÍѤΥ«¥Æ¥´¥ê¤Çɽ¤»
851 ¤Ê¤¤¾ì¹ç¤Ë¤Ï(¾å¤ÎºÇ½é¤ÎÎã¤Î¤è¤¦¤Ë) ¤³¤Î¥Ñ¥¿¡¼¥ó¤ò»ý¤ÄÀ¸À®µ¬Â§¤Ë¤Ï¹çÃ×
852 ¤·¤Ê¤¤¡£
853
854 @subsection flt-seealso »²¾È
855
856 @ref mdbGeneral "mdbGeneral(5)", 
857 @ref flt-list "FLTs provided by the m17n database"
858 */
859 /***en
860
861 @section mdbFLT Font Layout Table
862
863 @subsection flt-description DESCRIPTION
864
865 For simple scripts, the rendering engine converts character codes into glyph
866 codes one by one by consulting the encoding of each selected font.
867 But, to render text that requires complicated layout (e.g. Thai and
868 Indic scripts), one to one conversion is not sufficient.  A sequence
869 of characters may have to be drawn as a single ligature.  Some
870 glyphs may have to be drawn at 2-dimensionally shifted positions.
871
872 To handle those complicated scripts, the m17n library uses Font Layout
873 Tables (FLTs for short).  The FLT driver interprets an FLT and
874 converts a character sequence into a glyph sequence that is ready to
875 be passed to the rendering engine.
876
877 An FLT can contain information to extract a grapheme cluster from a
878 character sequence and to reorder the characters in the cluster, in
879 addition to information found in OpenType Layout Tables (CMAP, GSUB,
880 and GPOS).
881
882 An FLT is a cascade of one or more conversion stages.  In each stage, a
883 sequence is converted into another sequence to be read in the
884 next stage.  The length of sequences may differ from stage to
885 stage.  Each element in a sequence has the following integer attributes.
886
887 <ul>
888 <li> code
889
890 In the first conversion stage, this is the character code in the
891 original character sequence.  In the last stage, it is the glyph code
892 passed to the rendering engine.  In other cases, it is an intermediate
893 glyph code.
894
895 <li> category
896
897 This is the category code defined in the @c CATEGORY-TABLE
898 of the current stage.
899
900 <li> combining-spec
901
902 If nonzero, it specifies how to combine this (intermediate) glyph
903 with the previous one.
904
905 <li> left-padding-flag
906
907 If nonzero, it instructs the rendering function to insert a padding
908 space before this (intermediate) glyph so that the glyph does not
909 overlap with the previous one.
910
911 <li> right-padding-flag
912
913 If nonzero, it instructs the rendering function to insert a padding
914 space after this (intermediate) glyph so that the glyph does not
915 overlap with the next one.
916
917 </ul>
918
919 When the layout engine draws text, it at first determines a font and
920 an FLT for each character in the text.  For each subsequence of
921 characters that use use the same font and FLT, the layout engine
922 generates an intermediate glyph sequence from the character
923 subsequence.  Each element in the intermediate glyph sequence
924 has the corresponding character code as the code attribute and zeroes
925 for other attributes.  This sequence is processed in the
926 first stage of FLT as the current @e run (substring).
927
928 Each stage works as follows.
929
930 At first, if the stage has a @c CATEGORY-TABLE, the category of each glyph
931 in the current run is updated.  If there is a glyph that has no category,
932 the current run ends before that glyph.
933
934 Then, the default values of code-offset, combining-spec, and left-padding-flag
935 of this stage are initialized to zero.
936
937 Next, the initial conversion rule of the stage is applied to the
938 current run.
939
940 Lastly, the current run is replaced with the newly produced
941 (intermediate) glyph sequence.
942
943 @subsection flt-syntax SYNTAX and SEMANTICS
944
945 The m17n library loads an FLT from the m17n database using the tag
946 \<font, layouter, FLT-NAME\>.  The date format of an FLT is as follows:
947
948 @verbatim
949 FONT-LAYOUT-TABLE ::= STAGE0 STAGE *
950
951 STAGE0 ::= CATEGORY-TABLE GENERATOR
952
953 STAGE ::= CATEGORY-TABLE ? GENERATOR
954
955 CATEGORY-TABLE ::= '(' 'category' CATEGORY-SPEC + ')'
956
957 CATEGORY-SPEC ::= '(' CODE CATEGORY ')'
958                   | '(' CODE CODE CATEGORY ')'
959
960 CODE ::= INTEGER
961
962 CATEGORY ::= INTEGER
963 @endverbatim
964
965 In the definition of @c CATEGORY-SPEC, @c CODE is a glyph code, and @c
966 CATEGORY is ASCII code of an upper or lower letter, i.e. one of 'A',
967 ... 'Z', 'a', .. 'z'.
968
969 The first form of @c CATEGORY-SPEC assigns @c CATEGORY to a glyph
970 whose code @c CODE.  The second form assigns @c CATEGORY to glyphs
971 whose code falls between the two @c CODEs.
972
973 @verbatim
974 GENERATOR ::= '(' 'generator' RULE MACRO-DEF * ')'
975
976 RULE ::= REGEXP-BLOCK | MATCH-BLOCK | SUBST-BLOCK | COND-BLOCK
977          | DIRECT-CODE | COMBINING-SPEC | OTF-SPEC
978          | PREDEFINED-RULE | MACRO-NAME
979
980 MACOR-DEF ::= '(' MACRO-NAME RULE + ')'
981 @endverbatim
982
983 Each @c RULE specifies glyphs to be consumed and glyphs to be produced.  When
984 some glyphs are consumed, they are taken away from the current run.  A
985 rule may fail in some condition.  If not described explicitly to
986 fail, it should be regarded that the rule succeeds.
987
988 @verbatim
989 DIRECT-CODE ::= INTEGER
990 @endverbatim
991
992 This rule consumes no glyph and produces a glyph which has the
993 following attributes:
994
995 <ul>
996 <li> code : @c INTEGER plus the default code-offset
997 <li> combining-spec : default value
998 <li> left-padding-flag : default value
999 <li> right-padding-flag : zero
1000 </ul>
1001
1002 After having produced the glyph, the default code-offset,
1003 combining-spec, and left-padding-flag are all reset to zero.
1004
1005 @verbatim
1006 PREDEFINED-RULE ::= '=' | '*' | '<' | '>' | '|' | '[' | ']'
1007 @endverbatim
1008
1009 They perform actions as follows.
1010
1011 <ul>
1012 <li> @c =
1013
1014 This rule consumes the first glyph in the current run and produces the
1015 same glyph.  It fails if the current run is empty.
1016
1017 <li> @c *
1018
1019 This rule repeatedly executes the previous rule.
1020 If the previous rule fails, this rule does nothing and fails.
1021
1022 <li> @c @<
1023
1024 This rule specifies the start of a grapheme cluster.
1025
1026 <li> @c @>
1027
1028 This rule specifies the end of a grapheme cluster.
1029
1030 <li> @c @[
1031
1032 This rule sets the default left-padding-flag to 1.
1033 No glyph is consumed.  No glyph is produced.
1034
1035 <li> @c @]
1036
1037 This rule changes the right-padding-flag of the lastly generated
1038 glyph to 1.
1039 No glyph is consumed.  No glyph is produced.
1040
1041 <li> @c |
1042
1043 This rule consumes no glyph and produces a special glyph whose
1044 category is ' ' and other attributes are zero.  
1045 This is the only rule that produces that special glyph.
1046
1047 </ul>
1048
1049 @verbatim
1050 REGEXP-BLOCK ::= '(' REGEXP RULE * ')'
1051
1052 REGEXP ::= MTEXT
1053 @endverbatim
1054
1055 @c MTEXT is a regular expression that should match the sequence of
1056 categories of the current run.  If a match is found, this rule
1057 executes @c RULEs temporarily limiting the current run to the matched
1058 part.  The matched part is consumed by this rule.
1059
1060 Parenthesized subexpressions, if any, are recorded to be used in @c
1061 MATCH-BLOCK that may appear in one of @c RULEs.
1062
1063 If no match is found, this rule fails.
1064
1065 @verbatim
1066 MATCH-BLOCK ::= '(' MATCH-INDEX RULE * ')'
1067
1068 MATCH-INDEX ::= INTEGER
1069 @endverbatim
1070
1071 @c MATCH-INDEX is an integer specifying a parenthesized subexpression
1072 recorded by the previous @c REGEXP-BLOCK.  If such a subexpression was
1073 found by the previous regular expression matching, this rule executes @c
1074 RULEs temporarily limiting the current run to the matched part
1075 of the subexpression.  The matched part is consumed by this rule.
1076
1077 If no match was found, this rule fails.
1078
1079 If this is the first rule of the stage, @c MATCH-INDEX must be 0, and
1080 it matches the whole current run.
1081
1082 @verbatim
1083 SUBST-BLOCK ::= '(' SOURCE-PATTERN RULE * ')'
1084
1085 SOURCE-PATTERN ::= '(' CODE + ')'
1086                    | (' 'range' CODE CODE ')'
1087 @endverbatim
1088
1089 If the sequence of codes of the current run matches @c SOURCE-PATTERN,
1090 this rule executes @c RULEs temporarily limiting the current run to
1091 the matched part.  The matched part is consumed.
1092
1093 The first form of @c SOURCE-PATTERN specifies a sequence of glyph codes to be
1094 matched.  In this case, this rule resets the default code-offset to
1095 zero.
1096
1097 The second form specifies a range of codes that should match the first
1098 glyph code of the code sequence.  In this case, this rule sets the
1099 default code-offset to the first glyph code minus the first @c CODE
1100 specifying the range.
1101
1102
1103 If no match is found, this rule fails.
1104
1105 @verbatim
1106 COND-BLOCK ::= '(' 'cond' RULE + ')'
1107 @endverbatim
1108
1109 This rule sequentially executes @c RULEs until one succeeds.  If no
1110 rule succeeds, this rule fails.  Otherwise, it succeeds.
1111
1112 @verbatim
1113 OTF-SPEC ::= SYMBOL
1114 @endverbatim
1115
1116 @c OTF-SPEC is a symbol whose name specifies an instruction to the OTF
1117 driver.  The name has the following syntax.
1118
1119 @verbatim
1120   OTF-SPEC-NAME ::= 'otf:' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
1121
1122   SCRIPT ::= SYMBOL
1123
1124   LANGSYS ::= '/' SYMBOL
1125
1126   GSUB-FEATURES ::= '=' FEATURE-LIST ?
1127
1128   GPOS-FEATURES ::= '+' FEATURE-LIST ?
1129
1130   FEATURE-LIST ::= ( SYMBOL ',' ) * [ SYMBOL | '*' ]
1131
1132 @endverbatim
1133
1134 Each @c SYMBOL specifies a tag name defined in the OpenType
1135 specification.
1136
1137 For @c SCRIPT, @c SYMBOL specifies a Script tag name (e.g. deva for
1138 Devanagari).
1139
1140 For @c LANGSYS, @c SYMBOL specifies a Language System tag name.  If @c
1141 LANGSYS is omitted, the Default Language System
1142 table is used.
1143
1144 For @c GSUB-FEATURES, each @c SYMBOL in @c FEATURE LIST specifies a GSUB Feature tag name
1145 to apply.  '*' is allowed as the last item to specify all remaining
1146 features.  If @c SYMBOL is preceded by '~' and the last item is '*',
1147 @c SYMBOL is excluded from the features to apply.  If no @c SYMBOL is
1148 specified, no GSUB feature is applied.  If @c GSUB-FEATURES itself is
1149 omitted, all GSUB features are applied.
1150
1151 The specification of @c GPOS-FEATURES is analogous to that of @c
1152 GSUB-FEATURES.
1153
1154 Please note that all the tags above must be 4 ASCII printable characters.
1155
1156 See the following page for the OpenType specification.\n
1157     <http://www.microsoft.com/typography/otspec/default.htm>
1158
1159 @verbatim
1160 COMBINING ::= SYMBOL
1161 @endverbatim
1162
1163 @c COMBINING is a symbol whose name specifies how
1164 to combine the next glyph with the previous one.  This rule sets the
1165 default combining-spec to an integer code that is unique to the symbol
1166 name.  The name has the following syntax.
1167
1168 @verbatim
1169   COMBINING-NAME ::= VPOS HPOS OFFSET VPOS HPOS
1170
1171   VPOS ::= 't' | 'c' | 'b' | 'B'
1172
1173   HPOS ::= 'l' | 'c' | 'r'
1174
1175   OFFSET :: = '.' | XOFF | YOFF XOFF ?
1176
1177   XOFF ::= ('<' | '>') INTEGER ?
1178
1179   YOFF ::= ('+' | '-') INTEGER ?
1180 @endverbatim
1181
1182 @c VPOS and @c HPOS specify the vertical and horizontal positions
1183 as described below.
1184
1185 @verbatim
1186                                 POINT VPOS HPOS
1187                                 ----- ---- ----
1188     0----1----2 <---- top       0     t    l
1189     |         |                 1     t    c
1190     |         |                 2     t    r
1191     |         |                 3     B    l
1192     9   10   11 <---- center    4     B    c
1193     |         |                 5     B    r
1194   --3----4----5-- <-- baseline  6     b    l
1195     |         |                 7     b    c
1196     6----7----8 <---- bottom    8     b    r
1197                                 9     c    l
1198     |    |    |                10     c    c
1199   left center right            11     c    r
1200 @endverbatim
1201
1202 The left figure shows 12 reference points of a glyph by numbers 0 to
1203 11.  The rectangle 0-6-8-2 is the bounding box of the glyph, the
1204 positions 3, 4, and 5 are on the baseline, 9 and 11 are on the center
1205 of the lines 0-6 and 2-8 respectively, 1, 10, 4, and 7 are on the
1206 center of the lines 1-2, 3-5, 9-11, and 6-8 respectively.
1207
1208 The right table shows how those reference points are specified by a
1209 pair of @c VPOS and @c HPOS.
1210
1211 The first @c VPOS and @c HPOS in the definition of @c COMBINING-NAME
1212 specify the
1213 reference point of the previous glyph, and the second @c VPOS and @c
1214 HPOS specify that of the next glyph.
1215 The next glyph is drawn so that these two reference points align.
1216
1217 @c OFFSET specifies the way of alignment in detail.  If it is '.', the
1218 reference points are on the same position.
1219
1220 @c XOFF specifies how much the X position of the reference point of
1221 the next glyph should be shifted to the right ('<') or left ('>') from
1222 the previous reference point.
1223
1224 @c YOFF specifies how much the Y position of the reference point the
1225 next glyphshould be shifted upward ('+') or downward ('-') from the
1226 previous reference point.
1227
1228 In both cases, @c INTEGER is the amount of shift expressed as a
1229 percentage of the font size, i.e., if @c INTEGER is 10, it means
1230 10% (1/10) of the font size.  If @c INTEGER is omitted, it is assumed that
1231 5 is specified.
1232
1233 Once the next glyph is combined with the previous one, they
1234 are treated as a single combined glyph.
1235
1236 @verbatim
1237 MACRO-NAME ::= SYMBOL
1238 @endverbatim
1239
1240 @c MACRO-NAME is a symbol that appears in one of @c MACRO-DEF.  It is
1241 exapanded to the sequence of the correponding @c RULEs.
1242
1243 @subsection flt-context-dependent CONTEXT DEPENDENT BEHAVIOR
1244
1245 So far, it has been assumed that each sequence, which is drawn with a
1246 specific font, is context free, i.e. not affected by the glyphs
1247 preceding or following that sequence.  This is true when sequence S1
1248 is drawn with font F1 while the preceding sequence S0 unconditionally
1249 requires font F0.
1250
1251 @verbatim
1252   sequence                              S0      S1
1253   currently used font                   F0      F1
1254   usable font(s)                        F0      F1
1255 @endverbatim
1256
1257 Sometimes, however, a clear separation of sequences is not possible.
1258 Suppose that the preceding sequence S0 can be drawn not only with F0
1259 but also with F1.
1260
1261 @verbatim
1262   sequence                              S0      S1
1263   currently used font                   F0      F1
1264   usable font(s)                        F0,F1   F1
1265 @endverbatim
1266
1267 In this case, glyphs used to draw the preceding S0 may affect glyph
1268 generation of S1.  Therefore it is necessary to access information
1269 about S0, which has already been processed, when processing S1.
1270 Generation rules in the first stage (only in the first stage) accept a
1271 special regular expression to access already processed parts.
1272
1273 @verbatim
1274   "RE0 RE1"
1275 @endverbatim
1276
1277 @c RE0 and @c RE1 are regular expressions that match the preceding
1278 sequence S0 and the following sequence S1, respectively.
1279
1280 Pay attention to the space between the two regular expressions.  It
1281 represents the special category ' ' (see above).  Note that the
1282 regular expression above belongs to glyph generation rules using font
1283 F1, therefore not only RE1 but also RE0 must be expressed with the
1284 categories for F1.  This means when the preceding sequence S0 cannot
1285 be expressed with the categories for F1 (as in the first example
1286 above) generation rules having these patterns never match.
1287
1288 @subsection flt-seealso SEE ALSO
1289
1290 @ref mdbGeneral "mdbGeneral(5)", 
1291 @ref flt-list "FLTs provided by the m17n database"
1292 */
1293 /***ja
1294
1295 @section mdbFontEncoding ¥Õ¥©¥ó¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°
1296
1297 @subsection font-encoding-description ÀâÌÀ
1298
1299 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é \<font, encoding\> ¥¿¥°¤Ë¤è¤Ã
1300 ¤Æ¸Ä¡¹¤Î¥Õ¥©¥ó¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ë´Ø¤¹¤ë¾ðÊó¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿
1301 ¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
1302
1303 @verbatim
1304 FONT-ENCODING ::= PER-FONT *
1305
1306 PER-FONT ::= '(' FONT-SPEC ENCODING [ REPERTORY ] ')'
1307
1308 FONT-SPEC ::=
1309     '(' [ FOUNDRY FAMILY
1310           [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1311         REGISTRY ')'
1312
1313 ENCODING ::= SYMBOL
1314 @endverbatim
1315
1316 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1317 REGISTRY ¤Ï¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£¤ËÂбþ¤¹¤ë¥·
1318 ¥ó¥Ü¥ë¤Ç¤¢¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¡£
1319
1320 ¤¿¤È¤¨¤Ð¤³¤Î @c FONT-SPEC:
1321
1322 @verbatim
1323     (nil alice0\ lao iso8859-1)
1324 @endverbatim
1325
1326 ¤Ï¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥ß¥ê̾¤¬ "alice0 lao" ¤Ç¥ì¥¸¥¹¥È¥ê¤¬ "iso8859-1" ¤Ç¤¢
1327 ¤ë¤¹¤Ù¤Æ¤Î¥Õ¥©¥ó¥È¤ËŬÍѤǤ­¤ë¡£
1328
1329 @c ENCODING ¤Ïʸ»ú¥»¥Ã¥È¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£@c FONT-SPEC ¤Ë¹çÃפ¹¤ë
1330 ¥Õ¥©¥ó¥È¤Ï¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤ÎÁ´Ê¸»ú¤ò¥µ¥Ý¡¼¥È¤·¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤Ë¤è¤Ã¤Æ
1331 ʸ»ú¥³¡¼¥É¤Ï¤½¤Î¥Õ¥©¥ó¥È¤ÎÂбþ¤¹¤ë¥°¥ê¥Õ¥³¡¼¥É¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
1332
1333 @c REPERTORY ¤Ïʸ»ú¥»¥Ã¥È¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤« "nil" ¤Ç¤¢¤ë¡£¾Êά¤·¤¿¾ì¹ç¤Ï¡¢
1334 @c ENCODING ¤ò @c REPERTORY ¤Ë»ØÄꤷ¤¿¤Î¤ÈƱ¤¸°ÕÌ£¤Ë¤Ê¤ë¡£"nil" ¤Ç¤Ê¤±
1335 ¤ì¤Ð¡¢Ê¸»ú¥»¥Ã¥È¤Ï¥Õ¥©¥ó¥È¤Î¥ì¥Ñ¡¼¥È¥ê¡¢¤¹¤Ê¤ï¤Á¥µ¥Ý¡¼¥È¤¹¤ëʸ»ú¤ò¼¨¤¹¡£
1336 ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢ÆÃÄê¤Îʸ»ú¤¬¤½¤Î¥Õ¥©¥ó¥È¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ï
1337 ¸Ä¡¹¤Î¥Õ¥©¥ó¥È¥É¥é¥¤¥Ð¤ËÌ䤤¹ç¤ï¤»¤ë¡£
1338
1339 ¤¤¤ï¤æ¤ë¥æ¥Ë¥³¡¼¥É¥Õ¥©¥ó¥È (¥ì¥¸¥¹¥È¥ê¤Ï "iso10646-1") ¤Ë¤Ä¤¤¤Æ¤Ï¡¢Éá
1340 ÄÌ¥æ¥Ë¥³¡¼¥Éʸ»ú¤Î°ìÉô¤·¤«¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¤¿¤á¡¢@c REPERTORY ¤ò 
1341 "nil" ¤Ë¤¹¤ë¤³¤È¤¬Ë¾¤Þ¤·¤¤¡£     */
1342 /***en
1343
1344 @section mdbFontEncoding Font Encoding
1345
1346 @subsection font-encoding-description DESCRIPTION
1347
1348 The m17n library loads information about the encoding of each font
1349 form the m17n database by the tags \<font, encoding\>.  The data is
1350 loaded as a plist of this format.
1351
1352 @verbatim
1353 FONT-ENCODING ::= PER-FONT *
1354
1355 PER-FONT ::= '(' FONT-SPEC ENCODING [ REPERTORY ] ')'
1356
1357 FONT-SPEC ::=
1358     '(' [ FOUNDRY FAMILY
1359           [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1360         REGISTRY ')'
1361
1362 ENCODING ::= SYMBOL
1363 @endverbatim
1364
1365 @c FONT-SPEC is to specify properties of a font.  @c FOUNDRY to @c
1366 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1367 of a font.  See @ref m17nFont for the meaning of each property.
1368
1369 For instance, this @c FONT-SPEC:
1370
1371 @verbatim
1372     (nil alice0\ lao iso8859-1)
1373 @endverbatim
1374
1375 should be applied to all fonts whose family name is "alice0 lao", and
1376 registry is "iso8859-1".
1377
1378 @c ENCODING is a symbol representing a charset.  A font matching @c
1379 FONT-SPEC supports all characters of the charset, and a character code
1380 is mapped to the corresponding glyph code of the font by this charset.
1381
1382 @c REPERTORY is a symbol representing a charset or "nil".  Omitting it
1383 is the same as specifying @c ENCODING as @c REPERTORY.  If it is not
1384 "nil", the charset specifies the repertory of the font, i.e, which
1385 character it supports.  Otherwise, whether a specific character is
1386 supported by the font or not is asked to each font driver.
1387
1388 For so called Unicode fonts (registry is "iso10646-1"), it is
1389 recommended to specify "nil" as @c REPERTORY because such fonts
1390 usually supports only a subset of Unicode characters.  */
1391 /***ja
1392
1393 @section mdbFontSize ¥Õ¥©¥ó¥È¥µ¥¤¥º
1394
1395 @subsection font-size-description ÀâÌÀ
1396
1397 »þ¤Ë¥Õ¥©¥ó¥È¤Ï¤½¤Î¥µ¥¤¥º¤Ë¤Ä¤¤¤Æ¸í¤Ã¤¿¾ðÊó¤ò´Þ¤ó¤Ç¤¤¤ë¤³¤È¤¬¤¢¤ë (ŵ·¿
1398 Ū¤ÊÎã¤È¤·¤Æ¤Ï hack ¤µ¤ì¤¿ TrueType ¥Õ¥©¥ó¥È¤Ê¤É) ¡£¤³¤Î¤è¤¦¤Ê¥Õ¥©¥ó¥È
1399 ¤¬Â¾¤Î¥Õ¥©¥ó¥È¤È°ì½ï¤Ë»È¤ï¤ì¤ë¤È¡¢¥ì¥¤¥¢¥¦¥È¤¬¤ª¤«¤·¤¯¤Ê¤ë¡£¤³¤ÎÌäÂê¤ò
1400 ²ò·è¤¹¤ë¤¿¤á¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Ïm17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¥¿¥° \<font,
1401 resize\> ¤ò»ý¤Ä¥Ç¡¼¥¿¤ò¥í¡¼¥É¤·¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¤òÄ´À°¤¹¤ë¤¿¤á¤Î¾ðÊó¤È¤·
1402 ¤ÆÍѤ¤¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò»ý¤Ä¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼
1403 ¥É¤µ¤ì¤ë¡£
1404
1405 @verbatim
1406 FONT-SIZE-ADJUSTMENT ::= PER-FONT *
1407
1408 PER-FONT ::= '(' FONT-SPEC ADJUST-RATIO ')'
1409
1410 FONT-SPEC ::=
1411     '(' [ FOUNDRY FAMILY
1412           [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1413         REGISTRY ')'
1414
1415 ADJUST-RATIO ::= INTEGER
1416 @endverbatim
1417
1418 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1419 REGISTRY ¤Þ¤Ç¤Ï¡¢¤½¤ì¤¾¤ì¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£
1420 ¤Þ¤Ç¤ËÂбþ¤·¤Æ¤¤¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¤Î¤³¤È¡£
1421
1422 @c ADJUST-RATIO ¤Ï¡¢À°¿ôÃͤǤ¢¤ê¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¤ò¤É¤Î¤è¤¦¤ËÄ´À°¤¹¤ì¤Ð
1423 ¤è¤¤¤«¤ò¥Ñ¡¼¥»¥ó¥È¤Ç¤¢¤é¤ï¤¹¡£¤¿¤È¤¨¤Ð°Ê²¼¤Î @c PER-FONT:
1424
1425 @verbatim
1426     ((devanagari-cdac) 150)
1427 @endverbatim
1428
1429 ¤Ï¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Î¥Õ¥©¥ó¥È¥Ï¥ó¥É¥é¤Ë¡¢"devanagari-cdac" ¤È¤¤¤¦¥ì¥¸¥¹
1430 ¥È¥ê¤ò»ý¤Ä¥Õ¥©¥ó¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢Í׵ᤵ¤ì¤¿Â礭¤µ¤Î 1.5 ÇܤΥµ¥¤¥º¤Î¥Õ¥©¥ó
1431 ¥È¤ò³«¤¯¤è¤¦¤Ë»Ø¼¨¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
1432
1433 */
1434 /***en
1435
1436 @section mdbFontSize Font Size
1437
1438 @subsection font-size-description DESCRIPTION
1439
1440 In some case, a font contains incorrect information about its size
1441 (typically in the case of a hacked TrueType font), which results in a
1442 bad text layout when such a font is used in combination with the other
1443 fonts.  To overcome this problem, the m17n library loads information
1444 about font-size adjustment from the m17n database by the tags \<font,
1445 resize\>.  The data is loaded as a plist of this format.
1446
1447 @verbatim
1448 FONT-SIZE-ADJUSTMENT ::= PER-FONT *
1449
1450 PER-FONT ::= '(' FONT-SPEC ADJUST-RATIO ')'
1451
1452 FONT-SPEC ::=
1453     '(' [ FOUNDRY FAMILY
1454           [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1455         REGISTRY ')'
1456
1457 ADJUST-RATIO ::= INTEGER
1458 @endverbatim
1459
1460 @c FONT-SPEC is to specify properties of a font.  @c FOUNDRY to @c
1461 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1462 of a font.  See @ref m17nFont for the meaning of each property.
1463
1464 @c ADJUST-RATIO is an integer number specifying by percentage how much
1465 the font-size must be adjusted.  For instance, this @c PER-FONT:
1466
1467 @verbatim
1468     ((devanagari-cdac) 150)
1469 @endverbatim
1470
1471 instructs the font handler of the m17n library to open a font of 1.5
1472 times bigger than a requested size on opening a font whose registry
1473 is "devanagari-cdac".
1474 */
1475 /***ja
1476
1477 @section mdbFontset ¥Õ¥©¥ó¥È¥»¥Ã¥È
1478
1479 @subsection fontset-description ÀâÌÀ
1480
1481 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é \<fontset, FONTSET-NAME\> ¥¿
1482 ¥°¤Ë¤è¤Ã¤Æ¥Õ¥©¥ó¥È¥»¥Ã¥È¤ÎÄêµÁ¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã
1483 ¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
1484
1485 @verbatim
1486 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
1487
1488 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
1489
1490 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
1491
1492 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
1493
1494 FALLBACK ::= FONT-SPEC-ELEMENT
1495
1496 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
1497
1498 FONT-SPEC ::=
1499      '(' [ FOUNDRY FAMILY
1500            [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1501          REGISTRY ')'
1502 @endverbatim    
1503
1504 @c SCRIPT ¤Ï¥¹¥¯¥ê¥×¥È̾ (e.g. latin, han) ¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤« @c nil¤Ç¤¢
1505 ¤ë¡£@c LANGUAGE ¤ÏISO 639 ¤ËÄêµÁ¤µ¤ì¤¿¸À¸ì̾¥³¡¼¥É (e.g. ja, zh) ¤Ç¤¢
1506 ¤ë£²Ê¸»ú¤Î¥·¥ó¥Ü¥ë¤« @c nil ¤Ç¤¢¤ë¡£
1507
1508 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1509 REGISTRY ¤Ï¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£¤ËÂбþ¤¹¤ë¥·
1510 ¥ó¥Ü¥ë¤Ç¤¢¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¡£
1511
1512 @c FLT-NAME ¤Ï¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë¤Î̾Á°¤Ç¤¢¤ë¡£(@ref mdbFLT).
1513
1514 @subsection fontset-example Îã
1515
1516 ¤³¤ì¤Ï @c PER_SCRIPT ¤ÎÎã¤Ç¤¢¤ë¡£
1517
1518 @verbatim
1519 (han
1520   (ja
1521     ((jisx0208.1983-0)))
1522   (zh
1523     ((gb2312.1980-0)))
1524   (nil
1525     ((big5-0))))
1526 @endverbatim
1527
1528 ¤³¤ì¤Ë¤è¤Ã¤Æ¥Õ¥©¥ó¥È¥»¥ì¥¯¥¿¤Ï¡¢"han" Ê¸»ú (¤Ä¤Þ¤ê#Mscript ¥×¥í¥Ñ¥Æ¥£
1529 ¤¬ 'han' ¤Ç¤¢¤ëʸ»ú)¤Î¤¦¤Á¡¢Ê¸»ú¤Î M-text Ãæ¤Ç¤Î #Mlanguage ¥Æ¥­¥¹¥È¥×
1530 ¥í¥Ñ¥Æ¥£¤¬ "ja" ¤Ç¤¢¤ê¤½¤Îʸ»ú¤¬¥Õ¥©¥ó¥È¤Î¥ì¥Ñ¡¼¥È¥ê¡¼¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ì¤â
1531 ¤Î¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥ì¥¸¥¹¥È¥ê¤¬"jisx0208.1983-0" ¤Ç¤¢¤ë¥Õ¥©¥ó¥È¤ò»È¤¦¤³¤È¤ò
1532 »Ø¼¨¤µ¤ì¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¥ì¥¸¥¹¥È¥ê¤¬ "gb2312.1980-0" ¤ä"big5-0" ¤Ç
1533 ¤¢¤ë¤â¤Î¤¬»î¤µ¤ì¤ë¡£"han" Ê¸»ú¤Ë #Mlanguage ¥Æ¥­¥¹¥È¥×¥í¥Ñ¥Æ¥£¤¬Ìµ¤±¤ì
1534 ¤Ð¡¢£³¤Ä¤È¤â»î¤µ¤ì¤ë¡£
1535
1536 ¥Õ¥©¥ó¥ÈÁªÂò¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï´Ø¿ô mdraw_text () »²¾È¡£
1537 */
1538 /***en
1539
1540 @section mdbFontset Fontset
1541
1542 @subsection fontset-description DESCRIPTION
1543
1544 The m17n library loads a fontset definition from the m17n database by
1545 the tags \<fontset, FONTSET-NAME\>.  The plist format of the data is
1546 as follows:
1547
1548 @verbatim
1549 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
1550
1551 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
1552
1553 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
1554
1555 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
1556
1557 FALLBACK ::= FONT-SPEC-ELEMENT
1558
1559 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
1560
1561 FONT-SPEC ::=
1562      '(' [ FOUNDRY FAMILY
1563            [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1564          REGISTRY ')'
1565 @endverbatim    
1566
1567 @c SCRIPT is a symbol of script name (e.g. latin, han) or @c nil.  @c
1568 LANGUAGE is a two-letter symbol of language name code defined by ISO
1569 639 (e.g. ja, zh) or @c nil.
1570
1571 @c FONT-SPEC is to specify properties of a font.  @c FOUNDRY to @c
1572 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1573 of a font.  See @ref m17nFont for the meaning of each property.
1574
1575 @c FLT-NAME is a name of Font Layout Table (@ref mdbFLT).
1576
1577 @subsection fontset-example EXAMPLE
1578
1579 This is an example of @c PER_SCRIPT.
1580
1581 @verbatim
1582 (han
1583   (ja
1584     ((jisx0208.1983-0)))
1585   (zh
1586     ((gb2312.1980-0)))
1587   (nil
1588     ((big5-0))))
1589 @endverbatim
1590
1591 It instructs the font selector to use a font of registry
1592 "jisx0208.1983-0" for a "han" character (i.e. a character whose
1593 #Mscript property is 'han') if the character has #Mlanguage text
1594 property "ja" in an M-text and the character is in the repertories of
1595 such fonts.  Otherwise, try a font of registry "gb2312.1980-0" or
1596 "big5-0".  If that "han" character does not have #Mlanguage text
1597 property, try all three fonts.
1598
1599 See the function mdraw_text () for the detail of how a font is
1600 selected.
1601 */
1602 /***ja
1603
1604 @section mdbIM ¥¤¥ó¥×¥Ã¥È¥á¥½¥Ã¥É
1605
1606 @subsection im-description ÀâÌÀ
1607
1608 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤éưŪ¤Ë¥í¡¼¥É¤Ç¤­¤ëÆþÎϥ᥽¥Ã¥É
1609 ¥É¥é¥¤¥Ð¤òÄ󶡤·¤Æ¤¤¤ë¡£(@ref m17nInputMethod »²¾È¡£ @latexonly
1610 (P.\pageref{group__m17nInputMethod}) @endlatexonly).
1611
1612 ¤³¤³¤Ç¤ÏÆþÎϥ᥽¥Ã¥ÉÄêµÁ¤Î¥Ç¡¼¥¿¥Õ¥©¡¼¥Þ¥Ã¥È¤òÀâÌÀ¤¹¤ë¡£
1613
1614 @subsection im-format Ê¸Ë¡¤È°ÕÌ£
1615
1616 °Ê²¼¤Î¥Ç¡¼¥¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë¤è¤Ã¤ÆÆþÎϥ᥽¥Ã¥É¤¬ÄêµÁ¤µ¤ì¤ë¡£¥É¥é¥¤¥Ð¤Ï¥Õ¥¡
1617 ¥¤¥ë¤ä¥¹¥È¥ê¡¼¥à¤«¤éÄêµÁ¤ò¥í¡¼¥É¤·¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î·Á¼°¤ËÊÑ´¹¤¹¤ë¡£
1618
1619 @verbatim
1620 INPUT-METHOD ::= TITLE MAP-LIST MACRO-LIST ? MODULE-LIST ? STATE-LIST
1621
1622 TITLE ::= '(' 'title' MTEXT ')'
1623 @endverbatim
1624
1625 @c MTEXT ¤Ï¤³¤ÎÆþÎϥ᥽¥Ã¥É¤¬Í­¸ú¤ÊºÝ¥¹¥¯¥ê¡¼¥ó¾å¤Ëɽ¼¨¤µ¤ì¤ë¥Æ¥­¥¹¥È¤Ç¤¢¤ë ¡£
1626
1627 @verbatim 
1628 MAP-LIST ::= '(' 'map' MAP * ')'
1629
1630 MAP ::= '(' MAP-NAME RULE * ')'
1631
1632 MAP-NAME ::= SYMBOL
1633
1634 RULE ::= '(' KEYSEQ MAP-ACTION * ')'
1635
1636 KEYSEQ ::= MTEXT | '(' [ SYMBOL | INTEGER ] * ')'
1637 @endverbatim
1638
1639 @c MAP-NAME ÄêµÁÃæ¤Î @c SYMBOL ¤Ï¡¢ @c t ¤¢¤ë¤¤¤Ï @c nil ¤Ç¤¢¤Ã¤Æ¤Ï¤Ê
1640 ¤é¤Ê¤¤¡£
1641
1642 @c KEYSEQ ÄêµÁÃæ¤Î @c MTEXT ¤Ï¡¢¥­¡¼¥Ü¡¼¥É¤«¤éÀ¸À®¤Ç¤­¤ëʸ»ú¤Ç¹½À®¤µ¤ì
1643 ¤ë¡£¤¹¤Ê¤ï¤Á @c MTEXT ¤ÏÄ̾ïASCII Ê¸»ú¤Î¤ß¤ò´Þ¤à¡£¤·¤«¤·¡¢ÆþÎϥ᥽¥Ã¥É
1644 ¤¬¤¿¤È¤¨¤ÐÀ¾¥è¡¼¥í¥Ã¥ÑÍÑ¥­¡¼¥Ü¡¼¥É¤ò»È¤¦¤³¤È¤òÁÛÄꤷ¤¿¤â¤Î¤Ç¤¢¤ì¤Ð¡¢@c
1645 MTEXT ¤Ï Latin-1 Ê¸»ú¤ò´Þ¤ó¤Ç¤â¤è¤¤¡£
1646
1647 @c KEYSEQ ÄêµÁÃæ¤Î @c SYMBOL ¤Ï¡¢´Ø¿ô minput_event_to_key () ¤ÎÌá¤êÃÍ
1648 ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1649
1650 @c KEYSEQ ÄêµÁÃæ¤Î @c INTEGER ¤Ï¡¢Í­¸ú¤Êʸ»ú¥³¡¼¥É¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1651
1652 @verbatim
1653 MAP-ACTION ::= ACTION
1654
1655 ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK |
1656            | SHOW | HIDE | PUSHBACK | UNDO | SHIFT | CALL
1657            | SET | IF | '(' MACRO-NAME ')'
1658
1659 PREDEFINED-SYMBOL ::=
1660     '@0' | '@1' | '@2' | '@3' | '@4' |
1661     '@5' | '@6' | '@7' | '@8' | '@9' |
1662     '@<' | '@=' | '@>' | '@-' | '@+' | '@[' | '@]'
1663 @endverbatim
1664 @verbatim
1665 MACRO-LIST ::= '(' 'macro' MACRO * ')'
1666
1667 MACRO ::= '(' MACRO-NAME MACRO-ACTION * ')'
1668
1669 MACRO-NAME ::= SYMBOL
1670
1671 MACRO-ACTION ::= ACTION
1672 @endverbatim
1673 @verbatim
1674 MODULE-LIST ::= '(' 'module' MODULE * ')'
1675
1676 MODULE ::= '(' MODULE-NAME FUNCTION * ')'
1677
1678 MODULE-NAME ::= SYMBOL
1679
1680 FUNCTION ::= SYMBOL
1681 @endverbatim
1682
1683 ³Æ @c MODULE ¤Ï³°Éô¥â¥¸¥å¡¼¥ë (ưŪ¥é¥¤¥Ö¥é¥ê) ¤Î̾Á°¤È¤½¤Î¥â¥¸¥å¡¼¥ë
1684 ¤¬¸ø³«¤¹¤ë´Ø¿ô̾¤òÀë¸À¤¹¤ë¡£@c FUNCTION ¤¬ "init" ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤ì¤Ð¡¢
1685 ¤³¤ÎÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬À¸À®¤µ¤ì¤ëºÝ¤Ë¤Î¤ß¡¢¥Ç¥Õ¥©¥ë¥È¤Î
1686 °ú¿ô (@c CALL ¤ÎÀỲ¾È) ¤È¤È¤â¤Ë¸Æ¤Ð¤ì¤ë¡£ @c FUNCTION ¤¬ "fini" ¤È¤¤
1687 ¤¦Ì¾Á°¤ò»ý¤Æ¤Ð, ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬Ç˲õ¤µ¤ì¤ëºÝ¤Ë¤Î¤ß¡¢¥Ç¥Õ¥©¥ë¥È¤Î°ú¿ô
1688 ¤È¤È¤â¤Ë¸Æ¤Ð¤ì¤ë¡£
1689
1690 @verbatim
1691 STATE-LIST ::= '(' 'state' STATE * ')'
1692
1693 STATE ::= '(' STATE-NAME BRANCH * ')'
1694
1695 STATE-NAME ::= SYMBOL
1696
1697 BRANCH ::= '(' MAP-NAME BRANCH-ACTION * ')'
1698            | '(' nil BRANCH-ACTION * ')'
1699            | '(' t BRANCH-ACTION * ')'
1700 @endverbatim
1701
1702 @c BRANCH ¤ÎºÇ½é¤Î·Á¼°¤Ç¤Ï¡¢@c MAP-NAME ¤Ï @c MAP ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê¤¯
1703 ¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£¤³¤Î¾ì¹ç¡¢@c MAP-NAME ¤Î @c KEYSEQ ¤Î°ì¤Ä¤Ë¹çÃפ¹¤ë¥­¡¼
1704 Î󤬥¿¥¤¥×¤µ¤ì¤ì¤Ð¡¢ @c BRANCH-ACTION ¤¬¼Â¹Ô¤µ¤ì¤ë¡£
1705
1706 @c BRANCH ¤ÎÆó¤ÄÌܤηÁ¼°¤Ç¤Ï¡¢¤½¤Î»þÅÀ¤Î¾õÂ֤Τ¤¤º¤ì¤Î @c BRANCH ¤Ë¤â
1707 ¹çÃפ·¤Ê¤¤¥­¡¼Î󤬥¿¥¤¥×¤µ¤ì¤ì¤Ð¡¢@c BRANCH-ACTION¤¬¼Â¹Ô¤µ¤ì¤ë¡£
1708
1709 @c BRANCH ¤Î»°¤ÄÌܤηÁ¼°¤Ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥­¡¼¤ò½èÍý¤·¤¿¸å¤Ç¤½¤Î¾õÂ֤˰ÜÆ°
1710 ¤·¤¿¾ì¹ç¤Ë @c BRANCH-ACTION ¤¬¼Â¹Ô¤µ¤ì¤ë¡£¤â¤·½é´ü¾õÂ֤Ǥ¢¤ì¤Ð¡¢ÆþÎÏ¥á
1711 ¥½¥Ã¥É¤ÎÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤·¤¿Ä¾¸å¤Ë @c BRANCH-ACTION ¤ò¼Â¹Ô¤¹¤ë¡£
1712
1713 @verbatim
1714 BRANCH-ACTION ::= ACTION
1715 @endverbatim
1716
1717 ÆþÎϥ᥽¥Ã¥É¤Ï¼¡¤ÎÆó¤Ä¤Î¥·¥ó¥Ü¥ë¤Î¥ê¥¹¥È¤ò»ý¤Ä¡£
1718
1719 <ul>
1720 <li> ¥Þ¡¼¥«¥ê¥¹¥È
1721
1722 ¥Þ¡¼¥«¤Ï preediting ¥Æ¥­¥¹¥ÈÃæ¤Ç¤Îʸ»ú°ÌÃÖ¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£@c
1723 MARK ¥¢¥¯¥·¥ç¥ó¤Ï¥Þ¡¼¥«¤ò¤¢¤ë°ÌÃÖ¤ËÀßÄꤹ¤ë¡£@c MOVE ¤È @c DELETE ¥¢¥¯
1724 ¥·¥ç¥ó¤Ï¥Þ¡¼¥«¤Î°ÌÃÖ¤ò»²¾È¤¹¤ë¡£
1725
1726 <li> ÊÑ¿ô¥ê¥¹¥È
1727
1728 ÊÑ¿ô¤ÏÀ°¿ô¤ÎÃͤò»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£ÃͤÏ@c SET ¥¢¥¯¥·¥ç¥ó¤Ë¤è¤Ã¤ÆÀßÄê
1729 ¤µ¤ì¡¢@c SET, @c INSERT, @c IF ¤Ë»²¾È¤µ¤ì¤ë¡£¤¹¤Ù¤Æ¤ÎÊÑ¿ô¤Î½é´üÃͤϠ0 
1730 ¤Ç¤¢¤ë¡£
1731
1732 </ul>
1733
1734 @c PREDEFINED-SYMBOL ¤Ï¥Þ¡¼¥«¤È¤·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹çÆÃÊ̤ʰÕÌ£¤ò»ý¤Ä¡£
1735
1736 <ul>
1737 <li> @c @@0, @c @@1, @c @@2, @c @@3, @c @@4, @c @@5, @c @@6, @c @@7, @c @@8, @c @@9
1738
1739 ¤½¤ì¤¾¤ì£°ÈÖÌܤ«¤é£¹ÈÖÌܤΰÌÃÖ
1740
1741 <li> @c @@<, @c @@=, @c @@>
1742
1743 ºÇ½é¤Î¡¢º£¤Î¡¢ºÇ¸å¤Î°ÌÃÖ
1744
1745 <li> @c @@-, @c @@+
1746
1747 Á°¤Î¡¢¼¡¤Î°ÌÃÖ
1748
1749 <li> @c @@[, @c @@]
1750
1751 ¸õÊä¥ê¥¹¥È¤¬ÊѲ½¤¹¤ëºÝ¤ÎÁ°¤È¼¡¤Î°ÌÃÖ
1752 </ul>
1753
1754 @c PREDEFINED-SYMBOL ¤Ï @c SELECT ¥¢¥¯¥·¥ç¥óÃæ¤Ç¸õÊä¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤È¤·
1755 ¤ÆÍѤ¤¤é¤ì¤¿ºÝÆÃÊ̤ʰÕÌ£¤ò»ý¤Ä¡£
1756
1757 <ul>
1758 <li> @c @@<, @c @@=, @c @@>
1759
1760 ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ½é¤Î¡¢º£¤Î¡¢ºÇ¸å¤Î¸õÊä
1761
1762 <li> @c @@-
1763
1764 Á°¸õÊä¡£º£¤Î¸õÊ䤬º£¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ½é¤Î¤â¤Î¤Ç¤¢¤ì¤Ð¡¢Á°¤Î¸õÊ䥰
1765 ¥ë¡¼¥×¤ÎºÇ¸å¤Î¸õÊä¡£
1766
1767 <li> @c @@+
1768
1769 ¼¡¸õÊä¡£º£¤Î¸õÊ䤬º£¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ¸å¤Î¤â¤Î¤Ç¤¢¤ì¤Ð¡¢¼¡¤Î¸õÊ䥰
1770 ¥ë¡¼¥×¤ÎºÇ½é¤Î¸õÊä¡£
1771
1772 <li> @c @@[, @c @@]
1773
1774 ¤½¤ì¤¾¤ìÁ°¤È¸å¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¡¢º£¤Î¸õÊä¤ÈƱ¤¸¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤ò»ý¤Ä
1775 ¤â¤Î¡£
1776 </ul>
1777
1778 ³Æ¥¢¥¯¥·¥ç¥ó¤Î°ú¿ô¤È¿¶Éñ¤¤¤Ï°Ê²¼¤ÎÄ̤ꡣ
1779
1780 @verbatim
1781 INSERT ::= '(' 'insert' MTEXT ')'
1782            | MTEXT
1783            | INTEGER
1784            | '(' 'insert' SYMBOL ')'
1785            | '(' 'insert' '(' CANDIDATES * ')' ')'
1786            | '(' CANDIDATES * ')' 
1787
1788 CANDIDATES ::= MTEXT | '(' MTEXT * ')'
1789 @endverbatim
1790
1791 Âè°ì¡¢ÂèÆó¤Î·Á¼°¤Ï @c MTEXT ¤ò¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1792
1793 Âè»°¤Î·Á¼°¤Ï¡¢Ê¸»ú @c INTEGER ¤ò¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1794
1795 Âè»Í¤Î·Á¼°¤Ï¡¢@c SYMBOL ¤òÊÑ¿ô¤È¤·¤Æ°·¤¤¡¢¤½¤ÎÃͤ¬Àµ¤·¤¤Ê¸»ú¥³¡¼¥É¤Ç
1796 ¤¢¤ì¤Ð¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1797
1798 Âè¸Þ¡¢ÂèÏ»¤Î·Á¼°¤Ç¤Ï¡¢@c CANDIDATES ¤Ï¸õÊ䥰¥ë¡¼¥×¤òɽ¤·¡¢@c
1799 CANDIDATES ¤Î³ÆÍ×ÁǤ¬¸õÊä¤òɽ¤¹¡£¤Ä¤Þ¤ê@c CANDIDATES ¤¬ M-text ¤Ç¤¢¤ì
1800 ¤Ð¡¢¸õÊä¤Ï¤½¤ÎM-text Ãæ¤Îʸ»ú¤Ç¤¢¤ê¡¢@c CANDIDATES ¤¬ M-text ¤Î¥ê¥¹¥È
1801 ¤Ç¤¢¤ì¤Ð¡¢¸õÊä¤Ï¤½¤ì¤é¤Î M-text ¤Ç¤¢¤ë¡£
1802
1803 ¤³¤ì¤é¤Î·Á¼°¤Ï¸½ºß¤Î°ÌÃ֤ξÁ°¤ËºÇ½é¤Î¸õÊä¤òÁÞÆþ¤¹¤ë¡£ÁÞÆþ¤µ¤ì¤¿Ê¸»úÎó
1804 ¤Ë¤Ï¡¢¸õÊä¤Î¥ê¥¹¥È¤È¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¸õÊä¤ò»Ø¤¹¾ðÊó¤¬Éղ䵤ì¤Æ¤¤¤ë¡£
1805
1806 ÁÞÆþ¤Ë¤è¤Ã¤Æ¥Þ¡¼¥«¤Î°ÌÃ֤ϼ«Æ°Åª¤ËÊѹ¹¤µ¤ì¤ë¡£
1807
1808 @verbatim
1809 DELETE ::= '(' 'delete' SYMBOL ')'
1810            | '(' 'delete' INTEGER ')'
1811 @endverbatim
1812
1813 Âè°ì¤Î·Á¼°¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¥Þ¡¼¥«¤È¸½ºß¤Î°ÌÃ֤δ֤Îʸ»ú¤ò
1814 ºï½ü¤¹¤ë¡£
1815
1816 ÂèÆó¤Î·Á¼°¤Ï @c INTEGER ¤òʸ»ú°ÌÃ֤Ȥ·¤Æ¡¢¤½¤Îʸ»ú°ÌÃ֤ȸ½ºß¤Î°ÌÃ֤δÖ
1817 ¤Îʸ»ú¤òºï½ü¤¹¤ë¡£
1818
1819 ºï½ü¤Ë¤è¤Ã¤Æ¥Þ¡¼¥«¤Î°ÌÃ֤ϼ«Æ°Åª¤ËÊѹ¹¤µ¤ì¤ë¡£
1820
1821 @verbatim
1822 SELECT ::= '(' 'select' PREDEFINED-SYMBOL ')'
1823            | '(' 'select' INTEGER ')'
1824 @endverbatim
1825
1826 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¤Þ¤º¡¢¸½ºß¤Î°ÌÃ֤ξÁ°¤Îʸ»ú¤¬¡¢¸õÊä¥ê¥¹¥È¤¬Éղ䵤ì¤Æ
1827 ¤¤¤ëʸ»úÎó¤Ë°¤¹¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¤½¤¦¤Ç¤¢¤ì¤Ð¡¢¤½¤Îʸ»úÎó¤ò°ú¿ô¤Ë¤è¤Ã
1828 ¤Æ»ØÄꤵ¤ì¤¿¸õÊä¤ËÆþ¤ì´¹¤¨¤ë¡£
1829
1830 Âè°ì¤Î·Á¼°¤Ç¤Ï @c PREDEFINED-SYMBOL ¤òÁ°½Ò¤Î¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤È¤·¤Æ°·¤¤¡¢
1831 ¤½¤ì¤Ë¤è¤Ã¤Æ¸õÊä¥ê¥¹¥ÈÃæ¤Î¿·¤·¤¤¸õÊ䤬»ØÄꤵ¤ì¤ë¡£
1832
1833 ÂèÆó¤Î·Á¼°¤Ç¤Ï @c INTEGER ¤Ï¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤¢¤ê¡¢¸õÊä¥ê¥¹¥ÈÃæ¤Î¿·¤·
1834 ¤¤¸õÊä¤ò»ØÄꤹ¤ë¡£
1835
1836 @verbatim
1837 SHOW ::= '(show)'
1838 @endverbatim
1839
1840 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤Ë¤¢¤ëʸ»úÎó¤ËÉÕ
1841 ²Ã¤µ¤ì¤Æ¤¤¤ë¸õÊä¥ê¥¹¥È¤ò¼¨¤¹¤è¤¦¤Ë»Ø¼¨¤¹¤ë¡£
1842
1843 @verbatim
1844 HIDE ::= '(hide)'
1845 @endverbatim
1846
1847 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¸½ºß¼¨¤µ¤ì¤Æ¤¤¤ë¸õÊä¥ê¥¹¥È¤ò±£
1848 ¤¹¤è¤¦¤Ë»Ø¼¨¤¹¤ë¡£
1849
1850 @verbatim
1851 MOVE ::= '(' 'move' SYMBOL ')'
1852          | '(' 'move' INTEGER ')'
1853 @endverbatim
1854
1855 Âè°ì¤Î·Á¼°¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¤½¤ì¤ò¿·¤·¤¤¸½ºß¤Î°ÌÃ֤Ȥ¹¤ë¡£
1856
1857 ÂèÆó¤Î·Á¼°¤Ï @c INTEGER ¤òʸ»ú°ÌÃ֤Ȥ·¤Æ¡¢¤½¤Î°ÌÃÖ¤ò¿·¤·¤¤¸½ºß¤Î°ÌÃÖ¤È
1858 ¤¹¤ë¡£
1859
1860 @verbatim
1861 MARK ::= '(' 'mark' SYMBOL ')'
1862 @endverbatim
1863
1864 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¤½¤ì¤ò¸½ºß¤Î°ÌÃÖ¤ËÀßÄꤹ¤ë¡£
1865 @c SYMBOL ¤Ï @c PREDEFINED-SYMBOL ¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1866
1867
1868 @verbatim
1869 PUSHBACK :: = '(pushback INTEGER)'
1870 @endverbatim
1871
1872 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤ÏºÇ¿·¤Î¥­¡¼¥¤¥Ù¥ó¥È¤ò¥¤¥Ù¥ó¥È¥­¥å¡¼¤ËÌ᤹¡£
1873
1874 @verbatim
1875 UNDO :: = '(undo)'
1876 @endverbatim
1877
1878 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤ÏºÇ¸å¤Î¥­¡¼¥¤¥Ù¥ó¥È¤ò¼è¤ê¾Ã¤¹¡£
1879
1880 @verbatim
1881 SHIFT :: = '(' 'shift' STATE-NAME ')'
1882 @endverbatim
1883
1884 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¸½ºß¤Î¾õÂÖ¤ò @c STATE-NAME ¤Ë°ÜÆ°¤µ¤»¤ë¡£ @c
1885 STATE-NAME ¤Ï @c STATE-LIST ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1886
1887 @verbatim
1888 CALL ::= '(' 'call' MODULE-NAME FUNCTION ARG * ')'
1889
1890 ARG ::= INTEGER | SYMBOL | MTEXT | PLIST
1891 @endverbatim
1892
1893 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï³°Éô¥â¥¸¥å¡¼¥ë @c MODULE-NAME ¤Î´Ø¿ô @c FUNCTION ¤ò¸Æ
1894 ¤Ö¡£@c MODULE-NAME ¤È @c FUNCTION ¤Ï @c MODULE-LIST ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê
1895 ¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1896
1897 ´Ø¿ô¤Ï (#MPlist *) ·¿¤Î°ú¿ô¤È¤È¤â¤Ë¸Æ¤Ð¤ì¤ë¡£ºÇ½é¤ÎÍ×ÁǤΥ­¡¼¤Ï #Mt ¤Ç
1898 ¤¢¤ê¡¢¤½¤ÎÃͤÏ#MInputContext ·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ÂèÆó
1899 ¤ÎÍ×ÁǤΥ­¡¼¤Ï#Msymbol ¤Ç¤¢¤ê¡¢Ãͤϸ½ºß¤Î¾õÂÖ̾¤Ç¤¢¤ë¡£ @c ARGs ¤Ï»°¤Ä
1900 ÌܰʹߤÎÍ×ÁǤÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤ë¡£¤½¤ì¤é¤ÎÍ×ÁǤΥ­¡¼¤Ï¼«Æ°Åª¤Ë·èÄꤵ¤ì
1901 ¤ë¡£@c ARG ¤¬À°¿ôÃͤʤé¤ÐÂбþ¤¹¤ë¥­¡¼¤Ï #Minteger ¤Ç¤¢¤ê¡¢@c ARG ¤¬¥·
1902 ¥ó¥Ü¥ë¤Ê¤é¤Ð¡¢Âбþ¤¹¤ë¥­¡¼¤Ï #Msymbol¡¢¤Ê¤É¤Î¤è¤¦¤Ë¡£
1903
1904 ´Ø¿ô¤Ï NULL ¤òÊÖ¤¹¤«¡¢¤Þ¤¿¤Ï¹Ô¤¦¤Ù¤­¥¢¥¯¥·¥ç¥ó¤Î¥ê¥¹¥È¤òɽ¤¹ (#MPlist
1905 *) ·¿¤ÎÃͤòÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1906
1907 @verbatim
1908 SET ::= '(' OPERAND SYMBOL1 [ INTEGER | SYMBOL2 ] ')'
1909
1910 OPERAND ::= 'set' | 'add' | 'sub' | 'mul' | 'div'
1911 @endverbatim
1912
1913 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï @c SYMBOL1 ¤È @c SYMBOL2 ¤òÊÑ¿ô¤È¤·¤Æ¡¢@c SYMBOL1 ¤Î
1914 Ãͤò°Ê²¼¤Î¤è¤¦¤ËÀßÄꤹ¤ë¡£
1915
1916 @c OPERAND ¤¬ 'set' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤϠ@c INTEGER ¤Þ¤¿¤Ï @c
1917 SYMBOL2 ¤ËÀßÄꤵ¤ì¤ë¡£
1918
1919 @c OPERAND ¤¬ 'add' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1920 SYMBOL2 ¤ÎÃͤÀ¤±Áý¤ä¤¹¡£
1921
1922 @c OPERAND ¤¬ 'sub' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1923 SYMBOL2 ¤ÎÃͤÀ¤±¸º¤é¤¹¡£
1924
1925 @c OPERAND ¤¬ 'mul' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤˠ@c INTEGER ¤Þ¤¿¤Ï @c
1926 SYMBOL2 ¤ÎÃͤò³Ý¤±¤ë¡£
1927
1928 @c OPERAND ¤¬ 'div' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1929 SYMBOL2 ¤ÎÃͤdzä¤ë¡£
1930
1931 @verbatim
1932 IF ::= '(' 'if' CONDITION ACTION-LIST1 ACTION-LIST2 * ')'
1933
1934 CONDITION ::= '(' OPERAND VAL1 VAL2 ')'
1935
1936 ACTION-LIST1 ::= '(' ACTION * ')'
1937
1938 ACTION-LIST2 ::= '(' ACTION * ')'
1939
1940 OPERAND ::= '=' '<' '>'
1941
1942 VAL1 ::= [ INTEGER1 | SYMBOL1 ]
1943
1944 VAL2 ::= [ INTEGER2 | SYMBOL2 ]
1945 @endverbatim
1946
1947 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ @c CONDITION ¤¬¿¿¤Ç¤¢¤ì¤Ð @c ACTION-LIST1 ¤ò¼Â¹Ô¤·¡¢
1948 ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð @c ACTION-LIST2 ¤ò (¤â¤·¤¢¤ì¤Ð) ¼Â¹Ô¤¹¤ë¡£
1949
1950 @c SYMBOL1 ¤È @c SYMBOL2 ¤ÏÊÑ¿ô¤È¤·¤Æ°·¤ï¤ì¤ë¡£
1951
1952 @ifnot FOR-MAN
1953
1954 @subsection im-seealso SEE ALSO
1955
1956 @ref mim-list "Input Methods provided by the m17n database",
1957 @ref mdbGeneral "mdbGeneral(5)"
1958 */
1959 /***en
1960
1961 @section mdbIM Input Method
1962
1963 @subsection im-description DESCRIPTION
1964
1965 The m17n library provides a driver for input methods that are
1966 dynamically loadable from the m17n database (see @ref m17nInputMethod
1967 @latexonly (P.\pageref{group__m17nInputMethod}) @endlatexonly).
1968
1969 This section describes the data format that defines those input
1970 methods.
1971
1972 @subsection im-format SYNTAX and SEMANTICS
1973
1974 The following data format defines an input method.  The driver loads
1975 a definition from a file, a stream, etc.  A definitions is converted
1976 into the form of plist in the driver.
1977
1978 @verbatim
1979 INPUT-METHOD ::= TITLE MAP-LIST MACRO-LIST ? MODULE-LIST ? STATE-LIST
1980
1981 TITLE ::= '(' 'title' MTEXT ')'
1982 @endverbatim
1983
1984 @c MTEXT is a text displayed on the screen when this input method is
1985 active.
1986
1987 @verbatim
1988 MAP-LIST ::= '(' 'map' MAP * ')'
1989
1990 MAP ::= '(' MAP-NAME RULE * ')'
1991
1992 MAP-NAME ::= SYMBOL
1993
1994 RULE ::= '(' KEYSEQ MAP-ACTION * ')'
1995
1996 KEYSEQ ::= MTEXT | '(' [ SYMBOL | INTEGER ] * ')'
1997 @endverbatim
1998
1999 @c SYMBOL in the definitions of @c MAP-NAME must not be @c t nor @c
2000 nil.
2001
2002 @c MTEXT in the definition of @c KEYSEQ consists of characters that
2003 can be generated by a keyboard.  Therefore @c MTEXT usually contains
2004 only ASCII characters.  However, if the input method is intended to be
2005 used, for instance, with a West European keyboard, @c MTEXT may
2006 contain Latin-1 characters.
2007
2008 @c SYMBOL in the definition of @c KEYSEQ must be the return value of
2009 the minput_event_to_key () function.
2010
2011 @c INTEGER in the definition of @c KEYSEQ must be a valid character
2012 code.
2013
2014 @verbatim
2015 MAP-ACTION ::= ACTION
2016
2017 ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK |
2018            | SHOW | HIDE | PUSHBACK | UNDO | SHIFT | CALL
2019            | SET | IF | '(' MACRO-NAME ')'
2020
2021 PREDEFINED-SYMBOL ::=
2022     '@0' | '@1' | '@2' | '@3' | '@4' |
2023     '@5' | '@6' | '@7' | '@8' | '@9' |
2024     '@<' | '@=' | '@>' | '@-' | '@+' | '@[' | '@]'
2025 @endverbatim
2026 @verbatim
2027 MACRO-LIST ::= '(' 'macro' MACRO * ')'
2028
2029 MACRO ::= '(' MACRO-NAME MACRO-ACTION * ')'
2030
2031 MACRO-NAME ::= SYMBOL
2032
2033 MACRO-ACTION ::= ACTION
2034 @endverbatim
2035 @verbatim
2036 MODULE-LIST ::= '(' 'module' MODULE * ')'
2037
2038 MODULE ::= '(' MODULE-NAME FUNCTION * ')'
2039
2040 MODULE-NAME ::= SYMBOL
2041
2042 FUNCTION ::= SYMBOL
2043 @endverbatim
2044
2045 Each @c MODULE declares the name of external module (i.e. dynamic
2046 library) and function names exported by the module.  If a @c FUNCTION has
2047 name "init", it is called with only the default arguments (see the
2048 section about @c CALL) when an input context is created for the input
2049 method.  If a @c FUNCTION has name "fini", it is called with only the
2050 default arguments when an input context is destroyed.
2051
2052 @verbatim
2053 STATE-LIST ::= '(' 'state' STATE * ')'
2054
2055 STATE ::= '(' STATE-NAME BRANCH * ')'
2056
2057 STATE-NAME ::= SYMBOL
2058
2059 BRANCH ::= '(' MAP-NAME BRANCH-ACTION * ')'
2060            | '(' nil BRANCH-ACTION * ')'
2061            | '(' t BRANCH-ACTION * ')'
2062 @endverbatim
2063
2064 In the first form of @c BRANCH, @c MAP-NAME must be an item that appears
2065 in @c MAP.  In this case, if a key sequence matching one of @c
2066 KEYSEQs of @c MAP-NAME is typed, @c BRANCH-ACTIONs are executed.
2067
2068 In the second form of @c BRANCH, @c BRANCH-ACTIONs are executed if a
2069 key sequence that doesn't match any of @c Branch's of the current
2070 state is typed.
2071
2072 In the third form of @c BRANCH, @c BRANCH-ACTIONs are executed if we
2073 shift to the current state after handling all typed keys.  If the
2074 current state is the initial state, @c BRANCH-ACTIONs are executed
2075 just after an input context of the input method is created.
2076
2077 @verbatim
2078 BRANCH-ACTION ::= ACTION
2079 @endverbatim
2080
2081 An input method has the following two lists of symbols.
2082
2083 <ul>
2084 <li> marker list
2085
2086 A marker is a symbol indicating a character position in the preediting
2087 text.  The @c MARK action assigns a position to a marker.  The
2088 position of a marker is referred by the @c MOVE and the @c DELETE actions.
2089
2090 <li> variable list
2091
2092 A variable is a symbol associated with an integer value.  The value of
2093 a variable is set by the @c SET action, and is referred by the @c SET,
2094 the @c INSERT, and the @c IF actions.  All variables are implicitly
2095 initialized to zero.
2096
2097 </ul>
2098
2099 Each @c PREDEFINED-SYMBOL has a special meaning when used as a marker.
2100
2101 <ul>
2102 <li> @c @@0, @c @@1, @c @@2, @c @@3, @c @@4, @c @@5, @c @@6, @c @@7, @c @@8, @c @@9
2103
2104 The 0th, 1st, 2nd, ... 9th position respectively.
2105
2106 <li> @c @@<, @c @@=, @c @@>
2107
2108 The first, the current, and the last position.
2109
2110 <li> @c @@-, @c @@+
2111
2112 The previous and the next position.
2113
2114 <li> @c @@[, @c @@]
2115
2116 The previous and the next position where a candidate list changes.
2117 </ul>
2118
2119 Some of the @c PREDEFINED-SYMBOL has a special meaning when used as a candidate
2120 index in the @c SELECT action.
2121
2122 <ul>
2123
2124 <li> @c @@<, @c @@=, @c @@>
2125
2126 The first, the current, and the last candidate of the current candidate group.
2127
2128 <li> @c @@-
2129
2130 The previous candidate.  If the current candidate is the first one in
2131 the current candidate group, then it means the last candidate in the
2132 previous candidate group.
2133
2134 <li> @c @@+
2135
2136 The next candidate.  If the current candidate is the last one in the
2137 current candidate group, then it means the first candidate in the next
2138 candidate group.
2139
2140 <li> @c @@[, @c @@]
2141
2142 The candidate in the previous and the next candidate group having the same
2143 candidate index as the current one.
2144 </ul>
2145
2146 The arguments and the behavior of each action are listed below.
2147
2148 @verbatim
2149 INSERT ::= '(' 'insert' MTEXT ')'
2150            | MTEXT
2151            | INTEGER
2152            | '(' 'insert' SYMBOL ')'
2153            | '(' 'insert' '(' CANDIDATES * ')' ')'
2154            | '(' CANDIDATES * ')' 
2155
2156 CANDIDATES ::= MTEXT | '(' MTEXT * ')'
2157 @endverbatim
2158
2159 The first and second forms insert @c MTEXT before the current position.
2160
2161 The third form inserts the character @c INTEGER before the current
2162 position.
2163
2164 The fourth form treats @c SYMBOL as a variable, and inserts its value
2165 (if it is a valid character code) before the current position.
2166
2167 In the fifth and sixth forms, each @c CANDIDATES represents a
2168 candidate group, and each element of @c CANDIDATES represents a
2169 candidate, i.e. if @c CANDIDATES is an M-text, the candidates are the
2170 characters in the M-text; if @c CANDIDATES is a list of M-texts, the
2171 candidates are the M-texts in the list.
2172
2173 These forms insert the first candidate before the current position.
2174 The inserted string is associated with the list of candidates and
2175 the information indicating the currently selected candidate.
2176
2177 The marker positions affected by the insertion are automatically relocated.
2178
2179 @verbatim
2180 DELETE ::= '(' 'delete' SYMBOL ')'
2181            | '(' 'delete' INTEGER ')'
2182 @endverbatim
2183
2184 The first form treats @c SYMBOL as a marker, and deletes characters
2185 between the current position and the marker position.
2186
2187 The second form treats @c INTEGER as a character position, and deletes
2188 characters between the current position and the character position.
2189
2190 The marker positions affected by the deletion are automatically relocated.
2191
2192 @verbatim
2193 SELECT ::= '(' 'select' PREDEFINED-SYMBOL ')'
2194            | '(' 'select' INTEGER ')'
2195 @endverbatim
2196
2197 This action first checks if the character just before the current position
2198 belongs to a string that is associated with a candidate list.  If it is,
2199 the action replaces that string with a candidate specified by the
2200 argument.
2201
2202 The first form treats @c PREDEFINED-SYMBOL as a candidate index (as
2203 described above) that specifies a new candidate in the candidate list.
2204
2205 The second form treats @c INTEGER as a candidate index that specifies a
2206 new candidate in the candidate list.
2207
2208 @verbatim
2209 SHOW ::= '(show)'
2210 @endverbatim
2211
2212 This actions instructs the input method driver to display a candidate
2213 list associated with the string before the current position.
2214
2215 @verbatim
2216 HIDE ::= '(hide)'
2217 @endverbatim
2218
2219 This action instructs the input method driver to hide the currently
2220 displayed candidate list.
2221
2222 @verbatim
2223 MOVE ::= '(' 'move' SYMBOL ')'
2224          | '(' 'move' INTEGER ')'
2225 @endverbatim
2226
2227 The first form treats @c SYMBOL as a marker, and makes the marker
2228 position be the new current position.
2229
2230 The second form treats @c INTEGER as a character position, and makes
2231 that position be the new current position.
2232
2233 @verbatim
2234 MARK ::= '(' 'mark' SYMBOL ')'
2235 @endverbatim
2236
2237 This action treats @c SYMBOL as a marker, and sets its position to the
2238 current position.  @c SYMBOL must not be a @c PREDEFINED-SYMBOL.
2239
2240
2241 @verbatim
2242 PUSHBACK :: = '(pushback INTEGER)'
2243 @endverbatim
2244
2245 This action pushes back the latest @c INTEGER number of key events to the event queue.
2246
2247 @verbatim
2248 UNDO :: = '(undo)'
2249 @endverbatim
2250
2251 This action cancels the last key event.
2252
2253 @verbatim
2254 SHIFT :: = '(' 'shift' STATE-NAME ')'
2255 @endverbatim
2256
2257 This action shifts the current state to @c STATE-NAME.  @c
2258 STATE-NAME must appear in @c STATE-LIST.
2259
2260 @verbatim
2261 CALL ::= '(' 'call' MODULE-NAME FUNCTION ARG * ')'
2262
2263 ARG ::= INTEGER | SYMBOL | MTEXT | PLIST
2264 @endverbatim
2265
2266 This action calls the function @c FUNCTION of external module @c
2267 MODULE-NAME.  @c MODULE-NAME and @c FUNCTION must appear in @c
2268 MODULE-LIST.
2269
2270 The function is called with an argument of the type (#MPlist *).  The
2271 key of the first element is #Mt and its value is a pointer to an
2272 object of the type #MInputContext.  The key of the second element is
2273 #Msymbol and its value is the current state name.  @c ARGs are used as
2274 the value of the third and later elements.  Their keys are determined
2275 automatically; if an @c ARG is an integer, the corresponding key is
2276 #Minteger; if an @c ARG is a symbol, the corresponding key is
2277 #Msymbol, etc.
2278
2279 The function must return NULL or a value of the type (#MPlist *) that
2280 represents a list of actions to take.
2281
2282 @verbatim
2283 SET ::= '(' OPERAND SYMBOL1 [ INTEGER | SYMBOL2 ] ')'
2284
2285 OPERAND ::= 'set' | 'add' | 'sub' | 'mul' | 'div'
2286 @endverbatim
2287
2288 This action treats @c SYMBOL1 and @c SYMBOL2 as variables and sets the
2289 value of @c SYMBOL1 as below.
2290
2291 If @c OPERAND is 'set', it sets the value of @c SYMBOL1 to @c INTEGER or the
2292 value of @c SYMBOL2.
2293
2294 If @c OPERAND is 'add', it increments the value of @c SYMBOL1 by @c INTEGER
2295 or the value of @c SYMBOL2.
2296
2297 If @c OPERAND is 'sub', it decrements the value of @c SYMBOL1 by @c INTEGER
2298 or the value of @c SYMBOL2.
2299
2300 If @c OPERAND is 'mul', it multiplies the value of @c SYMBOL1 by @c INTEGER
2301 or the value of @c SYMBOL2.
2302
2303 If @c OPERAND is 'div', it divides the value of @c SYMBOL1 by @c INTEGER or
2304 the value of @c SYMBOL2.
2305
2306 @verbatim
2307 IF ::= '(' CONDITION ACTION-LIST1 ACTION-LIST2 * ')'
2308
2309 CONDITION ::= OPERAND VAL1 VAL2
2310
2311 ACTION-LIST1 ::= '(' ACTION * ')'
2312
2313 ACTION-LIST2 ::= '(' ACTION * ')'
2314
2315 OPERAND ::= '=' '<' '>'
2316
2317 VAL1 ::= [ INTEGER1 | SYMBOL1 ]
2318
2319 VAL2 ::= [ INTEGER2 | SYMBOL2 ]
2320 @endverbatim
2321
2322 This action performs actions in @c ACTION-LIST1 if @c CONDITION is
2323 true, and performs @c ACTION-LIST2 (if any) otherwise.
2324
2325 @c SYMBOL1 and @c SYMBOL2 are treated as variables.
2326
2327 @ifnot FOR-MAN
2328
2329 @subsection im-example1 EXAMPLE 1
2330
2331 This is a very simple example for inputting Latin characters with
2332 diacritical marks (acute and cedilla).  For instance, when you type:
2333 @verbatim
2334     Comme'die-Franc,ais, chic,,
2335 @endverbatim
2336 you will get this:
2337 @if FOR-HTML
2338 @verbatim
2339     Commédie-Français, chic,
2340 @endverbatim
2341 @endif
2342 @if FOR-LATEX
2343 @latexonly
2344 \hskip5mm\texttt{\footnotesize Comm\'{e}die-Fran\c{c}ais, chic,}
2345 @endlatexonly
2346 @endif
2347
2348 The definition of the input method is very simple as below, and it is
2349 quite straight forward to extend it to cover all Latin characters.
2350
2351 @if FOR-HTML
2352 @verbatim
2353 (title "latin-postfix")
2354 (map
2355  (trans
2356   ("a'" ?á) ("e'" ?é) ("i'" ?í) ("o'" ?ó) ("u'" ?ú) ("c," ?ç)
2357   ("A'" ?Á) ("E'" ?É) ("I'" ?Í) ("O'" ?Ó) ("U'" ?Ú) ("C," ?Ç)
2358   ("a''" "a'") ("e''" "e'") ("i''" "i'") ("o''" "o'") ("u''" "u'")
2359   ("c,," "c,")
2360   ("A''" "A'") ("E''" "E'") ("I''" "I'") ("O''" "O'") ("U''" "U'")
2361   ("C,," "C,")))
2362 (state
2363  (init
2364   (trans)))
2365 @endverbatim
2366 @endif
2367 @if FOR-LATEX
2368 @latexonly
2369 \texttt{\footnotesize
2370 \hskip2mm(title "latin-postfix")\\
2371 \hskip2mm(map\\
2372 \hskip4mm (trans\\
2373 \hskip6mm  ("a'" ?\'{a}) ("e'" ?\'{e}) ("i'" ?\'{i}) ("o'" ?\'{o})
2374 ("u'" ?\'{u}) ("c," ?\c{c})\\
2375 \hskip6mm  ("A'" ?\'{A}) ("E'" ?\'{E}) ("I'" ?\'{I}) ("O'" ?\'{O})
2376 ("U'" ?\'{U}) ("C," ?\c{C})\\
2377 \hskip6mm  ("a''" "a'") ("e''" "e'") ("i''" "i'") ("o''" "o'") ("u''" "u'")\\
2378 \hskip6mm  ("c,," "c,")\\
2379 \hskip6mm  ("A''" "A'") ("E''" "E'") ("I''" "I'") ("O''" "O'") ("U''" "U'")\\
2380 \hskip6mm  ("C,," "C,")))\\
2381 \hskip2mm(state\\
2382 \hskip4mm (init\\
2383 \hskip6mm  (trans)))}
2384 @endlatexonly
2385 @endif
2386
2387 @subsection im-example2 EXAMPLE 2
2388
2389 This example is for inputting Unicode characters by typing C-u
2390 (Control-u) followed by four hexadecimal numbers.  For instance, when
2391 you type ("^u" means Control-u):
2392 @verbatim
2393     ^u2190^u2191^u2192^u2193
2394 @endverbatim
2395 you will get this (Unicode arrow symbols):
2396 @verbatim
2397     ←↑→↓
2398 @endverbatim
2399
2400 The definition utilizes @c SET and @c IF commands as below:
2401 @verbatim
2402 (title "UNICODE")
2403 (map
2404  (starter
2405   ((C-U) "U+"))
2406  (hex
2407   ("0" ?0) ("1" ?1) ... ("9" ?9) ("a" ?A) ("b" ?B) ... ("f" ?F)))
2408 (state
2409  (init
2410   (starter (set code 0) (set count 0) (shift unicode)))
2411  (unicode
2412   (hex (set this @-)
2413        (< this ?A
2414           ((sub this 48))
2415           ((sub this 55)))
2416        (mul code 16) (add code this)
2417        (add count 1)
2418        (= count 4
2419           ((delete @<) (insert code) (shift init))))))
2420 @endverbatim
2421
2422 @subsection im-example3 EXAMPLE 3
2423
2424 This example is for inputting Chinese characters by typing PinYin key
2425 sequence.
2426 @if FOR-HTML
2427 For instance, when you type:
2428 @verbatim
2429     nihaobei2jing2
2430 @endverbatim
2431 you will get:
2432 @verbatim
2433     你好北京
2434 @endverbatim
2435
2436 The definition utilizes @c CANDIDATE and @c SELECT commands as below.
2437 Note that this is just an example, and it ignores such important key
2438 as Backspace.
2439
2440 @verbatim
2441 (title "拼")
2442
2443 (map
2444  ;; The initial character of Pinyin.
2445  (starter
2446   ("a") ("b") ... ("h") ("j") ... ("t") ("w") ("x") ("y") ("z"))
2447
2448  ;; Big table of Pinyin vs the corresponding Chinese characters.
2449  (pinyin
2450   ...
2451   ("bei" ("被北备背悲辈杯倍贝碑" ...))
2452   ("hao" ("好号毫豪浩耗皓嚎昊郝" ...))
2453   ("jing" ("经京精境警竟静惊景敬" ...))
2454   ("ni" ("你呢尼泥逆倪匿拟腻妮" ...))
2455   ...)
2456  ;; Typing 1, 2, ..., 0 selects the 0th, 1st, ..., 9th candidate.
2457  (choose
2458   ("1" (select 0)) ("2" (select 1)) ... ("9" (select 8)) ("0" (select 9))))
2459
2460 (state
2461  (init
2462   ;; When an initial character of Pinyin is typed, re-handle it in
2463   ;; "main" state.  Anything else is just produced as is.
2464   (starter (show) (pushback 1) (shift main)))
2465
2466  (main
2467   ;; When a complete Pinyin sequence is typed, shift to "select" state
2468   ;; to allow users to select one from the candidates.
2469   (pinyin (shift select))
2470
2471   ;; When anything else is typed, produce the current candidate (if
2472   ;; any), and re-handle the last input in "init" state.
2473   (nil (hide) (shift init)))
2474
2475  (select
2476   ;; When a number is typed, select the corresponding canidate,
2477   ;; produce it, and shift to "init" state.
2478   (choose (hide) (shift init))
2479
2480   ;; When anything else is typed, produce the current candidate,
2481   ;; and re-handle the last input in "init" state.
2482   (nil (hide) (shift init))))
2483 @endverbatim
2484
2485 @elseif FOR-LATEX
2486 @latexonly
2487 \begin{center}
2488 \fbox{This example is readable only in the documentation of HTML version.}
2489 \end{center}
2490 @endlatexonly
2491 @endif
2492
2493 @endif
2494
2495 @subsection im-seealso SEE ALSO
2496
2497 @ref mim-list "Input Methods provided by the m17n database",
2498 @ref mdbGeneral "mdbGeneral(5)"
2499 */