Fix for the case of failed LAM-ALEF ligature. Handle positioning of
[m17n/m17n-db.git] / FORMATS / 0General.ja.txt
1 /* Copyright (C) 2003, 2004
2      National Institute of Advanced Industrial Science and Technology (AIST)
3      Registration Number H15PRO112
4    See the end for copying conditions.  */
5
6 /***ja
7
8 @page mdbGeneral °ìÈÌŪ¤Ê¥Õ¥©¡¼¥Þ¥Ã¥È
9
10 @section general-description ÀâÌÀ
11
12 ´Ø¿ô mdatabase_load () ¤Ï¡¢Âè°ì¥¿¥°¤¬ @c Mchartable ¤« @c Mcharset ¤Ç
13 ¤Ê¤¤¸Â¤ê¡¢¥¿¥°¤Ç»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿¤ò¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î·Á¤ÇÊÖ¤¹¡£ÊÖ¤µ¤ì¤ë
14 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥­¡¼¤Ï<tt>Minteger</tt>, <tt>Msymbol</tt>,
15 <tt>Mtext</tt>, <tt>Mplist</tt> ¤Ë¸Â¤ë¡£Ãͤη¿¤Ï¥­¡¼¤Ë¤è¤Ã¤ÆÛ£ËæÀ­¤Ê¤¯
16 ·èÄꤵ¤ì¤ë¡£¥­¡¼¤¬ <tt>Minteger</tt> ¤Ê¤é¤ÐÃͤÏÀ°¿ôÃͤǤ¢¤ê¡¢¥­¡¼¤¬ 
17 <tt>Msymbol</tt> ¤Ê¤éÃͤϥ·¥ó¥Ü¥ë¡¢<tt>Mtext</tt> ¤Ê¤é¤Ð M-text¡¢
18 <tt>Mplist</tt> ¤Ê¤é¤Ð¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ë¡£
19
20 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ò¼¨¤¹¤¿¤á¤Ë¤Ï¤µ¤Þ¤¶¤Þ¤Êɽ¸½·Á¼°¤¬²Äǽ¤Ç¤¢¤ë¡£¤¿¤È¤¨¤Ð
21 <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> ¤È¤¤¤¦·Á¤Ç¡¢ºÇ½é¤ÎK1 ¤È V1¡¢Æó¤ÄÌÜ
22 ¤Î¥­¡¼¤ÈÃͤ¬K2 ¤È V2 ¤È¤¤¤Ã¤¿¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤òɽ¸½¤¹¤ë¤³¤È¤â¤Ç¤­¤ë¡£
23 ¤·¤«¤·¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÇÍѤ¤¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥¿¥¤¥×¤Ï¤«¤Ê¤ê
24 ¸ÂÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¤â¤Ã¤Èñ½ã¤Êɽ¸½·Á¼°¤òÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
25
26 ¤³¤ì°Ê¹ß¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¼¨¤¹¤¿¤á¤Ë¤Ï S ¼°¤ËÎà»÷¤·¤¿É½¸½¤òÍѤ¤¤ë¡£
27 (¼ÂºÝ m17n ¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥í¡¼¥À¤Ï¤³¤Îɽ¸½¤Ç½ñ¤«
28 ¤ì¤¿¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤òÆɤà¤è¤¦¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£)
29
30 ¤³¤Îɽ¸½·Á¼°¤Ï 1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i>Í×ÁÇ (element)</i> ¤«¤é¤Ê¤ë¡£¸Ä¡¹
31 ¤ÎÍ×ÁǤϥץí¥Ñ¥Æ¥£¤¹¤Ê¤ï¤Á¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î°ì¤Ä¤ÎÍ×ÁǤòɽ¤¹¡£
32
33 Í×ÁǴ֤Ϡ1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i> ¶õÇò (whitespace)</i> ¤¹¤Ê¤ï¤Á¥¹¥Ú¡¼¥¹
34 (code 32)¡¢¥¿¥Ö (code 9)¡¢²þ¹Ô (code 10) ¤Î¤¤¤º¤ì¤«¤Ç¶èÀÚ¤é¤ì¤ë¡£¥»¥ß
35 ¥³¥í¥ó(<tt>;</tt>) ¤Ç»Ï¤Þ¤ë¹Ô¤Ï¥³¥á¥ó¥È¤Ç¤¢¤ë¡£
36
37 ³Æ¥×¥í¥Ñ¥Æ¥£¤Î¥­¡¼¤ÈÃͤϡ¢Í×ÁǤΥ¿¥¤¥×¤Ë´ð¤Å¤¤¤Æ°Ê²¼¤Î¤è¤¦¤Ë·èÄꤵ¤ì¤ë¡£
38
39 <ul>
40
41 <li> À°¿ô
42
43 Àµµ¬É½¸½<tt>-?[0-9]+</tt> ¤Þ¤¿¤Ï<tt>0[xX][0-9A-Fa-f]+</tt> ¤Ë¹çÃפ¹¤ë
44 Í×ÁǤϡ¢¥­¡¼¤¬<tt>Minteger</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£ºÇ½é¤ÎÀµµ¬É½¸½
45 ¤È¹çÃפ¹¤ë¤â¤Î¤Ï 10 ¿Ê¤ÎÀ°¿ô¡¢¸å¤ÎÀµµ¬É½¸½¤È¹çÃפ¹¤ë¤â¤Î¤Ï 16 ¿Ê¤ÎÀ°¿ô
46 ¤È²ò¼á¤·¡¢¤½¤Î²ò¼á¤Î·ë²Ì¤¬¥×¥í¥Ñ¥Æ¥£¤ÎÃͤǤ¢¤ë¡£
47
48 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>0xA0</tt> ¤Ï10 ¿Ê¤Ç 160 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
49
50 <li> ¥·¥ó¥Ü¥ë
51
52 Àµµ¬É½¸½<tt>[^-0-9(]([^\\()]|\\.)+</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥­¡¼¤¬<tt>
53 Msymbol</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£Í×ÁÇÃæ¤Î <tt>\\t</tt>,
54 <tt>\\n</tt>, <tt>\\r</tt>, <tt>\\e</tt> ¤Ï¤½¤ì¤¾¤ì¡¢¥¿¥Ö (code 9)¡¢²þ
55 ¹Ô (code 10)¡¢Éüµ¢(code 13)¡¢¥¨¥¹¥±¡¼¥× (code 27) ¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£¥Ð¥Ã
56 ¥¯¥¹¥é¥Ã¥·¥å¤Ë³¤¯Â¾¤Îʸ»ú¤Ï¤½¤ì¼«¿È¤È²ò¼á¤µ¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢·ë
57 ²Ì¤È¤·¤ÆÆÀ¤é¤ì¤ëʸ»úÎó¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
58
59 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>abc\ def</tt> ¤Ï "abc def" ¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë
60 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
61
62 <li> MTEXT
63
64 Àµµ¬É½¸½ <tt>"([^"]|\\")*"</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥­¡¼ <tt>Mtext</tt> 
65 ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£¾åµ­¤Î¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Ë¤è¤ë¥¨¥¹¥±¡¼¥×¤Ï¤³¤³¤Ç
66 ¤âÍ­¸ú¤Ç¤¢¤ë¡£¤µ¤é¤Ë¡¢Í×ÁÇÃæ¤ÎÀµµ¬É½¸½
67 <tt>\\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> ¤Ë¹çÃפ¹¤ëÉôʬ¤Ï¡¢16¿Ê¤Ç²ò¼á¤·¤¿
68 ·ë²Ì¤ËÃÖ¤­´¹¤¨¤é¤ì¤ë¡£
69
70 ¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¥¨¥¹¥±¡¼¥×¤ò½èÍý¤·¤¿¾å¤Ç¡¢¥À¥Ö¥ë¥¯¥ª¡¼¥È¤Ë¤Ï¤µ¤Þ¤ì¤¿¥Ð
71 ¥¤¥ÈÎó¤òUTF-8 Îó¤È¤·¤Æ²ò¼á¤·¡¢M-text ¤Ë¥Ç¥³¡¼¥É¤¹¤ë¡£¤³¤Î M-text ¤¬¥×
72 ¥í¥Ñ¥Æ¥£¤ÎÃͤǤ¢¤ë¡£
73
74 <li> PLIST
75
76 Âбþ¤¹¤ë³ç¸Ì¤Ë¤Ï¤µ¤Þ¤ì¤¿ 0 ¸Ä°Ê¾å¤ÎÍ×ÁǤÏ<tt>Mplist</tt> ¤ò¥­¡¼¤È¤¹¤ë
77 ¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£³ç¸Ì¤ÎÁ°¸å¤Î¶õÇò¤Ï¼è¤ê½ü¤«¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥×
78 ¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ê¡¢¤½¤Î³ç¸ÌÆâ¤Î³ÆÍ×ÁǤòºÆµ¢Åª¤Ë²ò¼á¤·¤¿·ë²Ì¤Ç¤¢¤ë¡£
79
80 </ul>
81
82 @section general-syntax Ê¸Ë¡¤Îɽµ­
83
84 ¥Ç¡¼¥¿¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¥Õ¥©¡¼¥Þ¥Ã¥È¤ÎÀâÌÀ¤Ç¤Ï¡¢BNFÉ÷¤Îµ­Ë¡¤¬ÍѤ¤¤é¤ì
85 ¤ë¡£¤³¤Îµ­Ë¡¤Ç¤Ï¡¢Èó½ªÃ¼¤ÏÂçʸ»ú¡Ê´Ö¤Ë'-'¤¬Æþ¤Ã¤Æ¤â¤è¤¤¡Ë ¤Ç¡¢½ªÃ¼¤Ï " 
86 ¤Ç°Ï¤Ã¤Æɽ¤µ¤ì¤ë¡£ÆÃÊ̤ÊÈó½ªÃ¼ INTEGER, SYMBOL,
87 MTEXT, PLIST ¤Ï¤½¤ì¤¾¤ìÂбþ¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò°ÕÌ£¤¹¤ë¡£
88
89 @section general-example Îã
90
91 ¼¡¤Îñ½ã¤Ê·Á¼°¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ËÆɤ߹þ¤Þ¤ì¤ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¡¼¥¿¤Î
92 °ìÎã¤ò¼¨¤¹¡§
93
94 @verbatim
95 DATA-FORMAT ::=
96     [ INTEGER | SYMBOL | MTEXT | FUNC ] *
97
98 FUNC ::=
99     '(' FUNC-NAME FUNC-ARG * ')'
100
101 FUNC-NAME ::=
102     SYMBOL
103
104 FUNC-ARG ::=
105     INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')'
106 @endverbatim
107
108 ¤¿¤È¤¨¤Ð¡¢¼¡¤Î¥Æ¥­¥¹¥È¤ò´Þ¤à¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Ï¾å¤Îʸˡ¤Ë¹çÃפ¹¤ë¡§
109
110 @verbatim
111 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
112 @endverbatim
113
114 ¤½¤·¤Æ¼¡¤Î¤è¤¦¤Ê¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤ÆÆɤ߹þ¤Þ¤ì¤ë¡§
115
116 @verbatim
117 Â裱Í×ÁÇ: ¥­¡¼: Msymbol,  ÃÍ: abc
118 Â裲Í×ÁÇ: ¥­¡¼: Minteger, ÃÍ: 123
119 Â裳Í×ÁÇ: ¥­¡¼: Mplist,   ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
120     Â裱Í×ÁÇ: ¥­¡¼ Msymbol,  ÃÍ: pgr
121     Â裲Í×ÁÇ: ¥­¡¼ Minteger, ÃÍ: 255
122 Â裴Í×ÁÇ: ¥­¡¼: Mtext,    ÃÍ: m"text
123 Â裵Í×ÁÇ: ¥­¡¼: Mplist,   ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
124     Â裱Í×ÁÇ: ¥­¡¼: Msymbol, ÃÍ: _\_
125     Â裲Í×ÁÇ: ¥­¡¼: Mplist,  ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
126         Â裱Í×ÁÇ: ¥­¡¼: Mtext,    ÃÍ: string
127         Â裲Í×ÁÇ: ¥­¡¼: Msymbol,  ÃÍ: xyz
128         Â裳Í×ÁÇ: ¥­¡¼: Minteger, ÃÍ: -456
129 @endverbatim
130 */
131
132 /* 
133 Copyright (C) 2003, 2004
134   National Institute of Advanced Industrial Science and Technology (AIST)
135   Registration Number H15PRO112
136
137 This file is part of the m17n database; a sub-part of the m17n
138 library.
139
140 The m17n library is free software; you can redistribute it and/or
141 modify it under the terms of the GNU Lesser General Public License
142 as published by the Free Software Foundation; either version 2.1 of
143 the License, or (at your option) any later version.
144
145 The m17n library is distributed in the hope that it will be useful,
146 but WITHOUT ANY WARRANTY; without even the implied warranty of
147 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
148 Lesser General Public License for more details.
149
150 You should have received a copy of the GNU Lesser General Public
151 License along with the m17n library; if not, write to the Free
152 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
153 Boston, MA 02110-1301, USA.
154 */