| OLD | NEW |
| 1 | 1 |
| 2 #line 1 "../../src/hb-ot-shape-complex-sea-machine.rl" | 2 #line 1 "../../src/hb-ot-shape-complex-sea-machine.rl" |
| 3 /* | 3 /* |
| 4 * Copyright © 2011,2012,2013 Google, Inc. | 4 * Copyright © 2011,2012,2013 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_SEA_MACHINE_HH | 29 #ifndef HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH |
| 30 #define HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH | 30 #define HB_OT_SHAPE_COMPLEX_SEA_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-sea-machine.hh.tmp" | 35 #line 36 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 36 static const unsigned char _sea_syllable_machine_trans_keys[] = { | 36 static const unsigned char _sea_syllable_machine_trans_keys[] = { |
| 37 1u, 1u, 1u, 1u, 1u, 29u, 3u, 29u, 3u, 29u, 1u, 1u, 0 | 37 1u, 1u, 1u, 1u, 1u, 29u, 3u, 29u, 3u, 29u, 1u, 1u, 0 |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 static const char _sea_syllable_machine_key_spans[] = { | 40 static const char _sea_syllable_machine_key_spans[] = { |
| 41 1, 1, 29, 27, 27, 1 | 41 1, 1, 29, 27, 27, 1 |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 static const char _sea_syllable_machine_index_offsets[] = { | 44 static const char _sea_syllable_machine_index_offsets[] = { |
| 45 0, 2, 4, 34, 62, 90 | 45 0, 2, 4, 34, 62, 90 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ | 106 if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ |
| 107 } HB_STMT_END | 107 } HB_STMT_END |
| 108 | 108 |
| 109 static void | 109 static void |
| 110 find_syllables (hb_buffer_t *buffer) | 110 find_syllables (hb_buffer_t *buffer) |
| 111 { | 111 { |
| 112 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; | 112 unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; |
| 113 int cs; | 113 int cs; |
| 114 hb_glyph_info_t *info = buffer->info; | 114 hb_glyph_info_t *info = buffer->info; |
| 115 | 115 |
| 116 #line 117 "hb-ot-shape-complex-sea-machine.hh.tmp" | 116 #line 117 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 117 { | 117 { |
| 118 cs = sea_syllable_machine_start; | 118 cs = sea_syllable_machine_start; |
| 119 ts = 0; | 119 ts = 0; |
| 120 te = 0; | 120 te = 0; |
| 121 act = 0; | 121 act = 0; |
| 122 } | 122 } |
| 123 | 123 |
| 124 #line 88 "../../src/hb-ot-shape-complex-sea-machine.rl" | 124 #line 88 "../../src/hb-ot-shape-complex-sea-machine.rl" |
| 125 | 125 |
| 126 | 126 |
| 127 p = 0; | 127 p = 0; |
| 128 pe = eof = buffer->len; | 128 pe = eof = buffer->len; |
| 129 | 129 |
| 130 unsigned int last = 0; | 130 unsigned int last = 0; |
| 131 unsigned int syllable_serial = 1; | 131 unsigned int syllable_serial = 1; |
| 132 | 132 |
| 133 #line 134 "hb-ot-shape-complex-sea-machine.hh.tmp" | 133 #line 134 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 134 { | 134 { |
| 135 int _slen; | 135 int _slen; |
| 136 int _trans; | 136 int _trans; |
| 137 const unsigned char *_keys; | 137 const unsigned char *_keys; |
| 138 const char *_inds; | 138 const char *_inds; |
| 139 if ( p == pe ) | 139 if ( p == pe ) |
| 140 goto _test_eof; | 140 goto _test_eof; |
| 141 _resume: | 141 _resume: |
| 142 switch ( _sea_syllable_machine_from_state_actions[cs] ) { | 142 switch ( _sea_syllable_machine_from_state_actions[cs] ) { |
| 143 case 5: | 143 case 5: |
| 144 #line 1 "NONE" | 144 #line 1 "NONE" |
| 145 {ts = p;} | 145 {ts = p;} |
| 146 break; | 146 break; |
| 147 #line 148 "hb-ot-shape-complex-sea-machine.hh.tmp" | 147 #line 148 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 148 } | 148 } |
| 149 | 149 |
| 150 _keys = _sea_syllable_machine_trans_keys + (cs<<1); | 150 _keys = _sea_syllable_machine_trans_keys + (cs<<1); |
| 151 _inds = _sea_syllable_machine_indicies + _sea_syllable_machine_index_off
sets[cs]; | 151 _inds = _sea_syllable_machine_indicies + _sea_syllable_machine_index_off
sets[cs]; |
| 152 | 152 |
| 153 _slen = _sea_syllable_machine_key_spans[cs]; | 153 _slen = _sea_syllable_machine_key_spans[cs]; |
| 154 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].sea_category()) && | 154 _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].sea_category()) && |
| 155 ( info[p].sea_category()) <= _keys[1] ? | 155 ( info[p].sea_category()) <= _keys[1] ? |
| 156 ( info[p].sea_category()) - _keys[0] : _slen ]; | 156 ( info[p].sea_category()) - _keys[0] : _slen ]; |
| 157 | 157 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 183 {te = p;p--;{ found_syllable (non_sea_cluster); }} | 183 {te = p;p--;{ found_syllable (non_sea_cluster); }} |
| 184 break; | 184 break; |
| 185 case 1: | 185 case 1: |
| 186 #line 61 "../../src/hb-ot-shape-complex-sea-machine.rl" | 186 #line 61 "../../src/hb-ot-shape-complex-sea-machine.rl" |
| 187 {{p = ((te))-1;}{ found_syllable (consonant_syllable); }} | 187 {{p = ((te))-1;}{ found_syllable (consonant_syllable); }} |
| 188 break; | 188 break; |
| 189 case 3: | 189 case 3: |
| 190 #line 62 "../../src/hb-ot-shape-complex-sea-machine.rl" | 190 #line 62 "../../src/hb-ot-shape-complex-sea-machine.rl" |
| 191 {{p = ((te))-1;}{ found_syllable (broken_cluster); }} | 191 {{p = ((te))-1;}{ found_syllable (broken_cluster); }} |
| 192 break; | 192 break; |
| 193 #line 194 "hb-ot-shape-complex-sea-machine.hh.tmp" | 193 #line 194 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 194 } | 194 } |
| 195 | 195 |
| 196 _again: | 196 _again: |
| 197 switch ( _sea_syllable_machine_to_state_actions[cs] ) { | 197 switch ( _sea_syllable_machine_to_state_actions[cs] ) { |
| 198 case 4: | 198 case 4: |
| 199 #line 1 "NONE" | 199 #line 1 "NONE" |
| 200 {ts = 0;} | 200 {ts = 0;} |
| 201 break; | 201 break; |
| 202 #line 203 "hb-ot-shape-complex-sea-machine.hh.tmp" | 202 #line 203 "../../src/hb-ot-shape-complex-sea-machine.hh" |
| 203 } | 203 } |
| 204 | 204 |
| 205 if ( ++p != pe ) | 205 if ( ++p != pe ) |
| 206 goto _resume; | 206 goto _resume; |
| 207 _test_eof: {} | 207 _test_eof: {} |
| 208 if ( p == eof ) | 208 if ( p == eof ) |
| 209 { | 209 { |
| 210 if ( _sea_syllable_machine_eof_trans[cs] > 0 ) { | 210 if ( _sea_syllable_machine_eof_trans[cs] > 0 ) { |
| 211 _trans = _sea_syllable_machine_eof_trans[cs] - 1; | 211 _trans = _sea_syllable_machine_eof_trans[cs] - 1; |
| 212 goto _eof_trans; | 212 goto _eof_trans; |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 | 215 |
| 216 } | 216 } |
| 217 | 217 |
| 218 #line 97 "../../src/hb-ot-shape-complex-sea-machine.rl" | 218 #line 97 "../../src/hb-ot-shape-complex-sea-machine.rl" |
| 219 | 219 |
| 220 } | 220 } |
| 221 | 221 |
| 222 #undef found_syllable | 222 #undef found_syllable |
| 223 | 223 |
| 224 #endif /* HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH */ | 224 #endif /* HB_OT_SHAPE_COMPLEX_SEA_MACHINE_HH */ |
| OLD | NEW |