xref: /aosp_15_r20/external/harfbuzz_ng/src/hb-ot-shaper-myanmar-machine.hh (revision 2d1272b857b1f7575e6e246373e1cb218663db8a)
1 
2 #line 1 "hb-ot-shaper-myanmar-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_SHAPER_MYANMAR_MACHINE_HH
30 #define HB_OT_SHAPER_MYANMAR_MACHINE_HH
31 
32 #include "hb.hh"
33 
34 #include "hb-ot-layout.hh"
35 #include "hb-ot-shaper-indic.hh"
36 
37 /* buffer var allocations */
38 #define myanmar_category() ot_shaper_var_u8_category() /* myanmar_category_t */
39 #define myanmar_position() ot_shaper_var_u8_auxiliary() /* myanmar_position_t */
40 
41 using myanmar_category_t = unsigned;
42 using myanmar_position_t = ot_position_t;
43 
44 #define M_Cat(Cat) myanmar_syllable_machine_ex_##Cat
45 
46 enum myanmar_syllable_type_t {
47   myanmar_consonant_syllable,
48   myanmar_broken_cluster,
49   myanmar_non_myanmar_cluster,
50 };
51 
52 
53 #line 54 "hb-ot-shaper-myanmar-machine.hh"
54 #define myanmar_syllable_machine_ex_A 9u
55 #define myanmar_syllable_machine_ex_As 32u
56 #define myanmar_syllable_machine_ex_C 1u
57 #define myanmar_syllable_machine_ex_CS 18u
58 #define myanmar_syllable_machine_ex_DB 3u
59 #define myanmar_syllable_machine_ex_DOTTEDCIRCLE 11u
60 #define myanmar_syllable_machine_ex_GB 10u
61 #define myanmar_syllable_machine_ex_H 4u
62 #define myanmar_syllable_machine_ex_IV 2u
63 #define myanmar_syllable_machine_ex_MH 35u
64 #define myanmar_syllable_machine_ex_ML 41u
65 #define myanmar_syllable_machine_ex_MR 36u
66 #define myanmar_syllable_machine_ex_MW 37u
67 #define myanmar_syllable_machine_ex_MY 38u
68 #define myanmar_syllable_machine_ex_PT 39u
69 #define myanmar_syllable_machine_ex_Ra 15u
70 #define myanmar_syllable_machine_ex_SM 8u
71 #define myanmar_syllable_machine_ex_VAbv 20u
72 #define myanmar_syllable_machine_ex_VBlw 21u
73 #define myanmar_syllable_machine_ex_VPre 22u
74 #define myanmar_syllable_machine_ex_VPst 23u
75 #define myanmar_syllable_machine_ex_VS 40u
76 #define myanmar_syllable_machine_ex_ZWJ 6u
77 #define myanmar_syllable_machine_ex_ZWNJ 5u
78 
79 
80 #line 81 "hb-ot-shaper-myanmar-machine.hh"
81 static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
82 	1u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u,
83 	5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u,
84 	3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 41u,
85 	3u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u,
86 	5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 41u, 3u, 39u,
87 	3u, 39u, 3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u,
88 	3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 1u, 41u, 1u, 15u, 0
89 };
90 
91 static const char _myanmar_syllable_machine_key_spans[] = {
92 	41, 39, 35, 4, 39, 37, 37, 35,
93 	35, 37, 37, 39, 35, 15, 37, 37,
94 	38, 37, 39, 39, 37, 39, 39, 39,
95 	39, 39, 35, 4, 39, 37, 37, 35,
96 	35, 37, 37, 39, 35, 15, 39, 37,
97 	37, 38, 37, 39, 39, 37, 39, 39,
98 	39, 39, 39, 39, 39, 41, 15
99 };
100 
101 static const short _myanmar_syllable_machine_index_offsets[] = {
102 	0, 42, 82, 118, 123, 163, 201, 239,
103 	275, 311, 349, 387, 427, 463, 479, 517,
104 	555, 594, 632, 672, 712, 750, 790, 830,
105 	870, 910, 950, 986, 991, 1031, 1069, 1107,
106 	1143, 1179, 1217, 1255, 1295, 1331, 1347, 1387,
107 	1425, 1463, 1502, 1540, 1580, 1620, 1658, 1698,
108 	1738, 1778, 1818, 1858, 1898, 1938, 1980
109 };
110 
111 static const char _myanmar_syllable_machine_indicies[] = {
112 	1, 1, 2, 3, 4, 4, 0, 5,
113 	6, 1, 1, 0, 0, 0, 7, 0,
114 	0, 8, 0, 9, 10, 11, 12, 0,
115 	0, 0, 0, 0, 0, 0, 0, 13,
116 	0, 0, 14, 15, 16, 17, 18, 19,
117 	20, 0, 22, 23, 24, 24, 21, 25,
118 	26, 21, 21, 21, 21, 21, 21, 21,
119 	21, 21, 21, 27, 28, 29, 30, 21,
120 	21, 21, 21, 21, 21, 21, 21, 31,
121 	21, 21, 32, 33, 34, 35, 36, 37,
122 	38, 21, 24, 24, 21, 25, 21, 21,
123 	21, 21, 21, 21, 21, 21, 21, 21,
124 	21, 21, 21, 21, 30, 21, 21, 21,
125 	21, 21, 21, 21, 21, 39, 21, 21,
126 	21, 21, 21, 21, 36, 21, 24, 24,
127 	21, 25, 21, 22, 21, 24, 24, 21,
128 	25, 26, 21, 21, 21, 21, 21, 21,
129 	21, 21, 21, 21, 40, 21, 21, 30,
130 	21, 21, 21, 21, 21, 21, 21, 21,
131 	41, 21, 21, 42, 21, 21, 21, 36,
132 	21, 41, 21, 22, 21, 24, 24, 21,
133 	25, 26, 21, 21, 21, 21, 21, 21,
134 	21, 21, 21, 21, 21, 21, 21, 30,
135 	21, 21, 21, 21, 21, 21, 21, 21,
136 	21, 21, 21, 21, 21, 21, 21, 36,
137 	21, 43, 21, 24, 24, 21, 25, 36,
138 	21, 21, 21, 21, 21, 21, 21, 21,
139 	21, 21, 21, 21, 21, 21, 21, 21,
140 	21, 21, 21, 21, 21, 21, 44, 21,
141 	21, 21, 21, 21, 21, 36, 21, 24,
142 	24, 21, 25, 21, 21, 21, 21, 21,
143 	21, 21, 21, 21, 21, 21, 21, 21,
144 	21, 21, 21, 21, 21, 21, 21, 21,
145 	21, 21, 44, 21, 21, 21, 21, 21,
146 	21, 36, 21, 24, 24, 21, 25, 21,
147 	21, 21, 21, 21, 21, 21, 21, 21,
148 	21, 21, 21, 21, 21, 21, 21, 21,
149 	21, 21, 21, 21, 21, 21, 21, 21,
150 	21, 21, 21, 21, 21, 36, 21, 22,
151 	21, 24, 24, 21, 25, 26, 21, 21,
152 	21, 21, 21, 21, 21, 21, 21, 21,
153 	40, 21, 21, 30, 21, 21, 21, 21,
154 	21, 21, 21, 21, 21, 21, 21, 21,
155 	21, 21, 21, 36, 21, 22, 21, 24,
156 	24, 21, 25, 26, 21, 21, 21, 21,
157 	21, 21, 21, 21, 21, 21, 40, 21,
158 	21, 30, 21, 21, 21, 21, 21, 21,
159 	21, 21, 41, 21, 21, 21, 21, 21,
160 	21, 36, 21, 22, 21, 24, 24, 21,
161 	25, 26, 21, 21, 21, 21, 21, 21,
162 	21, 21, 21, 21, 40, 21, 21, 30,
163 	21, 21, 21, 21, 21, 21, 21, 21,
164 	41, 21, 21, 21, 21, 21, 21, 36,
165 	21, 41, 21, 24, 24, 21, 25, 21,
166 	21, 21, 21, 21, 21, 21, 21, 21,
167 	21, 21, 21, 21, 21, 30, 21, 21,
168 	21, 21, 21, 21, 21, 21, 21, 21,
169 	21, 21, 21, 21, 21, 36, 21, 1,
170 	1, 21, 21, 21, 21, 21, 21, 21,
171 	21, 21, 21, 21, 21, 1, 21, 22,
172 	21, 24, 24, 21, 25, 26, 21, 21,
173 	21, 21, 21, 21, 21, 21, 21, 21,
174 	27, 28, 21, 30, 21, 21, 21, 21,
175 	21, 21, 21, 21, 21, 21, 21, 21,
176 	21, 21, 21, 36, 21, 22, 21, 24,
177 	24, 21, 25, 26, 21, 21, 21, 21,
178 	21, 21, 21, 21, 21, 21, 21, 28,
179 	21, 30, 21, 21, 21, 21, 21, 21,
180 	21, 21, 21, 21, 21, 21, 21, 21,
181 	21, 36, 21, 22, 21, 24, 24, 21,
182 	25, 26, 21, 21, 21, 21, 21, 21,
183 	21, 21, 21, 21, 27, 28, 29, 30,
184 	21, 21, 21, 21, 21, 21, 21, 21,
185 	21, 21, 21, 21, 21, 21, 21, 36,
186 	45, 21, 22, 21, 24, 24, 21, 25,
187 	26, 21, 21, 21, 21, 21, 21, 21,
188 	21, 21, 21, 27, 28, 29, 30, 21,
189 	21, 21, 21, 21, 21, 21, 21, 21,
190 	21, 21, 21, 21, 21, 21, 36, 21,
191 	22, 21, 24, 24, 21, 25, 26, 21,
192 	21, 21, 21, 21, 21, 21, 21, 21,
193 	21, 27, 28, 29, 30, 21, 21, 21,
194 	21, 21, 21, 21, 21, 31, 21, 21,
195 	32, 33, 34, 35, 36, 21, 38, 21,
196 	22, 21, 24, 24, 21, 25, 26, 21,
197 	21, 21, 21, 21, 21, 21, 21, 21,
198 	21, 27, 28, 29, 30, 21, 21, 21,
199 	21, 21, 21, 21, 21, 45, 21, 21,
200 	21, 21, 21, 21, 36, 21, 38, 21,
201 	22, 21, 24, 24, 21, 25, 26, 21,
202 	21, 21, 21, 21, 21, 21, 21, 21,
203 	21, 27, 28, 29, 30, 21, 21, 21,
204 	21, 21, 21, 21, 21, 45, 21, 21,
205 	21, 21, 21, 21, 36, 21, 22, 21,
206 	24, 24, 21, 25, 26, 21, 21, 21,
207 	21, 21, 21, 21, 21, 21, 21, 27,
208 	28, 29, 30, 21, 21, 21, 21, 21,
209 	21, 21, 21, 21, 21, 21, 32, 21,
210 	34, 21, 36, 21, 38, 21, 22, 21,
211 	24, 24, 21, 25, 26, 21, 21, 21,
212 	21, 21, 21, 21, 21, 21, 21, 27,
213 	28, 29, 30, 21, 21, 21, 21, 21,
214 	21, 21, 21, 45, 21, 21, 32, 21,
215 	21, 21, 36, 21, 38, 21, 22, 21,
216 	24, 24, 21, 25, 26, 21, 21, 21,
217 	21, 21, 21, 21, 21, 21, 21, 27,
218 	28, 29, 30, 21, 21, 21, 21, 21,
219 	21, 21, 21, 46, 21, 21, 32, 33,
220 	34, 21, 36, 21, 38, 21, 22, 21,
221 	24, 24, 21, 25, 26, 21, 21, 21,
222 	21, 21, 21, 21, 21, 21, 21, 27,
223 	28, 29, 30, 21, 21, 21, 21, 21,
224 	21, 21, 21, 21, 21, 21, 32, 33,
225 	34, 21, 36, 21, 38, 21, 22, 23,
226 	24, 24, 21, 25, 26, 21, 21, 21,
227 	21, 21, 21, 21, 21, 21, 21, 27,
228 	28, 29, 30, 21, 21, 21, 21, 21,
229 	21, 21, 21, 31, 21, 21, 32, 33,
230 	34, 35, 36, 21, 38, 21, 48, 48,
231 	47, 5, 47, 47, 47, 47, 47, 47,
232 	47, 47, 47, 47, 47, 47, 47, 47,
233 	12, 47, 47, 47, 47, 47, 47, 47,
234 	47, 49, 47, 47, 47, 47, 47, 47,
235 	18, 47, 48, 48, 47, 5, 47, 2,
236 	47, 48, 48, 47, 5, 6, 47, 47,
237 	47, 47, 47, 47, 47, 47, 47, 47,
238 	50, 47, 47, 12, 47, 47, 47, 47,
239 	47, 47, 47, 47, 51, 47, 47, 52,
240 	47, 47, 47, 18, 47, 51, 47, 2,
241 	47, 48, 48, 47, 5, 6, 47, 47,
242 	47, 47, 47, 47, 47, 47, 47, 47,
243 	47, 47, 47, 12, 47, 47, 47, 47,
244 	47, 47, 47, 47, 47, 47, 47, 47,
245 	47, 47, 47, 18, 47, 53, 47, 48,
246 	48, 47, 5, 18, 47, 47, 47, 47,
247 	47, 47, 47, 47, 47, 47, 47, 47,
248 	47, 47, 47, 47, 47, 47, 47, 47,
249 	47, 47, 54, 47, 47, 47, 47, 47,
250 	47, 18, 47, 48, 48, 47, 5, 47,
251 	47, 47, 47, 47, 47, 47, 47, 47,
252 	47, 47, 47, 47, 47, 47, 47, 47,
253 	47, 47, 47, 47, 47, 47, 54, 47,
254 	47, 47, 47, 47, 47, 18, 47, 48,
255 	48, 47, 5, 47, 47, 47, 47, 47,
256 	47, 47, 47, 47, 47, 47, 47, 47,
257 	47, 47, 47, 47, 47, 47, 47, 47,
258 	47, 47, 47, 47, 47, 47, 47, 47,
259 	47, 18, 47, 2, 47, 48, 48, 47,
260 	5, 6, 47, 47, 47, 47, 47, 47,
261 	47, 47, 47, 47, 50, 47, 47, 12,
262 	47, 47, 47, 47, 47, 47, 47, 47,
263 	47, 47, 47, 47, 47, 47, 47, 18,
264 	47, 2, 47, 48, 48, 47, 5, 6,
265 	47, 47, 47, 47, 47, 47, 47, 47,
266 	47, 47, 50, 47, 47, 12, 47, 47,
267 	47, 47, 47, 47, 47, 47, 51, 47,
268 	47, 47, 47, 47, 47, 18, 47, 2,
269 	47, 48, 48, 47, 5, 6, 47, 47,
270 	47, 47, 47, 47, 47, 47, 47, 47,
271 	50, 47, 47, 12, 47, 47, 47, 47,
272 	47, 47, 47, 47, 51, 47, 47, 47,
273 	47, 47, 47, 18, 47, 51, 47, 48,
274 	48, 47, 5, 47, 47, 47, 47, 47,
275 	47, 47, 47, 47, 47, 47, 47, 47,
276 	47, 12, 47, 47, 47, 47, 47, 47,
277 	47, 47, 47, 47, 47, 47, 47, 47,
278 	47, 18, 47, 55, 55, 47, 47, 47,
279 	47, 47, 47, 47, 47, 47, 47, 47,
280 	47, 55, 47, 2, 3, 48, 48, 47,
281 	5, 6, 47, 47, 47, 47, 47, 47,
282 	47, 47, 47, 47, 9, 10, 11, 12,
283 	47, 47, 47, 47, 47, 47, 47, 47,
284 	13, 47, 47, 14, 15, 16, 17, 18,
285 	19, 20, 47, 2, 47, 48, 48, 47,
286 	5, 6, 47, 47, 47, 47, 47, 47,
287 	47, 47, 47, 47, 9, 10, 47, 12,
288 	47, 47, 47, 47, 47, 47, 47, 47,
289 	47, 47, 47, 47, 47, 47, 47, 18,
290 	47, 2, 47, 48, 48, 47, 5, 6,
291 	47, 47, 47, 47, 47, 47, 47, 47,
292 	47, 47, 47, 10, 47, 12, 47, 47,
293 	47, 47, 47, 47, 47, 47, 47, 47,
294 	47, 47, 47, 47, 47, 18, 47, 2,
295 	47, 48, 48, 47, 5, 6, 47, 47,
296 	47, 47, 47, 47, 47, 47, 47, 47,
297 	9, 10, 11, 12, 47, 47, 47, 47,
298 	47, 47, 47, 47, 47, 47, 47, 47,
299 	47, 47, 47, 18, 56, 47, 2, 47,
300 	48, 48, 47, 5, 6, 47, 47, 47,
301 	47, 47, 47, 47, 47, 47, 47, 9,
302 	10, 11, 12, 47, 47, 47, 47, 47,
303 	47, 47, 47, 47, 47, 47, 47, 47,
304 	47, 47, 18, 47, 2, 47, 48, 48,
305 	47, 5, 6, 47, 47, 47, 47, 47,
306 	47, 47, 47, 47, 47, 9, 10, 11,
307 	12, 47, 47, 47, 47, 47, 47, 47,
308 	47, 13, 47, 47, 14, 15, 16, 17,
309 	18, 47, 20, 47, 2, 47, 48, 48,
310 	47, 5, 6, 47, 47, 47, 47, 47,
311 	47, 47, 47, 47, 47, 9, 10, 11,
312 	12, 47, 47, 47, 47, 47, 47, 47,
313 	47, 56, 47, 47, 47, 47, 47, 47,
314 	18, 47, 20, 47, 2, 47, 48, 48,
315 	47, 5, 6, 47, 47, 47, 47, 47,
316 	47, 47, 47, 47, 47, 9, 10, 11,
317 	12, 47, 47, 47, 47, 47, 47, 47,
318 	47, 56, 47, 47, 47, 47, 47, 47,
319 	18, 47, 2, 47, 48, 48, 47, 5,
320 	6, 47, 47, 47, 47, 47, 47, 47,
321 	47, 47, 47, 9, 10, 11, 12, 47,
322 	47, 47, 47, 47, 47, 47, 47, 47,
323 	47, 47, 14, 47, 16, 47, 18, 47,
324 	20, 47, 2, 47, 48, 48, 47, 5,
325 	6, 47, 47, 47, 47, 47, 47, 47,
326 	47, 47, 47, 9, 10, 11, 12, 47,
327 	47, 47, 47, 47, 47, 47, 47, 56,
328 	47, 47, 14, 47, 47, 47, 18, 47,
329 	20, 47, 2, 47, 48, 48, 47, 5,
330 	6, 47, 47, 47, 47, 47, 47, 47,
331 	47, 47, 47, 9, 10, 11, 12, 47,
332 	47, 47, 47, 47, 47, 47, 47, 57,
333 	47, 47, 14, 15, 16, 47, 18, 47,
334 	20, 47, 2, 47, 48, 48, 47, 5,
335 	6, 47, 47, 47, 47, 47, 47, 47,
336 	47, 47, 47, 9, 10, 11, 12, 47,
337 	47, 47, 47, 47, 47, 47, 47, 47,
338 	47, 47, 14, 15, 16, 47, 18, 47,
339 	20, 47, 2, 3, 48, 48, 47, 5,
340 	6, 47, 47, 47, 47, 47, 47, 47,
341 	47, 47, 47, 9, 10, 11, 12, 47,
342 	47, 47, 47, 47, 47, 47, 47, 13,
343 	47, 47, 14, 15, 16, 17, 18, 47,
344 	20, 47, 22, 23, 24, 24, 21, 25,
345 	26, 21, 21, 21, 21, 21, 21, 21,
346 	21, 21, 21, 27, 28, 29, 30, 21,
347 	21, 21, 21, 21, 21, 21, 21, 58,
348 	21, 21, 32, 33, 34, 35, 36, 37,
349 	38, 21, 22, 59, 24, 24, 21, 25,
350 	26, 21, 21, 21, 21, 21, 21, 21,
351 	21, 21, 21, 27, 28, 29, 30, 21,
352 	21, 21, 21, 21, 21, 21, 21, 31,
353 	21, 21, 32, 33, 34, 35, 36, 21,
354 	38, 21, 1, 1, 2, 3, 48, 48,
355 	47, 5, 6, 1, 1, 47, 47, 47,
356 	1, 47, 47, 47, 47, 9, 10, 11,
357 	12, 47, 47, 47, 47, 47, 47, 47,
358 	47, 13, 47, 47, 14, 15, 16, 17,
359 	18, 19, 20, 47, 1, 1, 60, 60,
360 	60, 60, 60, 60, 60, 1, 1, 60,
361 	60, 60, 1, 60, 0
362 };
363 
364 static const char _myanmar_syllable_machine_trans_targs[] = {
365 	0, 1, 26, 37, 0, 27, 29, 51,
366 	54, 39, 40, 41, 28, 43, 44, 46,
367 	47, 48, 30, 50, 45, 0, 2, 13,
368 	0, 3, 5, 14, 15, 16, 4, 18,
369 	19, 21, 22, 23, 6, 25, 20, 12,
370 	9, 10, 11, 7, 8, 17, 24, 0,
371 	0, 36, 33, 34, 35, 31, 32, 38,
372 	42, 49, 52, 53, 0
373 };
374 
375 static const char _myanmar_syllable_machine_trans_actions[] = {
376 	3, 0, 0, 0, 4, 0, 0, 0,
377 	0, 0, 0, 0, 0, 0, 0, 0,
378 	0, 0, 0, 0, 0, 5, 0, 0,
379 	6, 0, 0, 0, 0, 0, 0, 0,
380 	0, 0, 0, 0, 0, 0, 0, 0,
381 	0, 0, 0, 0, 0, 0, 0, 7,
382 	8, 0, 0, 0, 0, 0, 0, 0,
383 	0, 0, 0, 0, 9
384 };
385 
386 static const char _myanmar_syllable_machine_to_state_actions[] = {
387 	1, 0, 0, 0, 0, 0, 0, 0,
388 	0, 0, 0, 0, 0, 0, 0, 0,
389 	0, 0, 0, 0, 0, 0, 0, 0,
390 	0, 0, 0, 0, 0, 0, 0, 0,
391 	0, 0, 0, 0, 0, 0, 0, 0,
392 	0, 0, 0, 0, 0, 0, 0, 0,
393 	0, 0, 0, 0, 0, 0, 0
394 };
395 
396 static const char _myanmar_syllable_machine_from_state_actions[] = {
397 	2, 0, 0, 0, 0, 0, 0, 0,
398 	0, 0, 0, 0, 0, 0, 0, 0,
399 	0, 0, 0, 0, 0, 0, 0, 0,
400 	0, 0, 0, 0, 0, 0, 0, 0,
401 	0, 0, 0, 0, 0, 0, 0, 0,
402 	0, 0, 0, 0, 0, 0, 0, 0,
403 	0, 0, 0, 0, 0, 0, 0
404 };
405 
406 static const short _myanmar_syllable_machine_eof_trans[] = {
407 	0, 22, 22, 22, 22, 22, 22, 22,
408 	22, 22, 22, 22, 22, 22, 22, 22,
409 	22, 22, 22, 22, 22, 22, 22, 22,
410 	22, 22, 48, 48, 48, 48, 48, 48,
411 	48, 48, 48, 48, 48, 48, 48, 48,
412 	48, 48, 48, 48, 48, 48, 48, 48,
413 	48, 48, 48, 22, 22, 48, 61
414 };
415 
416 static const int myanmar_syllable_machine_start = 0;
417 static const int myanmar_syllable_machine_first_final = 0;
418 static const int myanmar_syllable_machine_error = -1;
419 
420 static const int myanmar_syllable_machine_en_main = 0;
421 
422 
423 #line 55 "hb-ot-shaper-myanmar-machine.rl"
424 
425 
426 
427 #line 117 "hb-ot-shaper-myanmar-machine.rl"
428 
429 
430 #define found_syllable(syllable_type) \
431   HB_STMT_START { \
432     if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \
433     for (unsigned int i = ts; i < te; i++) \
434       info[i].syllable() = (syllable_serial << 4) | syllable_type; \
435     syllable_serial++; \
436     if (syllable_serial == 16) syllable_serial = 1; \
437   } HB_STMT_END
438 
439 inline void
find_syllables_myanmar(hb_buffer_t * buffer)440 find_syllables_myanmar (hb_buffer_t *buffer)
441 {
442   unsigned int p, pe, eof, ts, te, act HB_UNUSED;
443   int cs;
444   hb_glyph_info_t *info = buffer->info;
445 
446 #line 447 "hb-ot-shaper-myanmar-machine.hh"
447 	{
448 	cs = myanmar_syllable_machine_start;
449 	ts = 0;
450 	te = 0;
451 	act = 0;
452 	}
453 
454 #line 137 "hb-ot-shaper-myanmar-machine.rl"
455 
456 
457   p = 0;
458   pe = eof = buffer->len;
459 
460   unsigned int syllable_serial = 1;
461 
462 #line 463 "hb-ot-shaper-myanmar-machine.hh"
463 	{
464 	int _slen;
465 	int _trans;
466 	const unsigned char *_keys;
467 	const char *_inds;
468 	if ( p == pe )
469 		goto _test_eof;
470 _resume:
471 	switch ( _myanmar_syllable_machine_from_state_actions[cs] ) {
472 	case 2:
473 #line 1 "NONE"
474 	{ts = p;}
475 	break;
476 #line 477 "hb-ot-shaper-myanmar-machine.hh"
477 	}
478 
479 	_keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
480 	_inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs];
481 
482 	_slen = _myanmar_syllable_machine_key_spans[cs];
483 	_trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) &&
484 		( info[p].myanmar_category()) <= _keys[1] ?
485 		( info[p].myanmar_category()) - _keys[0] : _slen ];
486 
487 _eof_trans:
488 	cs = _myanmar_syllable_machine_trans_targs[_trans];
489 
490 	if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 )
491 		goto _again;
492 
493 	switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
494 	case 6:
495 #line 110 "hb-ot-shaper-myanmar-machine.rl"
496 	{te = p+1;{ found_syllable (myanmar_consonant_syllable); }}
497 	break;
498 	case 4:
499 #line 111 "hb-ot-shaper-myanmar-machine.rl"
500 	{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
501 	break;
502 	case 8:
503 #line 112 "hb-ot-shaper-myanmar-machine.rl"
504 	{te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
505 	break;
506 	case 3:
507 #line 113 "hb-ot-shaper-myanmar-machine.rl"
508 	{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
509 	break;
510 	case 5:
511 #line 110 "hb-ot-shaper-myanmar-machine.rl"
512 	{te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
513 	break;
514 	case 7:
515 #line 112 "hb-ot-shaper-myanmar-machine.rl"
516 	{te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
517 	break;
518 	case 9:
519 #line 113 "hb-ot-shaper-myanmar-machine.rl"
520 	{te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
521 	break;
522 #line 523 "hb-ot-shaper-myanmar-machine.hh"
523 	}
524 
525 _again:
526 	switch ( _myanmar_syllable_machine_to_state_actions[cs] ) {
527 	case 1:
528 #line 1 "NONE"
529 	{ts = 0;}
530 	break;
531 #line 532 "hb-ot-shaper-myanmar-machine.hh"
532 	}
533 
534 	if ( ++p != pe )
535 		goto _resume;
536 	_test_eof: {}
537 	if ( p == eof )
538 	{
539 	if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) {
540 		_trans = _myanmar_syllable_machine_eof_trans[cs] - 1;
541 		goto _eof_trans;
542 	}
543 	}
544 
545 	}
546 
547 #line 145 "hb-ot-shaper-myanmar-machine.rl"
548 
549 }
550 
551 #undef found_syllable
552 
553 #endif /* HB_OT_SHAPER_MYANMAR_MACHINE_HH */
554