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_SMPst 57u
72 #define myanmar_syllable_machine_ex_VAbv 20u
73 #define myanmar_syllable_machine_ex_VBlw 21u
74 #define myanmar_syllable_machine_ex_VPre 22u
75 #define myanmar_syllable_machine_ex_VPst 23u
76 #define myanmar_syllable_machine_ex_VS 40u
77 #define myanmar_syllable_machine_ex_ZWJ 6u
78 #define myanmar_syllable_machine_ex_ZWNJ 5u
79
80
81 #line 82 "hb-ot-shaper-myanmar-machine.hh"
82 static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
83 1u, 57u, 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u,
84 3u, 57u, 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u,
85 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
86 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
87 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
88 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u,
89 3u, 57u, 3u, 57u, 3u, 57u, 1u, 57u, 1u, 15u, 0
90 };
91
92 static const char _myanmar_syllable_machine_key_spans[] = {
93 57, 55, 53, 53, 55, 53, 55, 55,
94 55, 55, 55, 53, 15, 55, 55, 55,
95 55, 55, 55, 55, 55, 55, 55, 55,
96 55, 53, 53, 55, 53, 55, 55, 55,
97 55, 55, 53, 15, 55, 55, 55, 55,
98 55, 55, 55, 55, 55, 55, 55, 55,
99 55, 55, 55, 57, 15
100 };
101
102 static const short _myanmar_syllable_machine_index_offsets[] = {
103 0, 58, 114, 168, 222, 278, 332, 388,
104 444, 500, 556, 612, 666, 682, 738, 794,
105 850, 906, 962, 1018, 1074, 1130, 1186, 1242,
106 1298, 1354, 1408, 1462, 1518, 1572, 1628, 1684,
107 1740, 1796, 1852, 1906, 1922, 1978, 2034, 2090,
108 2146, 2202, 2258, 2314, 2370, 2426, 2482, 2538,
109 2594, 2650, 2706, 2762, 2820
110 };
111
112 static const char _myanmar_syllable_machine_indicies[] = {
113 1, 1, 2, 3, 4, 4, 0, 5,
114 6, 1, 1, 0, 0, 0, 7, 0,
115 0, 8, 0, 9, 10, 11, 12, 0,
116 0, 0, 0, 0, 0, 0, 0, 13,
117 0, 0, 14, 15, 16, 17, 18, 19,
118 20, 0, 0, 0, 0, 0, 0, 0,
119 0, 0, 0, 0, 0, 0, 0, 0,
120 21, 0, 23, 24, 25, 25, 22, 26,
121 27, 22, 22, 22, 22, 22, 22, 22,
122 22, 22, 22, 28, 29, 30, 31, 22,
123 22, 22, 22, 22, 22, 22, 22, 32,
124 22, 22, 33, 34, 35, 36, 37, 38,
125 39, 22, 22, 22, 22, 22, 22, 22,
126 22, 22, 22, 22, 22, 22, 22, 22,
127 26, 22, 25, 25, 22, 26, 22, 22,
128 22, 22, 22, 22, 22, 22, 22, 22,
129 22, 22, 22, 22, 31, 22, 22, 22,
130 22, 22, 22, 22, 22, 40, 22, 22,
131 22, 22, 22, 22, 37, 22, 22, 22,
132 22, 22, 22, 22, 22, 22, 22, 22,
133 22, 22, 22, 22, 22, 22, 26, 22,
134 25, 25, 22, 26, 22, 22, 22, 22,
135 22, 22, 22, 22, 22, 22, 22, 22,
136 22, 22, 22, 22, 22, 22, 22, 22,
137 22, 22, 22, 22, 22, 22, 22, 22,
138 22, 22, 37, 22, 22, 22, 22, 22,
139 22, 22, 22, 22, 22, 22, 22, 22,
140 22, 22, 22, 22, 26, 22, 41, 22,
141 25, 25, 22, 26, 37, 22, 22, 22,
142 22, 22, 22, 22, 22, 22, 22, 22,
143 22, 22, 22, 22, 22, 22, 22, 22,
144 22, 22, 22, 26, 22, 22, 22, 22,
145 22, 22, 37, 22, 22, 22, 22, 22,
146 22, 22, 22, 22, 22, 22, 22, 22,
147 22, 22, 22, 22, 26, 22, 25, 25,
148 22, 26, 22, 22, 22, 22, 22, 22,
149 22, 22, 22, 22, 22, 22, 22, 22,
150 22, 22, 22, 22, 22, 22, 22, 22,
151 22, 26, 22, 22, 22, 22, 22, 22,
152 37, 22, 22, 22, 22, 22, 22, 22,
153 22, 22, 22, 22, 22, 22, 22, 22,
154 22, 22, 26, 22, 23, 22, 25, 25,
155 22, 26, 27, 22, 22, 22, 22, 22,
156 22, 22, 22, 22, 22, 42, 22, 22,
157 31, 22, 22, 22, 22, 22, 22, 22,
158 22, 43, 22, 22, 44, 22, 22, 22,
159 37, 22, 43, 22, 22, 22, 22, 22,
160 22, 22, 22, 22, 22, 22, 22, 22,
161 22, 22, 26, 22, 23, 22, 25, 25,
162 22, 26, 27, 22, 22, 22, 22, 22,
163 22, 22, 22, 22, 22, 22, 22, 22,
164 31, 22, 22, 22, 22, 22, 22, 22,
165 22, 22, 22, 22, 22, 22, 22, 22,
166 37, 22, 22, 22, 22, 22, 22, 22,
167 22, 22, 22, 22, 22, 22, 22, 22,
168 22, 22, 26, 22, 23, 22, 25, 25,
169 22, 26, 27, 22, 22, 22, 22, 22,
170 22, 22, 22, 22, 22, 42, 22, 22,
171 31, 22, 22, 22, 22, 22, 22, 22,
172 22, 22, 22, 22, 22, 22, 22, 22,
173 37, 22, 22, 22, 22, 22, 22, 22,
174 22, 22, 22, 22, 22, 22, 22, 22,
175 22, 22, 26, 22, 23, 22, 25, 25,
176 22, 26, 27, 22, 22, 22, 22, 22,
177 22, 22, 22, 22, 22, 42, 22, 22,
178 31, 22, 22, 22, 22, 22, 22, 22,
179 22, 43, 22, 22, 22, 22, 22, 22,
180 37, 22, 22, 22, 22, 22, 22, 22,
181 22, 22, 22, 22, 22, 22, 22, 22,
182 22, 22, 26, 22, 23, 22, 25, 25,
183 22, 26, 27, 22, 22, 22, 22, 22,
184 22, 22, 22, 22, 22, 42, 22, 22,
185 31, 22, 22, 22, 22, 22, 22, 22,
186 22, 43, 22, 22, 22, 22, 22, 22,
187 37, 22, 43, 22, 22, 22, 22, 22,
188 22, 22, 22, 22, 22, 22, 22, 22,
189 22, 22, 26, 22, 25, 25, 22, 26,
190 22, 22, 22, 22, 22, 22, 22, 22,
191 22, 22, 22, 22, 22, 22, 31, 22,
192 22, 22, 22, 22, 22, 22, 22, 22,
193 22, 22, 22, 22, 22, 22, 37, 22,
194 22, 22, 22, 22, 22, 22, 22, 22,
195 22, 22, 22, 22, 22, 22, 22, 22,
196 26, 22, 1, 1, 22, 22, 22, 22,
197 22, 22, 22, 22, 22, 22, 22, 22,
198 1, 22, 23, 22, 25, 25, 22, 26,
199 27, 22, 22, 22, 22, 22, 22, 22,
200 22, 22, 22, 28, 29, 22, 31, 22,
201 22, 22, 22, 22, 22, 22, 22, 22,
202 22, 22, 22, 22, 22, 22, 37, 22,
203 22, 22, 22, 22, 22, 22, 22, 22,
204 22, 22, 22, 22, 22, 22, 22, 22,
205 26, 22, 23, 22, 25, 25, 22, 26,
206 27, 22, 22, 22, 22, 22, 22, 22,
207 22, 22, 22, 22, 29, 22, 31, 22,
208 22, 22, 22, 22, 22, 22, 22, 22,
209 22, 22, 22, 22, 22, 22, 37, 22,
210 22, 22, 22, 22, 22, 22, 22, 22,
211 22, 22, 22, 22, 22, 22, 22, 22,
212 26, 22, 23, 22, 25, 25, 22, 26,
213 27, 22, 22, 22, 22, 22, 22, 22,
214 22, 22, 22, 28, 29, 30, 31, 22,
215 22, 22, 22, 22, 22, 22, 22, 22,
216 22, 22, 22, 22, 22, 22, 37, 45,
217 22, 22, 22, 22, 22, 22, 22, 22,
218 22, 22, 22, 22, 22, 22, 22, 22,
219 26, 22, 23, 22, 25, 25, 22, 26,
220 27, 22, 22, 22, 22, 22, 22, 22,
221 22, 22, 22, 28, 29, 30, 31, 22,
222 22, 22, 22, 22, 22, 22, 22, 22,
223 22, 22, 22, 22, 22, 22, 37, 22,
224 22, 22, 22, 22, 22, 22, 22, 22,
225 22, 22, 22, 22, 22, 22, 22, 22,
226 26, 22, 23, 22, 25, 25, 22, 26,
227 27, 22, 22, 22, 22, 22, 22, 22,
228 22, 22, 22, 28, 29, 30, 31, 22,
229 22, 22, 22, 22, 22, 22, 22, 32,
230 22, 22, 33, 34, 35, 36, 37, 22,
231 39, 22, 22, 22, 22, 22, 22, 22,
232 22, 22, 22, 22, 22, 22, 22, 22,
233 26, 22, 23, 22, 25, 25, 22, 26,
234 27, 22, 22, 22, 22, 22, 22, 22,
235 22, 22, 22, 28, 29, 30, 31, 22,
236 22, 22, 22, 22, 22, 22, 22, 45,
237 22, 22, 22, 22, 22, 22, 37, 22,
238 39, 22, 22, 22, 22, 22, 22, 22,
239 22, 22, 22, 22, 22, 22, 22, 22,
240 26, 22, 23, 22, 25, 25, 22, 26,
241 27, 22, 22, 22, 22, 22, 22, 22,
242 22, 22, 22, 28, 29, 30, 31, 22,
243 22, 22, 22, 22, 22, 22, 22, 45,
244 22, 22, 22, 22, 22, 22, 37, 22,
245 22, 22, 22, 22, 22, 22, 22, 22,
246 22, 22, 22, 22, 22, 22, 22, 22,
247 26, 22, 23, 22, 25, 25, 22, 26,
248 27, 22, 22, 22, 22, 22, 22, 22,
249 22, 22, 22, 28, 29, 30, 31, 22,
250 22, 22, 22, 22, 22, 22, 22, 22,
251 22, 22, 33, 22, 35, 22, 37, 22,
252 39, 22, 22, 22, 22, 22, 22, 22,
253 22, 22, 22, 22, 22, 22, 22, 22,
254 26, 22, 23, 22, 25, 25, 22, 26,
255 27, 22, 22, 22, 22, 22, 22, 22,
256 22, 22, 22, 28, 29, 30, 31, 22,
257 22, 22, 22, 22, 22, 22, 22, 45,
258 22, 22, 33, 22, 22, 22, 37, 22,
259 39, 22, 22, 22, 22, 22, 22, 22,
260 22, 22, 22, 22, 22, 22, 22, 22,
261 26, 22, 23, 22, 25, 25, 22, 26,
262 27, 22, 22, 22, 22, 22, 22, 22,
263 22, 22, 22, 28, 29, 30, 31, 22,
264 22, 22, 22, 22, 22, 22, 22, 46,
265 22, 22, 33, 34, 35, 22, 37, 22,
266 39, 22, 22, 22, 22, 22, 22, 22,
267 22, 22, 22, 22, 22, 22, 22, 22,
268 26, 22, 23, 22, 25, 25, 22, 26,
269 27, 22, 22, 22, 22, 22, 22, 22,
270 22, 22, 22, 28, 29, 30, 31, 22,
271 22, 22, 22, 22, 22, 22, 22, 22,
272 22, 22, 33, 34, 35, 22, 37, 22,
273 39, 22, 22, 22, 22, 22, 22, 22,
274 22, 22, 22, 22, 22, 22, 22, 22,
275 26, 22, 23, 24, 25, 25, 22, 26,
276 27, 22, 22, 22, 22, 22, 22, 22,
277 22, 22, 22, 28, 29, 30, 31, 22,
278 22, 22, 22, 22, 22, 22, 22, 32,
279 22, 22, 33, 34, 35, 36, 37, 22,
280 39, 22, 22, 22, 22, 22, 22, 22,
281 22, 22, 22, 22, 22, 22, 22, 22,
282 26, 22, 48, 48, 47, 5, 47, 47,
283 47, 47, 47, 47, 47, 47, 47, 47,
284 47, 47, 47, 47, 12, 47, 47, 47,
285 47, 47, 47, 47, 47, 49, 47, 47,
286 47, 47, 47, 47, 18, 47, 47, 47,
287 47, 47, 47, 47, 47, 47, 47, 47,
288 47, 47, 47, 47, 47, 47, 5, 47,
289 48, 48, 50, 5, 50, 50, 50, 50,
290 50, 50, 50, 50, 50, 50, 50, 50,
291 50, 50, 50, 50, 50, 50, 50, 50,
292 50, 50, 50, 50, 50, 50, 50, 50,
293 50, 50, 18, 50, 50, 50, 50, 50,
294 50, 50, 50, 50, 50, 50, 50, 50,
295 50, 50, 50, 50, 5, 50, 51, 47,
296 48, 48, 47, 5, 18, 47, 47, 47,
297 47, 47, 47, 47, 47, 47, 47, 47,
298 47, 47, 47, 47, 47, 47, 47, 47,
299 47, 47, 47, 5, 47, 47, 47, 47,
300 47, 47, 18, 47, 47, 47, 47, 47,
301 47, 47, 47, 47, 47, 47, 47, 47,
302 47, 47, 47, 47, 5, 47, 48, 48,
303 47, 5, 47, 47, 47, 47, 47, 47,
304 47, 47, 47, 47, 47, 47, 47, 47,
305 47, 47, 47, 47, 47, 47, 47, 47,
306 47, 5, 47, 47, 47, 47, 47, 47,
307 18, 47, 47, 47, 47, 47, 47, 47,
308 47, 47, 47, 47, 47, 47, 47, 47,
309 47, 47, 5, 47, 2, 47, 48, 48,
310 47, 5, 6, 47, 47, 47, 47, 47,
311 47, 47, 47, 47, 47, 52, 47, 47,
312 12, 47, 47, 47, 47, 47, 47, 47,
313 47, 53, 47, 47, 54, 47, 47, 47,
314 18, 47, 53, 47, 47, 47, 47, 47,
315 47, 47, 47, 47, 47, 47, 47, 47,
316 47, 47, 5, 47, 2, 47, 48, 48,
317 47, 5, 6, 47, 47, 47, 47, 47,
318 47, 47, 47, 47, 47, 47, 47, 47,
319 12, 47, 47, 47, 47, 47, 47, 47,
320 47, 47, 47, 47, 47, 47, 47, 47,
321 18, 47, 47, 47, 47, 47, 47, 47,
322 47, 47, 47, 47, 47, 47, 47, 47,
323 47, 47, 5, 47, 2, 47, 48, 48,
324 47, 5, 6, 47, 47, 47, 47, 47,
325 47, 47, 47, 47, 47, 52, 47, 47,
326 12, 47, 47, 47, 47, 47, 47, 47,
327 47, 47, 47, 47, 47, 47, 47, 47,
328 18, 47, 47, 47, 47, 47, 47, 47,
329 47, 47, 47, 47, 47, 47, 47, 47,
330 47, 47, 5, 47, 2, 47, 48, 48,
331 47, 5, 6, 47, 47, 47, 47, 47,
332 47, 47, 47, 47, 47, 52, 47, 47,
333 12, 47, 47, 47, 47, 47, 47, 47,
334 47, 53, 47, 47, 47, 47, 47, 47,
335 18, 47, 47, 47, 47, 47, 47, 47,
336 47, 47, 47, 47, 47, 47, 47, 47,
337 47, 47, 5, 47, 2, 47, 48, 48,
338 47, 5, 6, 47, 47, 47, 47, 47,
339 47, 47, 47, 47, 47, 52, 47, 47,
340 12, 47, 47, 47, 47, 47, 47, 47,
341 47, 53, 47, 47, 47, 47, 47, 47,
342 18, 47, 53, 47, 47, 47, 47, 47,
343 47, 47, 47, 47, 47, 47, 47, 47,
344 47, 47, 5, 47, 48, 48, 47, 5,
345 47, 47, 47, 47, 47, 47, 47, 47,
346 47, 47, 47, 47, 47, 47, 12, 47,
347 47, 47, 47, 47, 47, 47, 47, 47,
348 47, 47, 47, 47, 47, 47, 18, 47,
349 47, 47, 47, 47, 47, 47, 47, 47,
350 47, 47, 47, 47, 47, 47, 47, 47,
351 5, 47, 55, 55, 47, 47, 47, 47,
352 47, 47, 47, 47, 47, 47, 47, 47,
353 55, 47, 2, 3, 48, 48, 47, 5,
354 6, 47, 47, 47, 47, 47, 47, 47,
355 47, 47, 47, 9, 10, 11, 12, 47,
356 47, 47, 47, 47, 47, 47, 47, 13,
357 47, 47, 14, 15, 16, 17, 18, 19,
358 20, 47, 47, 47, 47, 47, 47, 47,
359 47, 47, 47, 47, 47, 47, 47, 47,
360 5, 47, 2, 47, 48, 48, 47, 5,
361 6, 47, 47, 47, 47, 47, 47, 47,
362 47, 47, 47, 9, 10, 47, 12, 47,
363 47, 47, 47, 47, 47, 47, 47, 47,
364 47, 47, 47, 47, 47, 47, 18, 47,
365 47, 47, 47, 47, 47, 47, 47, 47,
366 47, 47, 47, 47, 47, 47, 47, 47,
367 5, 47, 2, 47, 48, 48, 47, 5,
368 6, 47, 47, 47, 47, 47, 47, 47,
369 47, 47, 47, 47, 10, 47, 12, 47,
370 47, 47, 47, 47, 47, 47, 47, 47,
371 47, 47, 47, 47, 47, 47, 18, 47,
372 47, 47, 47, 47, 47, 47, 47, 47,
373 47, 47, 47, 47, 47, 47, 47, 47,
374 5, 47, 2, 47, 48, 48, 47, 5,
375 6, 47, 47, 47, 47, 47, 47, 47,
376 47, 47, 47, 9, 10, 11, 12, 47,
377 47, 47, 47, 47, 47, 47, 47, 47,
378 47, 47, 47, 47, 47, 47, 18, 56,
379 47, 47, 47, 47, 47, 47, 47, 47,
380 47, 47, 47, 47, 47, 47, 47, 47,
381 5, 47, 2, 47, 48, 48, 47, 5,
382 6, 47, 47, 47, 47, 47, 47, 47,
383 47, 47, 47, 9, 10, 11, 12, 47,
384 47, 47, 47, 47, 47, 47, 47, 47,
385 47, 47, 47, 47, 47, 47, 18, 47,
386 47, 47, 47, 47, 47, 47, 47, 47,
387 47, 47, 47, 47, 47, 47, 47, 47,
388 5, 47, 2, 47, 48, 48, 47, 5,
389 6, 47, 47, 47, 47, 47, 47, 47,
390 47, 47, 47, 9, 10, 11, 12, 47,
391 47, 47, 47, 47, 47, 47, 47, 13,
392 47, 47, 14, 15, 16, 17, 18, 47,
393 20, 47, 47, 47, 47, 47, 47, 47,
394 47, 47, 47, 47, 47, 47, 47, 47,
395 5, 47, 2, 47, 48, 48, 47, 5,
396 6, 47, 47, 47, 47, 47, 47, 47,
397 47, 47, 47, 9, 10, 11, 12, 47,
398 47, 47, 47, 47, 47, 47, 47, 56,
399 47, 47, 47, 47, 47, 47, 18, 47,
400 20, 47, 47, 47, 47, 47, 47, 47,
401 47, 47, 47, 47, 47, 47, 47, 47,
402 5, 47, 2, 47, 48, 48, 47, 5,
403 6, 47, 47, 47, 47, 47, 47, 47,
404 47, 47, 47, 9, 10, 11, 12, 47,
405 47, 47, 47, 47, 47, 47, 47, 56,
406 47, 47, 47, 47, 47, 47, 18, 47,
407 47, 47, 47, 47, 47, 47, 47, 47,
408 47, 47, 47, 47, 47, 47, 47, 47,
409 5, 47, 2, 47, 48, 48, 47, 5,
410 6, 47, 47, 47, 47, 47, 47, 47,
411 47, 47, 47, 9, 10, 11, 12, 47,
412 47, 47, 47, 47, 47, 47, 47, 47,
413 47, 47, 14, 47, 16, 47, 18, 47,
414 20, 47, 47, 47, 47, 47, 47, 47,
415 47, 47, 47, 47, 47, 47, 47, 47,
416 5, 47, 2, 47, 48, 48, 47, 5,
417 6, 47, 47, 47, 47, 47, 47, 47,
418 47, 47, 47, 9, 10, 11, 12, 47,
419 47, 47, 47, 47, 47, 47, 47, 56,
420 47, 47, 14, 47, 47, 47, 18, 47,
421 20, 47, 47, 47, 47, 47, 47, 47,
422 47, 47, 47, 47, 47, 47, 47, 47,
423 5, 47, 2, 47, 48, 48, 47, 5,
424 6, 47, 47, 47, 47, 47, 47, 47,
425 47, 47, 47, 9, 10, 11, 12, 47,
426 47, 47, 47, 47, 47, 47, 47, 57,
427 47, 47, 14, 15, 16, 47, 18, 47,
428 20, 47, 47, 47, 47, 47, 47, 47,
429 47, 47, 47, 47, 47, 47, 47, 47,
430 5, 47, 2, 47, 48, 48, 47, 5,
431 6, 47, 47, 47, 47, 47, 47, 47,
432 47, 47, 47, 9, 10, 11, 12, 47,
433 47, 47, 47, 47, 47, 47, 47, 47,
434 47, 47, 14, 15, 16, 47, 18, 47,
435 20, 47, 47, 47, 47, 47, 47, 47,
436 47, 47, 47, 47, 47, 47, 47, 47,
437 5, 47, 2, 3, 48, 48, 47, 5,
438 6, 47, 47, 47, 47, 47, 47, 47,
439 47, 47, 47, 9, 10, 11, 12, 47,
440 47, 47, 47, 47, 47, 47, 47, 13,
441 47, 47, 14, 15, 16, 17, 18, 47,
442 20, 47, 47, 47, 47, 47, 47, 47,
443 47, 47, 47, 47, 47, 47, 47, 47,
444 5, 47, 23, 24, 25, 25, 22, 26,
445 27, 22, 22, 22, 22, 22, 22, 22,
446 22, 22, 22, 28, 29, 30, 31, 22,
447 22, 22, 22, 22, 22, 22, 22, 58,
448 22, 22, 33, 34, 35, 36, 37, 38,
449 39, 22, 22, 22, 22, 22, 22, 22,
450 22, 22, 22, 22, 22, 22, 22, 22,
451 26, 22, 23, 59, 25, 25, 22, 26,
452 27, 22, 22, 22, 22, 22, 22, 22,
453 22, 22, 22, 28, 29, 30, 31, 22,
454 22, 22, 22, 22, 22, 22, 22, 32,
455 22, 22, 33, 34, 35, 36, 37, 22,
456 39, 22, 22, 22, 22, 22, 22, 22,
457 22, 22, 22, 22, 22, 22, 22, 22,
458 26, 22, 1, 1, 2, 3, 48, 48,
459 47, 5, 6, 1, 1, 47, 47, 47,
460 1, 47, 47, 47, 47, 9, 10, 11,
461 12, 47, 47, 47, 47, 47, 47, 47,
462 47, 13, 47, 47, 14, 15, 16, 17,
463 18, 19, 20, 47, 47, 47, 47, 47,
464 47, 47, 47, 47, 47, 47, 47, 47,
465 47, 47, 5, 47, 1, 1, 60, 60,
466 60, 60, 60, 60, 60, 1, 1, 60,
467 60, 60, 1, 60, 0
468 };
469
470 static const char _myanmar_syllable_machine_trans_targs[] = {
471 0, 1, 25, 35, 0, 26, 30, 49,
472 52, 37, 38, 39, 29, 41, 42, 44,
473 45, 46, 27, 48, 43, 26, 0, 2,
474 12, 0, 3, 7, 13, 14, 15, 6,
475 17, 18, 20, 21, 22, 4, 24, 19,
476 11, 5, 8, 9, 10, 16, 23, 0,
477 0, 34, 0, 28, 31, 32, 33, 36,
478 40, 47, 50, 51, 0
479 };
480
481 static const char _myanmar_syllable_machine_trans_actions[] = {
482 3, 0, 0, 0, 4, 5, 0, 0,
483 0, 0, 0, 0, 0, 0, 0, 0,
484 0, 0, 0, 0, 0, 6, 7, 0,
485 0, 8, 0, 0, 0, 0, 0, 0,
486 0, 0, 0, 0, 0, 0, 0, 0,
487 0, 0, 0, 0, 0, 0, 0, 9,
488 10, 0, 11, 0, 0, 0, 0, 0,
489 0, 0, 0, 0, 12
490 };
491
492 static const char _myanmar_syllable_machine_to_state_actions[] = {
493 1, 0, 0, 0, 0, 0, 0, 0,
494 0, 0, 0, 0, 0, 0, 0, 0,
495 0, 0, 0, 0, 0, 0, 0, 0,
496 0, 0, 0, 0, 0, 0, 0, 0,
497 0, 0, 0, 0, 0, 0, 0, 0,
498 0, 0, 0, 0, 0, 0, 0, 0,
499 0, 0, 0, 0, 0
500 };
501
502 static const char _myanmar_syllable_machine_from_state_actions[] = {
503 2, 0, 0, 0, 0, 0, 0, 0,
504 0, 0, 0, 0, 0, 0, 0, 0,
505 0, 0, 0, 0, 0, 0, 0, 0,
506 0, 0, 0, 0, 0, 0, 0, 0,
507 0, 0, 0, 0, 0, 0, 0, 0,
508 0, 0, 0, 0, 0, 0, 0, 0,
509 0, 0, 0, 0, 0
510 };
511
512 static const short _myanmar_syllable_machine_eof_trans[] = {
513 0, 23, 23, 23, 23, 23, 23, 23,
514 23, 23, 23, 23, 23, 23, 23, 23,
515 23, 23, 23, 23, 23, 23, 23, 23,
516 23, 48, 51, 48, 48, 48, 48, 48,
517 48, 48, 48, 48, 48, 48, 48, 48,
518 48, 48, 48, 48, 48, 48, 48, 48,
519 48, 23, 23, 48, 61
520 };
521
522 static const int myanmar_syllable_machine_start = 0;
523 static const int myanmar_syllable_machine_first_final = 0;
524 static const int myanmar_syllable_machine_error = -1;
525
526 static const int myanmar_syllable_machine_en_main = 0;
527
528
529 #line 55 "hb-ot-shaper-myanmar-machine.rl"
530
531
532
533 #line 118 "hb-ot-shaper-myanmar-machine.rl"
534
535
536 #define found_syllable(syllable_type) \
537 HB_STMT_START { \
538 if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \
539 for (unsigned int i = ts; i < te; i++) \
540 info[i].syllable() = (syllable_serial << 4) | syllable_type; \
541 syllable_serial++; \
542 if (syllable_serial == 16) syllable_serial = 1; \
543 } HB_STMT_END
544
545 inline void
find_syllables_myanmar(hb_buffer_t * buffer)546 find_syllables_myanmar (hb_buffer_t *buffer)
547 {
548 unsigned int p, pe, eof, ts, te, act HB_UNUSED;
549 int cs;
550 hb_glyph_info_t *info = buffer->info;
551
552 #line 553 "hb-ot-shaper-myanmar-machine.hh"
553 {
554 cs = myanmar_syllable_machine_start;
555 ts = 0;
556 te = 0;
557 act = 0;
558 }
559
560 #line 138 "hb-ot-shaper-myanmar-machine.rl"
561
562
563 p = 0;
564 pe = eof = buffer->len;
565
566 unsigned int syllable_serial = 1;
567
568 #line 569 "hb-ot-shaper-myanmar-machine.hh"
569 {
570 int _slen;
571 int _trans;
572 const unsigned char *_keys;
573 const char *_inds;
574 if ( p == pe )
575 goto _test_eof;
576 _resume:
577 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) {
578 case 2:
579 #line 1 "NONE"
580 {ts = p;}
581 break;
582 #line 583 "hb-ot-shaper-myanmar-machine.hh"
583 }
584
585 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
586 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs];
587
588 _slen = _myanmar_syllable_machine_key_spans[cs];
589 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) &&
590 ( info[p].myanmar_category()) <= _keys[1] ?
591 ( info[p].myanmar_category()) - _keys[0] : _slen ];
592
593 _eof_trans:
594 cs = _myanmar_syllable_machine_trans_targs[_trans];
595
596 if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 )
597 goto _again;
598
599 switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
600 case 8:
601 #line 111 "hb-ot-shaper-myanmar-machine.rl"
602 {te = p+1;{ found_syllable (myanmar_consonant_syllable); }}
603 break;
604 case 4:
605 #line 112 "hb-ot-shaper-myanmar-machine.rl"
606 {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
607 break;
608 case 10:
609 #line 113 "hb-ot-shaper-myanmar-machine.rl"
610 {te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
611 break;
612 case 3:
613 #line 114 "hb-ot-shaper-myanmar-machine.rl"
614 {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
615 break;
616 case 7:
617 #line 111 "hb-ot-shaper-myanmar-machine.rl"
618 {te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
619 break;
620 case 9:
621 #line 113 "hb-ot-shaper-myanmar-machine.rl"
622 {te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
623 break;
624 case 12:
625 #line 114 "hb-ot-shaper-myanmar-machine.rl"
626 {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
627 break;
628 case 11:
629 #line 1 "NONE"
630 { switch( act ) {
631 case 2:
632 {{p = ((te))-1;} found_syllable (myanmar_non_myanmar_cluster); }
633 break;
634 case 3:
635 {{p = ((te))-1;} found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }
636 break;
637 }
638 }
639 break;
640 case 6:
641 #line 1 "NONE"
642 {te = p+1;}
643 #line 112 "hb-ot-shaper-myanmar-machine.rl"
644 {act = 2;}
645 break;
646 case 5:
647 #line 1 "NONE"
648 {te = p+1;}
649 #line 113 "hb-ot-shaper-myanmar-machine.rl"
650 {act = 3;}
651 break;
652 #line 653 "hb-ot-shaper-myanmar-machine.hh"
653 }
654
655 _again:
656 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) {
657 case 1:
658 #line 1 "NONE"
659 {ts = 0;}
660 break;
661 #line 662 "hb-ot-shaper-myanmar-machine.hh"
662 }
663
664 if ( ++p != pe )
665 goto _resume;
666 _test_eof: {}
667 if ( p == eof )
668 {
669 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) {
670 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1;
671 goto _eof_trans;
672 }
673 }
674
675 }
676
677 #line 146 "hb-ot-shaper-myanmar-machine.rl"
678
679 }
680
681 #undef found_syllable
682
683 #endif /* HB_OT_SHAPER_MYANMAR_MACHINE_HH */
684