• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) : it (o.it) {}
379 
380 	static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator;
381 	static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator;
382 
__item__machine_index_t383 	typename Iter::item_t __item__ () const { return *it; }
__item_at__machine_index_t384 	typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; }
__len__machine_index_t385 	unsigned __len__ () const { return it.len (); }
__next__machine_index_t386 	void __next__ () { ++it; }
__forward__machine_index_t387 	void __forward__ (unsigned n) { it += n; }
__prev__machine_index_t388 	void __prev__ () { --it; }
__rewind__machine_index_t389 	void __rewind__ (unsigned n) { it -= n; }
operator =machine_index_t390 	void operator = (unsigned n)
391 	{ unsigned index = (*it).first; if (index < n) it += n - index; else if (index > n) it -= index - n; }
operator =machine_index_t392 	void operator = (const machine_index_t& o) { *this = (*o.it).first; }
operator ==machine_index_t393 	bool operator == (const machine_index_t& o) const { return (*it).first == (*o.it).first; }
operator !=machine_index_t394 	bool operator != (const machine_index_t& o) const { return !(*this == o); }
395 
396 	private:
397 	Iter it;
398 };
399 struct
400 {
401 	template <typename Iter,
402 	hb_requires (hb_is_iterable (Iter))>
403 	machine_index_t<hb_iter_type<Iter>>
operator ()__anon5820928d0108404 	operator () (Iter&& it) const
405 	{ return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); }
406 }
407 HB_FUNCOBJ (machine_index);
408 
409 
410 
411 static bool
not_standard_default_ignorable(const hb_glyph_info_t & i)412 not_standard_default_ignorable (const hb_glyph_info_t &i)
413 { return !(i.use_category() == USE(O) && _hb_glyph_info_is_default_ignorable (&i)); }
414 
415 static inline void
find_syllables_use(hb_buffer_t * buffer)416 find_syllables_use (hb_buffer_t *buffer)
417 {
418 	hb_glyph_info_t *info = buffer->info;
419 	auto p =
420 	+ hb_iter (info, buffer->len)
421 	| hb_enumerate
422 	| hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); },
423 	hb_second)
424 	| hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p)
425 	{
426 		if (p.second.use_category() == USE(ZWNJ))
427 			for (unsigned i = p.first + 1; i < buffer->len; ++i)
428 		if (not_standard_default_ignorable (info[i]))
429 			return !_hb_glyph_info_is_unicode_mark (&info[i]);
430 		return true;
431 	})
432 	| hb_enumerate
433 	| machine_index
434 	;
435 	auto pe = p + p.len ();
436 	auto eof = +pe;
437 	auto ts = +p;
438 	auto te = +p;
439 	unsigned int act HB_UNUSED;
440 	int cs;
441 
442 #line 443 "hb-ot-shape-complex-use-machine.hh"
443 	{
444 		cs = (int)use_syllable_machine_start;
445 		ts = 0;
446 		te = 0;
447 	}
448 
449 #line 260 "hb-ot-shape-complex-use-machine.rl"
450 
451 
452 	unsigned int syllable_serial = 1;
453 
454 #line 455 "hb-ot-shape-complex-use-machine.hh"
455 	{
456 		unsigned int _trans = 0;
457 		const unsigned char * _keys;
458 		const signed char * _inds;
459 		int _ic;
460 		_resume: {}
461 		if ( p == pe && p != eof )
462 			goto _out;
463 		switch ( _use_syllable_machine_from_state_actions[cs] ) {
464 			case 4:  {
465 				{
466 #line 1 "NONE"
467 					{ts = p;}}
468 
469 #line 470 "hb-ot-shape-complex-use-machine.hh"
470 
471 
472 				break;
473 			}
474 		}
475 
476 		if ( p == eof ) {
477 			if ( _use_syllable_machine_eof_trans[cs] > 0 ) {
478 				_trans = (unsigned int)_use_syllable_machine_eof_trans[cs] - 1;
479 			}
480 		}
481 		else {
482 			_keys = ( _use_syllable_machine_trans_keys + ((cs<<1)));
483 			_inds = ( _use_syllable_machine_indicies + (_use_syllable_machine_index_offsets[cs]));
484 
485 			if ( ((*p).second.second.use_category()) <= 52 ) {
486 				_ic = (int)_use_syllable_machine_char_class[(int)((*p).second.second.use_category()) - 0];
487 				if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
488 					_trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
489 				else
490 					_trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
491 			}
492 			else {
493 				_trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
494 			}
495 
496 		}
497 		cs = (int)_use_syllable_machine_cond_targs[_trans];
498 
499 		if ( _use_syllable_machine_cond_actions[_trans] != 0 ) {
500 
501 			switch ( _use_syllable_machine_cond_actions[_trans] ) {
502 				case 2:  {
503 					{
504 #line 1 "NONE"
505 						{te = p+1;}}
506 
507 #line 508 "hb-ot-shape-complex-use-machine.hh"
508 
509 
510 					break;
511 				}
512 				case 5:  {
513 					{
514 #line 163 "hb-ot-shape-complex-use-machine.rl"
515 						{te = p+1;{
516 #line 163 "hb-ot-shape-complex-use-machine.rl"
517 								found_syllable (use_independent_cluster); }
518 						}}
519 
520 #line 521 "hb-ot-shape-complex-use-machine.hh"
521 
522 
523 					break;
524 				}
525 				case 9:  {
526 					{
527 #line 166 "hb-ot-shape-complex-use-machine.rl"
528 						{te = p+1;{
529 #line 166 "hb-ot-shape-complex-use-machine.rl"
530 								found_syllable (use_standard_cluster); }
531 						}}
532 
533 #line 534 "hb-ot-shape-complex-use-machine.hh"
534 
535 
536 					break;
537 				}
538 				case 7:  {
539 					{
540 #line 171 "hb-ot-shape-complex-use-machine.rl"
541 						{te = p+1;{
542 #line 171 "hb-ot-shape-complex-use-machine.rl"
543 								found_syllable (use_broken_cluster); }
544 						}}
545 
546 #line 547 "hb-ot-shape-complex-use-machine.hh"
547 
548 
549 					break;
550 				}
551 				case 6:  {
552 					{
553 #line 172 "hb-ot-shape-complex-use-machine.rl"
554 						{te = p+1;{
555 #line 172 "hb-ot-shape-complex-use-machine.rl"
556 								found_syllable (use_non_cluster); }
557 						}}
558 
559 #line 560 "hb-ot-shape-complex-use-machine.hh"
560 
561 
562 					break;
563 				}
564 				case 10:  {
565 					{
566 #line 164 "hb-ot-shape-complex-use-machine.rl"
567 						{te = p;p = p - 1;{
568 #line 164 "hb-ot-shape-complex-use-machine.rl"
569 								found_syllable (use_virama_terminated_cluster); }
570 						}}
571 
572 #line 573 "hb-ot-shape-complex-use-machine.hh"
573 
574 
575 					break;
576 				}
577 				case 11:  {
578 					{
579 #line 165 "hb-ot-shape-complex-use-machine.rl"
580 						{te = p;p = p - 1;{
581 #line 165 "hb-ot-shape-complex-use-machine.rl"
582 								found_syllable (use_sakot_terminated_cluster); }
583 						}}
584 
585 #line 586 "hb-ot-shape-complex-use-machine.hh"
586 
587 
588 					break;
589 				}
590 				case 8:  {
591 					{
592 #line 166 "hb-ot-shape-complex-use-machine.rl"
593 						{te = p;p = p - 1;{
594 #line 166 "hb-ot-shape-complex-use-machine.rl"
595 								found_syllable (use_standard_cluster); }
596 						}}
597 
598 #line 599 "hb-ot-shape-complex-use-machine.hh"
599 
600 
601 					break;
602 				}
603 				case 13:  {
604 					{
605 #line 167 "hb-ot-shape-complex-use-machine.rl"
606 						{te = p;p = p - 1;{
607 #line 167 "hb-ot-shape-complex-use-machine.rl"
608 								found_syllable (use_number_joiner_terminated_cluster); }
609 						}}
610 
611 #line 612 "hb-ot-shape-complex-use-machine.hh"
612 
613 
614 					break;
615 				}
616 				case 12:  {
617 					{
618 #line 168 "hb-ot-shape-complex-use-machine.rl"
619 						{te = p;p = p - 1;{
620 #line 168 "hb-ot-shape-complex-use-machine.rl"
621 								found_syllable (use_numeral_cluster); }
622 						}}
623 
624 #line 625 "hb-ot-shape-complex-use-machine.hh"
625 
626 
627 					break;
628 				}
629 				case 14:  {
630 					{
631 #line 169 "hb-ot-shape-complex-use-machine.rl"
632 						{te = p;p = p - 1;{
633 #line 169 "hb-ot-shape-complex-use-machine.rl"
634 								found_syllable (use_symbol_cluster); }
635 						}}
636 
637 #line 638 "hb-ot-shape-complex-use-machine.hh"
638 
639 
640 					break;
641 				}
642 				case 17:  {
643 					{
644 #line 170 "hb-ot-shape-complex-use-machine.rl"
645 						{te = p;p = p - 1;{
646 #line 170 "hb-ot-shape-complex-use-machine.rl"
647 								found_syllable (use_hieroglyph_cluster); }
648 						}}
649 
650 #line 651 "hb-ot-shape-complex-use-machine.hh"
651 
652 
653 					break;
654 				}
655 				case 15:  {
656 					{
657 #line 171 "hb-ot-shape-complex-use-machine.rl"
658 						{te = p;p = p - 1;{
659 #line 171 "hb-ot-shape-complex-use-machine.rl"
660 								found_syllable (use_broken_cluster); }
661 						}}
662 
663 #line 664 "hb-ot-shape-complex-use-machine.hh"
664 
665 
666 					break;
667 				}
668 				case 16:  {
669 					{
670 #line 172 "hb-ot-shape-complex-use-machine.rl"
671 						{te = p;p = p - 1;{
672 #line 172 "hb-ot-shape-complex-use-machine.rl"
673 								found_syllable (use_non_cluster); }
674 						}}
675 
676 #line 677 "hb-ot-shape-complex-use-machine.hh"
677 
678 
679 					break;
680 				}
681 				case 1:  {
682 					{
683 #line 171 "hb-ot-shape-complex-use-machine.rl"
684 						{p = ((te))-1;
685 							{
686 #line 171 "hb-ot-shape-complex-use-machine.rl"
687 								found_syllable (use_broken_cluster); }
688 						}}
689 
690 #line 691 "hb-ot-shape-complex-use-machine.hh"
691 
692 
693 					break;
694 				}
695 			}
696 
697 		}
698 
699 		if ( p == eof ) {
700 			if ( cs >= 2 )
701 				goto _out;
702 		}
703 		else {
704 			switch ( _use_syllable_machine_to_state_actions[cs] ) {
705 				case 3:  {
706 					{
707 #line 1 "NONE"
708 						{ts = 0;}}
709 
710 #line 711 "hb-ot-shape-complex-use-machine.hh"
711 
712 
713 					break;
714 				}
715 			}
716 
717 			p += 1;
718 			goto _resume;
719 		}
720 		_out: {}
721 	}
722 
723 #line 265 "hb-ot-shape-complex-use-machine.rl"
724 
725 }
726 
727 #undef found_syllable
728 
729 #endif /* HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH */
730