• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #line 1 "hb-ot-shape-complex-indic-machine.rl"
3 /*
4  * Copyright © 2011,2012  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  * Google Author(s): Behdad Esfahbod
27  */
28 
29 #ifndef HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
30 #define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
31 
32 #include "hb.hh"
33 
34 enum indic_syllable_type_t {
35   indic_consonant_syllable,
36   indic_vowel_syllable,
37   indic_standalone_cluster,
38   indic_symbol_cluster,
39   indic_broken_cluster,
40   indic_non_indic_cluster,
41 };
42 
43 
44 #line 45 "hb-ot-shape-complex-indic-machine.hh"
45 #define indic_syllable_machine_ex_A 10u
46 #define indic_syllable_machine_ex_C 1u
47 #define indic_syllable_machine_ex_CM 17u
48 #define indic_syllable_machine_ex_CS 19u
49 #define indic_syllable_machine_ex_DOTTEDCIRCLE 12u
50 #define indic_syllable_machine_ex_H 4u
51 #define indic_syllable_machine_ex_M 7u
52 #define indic_syllable_machine_ex_N 3u
53 #define indic_syllable_machine_ex_PLACEHOLDER 11u
54 #define indic_syllable_machine_ex_RS 13u
55 #define indic_syllable_machine_ex_Ra 16u
56 #define indic_syllable_machine_ex_Repha 15u
57 #define indic_syllable_machine_ex_SM 8u
58 #define indic_syllable_machine_ex_Symbol 18u
59 #define indic_syllable_machine_ex_V 2u
60 #define indic_syllable_machine_ex_ZWJ 6u
61 #define indic_syllable_machine_ex_ZWNJ 5u
62 
63 
64 #line 65 "hb-ot-shape-complex-indic-machine.hh"
65 static const unsigned char _indic_syllable_machine_trans_keys[] = {
66 	8u, 8u, 4u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u, 4u, 8u,
67 	4u, 13u, 4u, 8u, 8u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u,
68 	4u, 8u, 4u, 13u, 4u, 13u, 4u, 13u, 8u, 8u, 5u, 7u, 5u, 8u, 4u, 8u,
69 	6u, 6u, 16u, 16u, 4u, 8u, 4u, 8u, 4u, 13u, 8u, 8u, 5u, 7u, 5u, 8u,
70 	4u, 8u, 6u, 6u, 16u, 16u, 4u, 8u, 4u, 8u, 5u, 8u, 8u, 8u, 1u, 19u,
71 	3u, 17u, 3u, 17u, 4u, 17u, 1u, 16u, 5u, 10u, 5u, 10u, 10u, 10u, 5u, 10u,
72 	1u, 16u, 1u, 16u, 1u, 16u, 3u, 10u, 4u, 10u, 5u, 10u, 4u, 10u, 5u, 10u,
73 	3u, 10u, 5u, 10u, 3u, 17u, 3u, 17u, 3u, 17u, 3u, 17u, 4u, 17u, 1u, 16u,
74 	3u, 17u, 3u, 17u, 4u, 17u, 1u, 16u, 5u, 10u, 10u, 10u, 5u, 10u, 1u, 16u,
75 	1u, 16u, 3u, 10u, 4u, 10u, 5u, 10u, 4u, 10u, 5u, 10u, 5u, 10u, 3u, 10u,
76 	5u, 10u, 3u, 17u, 3u, 17u, 4u, 8u, 3u, 17u, 3u, 17u, 4u, 17u, 1u, 16u,
77 	3u, 17u, 1u, 16u, 5u, 10u, 10u, 10u, 5u, 10u, 1u, 16u, 1u, 16u, 3u, 10u,
78 	4u, 10u, 5u, 10u, 3u, 17u, 4u, 10u, 5u, 10u, 5u, 10u, 3u, 10u, 5u, 10u,
79 	3u, 17u, 4u, 13u, 4u, 8u, 3u, 17u, 3u, 17u, 4u, 17u, 1u, 16u, 3u, 17u,
80 	1u, 16u, 5u, 10u, 10u, 10u, 5u, 10u, 1u, 16u, 1u, 16u, 3u, 10u, 4u, 10u,
81 	5u, 10u, 3u, 17u, 4u, 10u, 5u, 10u, 5u, 10u, 3u, 10u, 5u, 10u, 1u, 17u,
82 	3u, 17u, 1u, 17u, 4u, 13u, 5u, 10u, 10u, 10u, 5u, 10u, 1u, 16u, 3u, 10u,
83 	5u, 10u, 5u, 10u, 10u, 10u, 5u, 10u, 1u, 16u, 0
84 };
85 
86 static const char _indic_syllable_machine_key_spans[] = {
87 	1, 5, 3, 4, 5, 1, 1, 5,
88 	10, 5, 1, 3, 4, 5, 1, 1,
89 	5, 10, 10, 10, 1, 3, 4, 5,
90 	1, 1, 5, 5, 10, 1, 3, 4,
91 	5, 1, 1, 5, 5, 4, 1, 19,
92 	15, 15, 14, 16, 6, 6, 1, 6,
93 	16, 16, 16, 8, 7, 6, 7, 6,
94 	8, 6, 15, 15, 15, 15, 14, 16,
95 	15, 15, 14, 16, 6, 1, 6, 16,
96 	16, 8, 7, 6, 7, 6, 6, 8,
97 	6, 15, 15, 5, 15, 15, 14, 16,
98 	15, 16, 6, 1, 6, 16, 16, 8,
99 	7, 6, 15, 7, 6, 6, 8, 6,
100 	15, 10, 5, 15, 15, 14, 16, 15,
101 	16, 6, 1, 6, 16, 16, 8, 7,
102 	6, 15, 7, 6, 6, 8, 6, 17,
103 	15, 17, 10, 6, 1, 6, 16, 8,
104 	6, 6, 1, 6, 16
105 };
106 
107 static const short _indic_syllable_machine_index_offsets[] = {
108 	0, 2, 8, 12, 17, 23, 25, 27,
109 	33, 44, 50, 52, 56, 61, 67, 69,
110 	71, 77, 88, 99, 110, 112, 116, 121,
111 	127, 129, 131, 137, 143, 154, 156, 160,
112 	165, 171, 173, 175, 181, 187, 192, 194,
113 	214, 230, 246, 261, 278, 285, 292, 294,
114 	301, 318, 335, 352, 361, 369, 376, 384,
115 	391, 400, 407, 423, 439, 455, 471, 486,
116 	503, 519, 535, 550, 567, 574, 576, 583,
117 	600, 617, 626, 634, 641, 649, 656, 663,
118 	672, 679, 695, 711, 717, 733, 749, 764,
119 	781, 797, 814, 821, 823, 830, 847, 864,
120 	873, 881, 888, 904, 912, 919, 926, 935,
121 	942, 958, 969, 975, 991, 1007, 1022, 1039,
122 	1055, 1072, 1079, 1081, 1088, 1105, 1122, 1131,
123 	1139, 1146, 1162, 1170, 1177, 1184, 1193, 1200,
124 	1218, 1234, 1252, 1263, 1270, 1272, 1279, 1296,
125 	1305, 1312, 1319, 1321, 1328
126 };
127 
128 static const unsigned char _indic_syllable_machine_indicies[] = {
129 	1, 0, 2, 3, 3, 4, 1, 0,
130 	3, 3, 4, 0, 3, 3, 4, 1,
131 	0, 5, 3, 3, 4, 1, 0, 6,
132 	0, 7, 0, 8, 3, 3, 4, 1,
133 	0, 2, 3, 3, 4, 1, 0, 0,
134 	0, 0, 9, 0, 11, 12, 12, 13,
135 	14, 10, 14, 10, 12, 12, 13, 10,
136 	12, 12, 13, 14, 10, 15, 12, 12,
137 	13, 14, 10, 16, 10, 17, 10, 18,
138 	12, 12, 13, 14, 10, 11, 12, 12,
139 	13, 14, 10, 10, 10, 10, 19, 10,
140 	11, 12, 12, 13, 14, 10, 10, 10,
141 	10, 20, 10, 22, 23, 23, 24, 25,
142 	21, 21, 21, 21, 26, 21, 25, 21,
143 	23, 23, 24, 27, 23, 23, 24, 25,
144 	21, 28, 23, 23, 24, 25, 21, 29,
145 	21, 30, 21, 22, 23, 23, 24, 25,
146 	21, 31, 23, 23, 24, 25, 21, 33,
147 	34, 34, 35, 36, 32, 32, 32, 32,
148 	37, 32, 36, 32, 34, 34, 35, 32,
149 	34, 34, 35, 36, 32, 38, 34, 34,
150 	35, 36, 32, 39, 32, 40, 32, 33,
151 	34, 34, 35, 36, 32, 41, 34, 34,
152 	35, 36, 32, 23, 23, 24, 1, 0,
153 	43, 42, 45, 46, 47, 48, 49, 50,
154 	24, 25, 44, 51, 52, 52, 26, 44,
155 	53, 54, 55, 56, 57, 44, 59, 60,
156 	61, 62, 4, 1, 58, 63, 58, 58,
157 	9, 58, 58, 58, 64, 58, 65, 60,
158 	66, 66, 4, 1, 58, 63, 58, 58,
159 	58, 58, 58, 58, 64, 58, 60, 66,
160 	66, 4, 1, 58, 63, 58, 58, 58,
161 	58, 58, 58, 64, 58, 45, 58, 58,
162 	58, 67, 68, 58, 1, 58, 63, 58,
163 	58, 58, 58, 58, 45, 58, 69, 69,
164 	58, 1, 58, 63, 58, 63, 58, 58,
165 	70, 58, 63, 58, 63, 58, 63, 58,
166 	58, 58, 58, 63, 58, 45, 58, 71,
167 	58, 69, 69, 58, 1, 58, 63, 58,
168 	58, 58, 58, 58, 45, 58, 45, 58,
169 	58, 58, 69, 69, 58, 1, 58, 63,
170 	58, 58, 58, 58, 58, 45, 58, 45,
171 	58, 58, 58, 69, 68, 58, 1, 58,
172 	63, 58, 58, 58, 58, 58, 45, 58,
173 	72, 7, 73, 74, 4, 1, 58, 63,
174 	58, 7, 73, 74, 4, 1, 58, 63,
175 	58, 73, 73, 4, 1, 58, 63, 58,
176 	75, 76, 76, 4, 1, 58, 63, 58,
177 	67, 77, 58, 1, 58, 63, 58, 67,
178 	58, 69, 69, 58, 1, 58, 63, 58,
179 	69, 77, 58, 1, 58, 63, 58, 59,
180 	60, 66, 66, 4, 1, 58, 63, 58,
181 	58, 58, 58, 58, 58, 64, 58, 59,
182 	60, 61, 66, 4, 1, 58, 63, 58,
183 	58, 9, 58, 58, 58, 64, 58, 79,
184 	80, 81, 82, 13, 14, 78, 83, 78,
185 	78, 20, 78, 78, 78, 84, 78, 85,
186 	80, 86, 82, 13, 14, 78, 83, 78,
187 	78, 78, 78, 78, 78, 84, 78, 80,
188 	86, 82, 13, 14, 78, 83, 78, 78,
189 	78, 78, 78, 78, 84, 78, 87, 78,
190 	78, 78, 88, 89, 78, 14, 78, 83,
191 	78, 78, 78, 78, 78, 87, 78, 90,
192 	80, 91, 92, 13, 14, 78, 83, 78,
193 	78, 19, 78, 78, 78, 84, 78, 93,
194 	80, 86, 86, 13, 14, 78, 83, 78,
195 	78, 78, 78, 78, 78, 84, 78, 80,
196 	86, 86, 13, 14, 78, 83, 78, 78,
197 	78, 78, 78, 78, 84, 78, 87, 78,
198 	78, 78, 94, 89, 78, 14, 78, 83,
199 	78, 78, 78, 78, 78, 87, 78, 83,
200 	78, 78, 95, 78, 83, 78, 83, 78,
201 	83, 78, 78, 78, 78, 83, 78, 87,
202 	78, 96, 78, 94, 94, 78, 14, 78,
203 	83, 78, 78, 78, 78, 78, 87, 78,
204 	87, 78, 78, 78, 94, 94, 78, 14,
205 	78, 83, 78, 78, 78, 78, 78, 87,
206 	78, 97, 17, 98, 99, 13, 14, 78,
207 	83, 78, 17, 98, 99, 13, 14, 78,
208 	83, 78, 98, 98, 13, 14, 78, 83,
209 	78, 100, 101, 101, 13, 14, 78, 83,
210 	78, 88, 102, 78, 14, 78, 83, 78,
211 	94, 94, 78, 14, 78, 83, 78, 88,
212 	78, 94, 94, 78, 14, 78, 83, 78,
213 	94, 102, 78, 14, 78, 83, 78, 90,
214 	80, 86, 86, 13, 14, 78, 83, 78,
215 	78, 78, 78, 78, 78, 84, 78, 90,
216 	80, 91, 86, 13, 14, 78, 83, 78,
217 	78, 19, 78, 78, 78, 84, 78, 11,
218 	12, 12, 13, 14, 78, 79, 80, 86,
219 	82, 13, 14, 78, 83, 78, 78, 78,
220 	78, 78, 78, 84, 78, 104, 48, 105,
221 	105, 24, 25, 103, 51, 103, 103, 103,
222 	103, 103, 103, 55, 103, 48, 105, 105,
223 	24, 25, 103, 51, 103, 103, 103, 103,
224 	103, 103, 55, 103, 106, 103, 103, 103,
225 	107, 108, 103, 25, 103, 51, 103, 103,
226 	103, 103, 103, 106, 103, 47, 48, 109,
227 	110, 24, 25, 103, 51, 103, 103, 26,
228 	103, 103, 103, 55, 103, 106, 103, 103,
229 	103, 111, 108, 103, 25, 103, 51, 103,
230 	103, 103, 103, 103, 106, 103, 51, 103,
231 	103, 112, 103, 51, 103, 51, 103, 51,
232 	103, 103, 103, 103, 51, 103, 106, 103,
233 	113, 103, 111, 111, 103, 25, 103, 51,
234 	103, 103, 103, 103, 103, 106, 103, 106,
235 	103, 103, 103, 111, 111, 103, 25, 103,
236 	51, 103, 103, 103, 103, 103, 106, 103,
237 	114, 30, 115, 116, 24, 25, 103, 51,
238 	103, 30, 115, 116, 24, 25, 103, 51,
239 	103, 115, 115, 24, 25, 103, 51, 103,
240 	47, 48, 105, 105, 24, 25, 103, 51,
241 	103, 103, 103, 103, 103, 103, 55, 103,
242 	117, 118, 118, 24, 25, 103, 51, 103,
243 	107, 119, 103, 25, 103, 51, 103, 111,
244 	111, 103, 25, 103, 51, 103, 107, 103,
245 	111, 111, 103, 25, 103, 51, 103, 111,
246 	119, 103, 25, 103, 51, 103, 47, 48,
247 	109, 105, 24, 25, 103, 51, 103, 103,
248 	26, 103, 103, 103, 55, 103, 22, 23,
249 	23, 24, 25, 120, 120, 120, 120, 26,
250 	120, 22, 23, 23, 24, 25, 120, 122,
251 	123, 124, 125, 35, 36, 121, 126, 121,
252 	121, 37, 121, 121, 121, 127, 121, 128,
253 	123, 125, 125, 35, 36, 121, 126, 121,
254 	121, 121, 121, 121, 121, 127, 121, 123,
255 	125, 125, 35, 36, 121, 126, 121, 121,
256 	121, 121, 121, 121, 127, 121, 129, 121,
257 	121, 121, 130, 131, 121, 36, 121, 126,
258 	121, 121, 121, 121, 121, 129, 121, 122,
259 	123, 124, 52, 35, 36, 121, 126, 121,
260 	121, 37, 121, 121, 121, 127, 121, 129,
261 	121, 121, 121, 132, 131, 121, 36, 121,
262 	126, 121, 121, 121, 121, 121, 129, 121,
263 	126, 121, 121, 133, 121, 126, 121, 126,
264 	121, 126, 121, 121, 121, 121, 126, 121,
265 	129, 121, 134, 121, 132, 132, 121, 36,
266 	121, 126, 121, 121, 121, 121, 121, 129,
267 	121, 129, 121, 121, 121, 132, 132, 121,
268 	36, 121, 126, 121, 121, 121, 121, 121,
269 	129, 121, 135, 40, 136, 137, 35, 36,
270 	121, 126, 121, 40, 136, 137, 35, 36,
271 	121, 126, 121, 136, 136, 35, 36, 121,
272 	126, 121, 122, 123, 125, 125, 35, 36,
273 	121, 126, 121, 121, 121, 121, 121, 121,
274 	127, 121, 138, 139, 139, 35, 36, 121,
275 	126, 121, 130, 140, 121, 36, 121, 126,
276 	121, 132, 132, 121, 36, 121, 126, 121,
277 	130, 121, 132, 132, 121, 36, 121, 126,
278 	121, 132, 140, 121, 36, 121, 126, 121,
279 	45, 46, 47, 48, 109, 105, 24, 25,
280 	103, 51, 52, 52, 26, 103, 103, 45,
281 	55, 103, 59, 141, 61, 62, 4, 1,
282 	58, 63, 58, 58, 9, 58, 58, 58,
283 	64, 58, 45, 46, 47, 48, 142, 143,
284 	24, 144, 58, 145, 58, 52, 26, 58,
285 	58, 45, 55, 58, 22, 146, 146, 24,
286 	144, 58, 63, 58, 58, 26, 58, 145,
287 	58, 58, 147, 58, 145, 58, 145, 58,
288 	145, 58, 58, 58, 58, 145, 58, 45,
289 	58, 71, 22, 146, 146, 24, 144, 58,
290 	63, 58, 58, 58, 58, 58, 45, 58,
291 	149, 148, 150, 150, 148, 43, 148, 151,
292 	148, 150, 150, 148, 43, 148, 151, 148,
293 	151, 148, 148, 152, 148, 151, 148, 151,
294 	148, 151, 148, 148, 148, 148, 151, 148,
295 	45, 120, 120, 120, 120, 120, 120, 120,
296 	120, 120, 52, 120, 120, 120, 120, 45,
297 	120, 0
298 };
299 
300 static const unsigned char _indic_syllable_machine_trans_targs[] = {
301 	39, 45, 50, 2, 51, 5, 6, 53,
302 	57, 58, 39, 67, 11, 73, 68, 14,
303 	15, 75, 80, 81, 84, 39, 89, 21,
304 	95, 90, 98, 39, 24, 25, 97, 103,
305 	39, 112, 30, 118, 113, 121, 33, 34,
306 	120, 126, 39, 137, 39, 40, 60, 85,
307 	87, 105, 106, 91, 107, 127, 128, 99,
308 	135, 140, 39, 41, 43, 8, 59, 46,
309 	54, 42, 1, 44, 48, 0, 47, 49,
310 	52, 3, 4, 55, 7, 56, 39, 61,
311 	63, 18, 83, 69, 76, 62, 9, 64,
312 	78, 71, 65, 17, 82, 66, 10, 70,
313 	72, 74, 12, 13, 77, 16, 79, 39,
314 	86, 26, 88, 101, 93, 19, 104, 20,
315 	92, 94, 96, 22, 23, 100, 27, 102,
316 	39, 39, 108, 110, 28, 35, 114, 122,
317 	109, 111, 124, 116, 29, 115, 117, 119,
318 	31, 32, 123, 36, 125, 129, 130, 134,
319 	131, 132, 37, 133, 39, 136, 38, 138,
320 	139
321 };
322 
323 static const char _indic_syllable_machine_trans_actions[] = {
324 	1, 0, 2, 0, 2, 0, 0, 2,
325 	2, 2, 3, 2, 0, 2, 0, 0,
326 	0, 2, 2, 2, 2, 4, 2, 0,
327 	5, 0, 5, 6, 0, 0, 5, 2,
328 	7, 2, 0, 2, 0, 2, 0, 0,
329 	2, 2, 8, 0, 11, 2, 2, 5,
330 	0, 12, 12, 0, 2, 5, 2, 5,
331 	2, 0, 13, 2, 0, 0, 2, 0,
332 	2, 2, 0, 2, 2, 0, 0, 2,
333 	2, 0, 0, 0, 0, 2, 14, 2,
334 	0, 0, 2, 0, 2, 2, 0, 2,
335 	2, 2, 2, 0, 2, 2, 0, 0,
336 	2, 2, 0, 0, 0, 0, 2, 15,
337 	5, 0, 5, 2, 2, 0, 5, 0,
338 	0, 2, 5, 0, 0, 0, 0, 2,
339 	16, 17, 2, 0, 0, 0, 0, 2,
340 	2, 2, 2, 2, 0, 0, 2, 2,
341 	0, 0, 0, 0, 2, 0, 18, 18,
342 	0, 0, 0, 0, 19, 2, 0, 0,
343 	0
344 };
345 
346 static const char _indic_syllable_machine_to_state_actions[] = {
347 	0, 0, 0, 0, 0, 0, 0, 0,
348 	0, 0, 0, 0, 0, 0, 0, 0,
349 	0, 0, 0, 0, 0, 0, 0, 0,
350 	0, 0, 0, 0, 0, 0, 0, 0,
351 	0, 0, 0, 0, 0, 0, 0, 9,
352 	0, 0, 0, 0, 0, 0, 0, 0,
353 	0, 0, 0, 0, 0, 0, 0, 0,
354 	0, 0, 0, 0, 0, 0, 0, 0,
355 	0, 0, 0, 0, 0, 0, 0, 0,
356 	0, 0, 0, 0, 0, 0, 0, 0,
357 	0, 0, 0, 0, 0, 0, 0, 0,
358 	0, 0, 0, 0, 0, 0, 0, 0,
359 	0, 0, 0, 0, 0, 0, 0, 0,
360 	0, 0, 0, 0, 0, 0, 0, 0,
361 	0, 0, 0, 0, 0, 0, 0, 0,
362 	0, 0, 0, 0, 0, 0, 0, 0,
363 	0, 0, 0, 0, 0, 0, 0, 0,
364 	0, 0, 0, 0, 0
365 };
366 
367 static const char _indic_syllable_machine_from_state_actions[] = {
368 	0, 0, 0, 0, 0, 0, 0, 0,
369 	0, 0, 0, 0, 0, 0, 0, 0,
370 	0, 0, 0, 0, 0, 0, 0, 0,
371 	0, 0, 0, 0, 0, 0, 0, 0,
372 	0, 0, 0, 0, 0, 0, 0, 10,
373 	0, 0, 0, 0, 0, 0, 0, 0,
374 	0, 0, 0, 0, 0, 0, 0, 0,
375 	0, 0, 0, 0, 0, 0, 0, 0,
376 	0, 0, 0, 0, 0, 0, 0, 0,
377 	0, 0, 0, 0, 0, 0, 0, 0,
378 	0, 0, 0, 0, 0, 0, 0, 0,
379 	0, 0, 0, 0, 0, 0, 0, 0,
380 	0, 0, 0, 0, 0, 0, 0, 0,
381 	0, 0, 0, 0, 0, 0, 0, 0,
382 	0, 0, 0, 0, 0, 0, 0, 0,
383 	0, 0, 0, 0, 0, 0, 0, 0,
384 	0, 0, 0, 0, 0, 0, 0, 0,
385 	0, 0, 0, 0, 0
386 };
387 
388 static const short _indic_syllable_machine_eof_trans[] = {
389 	1, 1, 1, 1, 1, 1, 1, 1,
390 	1, 11, 11, 11, 11, 11, 11, 11,
391 	11, 11, 11, 22, 22, 28, 22, 22,
392 	22, 22, 22, 22, 33, 33, 33, 33,
393 	33, 33, 33, 33, 33, 1, 43, 0,
394 	59, 59, 59, 59, 59, 59, 59, 59,
395 	59, 59, 59, 59, 59, 59, 59, 59,
396 	59, 59, 59, 59, 79, 79, 79, 79,
397 	79, 79, 79, 79, 79, 79, 79, 79,
398 	79, 79, 79, 79, 79, 79, 79, 79,
399 	79, 79, 79, 79, 79, 104, 104, 104,
400 	104, 104, 104, 104, 104, 104, 104, 104,
401 	104, 104, 104, 104, 104, 104, 104, 104,
402 	104, 121, 121, 122, 122, 122, 122, 122,
403 	122, 122, 122, 122, 122, 122, 122, 122,
404 	122, 122, 122, 122, 122, 122, 122, 104,
405 	59, 59, 59, 59, 59, 59, 59, 149,
406 	149, 149, 149, 149, 121
407 };
408 
409 static const int indic_syllable_machine_start = 39;
410 static const int indic_syllable_machine_first_final = 39;
411 static const int indic_syllable_machine_error = -1;
412 
413 static const int indic_syllable_machine_en_main = 39;
414 
415 
416 #line 46 "hb-ot-shape-complex-indic-machine.rl"
417 
418 
419 
420 #line 102 "hb-ot-shape-complex-indic-machine.rl"
421 
422 
423 #define found_syllable(syllable_type) \
424   HB_STMT_START { \
425     if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
426     for (unsigned int i = ts; i < te; i++) \
427       info[i].syllable() = (syllable_serial << 4) | syllable_type; \
428     syllable_serial++; \
429     if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
430   } HB_STMT_END
431 
432 static void
find_syllables_indic(hb_buffer_t * buffer)433 find_syllables_indic (hb_buffer_t *buffer)
434 {
435   unsigned int p, pe, eof, ts, te, act;
436   int cs;
437   hb_glyph_info_t *info = buffer->info;
438 
439 #line 440 "hb-ot-shape-complex-indic-machine.hh"
440 	{
441 	cs = indic_syllable_machine_start;
442 	ts = 0;
443 	te = 0;
444 	act = 0;
445 	}
446 
447 #line 122 "hb-ot-shape-complex-indic-machine.rl"
448 
449 
450   p = 0;
451   pe = eof = buffer->len;
452 
453   unsigned int syllable_serial = 1;
454 
455 #line 456 "hb-ot-shape-complex-indic-machine.hh"
456 	{
457 	int _slen;
458 	int _trans;
459 	const unsigned char *_keys;
460 	const unsigned char *_inds;
461 	if ( p == pe )
462 		goto _test_eof;
463 _resume:
464 	switch ( _indic_syllable_machine_from_state_actions[cs] ) {
465 	case 10:
466 #line 1 "NONE"
467 	{ts = p;}
468 	break;
469 #line 470 "hb-ot-shape-complex-indic-machine.hh"
470 	}
471 
472 	_keys = _indic_syllable_machine_trans_keys + (cs<<1);
473 	_inds = _indic_syllable_machine_indicies + _indic_syllable_machine_index_offsets[cs];
474 
475 	_slen = _indic_syllable_machine_key_spans[cs];
476 	_trans = _inds[ _slen > 0 && _keys[0] <=( info[p].indic_category()) &&
477 		( info[p].indic_category()) <= _keys[1] ?
478 		( info[p].indic_category()) - _keys[0] : _slen ];
479 
480 _eof_trans:
481 	cs = _indic_syllable_machine_trans_targs[_trans];
482 
483 	if ( _indic_syllable_machine_trans_actions[_trans] == 0 )
484 		goto _again;
485 
486 	switch ( _indic_syllable_machine_trans_actions[_trans] ) {
487 	case 2:
488 #line 1 "NONE"
489 	{te = p+1;}
490 	break;
491 	case 11:
492 #line 98 "hb-ot-shape-complex-indic-machine.rl"
493 	{te = p+1;{ found_syllable (indic_non_indic_cluster); }}
494 	break;
495 	case 13:
496 #line 93 "hb-ot-shape-complex-indic-machine.rl"
497 	{te = p;p--;{ found_syllable (indic_consonant_syllable); }}
498 	break;
499 	case 14:
500 #line 94 "hb-ot-shape-complex-indic-machine.rl"
501 	{te = p;p--;{ found_syllable (indic_vowel_syllable); }}
502 	break;
503 	case 17:
504 #line 95 "hb-ot-shape-complex-indic-machine.rl"
505 	{te = p;p--;{ found_syllable (indic_standalone_cluster); }}
506 	break;
507 	case 19:
508 #line 96 "hb-ot-shape-complex-indic-machine.rl"
509 	{te = p;p--;{ found_syllable (indic_symbol_cluster); }}
510 	break;
511 	case 15:
512 #line 97 "hb-ot-shape-complex-indic-machine.rl"
513 	{te = p;p--;{ found_syllable (indic_broken_cluster); }}
514 	break;
515 	case 16:
516 #line 98 "hb-ot-shape-complex-indic-machine.rl"
517 	{te = p;p--;{ found_syllable (indic_non_indic_cluster); }}
518 	break;
519 	case 1:
520 #line 93 "hb-ot-shape-complex-indic-machine.rl"
521 	{{p = ((te))-1;}{ found_syllable (indic_consonant_syllable); }}
522 	break;
523 	case 3:
524 #line 94 "hb-ot-shape-complex-indic-machine.rl"
525 	{{p = ((te))-1;}{ found_syllable (indic_vowel_syllable); }}
526 	break;
527 	case 7:
528 #line 95 "hb-ot-shape-complex-indic-machine.rl"
529 	{{p = ((te))-1;}{ found_syllable (indic_standalone_cluster); }}
530 	break;
531 	case 8:
532 #line 96 "hb-ot-shape-complex-indic-machine.rl"
533 	{{p = ((te))-1;}{ found_syllable (indic_symbol_cluster); }}
534 	break;
535 	case 4:
536 #line 97 "hb-ot-shape-complex-indic-machine.rl"
537 	{{p = ((te))-1;}{ found_syllable (indic_broken_cluster); }}
538 	break;
539 	case 6:
540 #line 1 "NONE"
541 	{	switch( act ) {
542 	case 1:
543 	{{p = ((te))-1;} found_syllable (indic_consonant_syllable); }
544 	break;
545 	case 5:
546 	{{p = ((te))-1;} found_syllable (indic_broken_cluster); }
547 	break;
548 	case 6:
549 	{{p = ((te))-1;} found_syllable (indic_non_indic_cluster); }
550 	break;
551 	}
552 	}
553 	break;
554 	case 18:
555 #line 1 "NONE"
556 	{te = p+1;}
557 #line 93 "hb-ot-shape-complex-indic-machine.rl"
558 	{act = 1;}
559 	break;
560 	case 5:
561 #line 1 "NONE"
562 	{te = p+1;}
563 #line 97 "hb-ot-shape-complex-indic-machine.rl"
564 	{act = 5;}
565 	break;
566 	case 12:
567 #line 1 "NONE"
568 	{te = p+1;}
569 #line 98 "hb-ot-shape-complex-indic-machine.rl"
570 	{act = 6;}
571 	break;
572 #line 573 "hb-ot-shape-complex-indic-machine.hh"
573 	}
574 
575 _again:
576 	switch ( _indic_syllable_machine_to_state_actions[cs] ) {
577 	case 9:
578 #line 1 "NONE"
579 	{ts = 0;}
580 	break;
581 #line 582 "hb-ot-shape-complex-indic-machine.hh"
582 	}
583 
584 	if ( ++p != pe )
585 		goto _resume;
586 	_test_eof: {}
587 	if ( p == eof )
588 	{
589 	if ( _indic_syllable_machine_eof_trans[cs] > 0 ) {
590 		_trans = _indic_syllable_machine_eof_trans[cs] - 1;
591 		goto _eof_trans;
592 	}
593 	}
594 
595 	}
596 
597 #line 130 "hb-ot-shape-complex-indic-machine.rl"
598 
599 }
600 
601 #undef found_syllable
602 
603 #endif /* HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH */
604