1 #line 1 "hb-ot-shape-complex-use-machine.rl"
2 /*
3 * Copyright © 2015 Mozilla Foundation.
4 * Copyright © 2015 Google, Inc.
5 *
6 * This is part of HarfBuzz, a text shaping library.
7 *
8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the
11 * above copyright notice and the following two paragraphs appear in
12 * all copies of this software.
13 *
14 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
15 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
17 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * DAMAGE.
19 *
20 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
21 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 *
26 * Mozilla Author(s): Jonathan Kew
27 * Google Author(s): Behdad Esfahbod
28 */
29
30 #ifndef HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
31 #define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
32
33 #include "hb.hh"
34
35 #include "hb-ot-shape-complex-syllabic.hh"
36
37 /* buffer var allocations */
38 #define use_category() complex_var_u8_category()
39
40 #define USE(Cat) use_syllable_machine_ex_##Cat
41
42 enum use_syllable_type_t {
43 use_independent_cluster,
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 57 "hb-ot-shape-complex-use-machine.hh"
57 #define use_syllable_machine_ex_B 1u
58 #define use_syllable_machine_ex_CMAbv 31u
59 #define use_syllable_machine_ex_CMBlw 32u
60 #define use_syllable_machine_ex_CS 43u
61 #define use_syllable_machine_ex_FAbv 24u
62 #define use_syllable_machine_ex_FBlw 25u
63 #define use_syllable_machine_ex_FMAbv 45u
64 #define use_syllable_machine_ex_FMBlw 46u
65 #define use_syllable_machine_ex_FMPst 47u
66 #define use_syllable_machine_ex_FPst 26u
67 #define use_syllable_machine_ex_G 49u
68 #define use_syllable_machine_ex_GB 5u
69 #define use_syllable_machine_ex_H 12u
70 #define use_syllable_machine_ex_HN 13u
71 #define use_syllable_machine_ex_HVM 44u
72 #define use_syllable_machine_ex_J 50u
73 #define use_syllable_machine_ex_MAbv 27u
74 #define use_syllable_machine_ex_MBlw 28u
75 #define use_syllable_machine_ex_MPre 30u
76 #define use_syllable_machine_ex_MPst 29u
77 #define use_syllable_machine_ex_N 4u
78 #define use_syllable_machine_ex_O 0u
79 #define use_syllable_machine_ex_R 18u
80 #define use_syllable_machine_ex_S 19u
81 #define use_syllable_machine_ex_SB 51u
82 #define use_syllable_machine_ex_SE 52u
83 #define use_syllable_machine_ex_SMAbv 41u
84 #define use_syllable_machine_ex_SMBlw 42u
85 #define use_syllable_machine_ex_SUB 11u
86 #define use_syllable_machine_ex_Sk 48u
87 #define use_syllable_machine_ex_VAbv 33u
88 #define use_syllable_machine_ex_VBlw 34u
89 #define use_syllable_machine_ex_VMAbv 37u
90 #define use_syllable_machine_ex_VMBlw 38u
91 #define use_syllable_machine_ex_VMPre 23u
92 #define use_syllable_machine_ex_VMPst 39u
93 #define use_syllable_machine_ex_VPre 22u
94 #define use_syllable_machine_ex_VPst 35u
95 #define use_syllable_machine_ex_ZWNJ 14u
96
97
98 #line 99 "hb-ot-shape-complex-use-machine.hh"
99 static const unsigned char _use_syllable_machine_trans_keys[] = {
100 1u, 1u, 1u, 1u, 0u, 37u, 5u, 34u,
101 5u, 34u, 1u, 1u, 10u, 34u, 11u, 34u,
102 12u, 33u, 13u, 33u, 14u, 33u, 31u, 32u,
103 32u, 32u, 12u, 34u, 12u, 34u, 12u, 34u,
104 1u, 1u, 12u, 34u, 11u, 34u, 11u, 34u,
105 11u, 34u, 10u, 34u, 10u, 34u, 10u, 34u,
106 5u, 34u, 1u, 34u, 7u, 7u, 3u, 3u,
107 5u, 34u, 27u, 28u, 28u, 28u, 5u, 34u,
108 10u, 34u, 11u, 34u, 12u, 33u, 13u, 33u,
109 14u, 33u, 31u, 32u, 32u, 32u, 12u, 34u,
110 12u, 34u, 12u, 34u, 12u, 34u, 11u, 34u,
111 11u, 34u, 11u, 34u, 10u, 34u, 10u, 34u,
112 10u, 34u, 5u, 34u, 1u, 34u, 1u, 1u,
113 3u, 3u, 7u, 7u, 1u, 34u, 5u, 34u,
114 27u, 28u, 28u, 28u, 1u, 4u, 36u, 38u,
115 35u, 38u, 35u, 37u, 0u
116 };
117
118 static const signed char _use_syllable_machine_char_class[] = {
119 0, 1, 2, 2, 3, 4, 2, 2,
120 2, 2, 2, 5, 6, 7, 2, 2,
121 2, 2, 8, 9, 2, 2, 10, 11,
122 12, 13, 14, 15, 16, 17, 18, 19,
123 20, 21, 22, 23, 2, 24, 25, 26,
124 2, 27, 28, 29, 30, 31, 32, 33,
125 34, 35, 36, 37, 38, 0
126 };
127
128 static const short _use_syllable_machine_index_offsets[] = {
129 0, 1, 2, 40, 70, 100, 101, 126,
130 150, 172, 193, 213, 215, 216, 239, 262,
131 285, 286, 309, 333, 357, 381, 406, 431,
132 456, 486, 520, 521, 522, 552, 554, 555,
133 585, 610, 634, 656, 677, 697, 699, 700,
134 723, 746, 769, 792, 816, 840, 864, 889,
135 914, 939, 969, 1003, 1004, 1005, 1006, 1040,
136 1070, 1072, 1073, 1077, 1080, 1084, 0
137 };
138
139 static const signed char _use_syllable_machine_indicies[] = {
140 1, 2, 4, 5, 6, 7, 8, 1,
141 9, 10, 11, 12, 13, 14, 15, 16,
142 17, 18, 19, 13, 20, 21, 22, 23,
143 24, 25, 26, 27, 28, 29, 30, 31,
144 32, 33, 34, 35, 9, 36, 6, 37,
145 39, 40, 38, 38, 38, 41, 42, 43,
146 44, 45, 46, 47, 41, 48, 5, 49,
147 50, 51, 52, 53, 54, 55, 38, 38,
148 38, 56, 57, 58, 59, 40, 39, 40,
149 38, 38, 38, 41, 42, 43, 44, 45,
150 46, 47, 41, 48, 49, 49, 50, 51,
151 52, 53, 54, 55, 38, 38, 38, 56,
152 57, 58, 59, 40, 39, 41, 42, 43,
153 44, 45, 38, 38, 38, 38, 38, 38,
154 50, 51, 52, 53, 54, 55, 38, 38,
155 38, 42, 57, 58, 59, 61, 42, 43,
156 44, 45, 38, 38, 38, 38, 38, 38,
157 38, 38, 38, 53, 54, 55, 38, 38,
158 38, 38, 57, 58, 59, 61, 43, 44,
159 45, 38, 38, 38, 38, 38, 38, 38,
160 38, 38, 38, 38, 38, 38, 38, 38,
161 38, 57, 58, 59, 44, 45, 38, 38,
162 38, 38, 38, 38, 38, 38, 38, 38,
163 38, 38, 38, 38, 38, 38, 57, 58,
164 59, 45, 38, 38, 38, 38, 38, 38,
165 38, 38, 38, 38, 38, 38, 38, 38,
166 38, 38, 57, 58, 59, 57, 58, 58,
167 43, 44, 45, 38, 38, 38, 38, 38,
168 38, 38, 38, 38, 53, 54, 55, 38,
169 38, 38, 38, 57, 58, 59, 61, 43,
170 44, 45, 38, 38, 38, 38, 38, 38,
171 38, 38, 38, 38, 54, 55, 38, 38,
172 38, 38, 57, 58, 59, 61, 43, 44,
173 45, 38, 38, 38, 38, 38, 38, 38,
174 38, 38, 38, 38, 55, 38, 38, 38,
175 38, 57, 58, 59, 61, 63, 43, 44,
176 45, 38, 38, 38, 38, 38, 38, 38,
177 38, 38, 38, 38, 38, 38, 38, 38,
178 38, 57, 58, 59, 61, 42, 43, 44,
179 45, 38, 38, 38, 38, 38, 38, 50,
180 51, 52, 53, 54, 55, 38, 38, 38,
181 42, 57, 58, 59, 61, 42, 43, 44,
182 45, 38, 38, 38, 38, 38, 38, 38,
183 51, 52, 53, 54, 55, 38, 38, 38,
184 42, 57, 58, 59, 61, 42, 43, 44,
185 45, 38, 38, 38, 38, 38, 38, 38,
186 38, 52, 53, 54, 55, 38, 38, 38,
187 42, 57, 58, 59, 61, 41, 42, 43,
188 44, 45, 38, 47, 41, 38, 38, 38,
189 50, 51, 52, 53, 54, 55, 38, 38,
190 38, 42, 57, 58, 59, 61, 41, 42,
191 43, 44, 45, 38, 38, 41, 38, 38,
192 38, 50, 51, 52, 53, 54, 55, 38,
193 38, 38, 42, 57, 58, 59, 61, 41,
194 42, 43, 44, 45, 46, 47, 41, 38,
195 38, 38, 50, 51, 52, 53, 54, 55,
196 38, 38, 38, 42, 57, 58, 59, 61,
197 39, 40, 38, 38, 38, 41, 42, 43,
198 44, 45, 46, 47, 41, 48, 38, 49,
199 50, 51, 52, 53, 54, 55, 38, 38,
200 38, 56, 57, 58, 59, 40, 39, 60,
201 60, 60, 60, 60, 60, 60, 60, 60,
202 42, 43, 44, 45, 60, 60, 60, 60,
203 60, 60, 60, 60, 60, 53, 54, 55,
204 60, 60, 60, 60, 57, 58, 59, 61,
205 65, 7, 39, 40, 38, 38, 38, 41,
206 42, 43, 44, 45, 46, 47, 41, 48,
207 5, 49, 50, 51, 52, 53, 54, 55,
208 12, 67, 38, 56, 57, 58, 59, 40,
209 12, 67, 67, 1, 70, 69, 69, 69,
210 13, 14, 15, 16, 17, 18, 19, 13,
211 20, 22, 22, 23, 24, 25, 26, 27,
212 28, 69, 69, 69, 32, 33, 34, 35,
213 70, 13, 14, 15, 16, 17, 69, 69,
214 69, 69, 69, 69, 23, 24, 25, 26,
215 27, 28, 69, 69, 69, 14, 33, 34,
216 35, 71, 14, 15, 16, 17, 69, 69,
217 69, 69, 69, 69, 69, 69, 69, 26,
218 27, 28, 69, 69, 69, 69, 33, 34,
219 35, 71, 15, 16, 17, 69, 69, 69,
220 69, 69, 69, 69, 69, 69, 69, 69,
221 69, 69, 69, 69, 69, 33, 34, 35,
222 16, 17, 69, 69, 69, 69, 69, 69,
223 69, 69, 69, 69, 69, 69, 69, 69,
224 69, 69, 33, 34, 35, 17, 69, 69,
225 69, 69, 69, 69, 69, 69, 69, 69,
226 69, 69, 69, 69, 69, 69, 33, 34,
227 35, 33, 34, 34, 15, 16, 17, 69,
228 69, 69, 69, 69, 69, 69, 69, 69,
229 26, 27, 28, 69, 69, 69, 69, 33,
230 34, 35, 71, 15, 16, 17, 69, 69,
231 69, 69, 69, 69, 69, 69, 69, 69,
232 27, 28, 69, 69, 69, 69, 33, 34,
233 35, 71, 15, 16, 17, 69, 69, 69,
234 69, 69, 69, 69, 69, 69, 69, 69,
235 28, 69, 69, 69, 69, 33, 34, 35,
236 71, 15, 16, 17, 69, 69, 69, 69,
237 69, 69, 69, 69, 69, 69, 69, 69,
238 69, 69, 69, 69, 33, 34, 35, 71,
239 14, 15, 16, 17, 69, 69, 69, 69,
240 69, 69, 23, 24, 25, 26, 27, 28,
241 69, 69, 69, 14, 33, 34, 35, 71,
242 14, 15, 16, 17, 69, 69, 69, 69,
243 69, 69, 69, 24, 25, 26, 27, 28,
244 69, 69, 69, 14, 33, 34, 35, 71,
245 14, 15, 16, 17, 69, 69, 69, 69,
246 69, 69, 69, 69, 25, 26, 27, 28,
247 69, 69, 69, 14, 33, 34, 35, 71,
248 13, 14, 15, 16, 17, 69, 19, 13,
249 69, 69, 69, 23, 24, 25, 26, 27,
250 28, 69, 69, 69, 14, 33, 34, 35,
251 71, 13, 14, 15, 16, 17, 69, 69,
252 13, 69, 69, 69, 23, 24, 25, 26,
253 27, 28, 69, 69, 69, 14, 33, 34,
254 35, 71, 13, 14, 15, 16, 17, 18,
255 19, 13, 69, 69, 69, 23, 24, 25,
256 26, 27, 28, 69, 69, 69, 14, 33,
257 34, 35, 71, 1, 70, 69, 69, 69,
258 13, 14, 15, 16, 17, 18, 19, 13,
259 20, 69, 22, 23, 24, 25, 26, 27,
260 28, 69, 69, 69, 32, 33, 34, 35,
261 70, 1, 69, 69, 69, 69, 69, 69,
262 69, 69, 69, 14, 15, 16, 17, 69,
263 69, 69, 69, 69, 69, 69, 69, 69,
264 26, 27, 28, 69, 69, 69, 69, 33,
265 34, 35, 71, 1, 73, 10, 5, 69,
266 69, 5, 1, 70, 10, 69, 69, 13,
267 14, 15, 16, 17, 18, 19, 13, 20,
268 21, 22, 23, 24, 25, 26, 27, 28,
269 29, 30, 69, 32, 33, 34, 35, 70,
270 1, 70, 69, 69, 69, 13, 14, 15,
271 16, 17, 18, 19, 13, 20, 21, 22,
272 23, 24, 25, 26, 27, 28, 69, 69,
273 69, 32, 33, 34, 35, 70, 29, 30,
274 30, 5, 72, 72, 5, 75, 74, 36,
275 36, 75, 74, 75, 36, 74, 37, 0
276 };
277
278 static const signed char _use_syllable_machine_index_defaults[] = {
279 0, 0, 6, 38, 38, 60, 38, 38,
280 38, 38, 38, 38, 38, 38, 38, 38,
281 62, 38, 38, 38, 38, 38, 38, 38,
282 38, 60, 64, 66, 38, 68, 68, 69,
283 69, 69, 69, 69, 69, 69, 69, 69,
284 69, 69, 69, 69, 69, 69, 69, 69,
285 69, 69, 69, 72, 69, 69, 69, 69,
286 69, 69, 72, 74, 74, 74, 0
287 };
288
289 static const signed char _use_syllable_machine_cond_targs[] = {
290 2, 31, 42, 2, 2, 3, 2, 26,
291 28, 51, 52, 54, 29, 32, 33, 34,
292 35, 36, 46, 47, 48, 55, 49, 43,
293 44, 45, 39, 40, 41, 56, 57, 58,
294 50, 37, 38, 2, 59, 61, 2, 4,
295 5, 6, 7, 8, 9, 10, 21, 22,
296 23, 24, 18, 19, 20, 13, 14, 15,
297 25, 11, 12, 2, 2, 16, 2, 17,
298 2, 27, 2, 30, 2, 2, 0, 1,
299 2, 53, 2, 60, 0
300 };
301
302 static const signed char _use_syllable_machine_cond_actions[] = {
303 1, 2, 2, 0, 5, 0, 6, 0,
304 0, 0, 0, 2, 0, 2, 2, 0,
305 0, 0, 2, 2, 2, 2, 2, 2,
306 2, 2, 2, 2, 2, 0, 0, 0,
307 2, 0, 0, 7, 0, 0, 8, 0,
308 0, 0, 0, 0, 0, 0, 0, 0,
309 0, 0, 0, 0, 0, 0, 0, 0,
310 0, 0, 0, 9, 10, 0, 11, 0,
311 12, 0, 13, 0, 14, 15, 0, 0,
312 16, 0, 17, 0, 0
313 };
314
315 static const signed char _use_syllable_machine_to_state_actions[] = {
316 0, 0, 3, 0, 0, 0, 0, 0,
317 0, 0, 0, 0, 0, 0, 0, 0,
318 0, 0, 0, 0, 0, 0, 0, 0,
319 0, 0, 0, 0, 0, 0, 0, 0,
320 0, 0, 0, 0, 0, 0, 0, 0,
321 0, 0, 0, 0, 0, 0, 0, 0,
322 0, 0, 0, 0, 0, 0, 0, 0,
323 0, 0, 0, 0, 0, 0, 0
324 };
325
326 static const signed char _use_syllable_machine_from_state_actions[] = {
327 0, 0, 4, 0, 0, 0, 0, 0,
328 0, 0, 0, 0, 0, 0, 0, 0,
329 0, 0, 0, 0, 0, 0, 0, 0,
330 0, 0, 0, 0, 0, 0, 0, 0,
331 0, 0, 0, 0, 0, 0, 0, 0,
332 0, 0, 0, 0, 0, 0, 0, 0,
333 0, 0, 0, 0, 0, 0, 0, 0,
334 0, 0, 0, 0, 0, 0, 0
335 };
336
337 static const signed char _use_syllable_machine_eof_trans[] = {
338 1, 1, 4, 39, 39, 61, 39, 39,
339 39, 39, 39, 39, 39, 39, 39, 39,
340 63, 39, 39, 39, 39, 39, 39, 39,
341 39, 61, 65, 67, 39, 69, 69, 70,
342 70, 70, 70, 70, 70, 70, 70, 70,
343 70, 70, 70, 70, 70, 70, 70, 70,
344 70, 70, 70, 73, 70, 70, 70, 70,
345 70, 70, 73, 75, 75, 75, 0
346 };
347
348 static const int use_syllable_machine_start = 2;
349 static const int use_syllable_machine_first_final = 2;
350 static const int use_syllable_machine_error = -1;
351
352 static const int use_syllable_machine_en_main = 2;
353
354
355 #line 59 "hb-ot-shape-complex-use-machine.rl"
356
357
358
359 #line 176 "hb-ot-shape-complex-use-machine.rl"
360
361
362 #define found_syllable(syllable_type) \
363 HB_STMT_START { \
364 if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \
365 for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \
366 info[i].syllable() = (syllable_serial << 4) | syllable_type; \
367 syllable_serial++; \
368 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
369 } HB_STMT_END
370
371
372 template <typename Iter>
373 struct machine_index_t :
374 hb_iter_with_fallback_t<machine_index_t<Iter>,
375 typename Iter::item_t>
376 {
machine_index_tmachine_index_t377 machine_index_t (const Iter& it) : it (it) {}
machine_index_tmachine_index_t378 machine_index_t (const machine_index_t& o) :
379 hb_iter_with_fallback_t<machine_index_t<Iter>, typename Iter::item_t>(o),
380 it (o.it) {}
381
382 static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator;
383 static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator;
384
__item__machine_index_t385 typename Iter::item_t __item__ () const { return *it; }
__item_at__machine_index_t386 typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; }
__len__machine_index_t387 unsigned __len__ () const { return it.len (); }
__next__machine_index_t388 void __next__ () { ++it; }
__forward__machine_index_t389 void __forward__ (unsigned n) { it += n; }
__prev__machine_index_t390 void __prev__ () { --it; }
__rewind__machine_index_t391 void __rewind__ (unsigned n) { it -= n; }
operator =machine_index_t392 void operator = (unsigned n)
393 { unsigned index = (*it).first; if (index < n) it += n - index; else if (index > n) it -= index - n; }
operator =machine_index_t394 void operator = (const machine_index_t& o) { *this = (*o.it).first; }
operator ==machine_index_t395 bool operator == (const machine_index_t& o) const { return (*it).first == (*o.it).first; }
operator !=machine_index_t396 bool operator != (const machine_index_t& o) const { return !(*this == o); }
397
398 private:
399 Iter it;
400 };
401 struct
402 {
403 template <typename Iter,
404 hb_requires (hb_is_iterable (Iter))>
405 machine_index_t<hb_iter_type<Iter>>
operator ()__anonf43556b10108406 operator () (Iter&& it) const
407 { return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); }
408 }
409 HB_FUNCOBJ (machine_index);
410
411
412
413 static bool
not_standard_default_ignorable(const hb_glyph_info_t & i)414 not_standard_default_ignorable (const hb_glyph_info_t &i)
415 { return !(i.use_category() == USE(O) && _hb_glyph_info_is_default_ignorable (&i)); }
416
417 static inline void
find_syllables_use(hb_buffer_t * buffer)418 find_syllables_use (hb_buffer_t *buffer)
419 {
420 hb_glyph_info_t *info = buffer->info;
421 auto p =
422 + hb_iter (info, buffer->len)
423 | hb_enumerate
424 | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); },
425 hb_second)
426 | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p)
427 {
428 if (p.second.use_category() == USE(ZWNJ))
429 for (unsigned i = p.first + 1; i < buffer->len; ++i)
430 if (not_standard_default_ignorable (info[i]))
431 return !_hb_glyph_info_is_unicode_mark (&info[i]);
432 return true;
433 })
434 | hb_enumerate
435 | machine_index
436 ;
437 auto pe = p + p.len ();
438 auto eof = +pe;
439 auto ts = +p;
440 auto te = +p;
441 unsigned int act HB_UNUSED;
442 int cs;
443
444 #line 443 "hb-ot-shape-complex-use-machine.hh"
445 {
446 cs = (int)use_syllable_machine_start;
447 ts = 0;
448 te = 0;
449 }
450
451 #line 260 "hb-ot-shape-complex-use-machine.rl"
452
453
454 unsigned int syllable_serial = 1;
455
456 #line 455 "hb-ot-shape-complex-use-machine.hh"
457 {
458 unsigned int _trans = 0;
459 const unsigned char * _keys;
460 const signed char * _inds;
461 int _ic;
462 _resume: {}
463 if ( p == pe && p != eof )
464 goto _out;
465 switch ( _use_syllable_machine_from_state_actions[cs] ) {
466 case 4: {
467 {
468 #line 1 "NONE"
469 {ts = p;}}
470
471 #line 470 "hb-ot-shape-complex-use-machine.hh"
472
473
474 break;
475 }
476 }
477
478 if ( p == eof ) {
479 if ( _use_syllable_machine_eof_trans[cs] > 0 ) {
480 _trans = (unsigned int)_use_syllable_machine_eof_trans[cs] - 1;
481 }
482 }
483 else {
484 _keys = ( _use_syllable_machine_trans_keys + ((cs<<1)));
485 _inds = ( _use_syllable_machine_indicies + (_use_syllable_machine_index_offsets[cs]));
486
487 if ( ((*p).second.second.use_category()) <= 52 ) {
488 _ic = (int)_use_syllable_machine_char_class[(int)((*p).second.second.use_category()) - 0];
489 if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
490 _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
491 else
492 _trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
493 }
494 else {
495 _trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
496 }
497
498 }
499 cs = (int)_use_syllable_machine_cond_targs[_trans];
500
501 if ( _use_syllable_machine_cond_actions[_trans] != 0 ) {
502
503 switch ( _use_syllable_machine_cond_actions[_trans] ) {
504 case 2: {
505 {
506 #line 1 "NONE"
507 {te = p+1;}}
508
509 #line 508 "hb-ot-shape-complex-use-machine.hh"
510
511
512 break;
513 }
514 case 5: {
515 {
516 #line 163 "hb-ot-shape-complex-use-machine.rl"
517 {te = p+1;{
518 #line 163 "hb-ot-shape-complex-use-machine.rl"
519 found_syllable (use_independent_cluster); }
520 }}
521
522 #line 521 "hb-ot-shape-complex-use-machine.hh"
523
524
525 break;
526 }
527 case 9: {
528 {
529 #line 166 "hb-ot-shape-complex-use-machine.rl"
530 {te = p+1;{
531 #line 166 "hb-ot-shape-complex-use-machine.rl"
532 found_syllable (use_standard_cluster); }
533 }}
534
535 #line 534 "hb-ot-shape-complex-use-machine.hh"
536
537
538 break;
539 }
540 case 7: {
541 {
542 #line 171 "hb-ot-shape-complex-use-machine.rl"
543 {te = p+1;{
544 #line 171 "hb-ot-shape-complex-use-machine.rl"
545 found_syllable (use_broken_cluster); }
546 }}
547
548 #line 547 "hb-ot-shape-complex-use-machine.hh"
549
550
551 break;
552 }
553 case 6: {
554 {
555 #line 172 "hb-ot-shape-complex-use-machine.rl"
556 {te = p+1;{
557 #line 172 "hb-ot-shape-complex-use-machine.rl"
558 found_syllable (use_non_cluster); }
559 }}
560
561 #line 560 "hb-ot-shape-complex-use-machine.hh"
562
563
564 break;
565 }
566 case 10: {
567 {
568 #line 164 "hb-ot-shape-complex-use-machine.rl"
569 {te = p;p = p - 1;{
570 #line 164 "hb-ot-shape-complex-use-machine.rl"
571 found_syllable (use_virama_terminated_cluster); }
572 }}
573
574 #line 573 "hb-ot-shape-complex-use-machine.hh"
575
576
577 break;
578 }
579 case 11: {
580 {
581 #line 165 "hb-ot-shape-complex-use-machine.rl"
582 {te = p;p = p - 1;{
583 #line 165 "hb-ot-shape-complex-use-machine.rl"
584 found_syllable (use_sakot_terminated_cluster); }
585 }}
586
587 #line 586 "hb-ot-shape-complex-use-machine.hh"
588
589
590 break;
591 }
592 case 8: {
593 {
594 #line 166 "hb-ot-shape-complex-use-machine.rl"
595 {te = p;p = p - 1;{
596 #line 166 "hb-ot-shape-complex-use-machine.rl"
597 found_syllable (use_standard_cluster); }
598 }}
599
600 #line 599 "hb-ot-shape-complex-use-machine.hh"
601
602
603 break;
604 }
605 case 13: {
606 {
607 #line 167 "hb-ot-shape-complex-use-machine.rl"
608 {te = p;p = p - 1;{
609 #line 167 "hb-ot-shape-complex-use-machine.rl"
610 found_syllable (use_number_joiner_terminated_cluster); }
611 }}
612
613 #line 612 "hb-ot-shape-complex-use-machine.hh"
614
615
616 break;
617 }
618 case 12: {
619 {
620 #line 168 "hb-ot-shape-complex-use-machine.rl"
621 {te = p;p = p - 1;{
622 #line 168 "hb-ot-shape-complex-use-machine.rl"
623 found_syllable (use_numeral_cluster); }
624 }}
625
626 #line 625 "hb-ot-shape-complex-use-machine.hh"
627
628
629 break;
630 }
631 case 14: {
632 {
633 #line 169 "hb-ot-shape-complex-use-machine.rl"
634 {te = p;p = p - 1;{
635 #line 169 "hb-ot-shape-complex-use-machine.rl"
636 found_syllable (use_symbol_cluster); }
637 }}
638
639 #line 638 "hb-ot-shape-complex-use-machine.hh"
640
641
642 break;
643 }
644 case 17: {
645 {
646 #line 170 "hb-ot-shape-complex-use-machine.rl"
647 {te = p;p = p - 1;{
648 #line 170 "hb-ot-shape-complex-use-machine.rl"
649 found_syllable (use_hieroglyph_cluster); }
650 }}
651
652 #line 651 "hb-ot-shape-complex-use-machine.hh"
653
654
655 break;
656 }
657 case 15: {
658 {
659 #line 171 "hb-ot-shape-complex-use-machine.rl"
660 {te = p;p = p - 1;{
661 #line 171 "hb-ot-shape-complex-use-machine.rl"
662 found_syllable (use_broken_cluster); }
663 }}
664
665 #line 664 "hb-ot-shape-complex-use-machine.hh"
666
667
668 break;
669 }
670 case 16: {
671 {
672 #line 172 "hb-ot-shape-complex-use-machine.rl"
673 {te = p;p = p - 1;{
674 #line 172 "hb-ot-shape-complex-use-machine.rl"
675 found_syllable (use_non_cluster); }
676 }}
677
678 #line 677 "hb-ot-shape-complex-use-machine.hh"
679
680
681 break;
682 }
683 case 1: {
684 {
685 #line 171 "hb-ot-shape-complex-use-machine.rl"
686 {p = ((te))-1;
687 {
688 #line 171 "hb-ot-shape-complex-use-machine.rl"
689 found_syllable (use_broken_cluster); }
690 }}
691
692 #line 691 "hb-ot-shape-complex-use-machine.hh"
693
694
695 break;
696 }
697 }
698
699 }
700
701 if ( p == eof ) {
702 if ( cs >= 2 )
703 goto _out;
704 }
705 else {
706 switch ( _use_syllable_machine_to_state_actions[cs] ) {
707 case 3: {
708 {
709 #line 1 "NONE"
710 {ts = 0;}}
711
712 #line 711 "hb-ot-shape-complex-use-machine.hh"
713
714
715 break;
716 }
717 }
718
719 p += 1;
720 goto _resume;
721 }
722 _out: {}
723 }
724
725 #line 265 "hb-ot-shape-complex-use-machine.rl"
726
727 }
728
729 #undef found_syllable
730
731 #endif /* HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH */
732