/src/harfbuzz/src/hb-ot-shaper-use-machine.hh
Line | Count | Source (jump to first uncovered line) |
1 | | |
2 | | #line 1 "hb-ot-shaper-use-machine.rl" |
3 | | /* |
4 | | * Copyright © 2015 Mozilla Foundation. |
5 | | * Copyright © 2015 Google, Inc. |
6 | | * |
7 | | * This is part of HarfBuzz, a text shaping library. |
8 | | * |
9 | | * Permission is hereby granted, without written agreement and without |
10 | | * license or royalty fees, to use, copy, modify, and distribute this |
11 | | * software and its documentation for any purpose, provided that the |
12 | | * above copyright notice and the following two paragraphs appear in |
13 | | * all copies of this software. |
14 | | * |
15 | | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
16 | | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
17 | | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
18 | | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
19 | | * DAMAGE. |
20 | | * |
21 | | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
22 | | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
23 | | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
24 | | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
25 | | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
26 | | * |
27 | | * Mozilla Author(s): Jonathan Kew |
28 | | * Google Author(s): Behdad Esfahbod |
29 | | */ |
30 | | |
31 | | #ifndef HB_OT_SHAPER_USE_MACHINE_HH |
32 | | #define HB_OT_SHAPER_USE_MACHINE_HH |
33 | | |
34 | | #include "hb.hh" |
35 | | |
36 | | #include "hb-ot-shaper-syllabic.hh" |
37 | | |
38 | | /* buffer var allocations */ |
39 | 76.5M | #define use_category() ot_shaper_var_u8_category() |
40 | | |
41 | 37.1M | #define USE(Cat) use_syllable_machine_ex_##Cat |
42 | | |
43 | | enum use_syllable_type_t { |
44 | | use_virama_terminated_cluster, |
45 | | use_sakot_terminated_cluster, |
46 | | use_standard_cluster, |
47 | | use_number_joiner_terminated_cluster, |
48 | | use_numeral_cluster, |
49 | | use_symbol_cluster, |
50 | | use_hieroglyph_cluster, |
51 | | use_broken_cluster, |
52 | | use_non_cluster, |
53 | | }; |
54 | | |
55 | | |
56 | | #line 54 "hb-ot-shaper-use-machine.hh" |
57 | 46.8k | #define use_syllable_machine_ex_B 1u |
58 | 24.7M | #define use_syllable_machine_ex_CGJ 6u |
59 | | #define use_syllable_machine_ex_CMAbv 31u |
60 | | #define use_syllable_machine_ex_CMBlw 32u |
61 | | #define use_syllable_machine_ex_CS 43u |
62 | | #define use_syllable_machine_ex_FAbv 24u |
63 | | #define use_syllable_machine_ex_FBlw 25u |
64 | | #define use_syllable_machine_ex_FMAbv 45u |
65 | | #define use_syllable_machine_ex_FMBlw 46u |
66 | | #define use_syllable_machine_ex_FMPst 47u |
67 | | #define use_syllable_machine_ex_FPst 26u |
68 | | #define use_syllable_machine_ex_G 49u |
69 | | #define use_syllable_machine_ex_GB 5u |
70 | 6.84M | #define use_syllable_machine_ex_H 12u |
71 | | #define use_syllable_machine_ex_HN 13u |
72 | 6.81M | #define use_syllable_machine_ex_HVM 53u |
73 | 3.38M | #define use_syllable_machine_ex_IS 44u |
74 | | #define use_syllable_machine_ex_J 50u |
75 | | #define use_syllable_machine_ex_MAbv 27u |
76 | | #define use_syllable_machine_ex_MBlw 28u |
77 | | #define use_syllable_machine_ex_MPre 30u |
78 | | #define use_syllable_machine_ex_MPst 29u |
79 | | #define use_syllable_machine_ex_N 4u |
80 | 754k | #define use_syllable_machine_ex_O 0u |
81 | 6.31M | #define use_syllable_machine_ex_R 18u |
82 | | #define use_syllable_machine_ex_SB 51u |
83 | | #define use_syllable_machine_ex_SE 52u |
84 | | #define use_syllable_machine_ex_SMAbv 41u |
85 | | #define use_syllable_machine_ex_SMBlw 42u |
86 | | #define use_syllable_machine_ex_SUB 11u |
87 | | #define use_syllable_machine_ex_Sk 48u |
88 | | #define use_syllable_machine_ex_VAbv 33u |
89 | | #define use_syllable_machine_ex_VBlw 34u |
90 | | #define use_syllable_machine_ex_VMAbv 37u |
91 | | #define use_syllable_machine_ex_VMBlw 38u |
92 | | #define use_syllable_machine_ex_VMPre 23u |
93 | | #define use_syllable_machine_ex_VMPst 39u |
94 | 1.39k | #define use_syllable_machine_ex_VPre 22u |
95 | | #define use_syllable_machine_ex_VPst 35u |
96 | | #define use_syllable_machine_ex_WJ 16u |
97 | 23.8M | #define use_syllable_machine_ex_ZWNJ 14u |
98 | | |
99 | | |
100 | | #line 96 "hb-ot-shaper-use-machine.hh" |
101 | | static const unsigned char _use_syllable_machine_trans_keys[] = { |
102 | | 0u, 53u, 11u, 53u, 11u, 53u, 1u, 53u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, |
103 | | 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 1u, 1u, 24u, 48u, 22u, 53u, |
104 | | 23u, 53u, 23u, 53u, 23u, 53u, 12u, 53u, 23u, 53u, 12u, 53u, 12u, 53u, 12u, 53u, |
105 | | 11u, 53u, 1u, 1u, 1u, 48u, 11u, 53u, 41u, 42u, 42u, 42u, 11u, 53u, 11u, 53u, |
106 | | 1u, 53u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, |
107 | | 24u, 48u, 24u, 48u, 1u, 1u, 24u, 48u, 22u, 53u, 23u, 53u, 23u, 53u, 23u, 53u, |
108 | | 12u, 53u, 23u, 53u, 12u, 53u, 12u, 53u, 12u, 53u, 11u, 53u, 1u, 1u, 1u, 48u, |
109 | | 13u, 13u, 4u, 4u, 11u, 53u, 11u, 53u, 1u, 53u, 23u, 48u, 24u, 47u, 25u, 47u, |
110 | | 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 1u, 1u, 24u, 48u, |
111 | | 22u, 53u, 23u, 53u, 23u, 53u, 23u, 53u, 12u, 53u, 23u, 53u, 12u, 53u, 12u, 53u, |
112 | | 12u, 53u, 11u, 53u, 1u, 1u, 1u, 48u, 11u, 53u, 11u, 53u, 1u, 53u, 23u, 48u, |
113 | | 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, |
114 | | 1u, 1u, 24u, 48u, 22u, 53u, 23u, 53u, 23u, 53u, 23u, 53u, 12u, 53u, 23u, 53u, |
115 | | 12u, 53u, 12u, 53u, 12u, 53u, 11u, 53u, 1u, 1u, 1u, 48u, 4u, 4u, 13u, 13u, |
116 | | 1u, 53u, 11u, 53u, 41u, 42u, 42u, 42u, 1u, 5u, 50u, 52u, 49u, 52u, 49u, 51u, |
117 | | 0 |
118 | | }; |
119 | | |
120 | | static const char _use_syllable_machine_key_spans[] = { |
121 | | 54, 43, 43, 53, 26, 24, 23, 22, |
122 | | 2, 1, 25, 25, 25, 1, 25, 32, |
123 | | 31, 31, 31, 42, 31, 42, 42, 42, |
124 | | 43, 1, 48, 43, 2, 1, 43, 43, |
125 | | 53, 26, 24, 23, 22, 2, 1, 25, |
126 | | 25, 25, 1, 25, 32, 31, 31, 31, |
127 | | 42, 31, 42, 42, 42, 43, 1, 48, |
128 | | 1, 1, 43, 43, 53, 26, 24, 23, |
129 | | 22, 2, 1, 25, 25, 25, 1, 25, |
130 | | 32, 31, 31, 31, 42, 31, 42, 42, |
131 | | 42, 43, 1, 48, 43, 43, 53, 26, |
132 | | 24, 23, 22, 2, 1, 25, 25, 25, |
133 | | 1, 25, 32, 31, 31, 31, 42, 31, |
134 | | 42, 42, 42, 43, 1, 48, 1, 1, |
135 | | 53, 43, 2, 1, 5, 3, 4, 3 |
136 | | }; |
137 | | |
138 | | static const short _use_syllable_machine_index_offsets[] = { |
139 | | 0, 55, 99, 143, 197, 224, 249, 273, |
140 | | 296, 299, 301, 327, 353, 379, 381, 407, |
141 | | 440, 472, 504, 536, 579, 611, 654, 697, |
142 | | 740, 784, 786, 835, 879, 882, 884, 928, |
143 | | 972, 1026, 1053, 1078, 1102, 1125, 1128, 1130, |
144 | | 1156, 1182, 1208, 1210, 1236, 1269, 1301, 1333, |
145 | | 1365, 1408, 1440, 1483, 1526, 1569, 1613, 1615, |
146 | | 1664, 1666, 1668, 1712, 1756, 1810, 1837, 1862, |
147 | | 1886, 1909, 1912, 1914, 1940, 1966, 1992, 1994, |
148 | | 2020, 2053, 2085, 2117, 2149, 2192, 2224, 2267, |
149 | | 2310, 2353, 2397, 2399, 2448, 2492, 2536, 2590, |
150 | | 2617, 2642, 2666, 2689, 2692, 2694, 2720, 2746, |
151 | | 2772, 2774, 2800, 2833, 2865, 2897, 2929, 2972, |
152 | | 3004, 3047, 3090, 3133, 3177, 3179, 3228, 3230, |
153 | | 3232, 3286, 3330, 3333, 3335, 3341, 3345, 3350 |
154 | | }; |
155 | | |
156 | | static const unsigned char _use_syllable_machine_indicies[] = { |
157 | | 0, 1, 2, 2, 3, 4, 2, 2, |
158 | | 2, 2, 2, 5, 6, 7, 2, 2, |
159 | | 2, 2, 8, 2, 2, 2, 9, 10, |
160 | | 11, 12, 13, 14, 15, 16, 17, 18, |
161 | | 19, 20, 21, 22, 2, 23, 24, 25, |
162 | | 2, 26, 27, 28, 29, 30, 31, 32, |
163 | | 29, 33, 2, 34, 2, 35, 2, 37, |
164 | | 38, 36, 36, 36, 36, 36, 36, 36, |
165 | | 36, 36, 39, 40, 41, 42, 43, 44, |
166 | | 45, 46, 47, 48, 49, 50, 51, 52, |
167 | | 36, 53, 54, 55, 36, 56, 57, 36, |
168 | | 58, 59, 60, 61, 58, 36, 36, 36, |
169 | | 36, 62, 36, 37, 38, 36, 36, 36, |
170 | | 36, 36, 36, 36, 36, 36, 39, 40, |
171 | | 41, 42, 43, 44, 45, 46, 47, 49, |
172 | | 49, 50, 51, 52, 36, 53, 54, 55, |
173 | | 36, 36, 36, 36, 58, 59, 60, 61, |
174 | | 58, 36, 36, 36, 36, 62, 36, 37, |
175 | | 36, 36, 36, 36, 36, 36, 36, 36, |
176 | | 36, 36, 36, 36, 36, 36, 36, 36, |
177 | | 36, 36, 36, 36, 36, 40, 41, 42, |
178 | | 43, 36, 36, 36, 36, 36, 36, 36, |
179 | | 36, 36, 36, 53, 54, 55, 36, 36, |
180 | | 36, 36, 36, 59, 60, 61, 63, 36, |
181 | | 36, 36, 36, 40, 36, 40, 41, 42, |
182 | | 43, 36, 36, 36, 36, 36, 36, 36, |
183 | | 36, 36, 36, 53, 54, 55, 36, 36, |
184 | | 36, 36, 36, 59, 60, 61, 63, 36, |
185 | | 41, 42, 43, 36, 36, 36, 36, 36, |
186 | | 36, 36, 36, 36, 36, 36, 36, 36, |
187 | | 36, 36, 36, 36, 36, 59, 60, 61, |
188 | | 36, 42, 43, 36, 36, 36, 36, 36, |
189 | | 36, 36, 36, 36, 36, 36, 36, 36, |
190 | | 36, 36, 36, 36, 36, 59, 60, 61, |
191 | | 36, 43, 36, 36, 36, 36, 36, 36, |
192 | | 36, 36, 36, 36, 36, 36, 36, 36, |
193 | | 36, 36, 36, 36, 59, 60, 61, 36, |
194 | | 59, 60, 36, 60, 36, 41, 42, 43, |
195 | | 36, 36, 36, 36, 36, 36, 36, 36, |
196 | | 36, 36, 53, 54, 55, 36, 36, 36, |
197 | | 36, 36, 59, 60, 61, 63, 36, 41, |
198 | | 42, 43, 36, 36, 36, 36, 36, 36, |
199 | | 36, 36, 36, 36, 36, 54, 55, 36, |
200 | | 36, 36, 36, 36, 59, 60, 61, 63, |
201 | | 36, 41, 42, 43, 36, 36, 36, 36, |
202 | | 36, 36, 36, 36, 36, 36, 36, 36, |
203 | | 55, 36, 36, 36, 36, 36, 59, 60, |
204 | | 61, 63, 36, 64, 36, 41, 42, 43, |
205 | | 36, 36, 36, 36, 36, 36, 36, 36, |
206 | | 36, 36, 36, 36, 36, 36, 36, 36, |
207 | | 36, 36, 59, 60, 61, 63, 36, 39, |
208 | | 40, 41, 42, 43, 36, 36, 36, 36, |
209 | | 36, 36, 50, 51, 52, 36, 53, 54, |
210 | | 55, 36, 36, 36, 36, 36, 59, 60, |
211 | | 61, 63, 36, 36, 36, 36, 40, 36, |
212 | | 40, 41, 42, 43, 36, 36, 36, 36, |
213 | | 36, 36, 50, 51, 52, 36, 53, 54, |
214 | | 55, 36, 36, 36, 36, 36, 59, 60, |
215 | | 61, 63, 36, 36, 36, 36, 40, 36, |
216 | | 40, 41, 42, 43, 36, 36, 36, 36, |
217 | | 36, 36, 36, 51, 52, 36, 53, 54, |
218 | | 55, 36, 36, 36, 36, 36, 59, 60, |
219 | | 61, 63, 36, 36, 36, 36, 40, 36, |
220 | | 40, 41, 42, 43, 36, 36, 36, 36, |
221 | | 36, 36, 36, 36, 52, 36, 53, 54, |
222 | | 55, 36, 36, 36, 36, 36, 59, 60, |
223 | | 61, 63, 36, 36, 36, 36, 40, 36, |
224 | | 65, 36, 36, 36, 36, 36, 36, 36, |
225 | | 36, 36, 39, 40, 41, 42, 43, 36, |
226 | | 45, 46, 36, 36, 36, 50, 51, 52, |
227 | | 36, 53, 54, 55, 36, 36, 36, 36, |
228 | | 36, 59, 60, 61, 63, 36, 36, 36, |
229 | | 36, 40, 36, 40, 41, 42, 43, 36, |
230 | | 36, 36, 36, 36, 36, 36, 36, 36, |
231 | | 36, 53, 54, 55, 36, 36, 36, 36, |
232 | | 36, 59, 60, 61, 63, 36, 36, 36, |
233 | | 36, 40, 36, 65, 36, 36, 36, 36, |
234 | | 36, 36, 36, 36, 36, 39, 40, 41, |
235 | | 42, 43, 36, 36, 46, 36, 36, 36, |
236 | | 50, 51, 52, 36, 53, 54, 55, 36, |
237 | | 36, 36, 36, 36, 59, 60, 61, 63, |
238 | | 36, 36, 36, 36, 40, 36, 65, 36, |
239 | | 36, 36, 36, 36, 36, 36, 36, 36, |
240 | | 39, 40, 41, 42, 43, 36, 36, 36, |
241 | | 36, 36, 36, 50, 51, 52, 36, 53, |
242 | | 54, 55, 36, 36, 36, 36, 36, 59, |
243 | | 60, 61, 63, 36, 36, 36, 36, 40, |
244 | | 36, 65, 36, 36, 36, 36, 36, 36, |
245 | | 36, 36, 36, 39, 40, 41, 42, 43, |
246 | | 44, 45, 46, 36, 36, 36, 50, 51, |
247 | | 52, 36, 53, 54, 55, 36, 36, 36, |
248 | | 36, 36, 59, 60, 61, 63, 36, 36, |
249 | | 36, 36, 40, 36, 37, 38, 36, 36, |
250 | | 36, 36, 36, 36, 36, 36, 36, 39, |
251 | | 40, 41, 42, 43, 44, 45, 46, 47, |
252 | | 36, 49, 50, 51, 52, 36, 53, 54, |
253 | | 55, 36, 36, 36, 36, 58, 59, 60, |
254 | | 61, 58, 36, 36, 36, 36, 62, 36, |
255 | | 37, 36, 37, 36, 36, 36, 36, 36, |
256 | | 36, 36, 36, 36, 36, 36, 36, 36, |
257 | | 36, 36, 36, 36, 36, 36, 36, 36, |
258 | | 40, 41, 42, 43, 36, 36, 36, 36, |
259 | | 36, 36, 36, 36, 36, 36, 53, 54, |
260 | | 55, 36, 36, 36, 36, 36, 59, 60, |
261 | | 61, 63, 36, 37, 38, 36, 36, 36, |
262 | | 36, 36, 36, 36, 36, 36, 39, 40, |
263 | | 41, 42, 43, 44, 45, 46, 47, 48, |
264 | | 49, 50, 51, 52, 36, 53, 54, 55, |
265 | | 36, 36, 36, 36, 58, 59, 60, 61, |
266 | | 58, 36, 36, 36, 36, 62, 36, 56, |
267 | | 57, 36, 57, 36, 67, 68, 66, 66, |
268 | | 66, 66, 66, 66, 66, 66, 66, 69, |
269 | | 70, 71, 72, 73, 74, 75, 76, 77, |
270 | | 1, 78, 79, 80, 81, 66, 82, 83, |
271 | | 84, 66, 66, 66, 66, 85, 86, 87, |
272 | | 88, 89, 66, 66, 66, 66, 90, 66, |
273 | | 67, 68, 66, 66, 66, 66, 66, 66, |
274 | | 66, 66, 66, 69, 70, 71, 72, 73, |
275 | | 74, 75, 76, 77, 78, 78, 79, 80, |
276 | | 81, 66, 82, 83, 84, 66, 66, 66, |
277 | | 66, 85, 86, 87, 88, 89, 66, 66, |
278 | | 66, 66, 90, 66, 67, 66, 66, 66, |
279 | | 66, 66, 66, 66, 66, 66, 66, 66, |
280 | | 66, 66, 66, 66, 66, 66, 66, 66, |
281 | | 66, 66, 70, 71, 72, 73, 66, 66, |
282 | | 66, 66, 66, 66, 66, 66, 66, 66, |
283 | | 82, 83, 84, 66, 66, 66, 66, 66, |
284 | | 86, 87, 88, 91, 66, 66, 66, 66, |
285 | | 70, 66, 70, 71, 72, 73, 66, 66, |
286 | | 66, 66, 66, 66, 66, 66, 66, 66, |
287 | | 82, 83, 84, 66, 66, 66, 66, 66, |
288 | | 86, 87, 88, 91, 66, 71, 72, 73, |
289 | | 66, 66, 66, 66, 66, 66, 66, 66, |
290 | | 66, 66, 66, 66, 66, 66, 66, 66, |
291 | | 66, 66, 86, 87, 88, 66, 72, 73, |
292 | | 66, 66, 66, 66, 66, 66, 66, 66, |
293 | | 66, 66, 66, 66, 66, 66, 66, 66, |
294 | | 66, 66, 86, 87, 88, 66, 73, 66, |
295 | | 66, 66, 66, 66, 66, 66, 66, 66, |
296 | | 66, 66, 66, 66, 66, 66, 66, 66, |
297 | | 66, 86, 87, 88, 66, 86, 87, 66, |
298 | | 87, 66, 71, 72, 73, 66, 66, 66, |
299 | | 66, 66, 66, 66, 66, 66, 66, 82, |
300 | | 83, 84, 66, 66, 66, 66, 66, 86, |
301 | | 87, 88, 91, 66, 71, 72, 73, 66, |
302 | | 66, 66, 66, 66, 66, 66, 66, 66, |
303 | | 66, 66, 83, 84, 66, 66, 66, 66, |
304 | | 66, 86, 87, 88, 91, 66, 71, 72, |
305 | | 73, 66, 66, 66, 66, 66, 66, 66, |
306 | | 66, 66, 66, 66, 66, 84, 66, 66, |
307 | | 66, 66, 66, 86, 87, 88, 91, 66, |
308 | | 93, 92, 71, 72, 73, 66, 66, 66, |
309 | | 66, 66, 66, 66, 66, 66, 66, 66, |
310 | | 66, 66, 66, 66, 66, 66, 66, 86, |
311 | | 87, 88, 91, 66, 69, 70, 71, 72, |
312 | | 73, 66, 66, 66, 66, 66, 66, 79, |
313 | | 80, 81, 66, 82, 83, 84, 66, 66, |
314 | | 66, 66, 66, 86, 87, 88, 91, 66, |
315 | | 66, 66, 66, 70, 66, 70, 71, 72, |
316 | | 73, 66, 66, 66, 66, 66, 66, 79, |
317 | | 80, 81, 66, 82, 83, 84, 66, 66, |
318 | | 66, 66, 66, 86, 87, 88, 91, 66, |
319 | | 66, 66, 66, 70, 66, 70, 71, 72, |
320 | | 73, 66, 66, 66, 66, 66, 66, 66, |
321 | | 80, 81, 66, 82, 83, 84, 66, 66, |
322 | | 66, 66, 66, 86, 87, 88, 91, 66, |
323 | | 66, 66, 66, 70, 66, 70, 71, 72, |
324 | | 73, 66, 66, 66, 66, 66, 66, 66, |
325 | | 66, 81, 66, 82, 83, 84, 66, 66, |
326 | | 66, 66, 66, 86, 87, 88, 91, 66, |
327 | | 66, 66, 66, 70, 66, 94, 66, 66, |
328 | | 66, 66, 66, 66, 66, 66, 66, 69, |
329 | | 70, 71, 72, 73, 66, 75, 76, 66, |
330 | | 66, 66, 79, 80, 81, 66, 82, 83, |
331 | | 84, 66, 66, 66, 66, 66, 86, 87, |
332 | | 88, 91, 66, 66, 66, 66, 70, 66, |
333 | | 70, 71, 72, 73, 66, 66, 66, 66, |
334 | | 66, 66, 66, 66, 66, 66, 82, 83, |
335 | | 84, 66, 66, 66, 66, 66, 86, 87, |
336 | | 88, 91, 66, 66, 66, 66, 70, 66, |
337 | | 94, 66, 66, 66, 66, 66, 66, 66, |
338 | | 66, 66, 69, 70, 71, 72, 73, 66, |
339 | | 66, 76, 66, 66, 66, 79, 80, 81, |
340 | | 66, 82, 83, 84, 66, 66, 66, 66, |
341 | | 66, 86, 87, 88, 91, 66, 66, 66, |
342 | | 66, 70, 66, 94, 66, 66, 66, 66, |
343 | | 66, 66, 66, 66, 66, 69, 70, 71, |
344 | | 72, 73, 66, 66, 66, 66, 66, 66, |
345 | | 79, 80, 81, 66, 82, 83, 84, 66, |
346 | | 66, 66, 66, 66, 86, 87, 88, 91, |
347 | | 66, 66, 66, 66, 70, 66, 94, 66, |
348 | | 66, 66, 66, 66, 66, 66, 66, 66, |
349 | | 69, 70, 71, 72, 73, 74, 75, 76, |
350 | | 66, 66, 66, 79, 80, 81, 66, 82, |
351 | | 83, 84, 66, 66, 66, 66, 66, 86, |
352 | | 87, 88, 91, 66, 66, 66, 66, 70, |
353 | | 66, 67, 68, 66, 66, 66, 66, 66, |
354 | | 66, 66, 66, 66, 69, 70, 71, 72, |
355 | | 73, 74, 75, 76, 77, 66, 78, 79, |
356 | | 80, 81, 66, 82, 83, 84, 66, 66, |
357 | | 66, 66, 85, 86, 87, 88, 89, 66, |
358 | | 66, 66, 66, 90, 66, 67, 95, 67, |
359 | | 66, 66, 66, 66, 66, 66, 66, 66, |
360 | | 66, 66, 66, 66, 66, 66, 66, 66, |
361 | | 66, 66, 66, 66, 66, 70, 71, 72, |
362 | | 73, 66, 66, 66, 66, 66, 66, 66, |
363 | | 66, 66, 66, 82, 83, 84, 66, 66, |
364 | | 66, 66, 66, 86, 87, 88, 91, 66, |
365 | | 97, 96, 3, 98, 99, 100, 66, 66, |
366 | | 66, 66, 66, 66, 66, 66, 66, 101, |
367 | | 102, 103, 104, 105, 106, 107, 108, 109, |
368 | | 110, 111, 112, 113, 114, 66, 115, 116, |
369 | | 117, 66, 56, 57, 66, 118, 119, 120, |
370 | | 88, 121, 66, 66, 66, 66, 122, 66, |
371 | | 99, 100, 66, 66, 66, 66, 66, 66, |
372 | | 66, 66, 66, 101, 102, 103, 104, 105, |
373 | | 106, 107, 108, 109, 111, 111, 112, 113, |
374 | | 114, 66, 115, 116, 117, 66, 66, 66, |
375 | | 66, 118, 119, 120, 88, 121, 66, 66, |
376 | | 66, 66, 122, 66, 99, 66, 66, 66, |
377 | | 66, 66, 66, 66, 66, 66, 66, 66, |
378 | | 66, 66, 66, 66, 66, 66, 66, 66, |
379 | | 66, 66, 102, 103, 104, 105, 66, 66, |
380 | | 66, 66, 66, 66, 66, 66, 66, 66, |
381 | | 115, 116, 117, 66, 66, 66, 66, 66, |
382 | | 119, 120, 88, 123, 66, 66, 66, 66, |
383 | | 102, 66, 102, 103, 104, 105, 66, 66, |
384 | | 66, 66, 66, 66, 66, 66, 66, 66, |
385 | | 115, 116, 117, 66, 66, 66, 66, 66, |
386 | | 119, 120, 88, 123, 66, 103, 104, 105, |
387 | | 66, 66, 66, 66, 66, 66, 66, 66, |
388 | | 66, 66, 66, 66, 66, 66, 66, 66, |
389 | | 66, 66, 119, 120, 88, 66, 104, 105, |
390 | | 66, 66, 66, 66, 66, 66, 66, 66, |
391 | | 66, 66, 66, 66, 66, 66, 66, 66, |
392 | | 66, 66, 119, 120, 88, 66, 105, 66, |
393 | | 66, 66, 66, 66, 66, 66, 66, 66, |
394 | | 66, 66, 66, 66, 66, 66, 66, 66, |
395 | | 66, 119, 120, 88, 66, 119, 120, 66, |
396 | | 120, 66, 103, 104, 105, 66, 66, 66, |
397 | | 66, 66, 66, 66, 66, 66, 66, 115, |
398 | | 116, 117, 66, 66, 66, 66, 66, 119, |
399 | | 120, 88, 123, 66, 103, 104, 105, 66, |
400 | | 66, 66, 66, 66, 66, 66, 66, 66, |
401 | | 66, 66, 116, 117, 66, 66, 66, 66, |
402 | | 66, 119, 120, 88, 123, 66, 103, 104, |
403 | | 105, 66, 66, 66, 66, 66, 66, 66, |
404 | | 66, 66, 66, 66, 66, 117, 66, 66, |
405 | | 66, 66, 66, 119, 120, 88, 123, 66, |
406 | | 124, 92, 103, 104, 105, 66, 66, 66, |
407 | | 66, 66, 66, 66, 66, 66, 66, 66, |
408 | | 66, 66, 66, 66, 66, 66, 66, 119, |
409 | | 120, 88, 123, 66, 101, 102, 103, 104, |
410 | | 105, 66, 66, 66, 66, 66, 66, 112, |
411 | | 113, 114, 66, 115, 116, 117, 66, 66, |
412 | | 66, 66, 66, 119, 120, 88, 123, 66, |
413 | | 66, 66, 66, 102, 66, 102, 103, 104, |
414 | | 105, 66, 66, 66, 66, 66, 66, 112, |
415 | | 113, 114, 66, 115, 116, 117, 66, 66, |
416 | | 66, 66, 66, 119, 120, 88, 123, 66, |
417 | | 66, 66, 66, 102, 66, 102, 103, 104, |
418 | | 105, 66, 66, 66, 66, 66, 66, 66, |
419 | | 113, 114, 66, 115, 116, 117, 66, 66, |
420 | | 66, 66, 66, 119, 120, 88, 123, 66, |
421 | | 66, 66, 66, 102, 66, 102, 103, 104, |
422 | | 105, 66, 66, 66, 66, 66, 66, 66, |
423 | | 66, 114, 66, 115, 116, 117, 66, 66, |
424 | | 66, 66, 66, 119, 120, 88, 123, 66, |
425 | | 66, 66, 66, 102, 66, 125, 66, 66, |
426 | | 66, 66, 66, 66, 66, 66, 66, 101, |
427 | | 102, 103, 104, 105, 66, 107, 108, 66, |
428 | | 66, 66, 112, 113, 114, 66, 115, 116, |
429 | | 117, 66, 66, 66, 66, 66, 119, 120, |
430 | | 88, 123, 66, 66, 66, 66, 102, 66, |
431 | | 102, 103, 104, 105, 66, 66, 66, 66, |
432 | | 66, 66, 66, 66, 66, 66, 115, 116, |
433 | | 117, 66, 66, 66, 66, 66, 119, 120, |
434 | | 88, 123, 66, 66, 66, 66, 102, 66, |
435 | | 125, 66, 66, 66, 66, 66, 66, 66, |
436 | | 66, 66, 101, 102, 103, 104, 105, 66, |
437 | | 66, 108, 66, 66, 66, 112, 113, 114, |
438 | | 66, 115, 116, 117, 66, 66, 66, 66, |
439 | | 66, 119, 120, 88, 123, 66, 66, 66, |
440 | | 66, 102, 66, 125, 66, 66, 66, 66, |
441 | | 66, 66, 66, 66, 66, 101, 102, 103, |
442 | | 104, 105, 66, 66, 66, 66, 66, 66, |
443 | | 112, 113, 114, 66, 115, 116, 117, 66, |
444 | | 66, 66, 66, 66, 119, 120, 88, 123, |
445 | | 66, 66, 66, 66, 102, 66, 125, 66, |
446 | | 66, 66, 66, 66, 66, 66, 66, 66, |
447 | | 101, 102, 103, 104, 105, 106, 107, 108, |
448 | | 66, 66, 66, 112, 113, 114, 66, 115, |
449 | | 116, 117, 66, 66, 66, 66, 66, 119, |
450 | | 120, 88, 123, 66, 66, 66, 66, 102, |
451 | | 66, 99, 100, 66, 66, 66, 66, 66, |
452 | | 66, 66, 66, 66, 101, 102, 103, 104, |
453 | | 105, 106, 107, 108, 109, 66, 111, 112, |
454 | | 113, 114, 66, 115, 116, 117, 66, 66, |
455 | | 66, 66, 118, 119, 120, 88, 121, 66, |
456 | | 66, 66, 66, 122, 66, 99, 95, 99, |
457 | | 66, 66, 66, 66, 66, 66, 66, 66, |
458 | | 66, 66, 66, 66, 66, 66, 66, 66, |
459 | | 66, 66, 66, 66, 66, 102, 103, 104, |
460 | | 105, 66, 66, 66, 66, 66, 66, 66, |
461 | | 66, 66, 66, 115, 116, 117, 66, 66, |
462 | | 66, 66, 66, 119, 120, 88, 123, 66, |
463 | | 99, 100, 66, 66, 66, 66, 66, 66, |
464 | | 66, 66, 66, 101, 102, 103, 104, 105, |
465 | | 106, 107, 108, 109, 110, 111, 112, 113, |
466 | | 114, 66, 115, 116, 117, 66, 66, 66, |
467 | | 66, 118, 119, 120, 88, 121, 66, 66, |
468 | | 66, 66, 122, 66, 5, 6, 126, 126, |
469 | | 126, 126, 126, 126, 126, 126, 126, 9, |
470 | | 10, 11, 12, 13, 14, 15, 16, 17, |
471 | | 19, 19, 20, 21, 22, 126, 23, 24, |
472 | | 25, 126, 126, 126, 126, 29, 30, 31, |
473 | | 32, 29, 126, 126, 126, 126, 35, 126, |
474 | | 5, 126, 126, 126, 126, 126, 126, 126, |
475 | | 126, 126, 126, 126, 126, 126, 126, 126, |
476 | | 126, 126, 126, 126, 126, 126, 10, 11, |
477 | | 12, 13, 126, 126, 126, 126, 126, 126, |
478 | | 126, 126, 126, 126, 23, 24, 25, 126, |
479 | | 126, 126, 126, 126, 30, 31, 32, 127, |
480 | | 126, 126, 126, 126, 10, 126, 10, 11, |
481 | | 12, 13, 126, 126, 126, 126, 126, 126, |
482 | | 126, 126, 126, 126, 23, 24, 25, 126, |
483 | | 126, 126, 126, 126, 30, 31, 32, 127, |
484 | | 126, 11, 12, 13, 126, 126, 126, 126, |
485 | | 126, 126, 126, 126, 126, 126, 126, 126, |
486 | | 126, 126, 126, 126, 126, 126, 30, 31, |
487 | | 32, 126, 12, 13, 126, 126, 126, 126, |
488 | | 126, 126, 126, 126, 126, 126, 126, 126, |
489 | | 126, 126, 126, 126, 126, 126, 30, 31, |
490 | | 32, 126, 13, 126, 126, 126, 126, 126, |
491 | | 126, 126, 126, 126, 126, 126, 126, 126, |
492 | | 126, 126, 126, 126, 126, 30, 31, 32, |
493 | | 126, 30, 31, 126, 31, 126, 11, 12, |
494 | | 13, 126, 126, 126, 126, 126, 126, 126, |
495 | | 126, 126, 126, 23, 24, 25, 126, 126, |
496 | | 126, 126, 126, 30, 31, 32, 127, 126, |
497 | | 11, 12, 13, 126, 126, 126, 126, 126, |
498 | | 126, 126, 126, 126, 126, 126, 24, 25, |
499 | | 126, 126, 126, 126, 126, 30, 31, 32, |
500 | | 127, 126, 11, 12, 13, 126, 126, 126, |
501 | | 126, 126, 126, 126, 126, 126, 126, 126, |
502 | | 126, 25, 126, 126, 126, 126, 126, 30, |
503 | | 31, 32, 127, 126, 128, 126, 11, 12, |
504 | | 13, 126, 126, 126, 126, 126, 126, 126, |
505 | | 126, 126, 126, 126, 126, 126, 126, 126, |
506 | | 126, 126, 126, 30, 31, 32, 127, 126, |
507 | | 9, 10, 11, 12, 13, 126, 126, 126, |
508 | | 126, 126, 126, 20, 21, 22, 126, 23, |
509 | | 24, 25, 126, 126, 126, 126, 126, 30, |
510 | | 31, 32, 127, 126, 126, 126, 126, 10, |
511 | | 126, 10, 11, 12, 13, 126, 126, 126, |
512 | | 126, 126, 126, 20, 21, 22, 126, 23, |
513 | | 24, 25, 126, 126, 126, 126, 126, 30, |
514 | | 31, 32, 127, 126, 126, 126, 126, 10, |
515 | | 126, 10, 11, 12, 13, 126, 126, 126, |
516 | | 126, 126, 126, 126, 21, 22, 126, 23, |
517 | | 24, 25, 126, 126, 126, 126, 126, 30, |
518 | | 31, 32, 127, 126, 126, 126, 126, 10, |
519 | | 126, 10, 11, 12, 13, 126, 126, 126, |
520 | | 126, 126, 126, 126, 126, 22, 126, 23, |
521 | | 24, 25, 126, 126, 126, 126, 126, 30, |
522 | | 31, 32, 127, 126, 126, 126, 126, 10, |
523 | | 126, 129, 126, 126, 126, 126, 126, 126, |
524 | | 126, 126, 126, 9, 10, 11, 12, 13, |
525 | | 126, 15, 16, 126, 126, 126, 20, 21, |
526 | | 22, 126, 23, 24, 25, 126, 126, 126, |
527 | | 126, 126, 30, 31, 32, 127, 126, 126, |
528 | | 126, 126, 10, 126, 10, 11, 12, 13, |
529 | | 126, 126, 126, 126, 126, 126, 126, 126, |
530 | | 126, 126, 23, 24, 25, 126, 126, 126, |
531 | | 126, 126, 30, 31, 32, 127, 126, 126, |
532 | | 126, 126, 10, 126, 129, 126, 126, 126, |
533 | | 126, 126, 126, 126, 126, 126, 9, 10, |
534 | | 11, 12, 13, 126, 126, 16, 126, 126, |
535 | | 126, 20, 21, 22, 126, 23, 24, 25, |
536 | | 126, 126, 126, 126, 126, 30, 31, 32, |
537 | | 127, 126, 126, 126, 126, 10, 126, 129, |
538 | | 126, 126, 126, 126, 126, 126, 126, 126, |
539 | | 126, 9, 10, 11, 12, 13, 126, 126, |
540 | | 126, 126, 126, 126, 20, 21, 22, 126, |
541 | | 23, 24, 25, 126, 126, 126, 126, 126, |
542 | | 30, 31, 32, 127, 126, 126, 126, 126, |
543 | | 10, 126, 129, 126, 126, 126, 126, 126, |
544 | | 126, 126, 126, 126, 9, 10, 11, 12, |
545 | | 13, 14, 15, 16, 126, 126, 126, 20, |
546 | | 21, 22, 126, 23, 24, 25, 126, 126, |
547 | | 126, 126, 126, 30, 31, 32, 127, 126, |
548 | | 126, 126, 126, 10, 126, 5, 6, 126, |
549 | | 126, 126, 126, 126, 126, 126, 126, 126, |
550 | | 9, 10, 11, 12, 13, 14, 15, 16, |
551 | | 17, 126, 19, 20, 21, 22, 126, 23, |
552 | | 24, 25, 126, 126, 126, 126, 29, 30, |
553 | | 31, 32, 29, 126, 126, 126, 126, 35, |
554 | | 126, 5, 126, 5, 126, 126, 126, 126, |
555 | | 126, 126, 126, 126, 126, 126, 126, 126, |
556 | | 126, 126, 126, 126, 126, 126, 126, 126, |
557 | | 126, 10, 11, 12, 13, 126, 126, 126, |
558 | | 126, 126, 126, 126, 126, 126, 126, 23, |
559 | | 24, 25, 126, 126, 126, 126, 126, 30, |
560 | | 31, 32, 127, 126, 130, 126, 7, 126, |
561 | | 1, 126, 126, 126, 1, 126, 126, 126, |
562 | | 126, 126, 5, 6, 7, 126, 126, 126, |
563 | | 126, 126, 126, 126, 126, 9, 10, 11, |
564 | | 12, 13, 14, 15, 16, 17, 18, 19, |
565 | | 20, 21, 22, 126, 23, 24, 25, 126, |
566 | | 26, 27, 126, 29, 30, 31, 32, 29, |
567 | | 126, 126, 126, 126, 35, 126, 5, 6, |
568 | | 126, 126, 126, 126, 126, 126, 126, 126, |
569 | | 126, 9, 10, 11, 12, 13, 14, 15, |
570 | | 16, 17, 18, 19, 20, 21, 22, 126, |
571 | | 23, 24, 25, 126, 126, 126, 126, 29, |
572 | | 30, 31, 32, 29, 126, 126, 126, 126, |
573 | | 35, 126, 26, 27, 126, 27, 126, 1, |
574 | | 131, 131, 131, 1, 131, 133, 132, 33, |
575 | | 132, 33, 133, 132, 133, 132, 33, 132, |
576 | | 34, 132, 0 |
577 | | }; |
578 | | |
579 | | static const char _use_syllable_machine_trans_targs[] = { |
580 | | 1, 30, 0, 56, 58, 85, 86, 110, |
581 | | 112, 98, 87, 88, 89, 90, 102, 104, |
582 | | 105, 106, 113, 107, 99, 100, 101, 93, |
583 | | 94, 95, 114, 115, 116, 108, 91, 92, |
584 | | 0, 117, 119, 109, 0, 2, 3, 15, |
585 | | 4, 5, 6, 7, 19, 21, 22, 23, |
586 | | 27, 24, 16, 17, 18, 10, 11, 12, |
587 | | 28, 29, 25, 8, 9, 0, 26, 13, |
588 | | 14, 20, 0, 31, 32, 44, 33, 34, |
589 | | 35, 36, 48, 50, 51, 52, 53, 45, |
590 | | 46, 47, 39, 40, 41, 54, 37, 38, |
591 | | 0, 54, 55, 42, 0, 43, 49, 0, |
592 | | 0, 57, 0, 59, 60, 72, 61, 62, |
593 | | 63, 64, 76, 78, 79, 80, 84, 81, |
594 | | 73, 74, 75, 67, 68, 69, 82, 65, |
595 | | 66, 82, 83, 70, 71, 77, 0, 96, |
596 | | 97, 103, 111, 0, 0, 118 |
597 | | }; |
598 | | |
599 | | static const char _use_syllable_machine_trans_actions[] = { |
600 | | 0, 0, 3, 0, 0, 0, 0, 0, |
601 | | 0, 0, 0, 0, 0, 0, 0, 0, |
602 | | 0, 0, 0, 0, 0, 0, 0, 0, |
603 | | 0, 0, 0, 0, 0, 0, 0, 0, |
604 | | 4, 0, 0, 0, 5, 0, 0, 0, |
605 | | 0, 0, 0, 0, 0, 0, 0, 0, |
606 | | 0, 0, 0, 0, 0, 0, 0, 0, |
607 | | 0, 0, 0, 0, 0, 6, 0, 0, |
608 | | 0, 0, 7, 0, 0, 0, 0, 0, |
609 | | 0, 0, 0, 0, 0, 0, 0, 0, |
610 | | 0, 0, 0, 0, 0, 8, 0, 0, |
611 | | 9, 10, 0, 0, 11, 0, 0, 12, |
612 | | 13, 0, 14, 0, 0, 0, 0, 0, |
613 | | 0, 0, 0, 0, 0, 0, 0, 0, |
614 | | 0, 0, 0, 0, 0, 0, 8, 0, |
615 | | 0, 10, 0, 0, 0, 0, 15, 0, |
616 | | 0, 0, 0, 16, 17, 0 |
617 | | }; |
618 | | |
619 | | static const char _use_syllable_machine_to_state_actions[] = { |
620 | | 1, 0, 0, 0, 0, 0, 0, 0, |
621 | | 0, 0, 0, 0, 0, 0, 0, 0, |
622 | | 0, 0, 0, 0, 0, 0, 0, 0, |
623 | | 0, 0, 0, 0, 0, 0, 0, 0, |
624 | | 0, 0, 0, 0, 0, 0, 0, 0, |
625 | | 0, 0, 0, 0, 0, 0, 0, 0, |
626 | | 0, 0, 0, 0, 0, 0, 0, 0, |
627 | | 0, 0, 0, 0, 0, 0, 0, 0, |
628 | | 0, 0, 0, 0, 0, 0, 0, 0, |
629 | | 0, 0, 0, 0, 0, 0, 0, 0, |
630 | | 0, 0, 0, 0, 0, 0, 0, 0, |
631 | | 0, 0, 0, 0, 0, 0, 0, 0, |
632 | | 0, 0, 0, 0, 0, 0, 0, 0, |
633 | | 0, 0, 0, 0, 0, 0, 0, 0, |
634 | | 0, 0, 0, 0, 0, 0, 0, 0 |
635 | | }; |
636 | | |
637 | | static const char _use_syllable_machine_from_state_actions[] = { |
638 | | 2, 0, 0, 0, 0, 0, 0, 0, |
639 | | 0, 0, 0, 0, 0, 0, 0, 0, |
640 | | 0, 0, 0, 0, 0, 0, 0, 0, |
641 | | 0, 0, 0, 0, 0, 0, 0, 0, |
642 | | 0, 0, 0, 0, 0, 0, 0, 0, |
643 | | 0, 0, 0, 0, 0, 0, 0, 0, |
644 | | 0, 0, 0, 0, 0, 0, 0, 0, |
645 | | 0, 0, 0, 0, 0, 0, 0, 0, |
646 | | 0, 0, 0, 0, 0, 0, 0, 0, |
647 | | 0, 0, 0, 0, 0, 0, 0, 0, |
648 | | 0, 0, 0, 0, 0, 0, 0, 0, |
649 | | 0, 0, 0, 0, 0, 0, 0, 0, |
650 | | 0, 0, 0, 0, 0, 0, 0, 0, |
651 | | 0, 0, 0, 0, 0, 0, 0, 0, |
652 | | 0, 0, 0, 0, 0, 0, 0, 0 |
653 | | }; |
654 | | |
655 | | static const short _use_syllable_machine_eof_trans[] = { |
656 | | 0, 37, 37, 37, 37, 37, 37, 37, |
657 | | 37, 37, 37, 37, 37, 37, 37, 37, |
658 | | 37, 37, 37, 37, 37, 37, 37, 37, |
659 | | 37, 37, 37, 37, 37, 37, 67, 67, |
660 | | 67, 67, 67, 67, 67, 67, 67, 67, |
661 | | 67, 67, 93, 67, 67, 67, 67, 67, |
662 | | 67, 67, 67, 67, 67, 67, 96, 67, |
663 | | 97, 99, 67, 67, 67, 67, 67, 67, |
664 | | 67, 67, 67, 67, 67, 67, 93, 67, |
665 | | 67, 67, 67, 67, 67, 67, 67, 67, |
666 | | 67, 67, 96, 67, 67, 127, 127, 127, |
667 | | 127, 127, 127, 127, 127, 127, 127, 127, |
668 | | 127, 127, 127, 127, 127, 127, 127, 127, |
669 | | 127, 127, 127, 127, 127, 127, 127, 127, |
670 | | 127, 127, 127, 127, 132, 133, 133, 133 |
671 | | }; |
672 | | |
673 | | static const int use_syllable_machine_start = 0; |
674 | | static const int use_syllable_machine_first_final = 0; |
675 | | static const int use_syllable_machine_error = -1; |
676 | | |
677 | | static const int use_syllable_machine_en_main = 0; |
678 | | |
679 | | |
680 | | #line 58 "hb-ot-shaper-use-machine.rl" |
681 | | |
682 | | |
683 | | |
684 | | #line 182 "hb-ot-shaper-use-machine.rl" |
685 | | |
686 | | |
687 | | #define found_syllable(syllable_type) \ |
688 | 3.41M | HB_STMT_START { \ |
689 | 3.41M | if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ |
690 | 7.00M | for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \ |
691 | 3.59M | info[i].syllable() = (syllable_serial << 4) | syllable_type; \ |
692 | 3.41M | syllable_serial++; \ |
693 | 3.41M | if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ |
694 | 3.41M | } HB_STMT_END |
695 | | |
696 | | |
697 | | template <typename Iter> |
698 | | struct machine_index_t : |
699 | | hb_iter_with_fallback_t<machine_index_t<Iter>, |
700 | | typename Iter::item_t> |
701 | | { |
702 | 46.8k | machine_index_t (const Iter& it) : it (it) {} |
703 | | machine_index_t (const machine_index_t& o) : hb_iter_with_fallback_t<machine_index_t<Iter>, |
704 | | typename Iter::item_t> (), |
705 | 3.59M | it (o.it), is_null (o.is_null) {} |
706 | | |
707 | | static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator; |
708 | | static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator; |
709 | | |
710 | 24.3M | typename Iter::item_t __item__ () const { return *it; } |
711 | | typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; } |
712 | 46.8k | unsigned __len__ () const { return it.len (); } |
713 | 6.78M | void __next__ () { ++it; } |
714 | 133k | void __forward__ (unsigned n) { it += n; } |
715 | 3.32M | void __prev__ () { --it; } |
716 | 312 | void __rewind__ (unsigned n) { it -= n; } |
717 | | |
718 | | void operator = (unsigned n) |
719 | 3.50M | { |
720 | 3.50M | assert (n == 0); |
721 | 0 | is_null = true; |
722 | 3.50M | } |
723 | | explicit operator bool () { return !is_null; } |
724 | | |
725 | | void operator = (const machine_index_t& o) |
726 | 6.82M | { |
727 | 6.82M | is_null = o.is_null; |
728 | 6.82M | unsigned index = (*it).first; |
729 | 6.82M | unsigned n = (*o.it).first; |
730 | 6.82M | if (index < n) it += n - index; else if (index > n) it -= index - n; |
731 | 6.82M | } |
732 | | bool operator == (const machine_index_t& o) const |
733 | 6.92M | { return is_null ? o.is_null : !o.is_null && (*it).first == (*o.it).first; } |
734 | 6.78M | bool operator != (const machine_index_t& o) const { return !(*this == o); } |
735 | | |
736 | | private: |
737 | | Iter it; |
738 | | bool is_null = false; |
739 | | }; |
740 | | struct |
741 | | { |
742 | | template <typename Iter, |
743 | | hb_requires (hb_is_iterable (Iter))> |
744 | | machine_index_t<hb_iter_type<Iter>> |
745 | | operator () (Iter&& it) const |
746 | 46.8k | { return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); } |
747 | | } |
748 | | HB_FUNCOBJ (machine_index); |
749 | | |
750 | | |
751 | | |
752 | | static bool |
753 | | not_ccs_default_ignorable (const hb_glyph_info_t &i) |
754 | 24.7M | { return i.use_category() != USE(CGJ); } |
755 | | |
756 | | static inline void |
757 | | find_syllables_use (hb_buffer_t *buffer) |
758 | 46.8k | { |
759 | 46.8k | hb_glyph_info_t *info = buffer->info; |
760 | 46.8k | auto p = |
761 | 46.8k | + hb_iter (info, buffer->len) |
762 | 46.8k | | hb_enumerate |
763 | 24.6M | | hb_filter ([] (const hb_glyph_info_t &i) { return not_ccs_default_ignorable (i); }, |
764 | 46.8k | hb_second) |
765 | 46.8k | | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p) |
766 | 23.8M | { |
767 | 23.8M | if (p.second.use_category() == USE(ZWNJ)) |
768 | 34.8k | for (unsigned i = p.first + 1; i < buffer->len; ++i) |
769 | 34.4k | if (not_ccs_default_ignorable (info[i])) |
770 | 33.5k | return !_hb_glyph_info_is_unicode_mark (&info[i]); |
771 | 23.7M | return true; |
772 | 23.8M | }) |
773 | 46.8k | | hb_enumerate |
774 | 46.8k | | machine_index |
775 | 46.8k | ; |
776 | 46.8k | auto pe = p + p.len (); |
777 | 46.8k | auto eof = +pe; |
778 | 46.8k | auto ts = +p; |
779 | 46.8k | auto te = +p; |
780 | 46.8k | unsigned int act HB_UNUSED; |
781 | 46.8k | int cs; |
782 | | |
783 | 46.8k | #line 773 "hb-ot-shaper-use-machine.hh" |
784 | 46.8k | { |
785 | 46.8k | cs = use_syllable_machine_start; |
786 | 46.8k | ts = 0; |
787 | 46.8k | te = 0; |
788 | 46.8k | act = 0; |
789 | 46.8k | } |
790 | | |
791 | 46.8k | #line 282 "hb-ot-shaper-use-machine.rl" |
792 | | |
793 | | |
794 | 46.8k | unsigned int syllable_serial = 1; |
795 | | |
796 | 46.8k | #line 782 "hb-ot-shaper-use-machine.hh" |
797 | 46.8k | { |
798 | 46.8k | int _slen; |
799 | 46.8k | int _trans; |
800 | 46.8k | const unsigned char *_keys; |
801 | 46.8k | const unsigned char *_inds; |
802 | 46.8k | if ( p == pe ) |
803 | 21 | goto _test_eof; |
804 | 6.73M | _resume: |
805 | 6.73M | switch ( _use_syllable_machine_from_state_actions[cs] ) { |
806 | 3.41M | case 2: |
807 | 3.41M | #line 1 "NONE" |
808 | 3.41M | {ts = p;} |
809 | 3.41M | break; |
810 | 6.73M | #line 794 "hb-ot-shaper-use-machine.hh" |
811 | 6.73M | } |
812 | | |
813 | 6.73M | _keys = _use_syllable_machine_trans_keys + (cs<<1); |
814 | 6.73M | _inds = _use_syllable_machine_indicies + _use_syllable_machine_index_offsets[cs]; |
815 | | |
816 | 6.73M | _slen = _use_syllable_machine_key_spans[cs]; |
817 | 6.73M | _trans = _inds[ _slen > 0 && _keys[0] <=( (*p).second.second.use_category()) && |
818 | 6.73M | ( (*p).second.second.use_category()) <= _keys[1] ? |
819 | 3.47M | ( (*p).second.second.use_category()) - _keys[0] : _slen ]; |
820 | | |
821 | 6.78M | _eof_trans: |
822 | 6.78M | cs = _use_syllable_machine_trans_targs[_trans]; |
823 | | |
824 | 6.78M | if ( _use_syllable_machine_trans_actions[_trans] == 0 ) |
825 | 3.37M | goto _again; |
826 | | |
827 | 3.41M | switch ( _use_syllable_machine_trans_actions[_trans] ) { |
828 | 260 | case 9: |
829 | 260 | #line 172 "hb-ot-shaper-use-machine.rl" |
830 | 260 | {te = p+1;{ found_syllable (use_standard_cluster); }} |
831 | 260 | break; |
832 | 360 | case 6: |
833 | 360 | #line 175 "hb-ot-shaper-use-machine.rl" |
834 | 360 | {te = p+1;{ found_syllable (use_symbol_cluster); }} |
835 | 360 | break; |
836 | 70.0k | case 4: |
837 | 70.0k | #line 177 "hb-ot-shaper-use-machine.rl" |
838 | 70.0k | {te = p+1;{ found_syllable (use_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} |
839 | 70.0k | break; |
840 | 15.8k | case 3: |
841 | 15.8k | #line 178 "hb-ot-shaper-use-machine.rl" |
842 | 15.8k | {te = p+1;{ found_syllable (use_non_cluster); }} |
843 | 15.8k | break; |
844 | 6 | case 11: |
845 | 6 | #line 171 "hb-ot-shaper-use-machine.rl" |
846 | 6 | {te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }} |
847 | 6 | break; |
848 | 188k | case 7: |
849 | 188k | #line 172 "hb-ot-shaper-use-machine.rl" |
850 | 188k | {te = p;p--;{ found_syllable (use_standard_cluster); }} |
851 | 188k | break; |
852 | 2 | case 14: |
853 | 2 | #line 173 "hb-ot-shaper-use-machine.rl" |
854 | 2 | {te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }} |
855 | 2 | break; |
856 | 3.61k | case 13: |
857 | 3.61k | #line 174 "hb-ot-shaper-use-machine.rl" |
858 | 3.61k | {te = p;p--;{ found_syllable (use_numeral_cluster); }} |
859 | 3.61k | break; |
860 | 2.84M | case 5: |
861 | 2.84M | #line 175 "hb-ot-shaper-use-machine.rl" |
862 | 2.84M | {te = p;p--;{ found_syllable (use_symbol_cluster); }} |
863 | 2.84M | break; |
864 | 0 | case 17: |
865 | 0 | #line 176 "hb-ot-shaper-use-machine.rl" |
866 | 0 | {te = p;p--;{ found_syllable (use_hieroglyph_cluster); }} |
867 | 0 | break; |
868 | 27.6k | case 15: |
869 | 27.6k | #line 177 "hb-ot-shaper-use-machine.rl" |
870 | 27.6k | {te = p;p--;{ found_syllable (use_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} |
871 | 27.6k | break; |
872 | 259k | case 16: |
873 | 259k | #line 178 "hb-ot-shaper-use-machine.rl" |
874 | 259k | {te = p;p--;{ found_syllable (use_non_cluster); }} |
875 | 259k | break; |
876 | 312 | case 12: |
877 | 312 | #line 1 "NONE" |
878 | 312 | { switch( act ) { |
879 | 263 | case 1: |
880 | 263 | {{p = ((te))-1;} found_syllable (use_virama_terminated_cluster); } |
881 | 263 | break; |
882 | 49 | case 2: |
883 | 49 | {{p = ((te))-1;} found_syllable (use_sakot_terminated_cluster); } |
884 | 49 | break; |
885 | 312 | } |
886 | 312 | } |
887 | 312 | break; |
888 | 358 | case 8: |
889 | 358 | #line 1 "NONE" |
890 | 358 | {te = p+1;} |
891 | 358 | #line 170 "hb-ot-shaper-use-machine.rl" |
892 | 358 | {act = 1;} |
893 | 358 | break; |
894 | 51 | case 10: |
895 | 51 | #line 1 "NONE" |
896 | 51 | {te = p+1;} |
897 | 51 | #line 171 "hb-ot-shaper-use-machine.rl" |
898 | 51 | {act = 2;} |
899 | 51 | break; |
900 | 3.41M | #line 866 "hb-ot-shaper-use-machine.hh" |
901 | 3.41M | } |
902 | | |
903 | 6.78M | _again: |
904 | 6.78M | switch ( _use_syllable_machine_to_state_actions[cs] ) { |
905 | 3.41M | case 1: |
906 | 3.41M | #line 1 "NONE" |
907 | 3.41M | {ts = 0;} |
908 | 3.41M | break; |
909 | 6.78M | #line 873 "hb-ot-shaper-use-machine.hh" |
910 | 6.78M | } |
911 | | |
912 | 6.78M | if ( ++p != pe ) |
913 | 6.69M | goto _resume; |
914 | 93.4k | _test_eof: {} |
915 | 93.4k | if ( p == eof ) |
916 | 93.4k | { |
917 | 93.4k | if ( _use_syllable_machine_eof_trans[cs] > 0 ) { |
918 | 46.6k | _trans = _use_syllable_machine_eof_trans[cs] - 1; |
919 | 46.6k | goto _eof_trans; |
920 | 46.6k | } |
921 | 93.4k | } |
922 | | |
923 | 93.4k | } |
924 | | |
925 | 93.4k | #line 287 "hb-ot-shaper-use-machine.rl" |
926 | | |
927 | 93.4k | } |
928 | | |
929 | | #undef found_syllable |
930 | | |
931 | | #endif /* HB_OT_SHAPER_USE_MACHINE_HH */ |