1 2 #line 1 "../../src/hb-ot-shape-complex-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_SHAPE_COMPLEX_MYANMAR_MACHINE_HH 30 #define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH 31 32 #include "hb-private.hh" 33 34 35 #line 36 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 36 static const unsigned char _myanmar_syllable_machine_trans_keys[] = { 37 1u, 31u, 3u, 30u, 5u, 29u, 5u, 8u, 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u, 38 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 16u, 3u, 29u, 3u, 29u, 3u, 29u, 39 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 5u, 29u, 5u, 8u, 40 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 41 3u, 30u, 3u, 29u, 1u, 30u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 42 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 8u, 8u, 0 43 }; 44 45 static const char _myanmar_syllable_machine_key_spans[] = { 46 31, 28, 25, 4, 25, 23, 21, 21, 47 27, 27, 27, 27, 16, 27, 27, 27, 48 27, 27, 27, 27, 27, 27, 25, 4, 49 25, 23, 21, 21, 27, 27, 27, 27, 50 28, 27, 30, 27, 27, 27, 27, 27, 51 27, 27, 27, 27, 1 52 }; 53 54 static const short _myanmar_syllable_machine_index_offsets[] = { 55 0, 32, 61, 87, 92, 118, 142, 164, 56 186, 214, 242, 270, 298, 315, 343, 371, 57 399, 427, 455, 483, 511, 539, 567, 593, 58 598, 624, 648, 670, 692, 720, 748, 776, 59 804, 833, 861, 892, 920, 948, 976, 1004, 60 1032, 1060, 1088, 1116, 1144 61 }; 62 63 static const char _myanmar_syllable_machine_indicies[] = { 64 1, 1, 2, 3, 4, 4, 0, 5, 65 0, 6, 1, 0, 0, 0, 0, 7, 66 0, 8, 1, 0, 9, 10, 11, 12, 67 13, 14, 15, 16, 17, 18, 19, 0, 68 21, 22, 23, 23, 20, 24, 20, 25, 69 20, 20, 20, 20, 20, 20, 20, 26, 70 20, 20, 27, 28, 29, 30, 31, 32, 71 33, 34, 35, 36, 20, 23, 23, 20, 72 24, 20, 20, 20, 20, 20, 20, 20, 73 20, 20, 37, 20, 20, 20, 20, 20, 74 20, 31, 20, 20, 20, 35, 20, 23, 75 23, 20, 24, 20, 23, 23, 20, 24, 76 20, 20, 20, 20, 20, 20, 20, 20, 77 20, 20, 20, 20, 20, 20, 20, 20, 78 31, 20, 20, 20, 35, 20, 38, 20, 79 23, 23, 20, 24, 20, 31, 20, 20, 80 20, 20, 20, 20, 20, 39, 20, 20, 81 20, 20, 20, 20, 31, 20, 23, 23, 82 20, 24, 20, 20, 20, 20, 20, 20, 83 20, 20, 20, 39, 20, 20, 20, 20, 84 20, 20, 31, 20, 23, 23, 20, 24, 85 20, 20, 20, 20, 20, 20, 20, 20, 86 20, 20, 20, 20, 20, 20, 20, 20, 87 31, 20, 21, 20, 23, 23, 20, 24, 88 20, 25, 20, 20, 20, 20, 20, 20, 89 20, 40, 20, 20, 40, 20, 20, 20, 90 31, 41, 20, 20, 35, 20, 21, 20, 91 23, 23, 20, 24, 20, 25, 20, 20, 92 20, 20, 20, 20, 20, 20, 20, 20, 93 20, 20, 20, 20, 31, 20, 20, 20, 94 35, 20, 21, 20, 23, 23, 20, 24, 95 20, 25, 20, 20, 20, 20, 20, 20, 96 20, 40, 20, 20, 20, 20, 20, 20, 97 31, 41, 20, 20, 35, 20, 21, 20, 98 23, 23, 20, 24, 20, 25, 20, 20, 99 20, 20, 20, 20, 20, 20, 20, 20, 100 20, 20, 20, 20, 31, 41, 20, 20, 101 35, 20, 1, 1, 20, 20, 20, 20, 102 20, 20, 20, 20, 20, 20, 20, 20, 103 20, 1, 20, 21, 20, 23, 23, 20, 104 24, 20, 25, 20, 20, 20, 20, 20, 105 20, 20, 26, 20, 20, 27, 28, 29, 106 30, 31, 32, 33, 34, 35, 20, 21, 107 20, 23, 23, 20, 24, 20, 25, 20, 108 20, 20, 20, 20, 20, 20, 34, 20, 109 20, 20, 20, 20, 20, 31, 32, 33, 110 34, 35, 20, 21, 20, 23, 23, 20, 111 24, 20, 25, 20, 20, 20, 20, 20, 112 20, 20, 20, 20, 20, 20, 20, 20, 113 20, 31, 32, 33, 34, 35, 20, 21, 114 20, 23, 23, 20, 24, 20, 25, 20, 115 20, 20, 20, 20, 20, 20, 20, 20, 116 20, 20, 20, 20, 20, 31, 32, 33, 117 20, 35, 20, 21, 20, 23, 23, 20, 118 24, 20, 25, 20, 20, 20, 20, 20, 119 20, 20, 20, 20, 20, 20, 20, 20, 120 20, 31, 20, 33, 20, 35, 20, 21, 121 20, 23, 23, 20, 24, 20, 25, 20, 122 20, 20, 20, 20, 20, 20, 34, 20, 123 20, 27, 20, 29, 20, 31, 32, 33, 124 34, 35, 20, 21, 20, 23, 23, 20, 125 24, 20, 25, 20, 20, 20, 20, 20, 126 20, 20, 34, 20, 20, 27, 20, 20, 127 20, 31, 32, 33, 34, 35, 20, 21, 128 20, 23, 23, 20, 24, 20, 25, 20, 129 20, 20, 20, 20, 20, 20, 34, 20, 130 20, 27, 28, 29, 20, 31, 32, 33, 131 34, 35, 20, 21, 22, 23, 23, 20, 132 24, 20, 25, 20, 20, 20, 20, 20, 133 20, 20, 26, 20, 20, 27, 28, 29, 134 30, 31, 32, 33, 34, 35, 20, 3, 135 3, 42, 5, 42, 42, 42, 42, 42, 136 42, 42, 42, 42, 43, 42, 42, 42, 137 42, 42, 42, 13, 42, 42, 42, 17, 138 42, 3, 3, 42, 5, 42, 3, 3, 139 42, 5, 42, 42, 42, 42, 42, 42, 140 42, 42, 42, 42, 42, 42, 42, 42, 141 42, 42, 13, 42, 42, 42, 17, 42, 142 44, 42, 3, 3, 42, 5, 42, 13, 143 42, 42, 42, 42, 42, 42, 42, 45, 144 42, 42, 42, 42, 42, 42, 13, 42, 145 3, 3, 42, 5, 42, 42, 42, 42, 146 42, 42, 42, 42, 42, 45, 42, 42, 147 42, 42, 42, 42, 13, 42, 3, 3, 148 42, 5, 42, 42, 42, 42, 42, 42, 149 42, 42, 42, 42, 42, 42, 42, 42, 150 42, 42, 13, 42, 2, 42, 3, 3, 151 42, 5, 42, 6, 42, 42, 42, 42, 152 42, 42, 42, 46, 42, 42, 46, 42, 153 42, 42, 13, 47, 42, 42, 17, 42, 154 2, 42, 3, 3, 42, 5, 42, 6, 155 42, 42, 42, 42, 42, 42, 42, 42, 156 42, 42, 42, 42, 42, 42, 13, 42, 157 42, 42, 17, 42, 2, 42, 3, 3, 158 42, 5, 42, 6, 42, 42, 42, 42, 159 42, 42, 42, 46, 42, 42, 42, 42, 160 42, 42, 13, 47, 42, 42, 17, 42, 161 2, 42, 3, 3, 42, 5, 42, 6, 162 42, 42, 42, 42, 42, 42, 42, 42, 163 42, 42, 42, 42, 42, 42, 13, 47, 164 42, 42, 17, 42, 21, 22, 23, 23, 165 20, 24, 20, 25, 20, 20, 20, 20, 166 20, 20, 20, 48, 20, 20, 27, 28, 167 29, 30, 31, 32, 33, 34, 35, 36, 168 20, 21, 49, 23, 23, 20, 24, 20, 169 25, 20, 20, 20, 20, 20, 20, 20, 170 26, 20, 20, 27, 28, 29, 30, 31, 171 32, 33, 34, 35, 20, 1, 1, 2, 172 3, 3, 3, 42, 5, 42, 6, 1, 173 42, 42, 42, 42, 1, 42, 8, 1, 174 42, 9, 10, 11, 12, 13, 14, 15, 175 16, 17, 18, 42, 2, 42, 3, 3, 176 42, 5, 42, 6, 42, 42, 42, 42, 177 42, 42, 42, 8, 42, 42, 9, 10, 178 11, 12, 13, 14, 15, 16, 17, 42, 179 2, 42, 3, 3, 42, 5, 42, 6, 180 42, 42, 42, 42, 42, 42, 42, 16, 181 42, 42, 42, 42, 42, 42, 13, 14, 182 15, 16, 17, 42, 2, 42, 3, 3, 183 42, 5, 42, 6, 42, 42, 42, 42, 184 42, 42, 42, 42, 42, 42, 42, 42, 185 42, 42, 13, 14, 15, 16, 17, 42, 186 2, 42, 3, 3, 42, 5, 42, 6, 187 42, 42, 42, 42, 42, 42, 42, 42, 188 42, 42, 42, 42, 42, 42, 13, 14, 189 15, 42, 17, 42, 2, 42, 3, 3, 190 42, 5, 42, 6, 42, 42, 42, 42, 191 42, 42, 42, 42, 42, 42, 42, 42, 192 42, 42, 13, 42, 15, 42, 17, 42, 193 2, 42, 3, 3, 42, 5, 42, 6, 194 42, 42, 42, 42, 42, 42, 42, 16, 195 42, 42, 9, 42, 11, 42, 13, 14, 196 15, 16, 17, 42, 2, 42, 3, 3, 197 42, 5, 42, 6, 42, 42, 42, 42, 198 42, 42, 42, 16, 42, 42, 9, 42, 199 42, 42, 13, 14, 15, 16, 17, 42, 200 2, 42, 3, 3, 42, 5, 42, 6, 201 42, 42, 42, 42, 42, 42, 42, 16, 202 42, 42, 9, 10, 11, 42, 13, 14, 203 15, 16, 17, 42, 2, 3, 3, 3, 204 42, 5, 42, 6, 42, 42, 42, 42, 205 42, 42, 42, 8, 42, 42, 9, 10, 206 11, 12, 13, 14, 15, 16, 17, 42, 207 51, 50, 0 208 }; 209 210 static const char _myanmar_syllable_machine_trans_targs[] = { 211 0, 1, 22, 0, 0, 23, 29, 32, 212 35, 36, 40, 41, 42, 25, 38, 39, 213 37, 28, 43, 44, 0, 2, 12, 0, 214 3, 9, 13, 14, 18, 19, 20, 5, 215 16, 17, 15, 8, 21, 4, 6, 7, 216 10, 11, 0, 24, 26, 27, 30, 31, 217 33, 34, 0, 0 218 }; 219 220 static const char _myanmar_syllable_machine_trans_actions[] = { 221 3, 0, 0, 4, 5, 0, 0, 0, 222 0, 0, 0, 0, 0, 0, 0, 0, 223 0, 0, 0, 0, 6, 0, 0, 7, 224 0, 0, 0, 0, 0, 0, 0, 0, 225 0, 0, 0, 0, 0, 0, 0, 0, 226 0, 0, 8, 0, 0, 0, 0, 0, 227 0, 0, 9, 10 228 }; 229 230 static const char _myanmar_syllable_machine_to_state_actions[] = { 231 1, 0, 0, 0, 0, 0, 0, 0, 232 0, 0, 0, 0, 0, 0, 0, 0, 233 0, 0, 0, 0, 0, 0, 0, 0, 234 0, 0, 0, 0, 0, 0, 0, 0, 235 0, 0, 0, 0, 0, 0, 0, 0, 236 0, 0, 0, 0, 0 237 }; 238 239 static const char _myanmar_syllable_machine_from_state_actions[] = { 240 2, 0, 0, 0, 0, 0, 0, 0, 241 0, 0, 0, 0, 0, 0, 0, 0, 242 0, 0, 0, 0, 0, 0, 0, 0, 243 0, 0, 0, 0, 0, 0, 0, 0, 244 0, 0, 0, 0, 0, 0, 0, 0, 245 0, 0, 0, 0, 0 246 }; 247 248 static const short _myanmar_syllable_machine_eof_trans[] = { 249 0, 21, 21, 21, 21, 21, 21, 21, 250 21, 21, 21, 21, 21, 21, 21, 21, 251 21, 21, 21, 21, 21, 21, 43, 43, 252 43, 43, 43, 43, 43, 43, 43, 43, 253 21, 21, 43, 43, 43, 43, 43, 43, 254 43, 43, 43, 43, 51 255 }; 256 257 static const int myanmar_syllable_machine_start = 0; 258 static const int myanmar_syllable_machine_first_final = 0; 259 static const int myanmar_syllable_machine_error = -1; 260 261 static const int myanmar_syllable_machine_en_main = 0; 262 263 264 #line 36 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 265 266 267 268 #line 93 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 269 270 271 #define found_syllable(syllable_type) \ 272 HB_STMT_START { \ 273 if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \ 274 for (unsigned int i = last; i < p+1; i++) \ 275 info[i].syllable() = (syllable_serial << 4) | syllable_type; \ 276 last = p+1; \ 277 syllable_serial++; \ 278 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ 279 } HB_STMT_END 280 281 static void 282 find_syllables (hb_buffer_t *buffer) 283 { 284 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; 285 int cs; 286 hb_glyph_info_t *info = buffer->info; 287 288 #line 289 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 289 { 290 cs = myanmar_syllable_machine_start; 291 ts = 0; 292 te = 0; 293 act = 0; 294 } 295 296 #line 114 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 297 298 299 p = 0; 300 pe = eof = buffer->len; 301 302 unsigned int last = 0; 303 unsigned int syllable_serial = 1; 304 305 #line 306 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 306 { 307 int _slen; 308 int _trans; 309 const unsigned char *_keys; 310 const char *_inds; 311 if ( p == pe ) 312 goto _test_eof; 313 _resume: 314 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) { 315 case 2: 316 #line 1 "NONE" 317 {ts = p;} 318 break; 319 #line 320 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 320 } 321 322 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); 323 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs]; 324 325 _slen = _myanmar_syllable_machine_key_spans[cs]; 326 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) && 327 ( info[p].myanmar_category()) <= _keys[1] ? 328 ( info[p].myanmar_category()) - _keys[0] : _slen ]; 329 330 _eof_trans: 331 cs = _myanmar_syllable_machine_trans_targs[_trans]; 332 333 if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 ) 334 goto _again; 335 336 switch ( _myanmar_syllable_machine_trans_actions[_trans] ) { 337 case 7: 338 #line 85 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 339 {te = p+1;{ found_syllable (consonant_syllable); }} 340 break; 341 case 5: 342 #line 86 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 343 {te = p+1;{ found_syllable (non_myanmar_cluster); }} 344 break; 345 case 10: 346 #line 87 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 347 {te = p+1;{ found_syllable (punctuation_cluster); }} 348 break; 349 case 4: 350 #line 88 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 351 {te = p+1;{ found_syllable (broken_cluster); }} 352 break; 353 case 3: 354 #line 89 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 355 {te = p+1;{ found_syllable (non_myanmar_cluster); }} 356 break; 357 case 6: 358 #line 85 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 359 {te = p;p--;{ found_syllable (consonant_syllable); }} 360 break; 361 case 8: 362 #line 88 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 363 {te = p;p--;{ found_syllable (broken_cluster); }} 364 break; 365 case 9: 366 #line 89 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 367 {te = p;p--;{ found_syllable (non_myanmar_cluster); }} 368 break; 369 #line 370 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 370 } 371 372 _again: 373 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) { 374 case 1: 375 #line 1 "NONE" 376 {ts = 0;} 377 break; 378 #line 379 "../../src/hb-ot-shape-complex-myanmar-machine.hh.tmp" 379 } 380 381 if ( ++p != pe ) 382 goto _resume; 383 _test_eof: {} 384 if ( p == eof ) 385 { 386 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) { 387 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1; 388 goto _eof_trans; 389 } 390 } 391 392 } 393 394 #line 123 "../../src/hb-ot-shape-complex-myanmar-machine.rl" 395 396 } 397 398 #undef found_syllable 399 400 #endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */ | 1 2 #line 1 "hb-ot-shape-complex-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_SHAPE_COMPLEX_MYANMAR_MACHINE_HH 30 #define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH 31 32 #include "hb-private.hh" 33 34 35 #line 36 "hb-ot-shape-complex-myanmar-machine.hh" 36 static const unsigned char _myanmar_syllable_machine_trans_keys[] = { 37 1u, 32u, 3u, 30u, 5u, 29u, 5u, 8u, 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u, 38 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 16u, 3u, 29u, 3u, 29u, 3u, 29u, 39 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 5u, 29u, 5u, 8u, 40 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 41 3u, 30u, 3u, 29u, 1u, 32u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 42 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 32u, 8u, 8u, 0 43 }; 44 45 static const char _myanmar_syllable_machine_key_spans[] = { 46 32, 28, 25, 4, 25, 23, 21, 21, 47 27, 27, 27, 27, 16, 27, 27, 27, 48 27, 27, 27, 27, 27, 27, 25, 4, 49 25, 23, 21, 21, 27, 27, 27, 27, 50 28, 27, 32, 27, 27, 27, 27, 27, 51 27, 27, 27, 27, 32, 1 52 }; 53 54 static const short _myanmar_syllable_machine_index_offsets[] = { 55 0, 33, 62, 88, 93, 119, 143, 165, 56 187, 215, 243, 271, 299, 316, 344, 372, 57 400, 428, 456, 484, 512, 540, 568, 594, 58 599, 625, 649, 671, 693, 721, 749, 777, 59 805, 834, 862, 895, 923, 951, 979, 1007, 60 1035, 1063, 1091, 1119, 1147, 1180 61 }; 62 63 static const char _myanmar_syllable_machine_indicies[] = { 64 1, 1, 2, 3, 4, 4, 0, 5, 65 0, 6, 1, 0, 0, 0, 0, 7, 66 0, 8, 9, 0, 10, 11, 12, 13, 67 14, 15, 16, 17, 18, 19, 20, 1, 68 0, 22, 23, 24, 24, 21, 25, 21, 69 26, 21, 21, 21, 21, 21, 21, 21, 70 27, 21, 21, 28, 29, 30, 31, 32, 71 33, 34, 35, 36, 37, 21, 24, 24, 72 21, 25, 21, 21, 21, 21, 21, 21, 73 21, 21, 21, 38, 21, 21, 21, 21, 74 21, 21, 32, 21, 21, 21, 36, 21, 75 24, 24, 21, 25, 21, 24, 24, 21, 76 25, 21, 21, 21, 21, 21, 21, 21, 77 21, 21, 21, 21, 21, 21, 21, 21, 78 21, 32, 21, 21, 21, 36, 21, 39, 79 21, 24, 24, 21, 25, 21, 32, 21, 80 21, 21, 21, 21, 21, 21, 40, 21, 81 21, 21, 21, 21, 21, 32, 21, 24, 82 24, 21, 25, 21, 21, 21, 21, 21, 83 21, 21, 21, 21, 40, 21, 21, 21, 84 21, 21, 21, 32, 21, 24, 24, 21, 85 25, 21, 21, 21, 21, 21, 21, 21, 86 21, 21, 21, 21, 21, 21, 21, 21, 87 21, 32, 21, 22, 21, 24, 24, 21, 88 25, 21, 26, 21, 21, 21, 21, 21, 89 21, 21, 41, 21, 21, 41, 21, 21, 90 21, 32, 42, 21, 21, 36, 21, 22, 91 21, 24, 24, 21, 25, 21, 26, 21, 92 21, 21, 21, 21, 21, 21, 21, 21, 93 21, 21, 21, 21, 21, 32, 21, 21, 94 21, 36, 21, 22, 21, 24, 24, 21, 95 25, 21, 26, 21, 21, 21, 21, 21, 96 21, 21, 41, 21, 21, 21, 21, 21, 97 21, 32, 42, 21, 21, 36, 21, 22, 98 21, 24, 24, 21, 25, 21, 26, 21, 99 21, 21, 21, 21, 21, 21, 21, 21, 100 21, 21, 21, 21, 21, 32, 42, 21, 101 21, 36, 21, 1, 1, 21, 21, 21, 102 21, 21, 21, 21, 21, 21, 21, 21, 103 21, 21, 1, 21, 22, 21, 24, 24, 104 21, 25, 21, 26, 21, 21, 21, 21, 105 21, 21, 21, 27, 21, 21, 28, 29, 106 30, 31, 32, 33, 34, 35, 36, 21, 107 22, 21, 24, 24, 21, 25, 21, 26, 108 21, 21, 21, 21, 21, 21, 21, 35, 109 21, 21, 21, 21, 21, 21, 32, 33, 110 34, 35, 36, 21, 22, 21, 24, 24, 111 21, 25, 21, 26, 21, 21, 21, 21, 112 21, 21, 21, 21, 21, 21, 21, 21, 113 21, 21, 32, 33, 34, 35, 36, 21, 114 22, 21, 24, 24, 21, 25, 21, 26, 115 21, 21, 21, 21, 21, 21, 21, 21, 116 21, 21, 21, 21, 21, 21, 32, 33, 117 34, 21, 36, 21, 22, 21, 24, 24, 118 21, 25, 21, 26, 21, 21, 21, 21, 119 21, 21, 21, 21, 21, 21, 21, 21, 120 21, 21, 32, 21, 34, 21, 36, 21, 121 22, 21, 24, 24, 21, 25, 21, 26, 122 21, 21, 21, 21, 21, 21, 21, 35, 123 21, 21, 28, 21, 30, 21, 32, 33, 124 34, 35, 36, 21, 22, 21, 24, 24, 125 21, 25, 21, 26, 21, 21, 21, 21, 126 21, 21, 21, 35, 21, 21, 28, 21, 127 21, 21, 32, 33, 34, 35, 36, 21, 128 22, 21, 24, 24, 21, 25, 21, 26, 129 21, 21, 21, 21, 21, 21, 21, 35, 130 21, 21, 28, 29, 30, 21, 32, 33, 131 34, 35, 36, 21, 22, 23, 24, 24, 132 21, 25, 21, 26, 21, 21, 21, 21, 133 21, 21, 21, 27, 21, 21, 28, 29, 134 30, 31, 32, 33, 34, 35, 36, 21, 135 3, 3, 43, 5, 43, 43, 43, 43, 136 43, 43, 43, 43, 43, 44, 43, 43, 137 43, 43, 43, 43, 14, 43, 43, 43, 138 18, 43, 3, 3, 43, 5, 43, 3, 139 3, 43, 5, 43, 43, 43, 43, 43, 140 43, 43, 43, 43, 43, 43, 43, 43, 141 43, 43, 43, 14, 43, 43, 43, 18, 142 43, 45, 43, 3, 3, 43, 5, 43, 143 14, 43, 43, 43, 43, 43, 43, 43, 144 46, 43, 43, 43, 43, 43, 43, 14, 145 43, 3, 3, 43, 5, 43, 43, 43, 146 43, 43, 43, 43, 43, 43, 46, 43, 147 43, 43, 43, 43, 43, 14, 43, 3, 148 3, 43, 5, 43, 43, 43, 43, 43, 149 43, 43, 43, 43, 43, 43, 43, 43, 150 43, 43, 43, 14, 43, 2, 43, 3, 151 3, 43, 5, 43, 6, 43, 43, 43, 152 43, 43, 43, 43, 47, 43, 43, 47, 153 43, 43, 43, 14, 48, 43, 43, 18, 154 43, 2, 43, 3, 3, 43, 5, 43, 155 6, 43, 43, 43, 43, 43, 43, 43, 156 43, 43, 43, 43, 43, 43, 43, 14, 157 43, 43, 43, 18, 43, 2, 43, 3, 158 3, 43, 5, 43, 6, 43, 43, 43, 159 43, 43, 43, 43, 47, 43, 43, 43, 160 43, 43, 43, 14, 48, 43, 43, 18, 161 43, 2, 43, 3, 3, 43, 5, 43, 162 6, 43, 43, 43, 43, 43, 43, 43, 163 43, 43, 43, 43, 43, 43, 43, 14, 164 48, 43, 43, 18, 43, 22, 23, 24, 165 24, 21, 25, 21, 26, 21, 21, 21, 166 21, 21, 21, 21, 49, 21, 21, 28, 167 29, 30, 31, 32, 33, 34, 35, 36, 168 37, 21, 22, 50, 24, 24, 21, 25, 169 21, 26, 21, 21, 21, 21, 21, 21, 170 21, 27, 21, 21, 28, 29, 30, 31, 171 32, 33, 34, 35, 36, 21, 1, 1, 172 2, 3, 3, 3, 43, 5, 43, 6, 173 1, 43, 43, 43, 43, 1, 43, 8, 174 43, 43, 10, 11, 12, 13, 14, 15, 175 16, 17, 18, 19, 43, 1, 43, 2, 176 43, 3, 3, 43, 5, 43, 6, 43, 177 43, 43, 43, 43, 43, 43, 8, 43, 178 43, 10, 11, 12, 13, 14, 15, 16, 179 17, 18, 43, 2, 43, 3, 3, 43, 180 5, 43, 6, 43, 43, 43, 43, 43, 181 43, 43, 17, 43, 43, 43, 43, 43, 182 43, 14, 15, 16, 17, 18, 43, 2, 183 43, 3, 3, 43, 5, 43, 6, 43, 184 43, 43, 43, 43, 43, 43, 43, 43, 185 43, 43, 43, 43, 43, 14, 15, 16, 186 17, 18, 43, 2, 43, 3, 3, 43, 187 5, 43, 6, 43, 43, 43, 43, 43, 188 43, 43, 43, 43, 43, 43, 43, 43, 189 43, 14, 15, 16, 43, 18, 43, 2, 190 43, 3, 3, 43, 5, 43, 6, 43, 191 43, 43, 43, 43, 43, 43, 43, 43, 192 43, 43, 43, 43, 43, 14, 43, 16, 193 43, 18, 43, 2, 43, 3, 3, 43, 194 5, 43, 6, 43, 43, 43, 43, 43, 195 43, 43, 17, 43, 43, 10, 43, 12, 196 43, 14, 15, 16, 17, 18, 43, 2, 197 43, 3, 3, 43, 5, 43, 6, 43, 198 43, 43, 43, 43, 43, 43, 17, 43, 199 43, 10, 43, 43, 43, 14, 15, 16, 200 17, 18, 43, 2, 43, 3, 3, 43, 201 5, 43, 6, 43, 43, 43, 43, 43, 202 43, 43, 17, 43, 43, 10, 11, 12, 203 43, 14, 15, 16, 17, 18, 43, 2, 204 3, 3, 3, 43, 5, 43, 6, 43, 205 43, 43, 43, 43, 43, 43, 8, 43, 206 43, 10, 11, 12, 13, 14, 15, 16, 207 17, 18, 43, 1, 1, 51, 51, 51, 208 51, 51, 51, 51, 51, 1, 51, 51, 209 51, 51, 1, 51, 51, 51, 51, 51, 210 51, 51, 51, 51, 51, 51, 51, 51, 211 51, 51, 1, 51, 52, 51, 0 212 }; 213 214 static const char _myanmar_syllable_machine_trans_targs[] = { 215 0, 1, 22, 0, 0, 23, 29, 32, 216 35, 44, 36, 40, 41, 42, 25, 38, 217 39, 37, 28, 43, 45, 0, 2, 12, 218 0, 3, 9, 13, 14, 18, 19, 20, 219 5, 16, 17, 15, 8, 21, 4, 6, 220 7, 10, 11, 0, 24, 26, 27, 30, 221 31, 33, 34, 0, 0 222 }; 223 224 static const char _myanmar_syllable_machine_trans_actions[] = { 225 3, 0, 0, 4, 5, 0, 0, 0, 226 0, 0, 0, 0, 0, 0, 0, 0, 227 0, 0, 0, 0, 0, 6, 0, 0, 228 7, 0, 0, 0, 0, 0, 0, 0, 229 0, 0, 0, 0, 0, 0, 0, 0, 230 0, 0, 0, 8, 0, 0, 0, 0, 231 0, 0, 0, 9, 10 232 }; 233 234 static const char _myanmar_syllable_machine_to_state_actions[] = { 235 1, 0, 0, 0, 0, 0, 0, 0, 236 0, 0, 0, 0, 0, 0, 0, 0, 237 0, 0, 0, 0, 0, 0, 0, 0, 238 0, 0, 0, 0, 0, 0, 0, 0, 239 0, 0, 0, 0, 0, 0, 0, 0, 240 0, 0, 0, 0, 0, 0 241 }; 242 243 static const char _myanmar_syllable_machine_from_state_actions[] = { 244 2, 0, 0, 0, 0, 0, 0, 0, 245 0, 0, 0, 0, 0, 0, 0, 0, 246 0, 0, 0, 0, 0, 0, 0, 0, 247 0, 0, 0, 0, 0, 0, 0, 0, 248 0, 0, 0, 0, 0, 0, 0, 0, 249 0, 0, 0, 0, 0, 0 250 }; 251 252 static const short _myanmar_syllable_machine_eof_trans[] = { 253 0, 22, 22, 22, 22, 22, 22, 22, 254 22, 22, 22, 22, 22, 22, 22, 22, 255 22, 22, 22, 22, 22, 22, 44, 44, 256 44, 44, 44, 44, 44, 44, 44, 44, 257 22, 22, 44, 44, 44, 44, 44, 44, 258 44, 44, 44, 44, 52, 52 259 }; 260 261 static const int myanmar_syllable_machine_start = 0; 262 static const int myanmar_syllable_machine_first_final = 0; 263 static const int myanmar_syllable_machine_error = -1; 264 265 static const int myanmar_syllable_machine_en_main = 0; 266 267 268 #line 36 "hb-ot-shape-complex-myanmar-machine.rl" 269 270 271 272 #line 94 "hb-ot-shape-complex-myanmar-machine.rl" 273 274 275 #define found_syllable(syllable_type) \ 276 HB_STMT_START { \ 277 if (0) fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #syllable_type); \ 278 for (unsigned int i = last; i < p+1; i++) \ 279 info[i].syllable() = (syllable_serial << 4) | syllable_type; \ 280 last = p+1; \ 281 syllable_serial++; \ 282 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ 283 } HB_STMT_END 284 285 static void 286 find_syllables (hb_buffer_t *buffer) 287 { 288 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; 289 int cs; 290 hb_glyph_info_t *info = buffer->info; 291 292 #line 293 "hb-ot-shape-complex-myanmar-machine.hh" 293 { 294 cs = myanmar_syllable_machine_start; 295 ts = 0; 296 te = 0; 297 act = 0; 298 } 299 300 #line 115 "hb-ot-shape-complex-myanmar-machine.rl" 301 302 303 p = 0; 304 pe = eof = buffer->len; 305 306 unsigned int last = 0; 307 unsigned int syllable_serial = 1; 308 309 #line 310 "hb-ot-shape-complex-myanmar-machine.hh" 310 { 311 int _slen; 312 int _trans; 313 const unsigned char *_keys; 314 const char *_inds; 315 if ( p == pe ) 316 goto _test_eof; 317 _resume: 318 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) { 319 case 2: 320 #line 1 "NONE" 321 {ts = p;} 322 break; 323 #line 324 "hb-ot-shape-complex-myanmar-machine.hh" 324 } 325 326 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); 327 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs]; 328 329 _slen = _myanmar_syllable_machine_key_spans[cs]; 330 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) && 331 ( info[p].myanmar_category()) <= _keys[1] ? 332 ( info[p].myanmar_category()) - _keys[0] : _slen ]; 333 334 _eof_trans: 335 cs = _myanmar_syllable_machine_trans_targs[_trans]; 336 337 if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 ) 338 goto _again; 339 340 switch ( _myanmar_syllable_machine_trans_actions[_trans] ) { 341 case 7: 342 #line 86 "hb-ot-shape-complex-myanmar-machine.rl" 343 {te = p+1;{ found_syllable (consonant_syllable); }} 344 break; 345 case 5: 346 #line 87 "hb-ot-shape-complex-myanmar-machine.rl" 347 {te = p+1;{ found_syllable (non_myanmar_cluster); }} 348 break; 349 case 10: 350 #line 88 "hb-ot-shape-complex-myanmar-machine.rl" 351 {te = p+1;{ found_syllable (punctuation_cluster); }} 352 break; 353 case 4: 354 #line 89 "hb-ot-shape-complex-myanmar-machine.rl" 355 {te = p+1;{ found_syllable (broken_cluster); }} 356 break; 357 case 3: 358 #line 90 "hb-ot-shape-complex-myanmar-machine.rl" 359 {te = p+1;{ found_syllable (non_myanmar_cluster); }} 360 break; 361 case 6: 362 #line 86 "hb-ot-shape-complex-myanmar-machine.rl" 363 {te = p;p--;{ found_syllable (consonant_syllable); }} 364 break; 365 case 8: 366 #line 89 "hb-ot-shape-complex-myanmar-machine.rl" 367 {te = p;p--;{ found_syllable (broken_cluster); }} 368 break; 369 case 9: 370 #line 90 "hb-ot-shape-complex-myanmar-machine.rl" 371 {te = p;p--;{ found_syllable (non_myanmar_cluster); }} 372 break; 373 #line 374 "hb-ot-shape-complex-myanmar-machine.hh" 374 } 375 376 _again: 377 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) { 378 case 1: 379 #line 1 "NONE" 380 {ts = 0;} 381 break; 382 #line 383 "hb-ot-shape-complex-myanmar-machine.hh" 383 } 384 385 if ( ++p != pe ) 386 goto _resume; 387 _test_eof: {} 388 if ( p == eof ) 389 { 390 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) { 391 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1; 392 goto _eof_trans; 393 } 394 } 395 396 } 397 398 #line 124 "hb-ot-shape-complex-myanmar-machine.rl" 399 400 } 401 402 #undef found_syllable 403 404 #endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */ |