1 /*** @addtogroup m17nDatabase */
5 /***@defgroup m17nDatabaseFormat DatabaseFormat
7 This section describes the formats of predefined @e plist @e type data
10 @section general General format
12 The m17n library expects that the function mdatabase_load () returns a
13 plist of a specific format on loading data identified by a specific
14 set of tags. As the plist format used for the database data is
15 strongly limited, we can use the equivalent text of simple syntax
16 (S-expression) to represent the plist as below.
18 The text consists of one or more @e elements . Each element
19 represents a property, i.e. a single element of a plist, and the
20 sequence of the elements constitute a plist.
22 Elements are separated by one or more @e whitespaces, i.e. a space
23 (code 32), a tab (code 9), or a newline (code 10). Comments begin
24 with a semicolon (<tt>;</tt>) and extend to the end of the line.
26 The key and the value of each property are determined based on the
27 form of element as below:
33 An element that matches the regular expression @c -?[0-9]+ or @c
34 0[xX][0-9A-Fa-f]+ represents a property whose key is @c Minteger . An
35 element matching the former expression is interpreted as an integer in
36 decimal notation, and one matching the latter expression is
37 interpreted as an integer in hexadecimal notation. The resulting
38 integer is the value of the property.
40 For instance, the element 0xA0 represents a property whose value is
45 An element that matchs the regular expression @c
46 [^-0-9(]([^\\()]|\\.)+ represents a property whose key is @c Msymbol .
47 In the sequence, @c \\t , @c \\n , @c \\r , and @c \\e are replaced
48 with tab (code 9), newline (code 10), carriage return (code 13), and
49 escape (code 27) respectively. Other characters following a backslash
50 is interpreted as it is. The symbol having the name of the resulting
51 sequence is the value of the property.
53 For instance, the element <tt>abc\ def</tt> represents a property
54 whose value is the symbol of name "abc def".
58 An element that matches the regular expression @c "([^"]|\\")*"
59 represents a property whose key is @c Mtext . The backslash escape
60 explained above also applies here. Moreover, each part in the
61 sequence matching the regular expression @c
62 \\[xX][0-9A-Fa-f][0-9A-Fa-f] is replaced with its hexadecimal
65 After having resolved the backslash escapes, the byte sequence between
66 the double quotes is interpreted as a UTF-8 sequence and decoded into
67 an M-text. This M-text is the value of the property.
71 An element that is preceded by a left parenthesis, followed zero or
72 more elements, and terminated by a right parenthesis represents a
73 property whose key is @c Mplist . Parentheses also serve as a
74 separator, which means whitespaces before and after a parenthesis can
75 be omitted. The value of the property is a plist, which is the result
76 of recursive interpretation of the elements between the parentheses.
82 Suppose (K1:V1, K2:V2, ... ,Kn:Vn) represents a plist whose first
83 property key and value are K1 and V1, second key and value are K2 and
84 V2, and so on. Then the line:
86 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
88 is interpreted as follows.
101 The default database loader of the m17n library actually read a text
102 of this syntax from the database file.
104 Here after we describes the plist format of each data by this syntax.
106 @section flt Font Layout Table
110 @section im Input Method
112 @verbinclude im.txt */