hb-ot-shaper-myanmar-machine.hh (21456B)
1 #line 1 "hb-ot-shaper-myanmar-machine.rl" 2 /* 3 * Copyright © 2011,2012 Google, Inc. 4 * 5 * This is part of HarfBuzz, a text shaping library. 6 * 7 * Permission is hereby granted, without written agreement and without 8 * license or royalty fees, to use, copy, modify, and distribute this 9 * software and its documentation for any purpose, provided that the 10 * above copyright notice and the following two paragraphs appear in 11 * all copies of this software. 12 * 13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 * DAMAGE. 18 * 19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 * 25 * Google Author(s): Behdad Esfahbod 26 */ 27 28 #ifndef HB_OT_SHAPER_MYANMAR_MACHINE_HH 29 #define HB_OT_SHAPER_MYANMAR_MACHINE_HH 30 31 #include "hb.hh" 32 33 #include "hb-ot-layout.hh" 34 #include "hb-ot-shaper-indic.hh" 35 36 /* buffer var allocations */ 37 #define myanmar_category() ot_shaper_var_u8_category() /* myanmar_category_t */ 38 #define myanmar_position() ot_shaper_var_u8_auxiliary() /* myanmar_position_t */ 39 40 using myanmar_category_t = unsigned; 41 using myanmar_position_t = ot_position_t; 42 43 #define M_Cat(Cat) myanmar_syllable_machine_ex_##Cat 44 45 enum myanmar_syllable_type_t { 46 myanmar_consonant_syllable, 47 myanmar_broken_cluster, 48 myanmar_non_myanmar_cluster, 49 }; 50 51 52 #line 51 "hb-ot-shaper-myanmar-machine.hh" 53 #define myanmar_syllable_machine_ex_A 9u 54 #define myanmar_syllable_machine_ex_As 32u 55 #define myanmar_syllable_machine_ex_C 1u 56 #define myanmar_syllable_machine_ex_CS 18u 57 #define myanmar_syllable_machine_ex_DB 3u 58 #define myanmar_syllable_machine_ex_DOTTEDCIRCLE 11u 59 #define myanmar_syllable_machine_ex_GB 10u 60 #define myanmar_syllable_machine_ex_H 4u 61 #define myanmar_syllable_machine_ex_IV 2u 62 #define myanmar_syllable_machine_ex_MH 35u 63 #define myanmar_syllable_machine_ex_ML 41u 64 #define myanmar_syllable_machine_ex_MR 36u 65 #define myanmar_syllable_machine_ex_MW 37u 66 #define myanmar_syllable_machine_ex_MY 38u 67 #define myanmar_syllable_machine_ex_PT 39u 68 #define myanmar_syllable_machine_ex_Ra 15u 69 #define myanmar_syllable_machine_ex_SM 8u 70 #define myanmar_syllable_machine_ex_SMPst 57u 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 77 "hb-ot-shaper-myanmar-machine.hh" 81 static const unsigned char _myanmar_syllable_machine_trans_keys[] = { 82 1u, 57u, 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u, 83 3u, 57u, 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u, 84 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 85 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 86 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 87 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 88 3u, 57u, 3u, 57u, 3u, 57u, 1u, 57u, 1u, 15u, 0 89 }; 90 91 static const char _myanmar_syllable_machine_key_spans[] = { 92 57, 55, 53, 53, 55, 53, 55, 55, 93 55, 55, 55, 53, 15, 55, 55, 55, 94 55, 55, 55, 55, 55, 55, 55, 55, 95 55, 53, 53, 55, 53, 55, 55, 55, 96 55, 55, 53, 15, 55, 55, 55, 55, 97 55, 55, 55, 55, 55, 55, 55, 55, 98 55, 55, 55, 57, 15 99 }; 100 101 static const short _myanmar_syllable_machine_index_offsets[] = { 102 0, 58, 114, 168, 222, 278, 332, 388, 103 444, 500, 556, 612, 666, 682, 738, 794, 104 850, 906, 962, 1018, 1074, 1130, 1186, 1242, 105 1298, 1354, 1408, 1462, 1518, 1572, 1628, 1684, 106 1740, 1796, 1852, 1906, 1922, 1978, 2034, 2090, 107 2146, 2202, 2258, 2314, 2370, 2426, 2482, 2538, 108 2594, 2650, 2706, 2762, 2820 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, 0, 0, 0, 0, 0, 0, 118 0, 0, 0, 0, 0, 0, 0, 0, 119 21, 0, 23, 24, 25, 25, 22, 26, 120 27, 22, 22, 22, 22, 22, 22, 22, 121 22, 22, 22, 28, 29, 30, 31, 22, 122 22, 22, 22, 22, 22, 22, 22, 32, 123 22, 22, 33, 34, 35, 36, 37, 38, 124 39, 22, 22, 22, 22, 22, 22, 22, 125 22, 22, 22, 22, 22, 22, 22, 22, 126 26, 22, 25, 25, 22, 26, 22, 22, 127 22, 22, 22, 22, 22, 22, 22, 22, 128 22, 22, 22, 22, 31, 22, 22, 22, 129 22, 22, 22, 22, 22, 40, 22, 22, 130 22, 22, 22, 22, 37, 22, 22, 22, 131 22, 22, 22, 22, 22, 22, 22, 22, 132 22, 22, 22, 22, 22, 22, 26, 22, 133 25, 25, 22, 26, 22, 22, 22, 22, 134 22, 22, 22, 22, 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, 37, 22, 22, 22, 22, 22, 138 22, 22, 22, 22, 22, 22, 22, 22, 139 22, 22, 22, 22, 26, 22, 41, 22, 140 25, 25, 22, 26, 37, 22, 22, 22, 141 22, 22, 22, 22, 22, 22, 22, 22, 142 22, 22, 22, 22, 22, 22, 22, 22, 143 22, 22, 22, 26, 22, 22, 22, 22, 144 22, 22, 37, 22, 22, 22, 22, 22, 145 22, 22, 22, 22, 22, 22, 22, 22, 146 22, 22, 22, 22, 26, 22, 25, 25, 147 22, 26, 22, 22, 22, 22, 22, 22, 148 22, 22, 22, 22, 22, 22, 22, 22, 149 22, 22, 22, 22, 22, 22, 22, 22, 150 22, 26, 22, 22, 22, 22, 22, 22, 151 37, 22, 22, 22, 22, 22, 22, 22, 152 22, 22, 22, 22, 22, 22, 22, 22, 153 22, 22, 26, 22, 23, 22, 25, 25, 154 22, 26, 27, 22, 22, 22, 22, 22, 155 22, 22, 22, 22, 22, 42, 22, 22, 156 31, 22, 22, 22, 22, 22, 22, 22, 157 22, 43, 22, 22, 44, 22, 22, 22, 158 37, 22, 43, 22, 22, 22, 22, 22, 159 22, 22, 22, 22, 22, 22, 22, 22, 160 22, 22, 26, 22, 23, 22, 25, 25, 161 22, 26, 27, 22, 22, 22, 22, 22, 162 22, 22, 22, 22, 22, 22, 22, 22, 163 31, 22, 22, 22, 22, 22, 22, 22, 164 22, 22, 22, 22, 22, 22, 22, 22, 165 37, 22, 22, 22, 22, 22, 22, 22, 166 22, 22, 22, 22, 22, 22, 22, 22, 167 22, 22, 26, 22, 23, 22, 25, 25, 168 22, 26, 27, 22, 22, 22, 22, 22, 169 22, 22, 22, 22, 22, 42, 22, 22, 170 31, 22, 22, 22, 22, 22, 22, 22, 171 22, 22, 22, 22, 22, 22, 22, 22, 172 37, 22, 22, 22, 22, 22, 22, 22, 173 22, 22, 22, 22, 22, 22, 22, 22, 174 22, 22, 26, 22, 23, 22, 25, 25, 175 22, 26, 27, 22, 22, 22, 22, 22, 176 22, 22, 22, 22, 22, 42, 22, 22, 177 31, 22, 22, 22, 22, 22, 22, 22, 178 22, 43, 22, 22, 22, 22, 22, 22, 179 37, 22, 22, 22, 22, 22, 22, 22, 180 22, 22, 22, 22, 22, 22, 22, 22, 181 22, 22, 26, 22, 23, 22, 25, 25, 182 22, 26, 27, 22, 22, 22, 22, 22, 183 22, 22, 22, 22, 22, 42, 22, 22, 184 31, 22, 22, 22, 22, 22, 22, 22, 185 22, 43, 22, 22, 22, 22, 22, 22, 186 37, 22, 43, 22, 22, 22, 22, 22, 187 22, 22, 22, 22, 22, 22, 22, 22, 188 22, 22, 26, 22, 25, 25, 22, 26, 189 22, 22, 22, 22, 22, 22, 22, 22, 190 22, 22, 22, 22, 22, 22, 31, 22, 191 22, 22, 22, 22, 22, 22, 22, 22, 192 22, 22, 22, 22, 22, 22, 37, 22, 193 22, 22, 22, 22, 22, 22, 22, 22, 194 22, 22, 22, 22, 22, 22, 22, 22, 195 26, 22, 1, 1, 22, 22, 22, 22, 196 22, 22, 22, 22, 22, 22, 22, 22, 197 1, 22, 23, 22, 25, 25, 22, 26, 198 27, 22, 22, 22, 22, 22, 22, 22, 199 22, 22, 22, 28, 29, 22, 31, 22, 200 22, 22, 22, 22, 22, 22, 22, 22, 201 22, 22, 22, 22, 22, 22, 37, 22, 202 22, 22, 22, 22, 22, 22, 22, 22, 203 22, 22, 22, 22, 22, 22, 22, 22, 204 26, 22, 23, 22, 25, 25, 22, 26, 205 27, 22, 22, 22, 22, 22, 22, 22, 206 22, 22, 22, 22, 29, 22, 31, 22, 207 22, 22, 22, 22, 22, 22, 22, 22, 208 22, 22, 22, 22, 22, 22, 37, 22, 209 22, 22, 22, 22, 22, 22, 22, 22, 210 22, 22, 22, 22, 22, 22, 22, 22, 211 26, 22, 23, 22, 25, 25, 22, 26, 212 27, 22, 22, 22, 22, 22, 22, 22, 213 22, 22, 22, 28, 29, 30, 31, 22, 214 22, 22, 22, 22, 22, 22, 22, 22, 215 22, 22, 22, 22, 22, 22, 37, 45, 216 22, 22, 22, 22, 22, 22, 22, 22, 217 22, 22, 22, 22, 22, 22, 22, 22, 218 26, 22, 23, 22, 25, 25, 22, 26, 219 27, 22, 22, 22, 22, 22, 22, 22, 220 22, 22, 22, 28, 29, 30, 31, 22, 221 22, 22, 22, 22, 22, 22, 22, 22, 222 22, 22, 22, 22, 22, 22, 37, 22, 223 22, 22, 22, 22, 22, 22, 22, 22, 224 22, 22, 22, 22, 22, 22, 22, 22, 225 26, 22, 23, 22, 25, 25, 22, 26, 226 27, 22, 22, 22, 22, 22, 22, 22, 227 22, 22, 22, 28, 29, 30, 31, 22, 228 22, 22, 22, 22, 22, 22, 22, 32, 229 22, 22, 33, 34, 35, 36, 37, 22, 230 39, 22, 22, 22, 22, 22, 22, 22, 231 22, 22, 22, 22, 22, 22, 22, 22, 232 26, 22, 23, 22, 25, 25, 22, 26, 233 27, 22, 22, 22, 22, 22, 22, 22, 234 22, 22, 22, 28, 29, 30, 31, 22, 235 22, 22, 22, 22, 22, 22, 22, 45, 236 22, 22, 22, 22, 22, 22, 37, 22, 237 39, 22, 22, 22, 22, 22, 22, 22, 238 22, 22, 22, 22, 22, 22, 22, 22, 239 26, 22, 23, 22, 25, 25, 22, 26, 240 27, 22, 22, 22, 22, 22, 22, 22, 241 22, 22, 22, 28, 29, 30, 31, 22, 242 22, 22, 22, 22, 22, 22, 22, 45, 243 22, 22, 22, 22, 22, 22, 37, 22, 244 22, 22, 22, 22, 22, 22, 22, 22, 245 22, 22, 22, 22, 22, 22, 22, 22, 246 26, 22, 23, 22, 25, 25, 22, 26, 247 27, 22, 22, 22, 22, 22, 22, 22, 248 22, 22, 22, 28, 29, 30, 31, 22, 249 22, 22, 22, 22, 22, 22, 22, 22, 250 22, 22, 33, 22, 35, 22, 37, 22, 251 39, 22, 22, 22, 22, 22, 22, 22, 252 22, 22, 22, 22, 22, 22, 22, 22, 253 26, 22, 23, 22, 25, 25, 22, 26, 254 27, 22, 22, 22, 22, 22, 22, 22, 255 22, 22, 22, 28, 29, 30, 31, 22, 256 22, 22, 22, 22, 22, 22, 22, 45, 257 22, 22, 33, 22, 22, 22, 37, 22, 258 39, 22, 22, 22, 22, 22, 22, 22, 259 22, 22, 22, 22, 22, 22, 22, 22, 260 26, 22, 23, 22, 25, 25, 22, 26, 261 27, 22, 22, 22, 22, 22, 22, 22, 262 22, 22, 22, 28, 29, 30, 31, 22, 263 22, 22, 22, 22, 22, 22, 22, 46, 264 22, 22, 33, 34, 35, 22, 37, 22, 265 39, 22, 22, 22, 22, 22, 22, 22, 266 22, 22, 22, 22, 22, 22, 22, 22, 267 26, 22, 23, 22, 25, 25, 22, 26, 268 27, 22, 22, 22, 22, 22, 22, 22, 269 22, 22, 22, 28, 29, 30, 31, 22, 270 22, 22, 22, 22, 22, 22, 22, 22, 271 22, 22, 33, 34, 35, 22, 37, 22, 272 39, 22, 22, 22, 22, 22, 22, 22, 273 22, 22, 22, 22, 22, 22, 22, 22, 274 26, 22, 23, 24, 25, 25, 22, 26, 275 27, 22, 22, 22, 22, 22, 22, 22, 276 22, 22, 22, 28, 29, 30, 31, 22, 277 22, 22, 22, 22, 22, 22, 22, 32, 278 22, 22, 33, 34, 35, 36, 37, 22, 279 39, 22, 22, 22, 22, 22, 22, 22, 280 22, 22, 22, 22, 22, 22, 22, 22, 281 26, 22, 48, 48, 47, 5, 47, 47, 282 47, 47, 47, 47, 47, 47, 47, 47, 283 47, 47, 47, 47, 12, 47, 47, 47, 284 47, 47, 47, 47, 47, 49, 47, 47, 285 47, 47, 47, 47, 18, 47, 47, 47, 286 47, 47, 47, 47, 47, 47, 47, 47, 287 47, 47, 47, 47, 47, 47, 5, 47, 288 48, 48, 50, 5, 50, 50, 50, 50, 289 50, 50, 50, 50, 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, 18, 50, 50, 50, 50, 50, 293 50, 50, 50, 50, 50, 50, 50, 50, 294 50, 50, 50, 50, 5, 50, 51, 47, 295 48, 48, 47, 5, 18, 47, 47, 47, 296 47, 47, 47, 47, 47, 47, 47, 47, 297 47, 47, 47, 47, 47, 47, 47, 47, 298 47, 47, 47, 5, 47, 47, 47, 47, 299 47, 47, 18, 47, 47, 47, 47, 47, 300 47, 47, 47, 47, 47, 47, 47, 47, 301 47, 47, 47, 47, 5, 47, 48, 48, 302 47, 5, 47, 47, 47, 47, 47, 47, 303 47, 47, 47, 47, 47, 47, 47, 47, 304 47, 47, 47, 47, 47, 47, 47, 47, 305 47, 5, 47, 47, 47, 47, 47, 47, 306 18, 47, 47, 47, 47, 47, 47, 47, 307 47, 47, 47, 47, 47, 47, 47, 47, 308 47, 47, 5, 47, 2, 47, 48, 48, 309 47, 5, 6, 47, 47, 47, 47, 47, 310 47, 47, 47, 47, 47, 52, 47, 47, 311 12, 47, 47, 47, 47, 47, 47, 47, 312 47, 53, 47, 47, 54, 47, 47, 47, 313 18, 47, 53, 47, 47, 47, 47, 47, 314 47, 47, 47, 47, 47, 47, 47, 47, 315 47, 47, 5, 47, 2, 47, 48, 48, 316 47, 5, 6, 47, 47, 47, 47, 47, 317 47, 47, 47, 47, 47, 47, 47, 47, 318 12, 47, 47, 47, 47, 47, 47, 47, 319 47, 47, 47, 47, 47, 47, 47, 47, 320 18, 47, 47, 47, 47, 47, 47, 47, 321 47, 47, 47, 47, 47, 47, 47, 47, 322 47, 47, 5, 47, 2, 47, 48, 48, 323 47, 5, 6, 47, 47, 47, 47, 47, 324 47, 47, 47, 47, 47, 52, 47, 47, 325 12, 47, 47, 47, 47, 47, 47, 47, 326 47, 47, 47, 47, 47, 47, 47, 47, 327 18, 47, 47, 47, 47, 47, 47, 47, 328 47, 47, 47, 47, 47, 47, 47, 47, 329 47, 47, 5, 47, 2, 47, 48, 48, 330 47, 5, 6, 47, 47, 47, 47, 47, 331 47, 47, 47, 47, 47, 52, 47, 47, 332 12, 47, 47, 47, 47, 47, 47, 47, 333 47, 53, 47, 47, 47, 47, 47, 47, 334 18, 47, 47, 47, 47, 47, 47, 47, 335 47, 47, 47, 47, 47, 47, 47, 47, 336 47, 47, 5, 47, 2, 47, 48, 48, 337 47, 5, 6, 47, 47, 47, 47, 47, 338 47, 47, 47, 47, 47, 52, 47, 47, 339 12, 47, 47, 47, 47, 47, 47, 47, 340 47, 53, 47, 47, 47, 47, 47, 47, 341 18, 47, 53, 47, 47, 47, 47, 47, 342 47, 47, 47, 47, 47, 47, 47, 47, 343 47, 47, 5, 47, 48, 48, 47, 5, 344 47, 47, 47, 47, 47, 47, 47, 47, 345 47, 47, 47, 47, 47, 47, 12, 47, 346 47, 47, 47, 47, 47, 47, 47, 47, 347 47, 47, 47, 47, 47, 47, 18, 47, 348 47, 47, 47, 47, 47, 47, 47, 47, 349 47, 47, 47, 47, 47, 47, 47, 47, 350 5, 47, 55, 55, 47, 47, 47, 47, 351 47, 47, 47, 47, 47, 47, 47, 47, 352 55, 47, 2, 3, 48, 48, 47, 5, 353 6, 47, 47, 47, 47, 47, 47, 47, 354 47, 47, 47, 9, 10, 11, 12, 47, 355 47, 47, 47, 47, 47, 47, 47, 13, 356 47, 47, 14, 15, 16, 17, 18, 19, 357 20, 47, 47, 47, 47, 47, 47, 47, 358 47, 47, 47, 47, 47, 47, 47, 47, 359 5, 47, 2, 47, 48, 48, 47, 5, 360 6, 47, 47, 47, 47, 47, 47, 47, 361 47, 47, 47, 9, 10, 47, 12, 47, 362 47, 47, 47, 47, 47, 47, 47, 47, 363 47, 47, 47, 47, 47, 47, 18, 47, 364 47, 47, 47, 47, 47, 47, 47, 47, 365 47, 47, 47, 47, 47, 47, 47, 47, 366 5, 47, 2, 47, 48, 48, 47, 5, 367 6, 47, 47, 47, 47, 47, 47, 47, 368 47, 47, 47, 47, 10, 47, 12, 47, 369 47, 47, 47, 47, 47, 47, 47, 47, 370 47, 47, 47, 47, 47, 47, 18, 47, 371 47, 47, 47, 47, 47, 47, 47, 47, 372 47, 47, 47, 47, 47, 47, 47, 47, 373 5, 47, 2, 47, 48, 48, 47, 5, 374 6, 47, 47, 47, 47, 47, 47, 47, 375 47, 47, 47, 9, 10, 11, 12, 47, 376 47, 47, 47, 47, 47, 47, 47, 47, 377 47, 47, 47, 47, 47, 47, 18, 56, 378 47, 47, 47, 47, 47, 47, 47, 47, 379 47, 47, 47, 47, 47, 47, 47, 47, 380 5, 47, 2, 47, 48, 48, 47, 5, 381 6, 47, 47, 47, 47, 47, 47, 47, 382 47, 47, 47, 9, 10, 11, 12, 47, 383 47, 47, 47, 47, 47, 47, 47, 47, 384 47, 47, 47, 47, 47, 47, 18, 47, 385 47, 47, 47, 47, 47, 47, 47, 47, 386 47, 47, 47, 47, 47, 47, 47, 47, 387 5, 47, 2, 47, 48, 48, 47, 5, 388 6, 47, 47, 47, 47, 47, 47, 47, 389 47, 47, 47, 9, 10, 11, 12, 47, 390 47, 47, 47, 47, 47, 47, 47, 13, 391 47, 47, 14, 15, 16, 17, 18, 47, 392 20, 47, 47, 47, 47, 47, 47, 47, 393 47, 47, 47, 47, 47, 47, 47, 47, 394 5, 47, 2, 47, 48, 48, 47, 5, 395 6, 47, 47, 47, 47, 47, 47, 47, 396 47, 47, 47, 9, 10, 11, 12, 47, 397 47, 47, 47, 47, 47, 47, 47, 56, 398 47, 47, 47, 47, 47, 47, 18, 47, 399 20, 47, 47, 47, 47, 47, 47, 47, 400 47, 47, 47, 47, 47, 47, 47, 47, 401 5, 47, 2, 47, 48, 48, 47, 5, 402 6, 47, 47, 47, 47, 47, 47, 47, 403 47, 47, 47, 9, 10, 11, 12, 47, 404 47, 47, 47, 47, 47, 47, 47, 56, 405 47, 47, 47, 47, 47, 47, 18, 47, 406 47, 47, 47, 47, 47, 47, 47, 47, 407 47, 47, 47, 47, 47, 47, 47, 47, 408 5, 47, 2, 47, 48, 48, 47, 5, 409 6, 47, 47, 47, 47, 47, 47, 47, 410 47, 47, 47, 9, 10, 11, 12, 47, 411 47, 47, 47, 47, 47, 47, 47, 47, 412 47, 47, 14, 47, 16, 47, 18, 47, 413 20, 47, 47, 47, 47, 47, 47, 47, 414 47, 47, 47, 47, 47, 47, 47, 47, 415 5, 47, 2, 47, 48, 48, 47, 5, 416 6, 47, 47, 47, 47, 47, 47, 47, 417 47, 47, 47, 9, 10, 11, 12, 47, 418 47, 47, 47, 47, 47, 47, 47, 56, 419 47, 47, 14, 47, 47, 47, 18, 47, 420 20, 47, 47, 47, 47, 47, 47, 47, 421 47, 47, 47, 47, 47, 47, 47, 47, 422 5, 47, 2, 47, 48, 48, 47, 5, 423 6, 47, 47, 47, 47, 47, 47, 47, 424 47, 47, 47, 9, 10, 11, 12, 47, 425 47, 47, 47, 47, 47, 47, 47, 57, 426 47, 47, 14, 15, 16, 47, 18, 47, 427 20, 47, 47, 47, 47, 47, 47, 47, 428 47, 47, 47, 47, 47, 47, 47, 47, 429 5, 47, 2, 47, 48, 48, 47, 5, 430 6, 47, 47, 47, 47, 47, 47, 47, 431 47, 47, 47, 9, 10, 11, 12, 47, 432 47, 47, 47, 47, 47, 47, 47, 47, 433 47, 47, 14, 15, 16, 47, 18, 47, 434 20, 47, 47, 47, 47, 47, 47, 47, 435 47, 47, 47, 47, 47, 47, 47, 47, 436 5, 47, 2, 3, 48, 48, 47, 5, 437 6, 47, 47, 47, 47, 47, 47, 47, 438 47, 47, 47, 9, 10, 11, 12, 47, 439 47, 47, 47, 47, 47, 47, 47, 13, 440 47, 47, 14, 15, 16, 17, 18, 47, 441 20, 47, 47, 47, 47, 47, 47, 47, 442 47, 47, 47, 47, 47, 47, 47, 47, 443 5, 47, 23, 24, 25, 25, 22, 26, 444 27, 22, 22, 22, 22, 22, 22, 22, 445 22, 22, 22, 28, 29, 30, 31, 22, 446 22, 22, 22, 22, 22, 22, 22, 58, 447 22, 22, 33, 34, 35, 36, 37, 38, 448 39, 22, 22, 22, 22, 22, 22, 22, 449 22, 22, 22, 22, 22, 22, 22, 22, 450 26, 22, 23, 59, 25, 25, 22, 26, 451 27, 22, 22, 22, 22, 22, 22, 22, 452 22, 22, 22, 28, 29, 30, 31, 22, 453 22, 22, 22, 22, 22, 22, 22, 32, 454 22, 22, 33, 34, 35, 36, 37, 22, 455 39, 22, 22, 22, 22, 22, 22, 22, 456 22, 22, 22, 22, 22, 22, 22, 22, 457 26, 22, 1, 1, 2, 3, 48, 48, 458 47, 5, 6, 1, 1, 47, 47, 47, 459 1, 47, 47, 47, 47, 9, 10, 11, 460 12, 47, 47, 47, 47, 47, 47, 47, 461 47, 13, 47, 47, 14, 15, 16, 17, 462 18, 19, 20, 47, 47, 47, 47, 47, 463 47, 47, 47, 47, 47, 47, 47, 47, 464 47, 47, 5, 47, 1, 1, 60, 60, 465 60, 60, 60, 60, 60, 1, 1, 60, 466 60, 60, 1, 60, 0 467 }; 468 469 static const char _myanmar_syllable_machine_trans_targs[] = { 470 0, 1, 25, 35, 0, 26, 30, 49, 471 52, 37, 38, 39, 29, 41, 42, 44, 472 45, 46, 27, 48, 43, 26, 0, 2, 473 12, 0, 3, 7, 13, 14, 15, 6, 474 17, 18, 20, 21, 22, 4, 24, 19, 475 11, 5, 8, 9, 10, 16, 23, 0, 476 0, 34, 0, 28, 31, 32, 33, 36, 477 40, 47, 50, 51, 0 478 }; 479 480 static const char _myanmar_syllable_machine_trans_actions[] = { 481 3, 0, 0, 0, 4, 5, 0, 0, 482 0, 0, 0, 0, 0, 0, 0, 0, 483 0, 0, 0, 0, 0, 6, 7, 0, 484 0, 8, 0, 0, 0, 0, 0, 0, 485 0, 0, 0, 0, 0, 0, 0, 0, 486 0, 0, 0, 0, 0, 0, 0, 9, 487 10, 0, 11, 0, 0, 0, 0, 0, 488 0, 0, 0, 0, 12 489 }; 490 491 static const char _myanmar_syllable_machine_to_state_actions[] = { 492 1, 0, 0, 0, 0, 0, 0, 0, 493 0, 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 499 }; 500 501 static const char _myanmar_syllable_machine_from_state_actions[] = { 502 2, 0, 0, 0, 0, 0, 0, 0, 503 0, 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 509 }; 510 511 static const short _myanmar_syllable_machine_eof_trans[] = { 512 0, 23, 23, 23, 23, 23, 23, 23, 513 23, 23, 23, 23, 23, 23, 23, 23, 514 23, 23, 23, 23, 23, 23, 23, 23, 515 23, 48, 51, 48, 48, 48, 48, 48, 516 48, 48, 48, 48, 48, 48, 48, 48, 517 48, 48, 48, 48, 48, 48, 48, 48, 518 48, 23, 23, 48, 61 519 }; 520 521 static const int myanmar_syllable_machine_start = 0; 522 static const int myanmar_syllable_machine_first_final = 0; 523 static const int myanmar_syllable_machine_error = -1; 524 525 static const int myanmar_syllable_machine_en_main = 0; 526 527 528 #line 55 "hb-ot-shaper-myanmar-machine.rl" 529 530 531 532 #line 118 "hb-ot-shaper-myanmar-machine.rl" 533 534 535 #define found_syllable(syllable_type) \ 536 HB_STMT_START { \ 537 if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ 538 for (unsigned int i = ts; i < te; i++) \ 539 info[i].syllable() = (syllable_serial << 4) | syllable_type; \ 540 syllable_serial++; \ 541 if (syllable_serial == 16) syllable_serial = 1; \ 542 } HB_STMT_END 543 544 inline void 545 find_syllables_myanmar (hb_buffer_t *buffer) 546 { 547 unsigned int p, pe, eof, ts, te, act HB_UNUSED; 548 int cs; 549 hb_glyph_info_t *info = buffer->info; 550 551 #line 542 "hb-ot-shaper-myanmar-machine.hh" 552 { 553 cs = myanmar_syllable_machine_start; 554 ts = 0; 555 te = 0; 556 act = 0; 557 } 558 559 #line 138 "hb-ot-shaper-myanmar-machine.rl" 560 561 562 p = 0; 563 pe = eof = buffer->len; 564 565 unsigned int syllable_serial = 1; 566 567 #line 554 "hb-ot-shaper-myanmar-machine.hh" 568 { 569 int _slen; 570 int _trans; 571 const unsigned char *_keys; 572 const char *_inds; 573 if ( p == pe ) 574 goto _test_eof; 575 _resume: 576 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) { 577 case 2: 578 #line 1 "NONE" 579 {ts = p;} 580 break; 581 #line 566 "hb-ot-shaper-myanmar-machine.hh" 582 } 583 584 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); 585 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs]; 586 587 _slen = _myanmar_syllable_machine_key_spans[cs]; 588 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) && 589 ( info[p].myanmar_category()) <= _keys[1] ? 590 ( info[p].myanmar_category()) - _keys[0] : _slen ]; 591 592 _eof_trans: 593 cs = _myanmar_syllable_machine_trans_targs[_trans]; 594 595 if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 ) 596 goto _again; 597 598 switch ( _myanmar_syllable_machine_trans_actions[_trans] ) { 599 case 8: 600 #line 111 "hb-ot-shaper-myanmar-machine.rl" 601 {te = p+1;{ found_syllable (myanmar_consonant_syllable); }} 602 break; 603 case 4: 604 #line 112 "hb-ot-shaper-myanmar-machine.rl" 605 {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }} 606 break; 607 case 10: 608 #line 113 "hb-ot-shaper-myanmar-machine.rl" 609 {te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} 610 break; 611 case 3: 612 #line 114 "hb-ot-shaper-myanmar-machine.rl" 613 {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }} 614 break; 615 case 7: 616 #line 111 "hb-ot-shaper-myanmar-machine.rl" 617 {te = p;p--;{ found_syllable (myanmar_consonant_syllable); }} 618 break; 619 case 9: 620 #line 113 "hb-ot-shaper-myanmar-machine.rl" 621 {te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }} 622 break; 623 case 12: 624 #line 114 "hb-ot-shaper-myanmar-machine.rl" 625 {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }} 626 break; 627 case 11: 628 #line 1 "NONE" 629 { switch( act ) { 630 case 2: 631 {{p = ((te))-1;} found_syllable (myanmar_non_myanmar_cluster); } 632 break; 633 case 3: 634 {{p = ((te))-1;} found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; } 635 break; 636 } 637 } 638 break; 639 case 6: 640 #line 1 "NONE" 641 {te = p+1;} 642 #line 112 "hb-ot-shaper-myanmar-machine.rl" 643 {act = 2;} 644 break; 645 case 5: 646 #line 1 "NONE" 647 {te = p+1;} 648 #line 113 "hb-ot-shaper-myanmar-machine.rl" 649 {act = 3;} 650 break; 651 #line 623 "hb-ot-shaper-myanmar-machine.hh" 652 } 653 654 _again: 655 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) { 656 case 1: 657 #line 1 "NONE" 658 {ts = 0;} 659 break; 660 #line 630 "hb-ot-shaper-myanmar-machine.hh" 661 } 662 663 if ( ++p != pe ) 664 goto _resume; 665 _test_eof: {} 666 if ( p == eof ) 667 { 668 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) { 669 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1; 670 goto _eof_trans; 671 } 672 } 673 674 } 675 676 #line 146 "hb-ot-shaper-myanmar-machine.rl" 677 678 } 679 680 #undef found_syllable 681 682 #endif /* HB_OT_SHAPER_MYANMAR_MACHINE_HH */