OLD | NEW |
1 | 1 |
2 #line 1 "../../src/hb-ot-shape-complex-myanmar-machine.rl" | 2 #line 1 "../../src/hb-ot-shape-complex-myanmar-machine.rl" |
3 /* | 3 /* |
4 * Copyright © 2011,2012 Google, Inc. | 4 * Copyright © 2011,2012 Google, Inc. |
5 * | 5 * |
6 * This is part of HarfBuzz, a text shaping library. | 6 * This is part of HarfBuzz, a text shaping library. |
7 * | 7 * |
8 * Permission is hereby granted, without written agreement and without | 8 * Permission is hereby granted, without written agreement and without |
9 * license or royalty fees, to use, copy, modify, and distribute this | 9 * license or royalty fees, to use, copy, modify, and distribute this |
10 * software and its documentation for any purpose, provided that the | 10 * software and its documentation for any purpose, provided that the |
(...skipping 14 matching lines...) Expand all Loading... |
25 * | 25 * |
26 * Google Author(s): Behdad Esfahbod | 26 * Google Author(s): Behdad Esfahbod |
27 */ | 27 */ |
28 | 28 |
29 #ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH | 29 #ifndef HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH |
30 #define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH | 30 #define HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH |
31 | 31 |
32 #include "hb-private.hh" | 32 #include "hb-private.hh" |
33 | 33 |
34 | 34 |
35 #line 36 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 35 #line 36 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
36 static const unsigned char _myanmar_syllable_machine_trans_keys[] = { | 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, | 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, | 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, | 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, | 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, | 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 | 42 3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 8u, 8u, 0 |
43 }; | 43 }; |
44 | 44 |
45 static const char _myanmar_syllable_machine_key_spans[] = { | 45 static const char _myanmar_syllable_machine_key_spans[] = { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ | 278 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ |
279 } HB_STMT_END | 279 } HB_STMT_END |
280 | 280 |
281 static void | 281 static void |
282 find_syllables (hb_buffer_t *buffer) | 282 find_syllables (hb_buffer_t *buffer) |
283 { | 283 { |
284 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; | 284 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; |
285 int cs; | 285 int cs; |
286 hb_glyph_info_t *info = buffer->info; | 286 hb_glyph_info_t *info = buffer->info; |
287 | 287 |
288 #line 289 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 288 #line 289 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
289 { | 289 { |
290 cs = myanmar_syllable_machine_start; | 290 cs = myanmar_syllable_machine_start; |
291 ts = 0; | 291 ts = 0; |
292 te = 0; | 292 te = 0; |
293 act = 0; | 293 act = 0; |
294 } | 294 } |
295 | 295 |
296 #line 114 "../../src/hb-ot-shape-complex-myanmar-machine.rl" | 296 #line 114 "../../src/hb-ot-shape-complex-myanmar-machine.rl" |
297 | 297 |
298 | 298 |
299 p = 0; | 299 p = 0; |
300 pe = eof = buffer->len; | 300 pe = eof = buffer->len; |
301 | 301 |
302 unsigned int last = 0; | 302 unsigned int last = 0; |
303 unsigned int syllable_serial = 1; | 303 unsigned int syllable_serial = 1; |
304 | 304 |
305 #line 306 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 305 #line 306 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
306 { | 306 { |
307 int _slen; | 307 int _slen; |
308 int _trans; | 308 int _trans; |
309 const unsigned char *_keys; | 309 const unsigned char *_keys; |
310 const char *_inds; | 310 const char *_inds; |
311 if ( p == pe ) | 311 if ( p == pe ) |
312 goto _test_eof; | 312 goto _test_eof; |
313 _resume: | 313 _resume: |
314 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) { | 314 switch ( _myanmar_syllable_machine_from_state_actions[cs] ) { |
315 case 2: | 315 case 2: |
316 #line 1 "NONE" | 316 #line 1 "NONE" |
317 {ts = p;} | 317 {ts = p;} |
318 break; | 318 break; |
319 #line 320 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 319 #line 320 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
320 } | 320 } |
321 | 321 |
322 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); | 322 _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); |
323 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_i
ndex_offsets[cs]; | 323 _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_i
ndex_offsets[cs]; |
324 | 324 |
325 _slen = _myanmar_syllable_machine_key_spans[cs]; | 325 _slen = _myanmar_syllable_machine_key_spans[cs]; |
326 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) && | 326 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) && |
327 ( info[p].myanmar_category()) <= _keys[1] ? | 327 ( info[p].myanmar_category()) <= _keys[1] ? |
328 ( info[p].myanmar_category()) - _keys[0] : _slen ]; | 328 ( info[p].myanmar_category()) - _keys[0] : _slen ]; |
329 | 329 |
(...skipping 29 matching lines...) Expand all Loading... |
359 {te = p;p--;{ found_syllable (consonant_syllable); }} | 359 {te = p;p--;{ found_syllable (consonant_syllable); }} |
360 break; | 360 break; |
361 case 8: | 361 case 8: |
362 #line 88 "../../src/hb-ot-shape-complex-myanmar-machine.rl" | 362 #line 88 "../../src/hb-ot-shape-complex-myanmar-machine.rl" |
363 {te = p;p--;{ found_syllable (broken_cluster); }} | 363 {te = p;p--;{ found_syllable (broken_cluster); }} |
364 break; | 364 break; |
365 case 9: | 365 case 9: |
366 #line 89 "../../src/hb-ot-shape-complex-myanmar-machine.rl" | 366 #line 89 "../../src/hb-ot-shape-complex-myanmar-machine.rl" |
367 {te = p;p--;{ found_syllable (non_myanmar_cluster); }} | 367 {te = p;p--;{ found_syllable (non_myanmar_cluster); }} |
368 break; | 368 break; |
369 #line 370 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 369 #line 370 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
370 } | 370 } |
371 | 371 |
372 _again: | 372 _again: |
373 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) { | 373 switch ( _myanmar_syllable_machine_to_state_actions[cs] ) { |
374 case 1: | 374 case 1: |
375 #line 1 "NONE" | 375 #line 1 "NONE" |
376 {ts = 0;} | 376 {ts = 0;} |
377 break; | 377 break; |
378 #line 379 "hb-ot-shape-complex-myanmar-machine.hh.tmp" | 378 #line 379 "../../src/hb-ot-shape-complex-myanmar-machine.hh" |
379 } | 379 } |
380 | 380 |
381 if ( ++p != pe ) | 381 if ( ++p != pe ) |
382 goto _resume; | 382 goto _resume; |
383 _test_eof: {} | 383 _test_eof: {} |
384 if ( p == eof ) | 384 if ( p == eof ) |
385 { | 385 { |
386 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) { | 386 if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) { |
387 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1; | 387 _trans = _myanmar_syllable_machine_eof_trans[cs] - 1; |
388 goto _eof_trans; | 388 goto _eof_trans; |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 } | 392 } |
393 | 393 |
394 #line 123 "../../src/hb-ot-shape-complex-myanmar-machine.rl" | 394 #line 123 "../../src/hb-ot-shape-complex-myanmar-machine.rl" |
395 | 395 |
396 } | 396 } |
397 | 397 |
398 #undef found_syllable | 398 #undef found_syllable |
399 | 399 |
400 #endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */ | 400 #endif /* HB_OT_SHAPE_COMPLEX_MYANMAR_MACHINE_HH */ |
OLD | NEW |