1 | // This file is autogenerated. Do not edit it! |
2 | // |
3 | // See docs/ragel.md for details. |
4 | |
5 | #![allow ( |
6 | dead_code, |
7 | non_upper_case_globals, |
8 | unused_assignments, |
9 | unused_parens, |
10 | while_true, |
11 | clippy::assign_op_pattern, |
12 | clippy::comparison_chain, |
13 | clippy::double_parens, |
14 | clippy::unnecessary_cast, |
15 | clippy::single_match, |
16 | clippy::never_loop |
17 | )] |
18 | |
19 | use crate::buffer::Buffer; |
20 | |
21 | static _indic_syllable_machine_trans_keys: [u8; 284] = [ |
22 | 7, 7, 3, 7, 4, 6, 4, 7, 3, 7, 5, 5, 14, 14, 3, 7, 3, 12, 3, 7, 7, 7, 4, 6, 4, 7, 3, 7, 5, 5, |
23 | 14, 14, 3, 7, 3, 12, 3, 12, 3, 12, 7, 7, 4, 6, 4, 7, 3, 7, 5, 5, 14, 14, 3, 7, 3, 7, 3, 12, 7, |
24 | 7, 4, 6, 4, 7, 3, 7, 5, 5, 14, 14, 3, 7, 3, 7, 4, 7, 7, 7, 0, 17, 2, 15, 2, 15, 3, 15, 0, 14, |
25 | 4, 9, 4, 9, 9, 9, 4, 9, 0, 14, 0, 14, 0, 14, 2, 9, 3, 9, 4, 9, 3, 9, 4, 9, 2, 9, 4, 9, 2, 15, |
26 | 2, 15, 2, 15, 2, 15, 3, 15, 0, 14, 2, 15, 2, 15, 3, 15, 0, 14, 4, 9, 9, 9, 4, 9, 0, 14, 0, 14, |
27 | 2, 9, 3, 9, 4, 9, 3, 9, 4, 9, 4, 9, 2, 9, 4, 9, 2, 15, 2, 15, 3, 7, 2, 15, 2, 15, 3, 15, 0, 14, |
28 | 2, 15, 0, 14, 4, 9, 9, 9, 4, 9, 0, 14, 0, 14, 2, 9, 3, 9, 4, 9, 2, 15, 3, 9, 4, 9, 4, 9, 2, 9, |
29 | 4, 9, 2, 15, 3, 12, 3, 7, 2, 15, 2, 15, 3, 15, 0, 14, 2, 15, 0, 14, 4, 9, 9, 9, 4, 9, 0, 14, 0, |
30 | 14, 2, 9, 3, 9, 4, 9, 2, 15, 3, 9, 4, 9, 4, 9, 2, 9, 4, 9, 0, 15, 2, 15, 0, 15, 3, 12, 4, 9, 9, |
31 | 9, 4, 9, 0, 14, 2, 9, 4, 9, 4, 9, 9, 9, 4, 9, 0, 14, 0, 0, |
32 | ]; |
33 | static _indic_syllable_machine_char_class: [i8; 21] = [ |
34 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 8, 13, 14, 15, 16, 17, 0, 0, |
35 | ]; |
36 | static _indic_syllable_machine_index_offsets: [i16; 143] = [ |
37 | 0, 1, 6, 9, 13, 18, 19, 20, 25, 35, 40, 41, 44, 48, 53, 54, 55, 60, 70, 80, 90, 91, 94, 98, |
38 | 103, 104, 105, 110, 115, 125, 126, 129, 133, 138, 139, 140, 145, 150, 154, 155, 173, 187, 201, |
39 | 214, 229, 235, 241, 242, 248, 263, 278, 293, 301, 308, 314, 321, 327, 335, 341, 355, 369, 383, |
40 | 397, 410, 425, 439, 453, 466, 481, 487, 488, 494, 509, 524, 532, 539, 545, 552, 558, 564, 572, |
41 | 578, 592, 606, 611, 625, 639, 652, 667, 681, 696, 702, 703, 709, 724, 739, 747, 754, 760, 774, |
42 | 781, 787, 793, 801, 807, 821, 831, 836, 850, 864, 877, 892, 906, 921, 927, 928, 934, 949, 964, |
43 | 972, 979, 985, 999, 1006, 1012, 1018, 1026, 1032, 1048, 1062, 1078, 1088, 1094, 1095, 1101, |
44 | 1116, 1124, 1130, 1136, 1137, 1143, 0, 0, |
45 | ]; |
46 | static _indic_syllable_machine_indices: [i16; 1160] = [ |
47 | 1, 2, 3, 3, 4, 1, 3, 3, 4, 3, 3, 4, 1, 5, 3, 3, 4, 1, 6, 7, 8, 3, 3, 4, 1, 2, 3, 3, 4, 1, 0, 0, |
48 | 0, 0, 9, 11, 12, 12, 13, 14, 14, 12, 12, 13, 12, 12, 13, 14, 15, 12, 12, 13, 14, 16, 17, 18, |
49 | 12, 12, 13, 14, 11, 12, 12, 13, 14, 10, 10, 10, 10, 19, 11, 12, 12, 13, 14, 10, 10, 10, 10, 20, |
50 | 22, 23, 23, 24, 25, 21, 21, 21, 21, 26, 25, 23, 23, 24, 23, 23, 24, 25, 28, 23, 23, 24, 25, 29, |
51 | 30, 22, 23, 23, 24, 25, 31, 23, 23, 24, 25, 33, 34, 34, 35, 36, 32, 32, 32, 32, 37, 36, 34, 34, |
52 | 35, 34, 34, 35, 36, 38, 34, 34, 35, 36, 39, 40, 33, 34, 34, 35, 36, 41, 34, 34, 35, 36, 23, 23, |
53 | 24, 1, 43, 46, 47, 48, 49, 50, 51, 24, 25, 45, 52, 53, 53, 26, 54, 55, 56, 57, 58, 60, 61, 62, |
54 | 63, 4, 1, 59, 64, 59, 59, 9, 59, 59, 65, 66, 61, 67, 67, 4, 1, 59, 64, 59, 59, 59, 59, 59, 65, |
55 | 61, 67, 67, 4, 1, 59, 64, 59, 59, 59, 59, 59, 65, 46, 59, 59, 59, 68, 69, 59, 1, 59, 64, 59, |
56 | 59, 59, 59, 46, 70, 70, 59, 1, 59, 64, 64, 59, 59, 71, 59, 64, 64, 64, 59, 59, 59, 59, 64, 46, |
57 | 59, 72, 59, 70, 70, 59, 1, 59, 64, 59, 59, 59, 59, 46, 46, 59, 59, 59, 70, 70, 59, 1, 59, 64, |
58 | 59, 59, 59, 59, 46, 46, 59, 59, 59, 70, 69, 59, 1, 59, 64, 59, 59, 59, 59, 46, 73, 7, 74, 75, |
59 | 4, 1, 59, 64, 7, 74, 75, 4, 1, 59, 64, 74, 74, 4, 1, 59, 64, 76, 77, 77, 4, 1, 59, 64, 68, 78, |
60 | 59, 1, 59, 64, 68, 59, 70, 70, 59, 1, 59, 64, 70, 78, 59, 1, 59, 64, 60, 61, 67, 67, 4, 1, 59, |
61 | 64, 59, 59, 59, 59, 59, 65, 60, 61, 62, 67, 4, 1, 59, 64, 59, 59, 9, 59, 59, 65, 80, 81, 82, |
62 | 83, 13, 14, 79, 84, 79, 79, 20, 79, 79, 85, 86, 81, 87, 83, 13, 14, 79, 84, 79, 79, 79, 79, 79, |
63 | 85, 81, 87, 83, 13, 14, 79, 84, 79, 79, 79, 79, 79, 85, 88, 79, 79, 79, 89, 90, 79, 14, 79, 84, |
64 | 79, 79, 79, 79, 88, 91, 81, 92, 93, 13, 14, 79, 84, 79, 79, 19, 79, 79, 85, 94, 81, 87, 87, 13, |
65 | 14, 79, 84, 79, 79, 79, 79, 79, 85, 81, 87, 87, 13, 14, 79, 84, 79, 79, 79, 79, 79, 85, 88, 79, |
66 | 79, 79, 95, 90, 79, 14, 79, 84, 79, 79, 79, 79, 88, 84, 79, 79, 96, 79, 84, 84, 84, 79, 79, 79, |
67 | 79, 84, 88, 79, 97, 79, 95, 95, 79, 14, 79, 84, 79, 79, 79, 79, 88, 88, 79, 79, 79, 95, 95, 79, |
68 | 14, 79, 84, 79, 79, 79, 79, 88, 98, 17, 99, 100, 13, 14, 79, 84, 17, 99, 100, 13, 14, 79, 84, |
69 | 99, 99, 13, 14, 79, 84, 101, 102, 102, 13, 14, 79, 84, 89, 103, 79, 14, 79, 84, 95, 95, 79, 14, |
70 | 79, 84, 89, 79, 95, 95, 79, 14, 79, 84, 95, 103, 79, 14, 79, 84, 91, 81, 87, 87, 13, 14, 79, |
71 | 84, 79, 79, 79, 79, 79, 85, 91, 81, 92, 87, 13, 14, 79, 84, 79, 79, 19, 79, 79, 85, 11, 12, 12, |
72 | 13, 14, 80, 81, 87, 83, 13, 14, 79, 84, 79, 79, 79, 79, 79, 85, 105, 49, 106, 106, 24, 25, 104, |
73 | 52, 104, 104, 104, 104, 104, 56, 49, 106, 106, 24, 25, 104, 52, 104, 104, 104, 104, 104, 56, |
74 | 107, 104, 104, 104, 108, 109, 104, 25, 104, 52, 104, 104, 104, 104, 107, 48, 49, 110, 111, 24, |
75 | 25, 104, 52, 104, 104, 26, 104, 104, 56, 107, 104, 104, 104, 112, 109, 104, 25, 104, 52, 104, |
76 | 104, 104, 104, 107, 52, 104, 104, 113, 104, 52, 52, 52, 104, 104, 104, 104, 52, 107, 104, 114, |
77 | 104, 112, 112, 104, 25, 104, 52, 104, 104, 104, 104, 107, 107, 104, 104, 104, 112, 112, 104, |
78 | 25, 104, 52, 104, 104, 104, 104, 107, 115, 30, 116, 117, 24, 25, 104, 52, 30, 116, 117, 24, 25, |
79 | 104, 52, 116, 116, 24, 25, 104, 52, 48, 49, 106, 106, 24, 25, 104, 52, 104, 104, 104, 104, 104, |
80 | 56, 118, 119, 119, 24, 25, 104, 52, 108, 120, 104, 25, 104, 52, 112, 112, 104, 25, 104, 52, |
81 | 108, 104, 112, 112, 104, 25, 104, 52, 112, 120, 104, 25, 104, 52, 48, 49, 110, 106, 24, 25, |
82 | 104, 52, 104, 104, 26, 104, 104, 56, 22, 23, 23, 24, 25, 121, 121, 121, 121, 26, 22, 23, 23, |
83 | 24, 25, 123, 124, 125, 126, 35, 36, 122, 127, 122, 122, 37, 122, 122, 128, 129, 124, 126, 126, |
84 | 35, 36, 122, 127, 122, 122, 122, 122, 122, 128, 124, 126, 126, 35, 36, 122, 127, 122, 122, 122, |
85 | 122, 122, 128, 130, 122, 122, 122, 131, 132, 122, 36, 122, 127, 122, 122, 122, 122, 130, 123, |
86 | 124, 125, 53, 35, 36, 122, 127, 122, 122, 37, 122, 122, 128, 130, 122, 122, 122, 133, 132, 122, |
87 | 36, 122, 127, 122, 122, 122, 122, 130, 127, 122, 122, 134, 122, 127, 127, 127, 122, 122, 122, |
88 | 122, 127, 130, 122, 135, 122, 133, 133, 122, 36, 122, 127, 122, 122, 122, 122, 130, 130, 122, |
89 | 122, 122, 133, 133, 122, 36, 122, 127, 122, 122, 122, 122, 130, 136, 40, 137, 138, 35, 36, 122, |
90 | 127, 40, 137, 138, 35, 36, 122, 127, 137, 137, 35, 36, 122, 127, 123, 124, 126, 126, 35, 36, |
91 | 122, 127, 122, 122, 122, 122, 122, 128, 139, 140, 140, 35, 36, 122, 127, 131, 141, 122, 36, |
92 | 122, 127, 133, 133, 122, 36, 122, 127, 131, 122, 133, 133, 122, 36, 122, 127, 133, 141, 122, |
93 | 36, 122, 127, 46, 47, 48, 49, 110, 106, 24, 25, 104, 52, 53, 53, 26, 104, 46, 56, 60, 142, 62, |
94 | 63, 4, 1, 59, 64, 59, 59, 9, 59, 59, 65, 46, 47, 48, 49, 143, 144, 24, 145, 59, 146, 59, 53, |
95 | 26, 59, 46, 56, 22, 147, 147, 24, 145, 59, 64, 59, 59, 26, 146, 59, 59, 148, 59, 146, 146, 146, |
96 | 59, 59, 59, 59, 146, 46, 59, 72, 22, 147, 147, 24, 145, 59, 64, 59, 59, 59, 59, 46, 150, 149, |
97 | 151, 151, 149, 43, 149, 152, 151, 151, 149, 43, 149, 152, 152, 149, 149, 153, 149, 152, 152, |
98 | 152, 149, 149, 149, 149, 152, 46, 121, 121, 121, 121, 121, 121, 121, 121, 121, 53, 121, 121, |
99 | 121, 46, 0, 0, |
100 | ]; |
101 | static _indic_syllable_machine_index_defaults: [i16; 143] = [ |
102 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 21, 21, 27, 21, 21, 21, 21, |
103 | 21, 21, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 42, 45, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, |
104 | 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, |
105 | 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, |
106 | 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 121, 121, 122, 122, 122, 122, 122, 122, 122, |
107 | 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 104, 59, 59, 59, 59, 59, 59, |
108 | 59, 149, 149, 149, 149, 149, 121, 0, 0, |
109 | ]; |
110 | static _indic_syllable_machine_cond_targs: [i16; 156] = [ |
111 | 39, 45, 50, 2, 51, 5, 6, 53, 57, 58, 39, 67, 11, 73, 68, 14, 15, 75, 80, 81, 84, 39, 89, 21, |
112 | 95, 90, 98, 39, 24, 25, 97, 103, 39, 112, 30, 118, 113, 121, 33, 34, 120, 126, 39, 137, 39, 39, |
113 | 40, 60, 85, 87, 105, 106, 91, 107, 127, 128, 99, 135, 140, 39, 41, 43, 8, 59, 46, 54, 42, 1, |
114 | 44, 48, 0, 47, 49, 52, 3, 4, 55, 7, 56, 39, 61, 63, 18, 83, 69, 76, 62, 9, 64, 78, 71, 65, 17, |
115 | 82, 66, 10, 70, 72, 74, 12, 13, 77, 16, 79, 39, 86, 26, 88, 101, 93, 19, 104, 20, 92, 94, 96, |
116 | 22, 23, 100, 27, 102, 39, 39, 108, 110, 28, 35, 114, 122, 109, 111, 124, 116, 29, 115, 117, |
117 | 119, 31, 32, 123, 36, 125, 129, 130, 134, 131, 132, 37, 133, 39, 136, 38, 138, 139, 0, 0, |
118 | ]; |
119 | static _indic_syllable_machine_cond_actions: [i8; 156] = [ |
120 | 1, 0, 2, 0, 2, 0, 0, 2, 2, 2, 3, 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 4, 2, 0, 5, 0, 5, 6, 0, 0, 5, 2, |
121 | 7, 2, 0, 2, 0, 2, 0, 0, 2, 2, 8, 0, 0, 11, 2, 2, 5, 0, 12, 12, 0, 2, 5, 2, 5, 2, 0, 13, 2, 0, |
122 | 0, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 14, 2, 0, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, |
123 | 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 15, 5, 0, 5, 2, 2, 0, 5, 0, 0, 2, 5, 0, 0, 0, 0, 2, 16, 17, 2, |
124 | 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 18, 18, 0, 0, 0, 0, 19, 2, 0, 0, 0, 0, |
125 | 0, |
126 | ]; |
127 | static _indic_syllable_machine_to_state_actions: [i8; 143] = [ |
128 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
129 | 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
130 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
131 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
132 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
133 | ]; |
134 | static _indic_syllable_machine_from_state_actions: [i8; 143] = [ |
135 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
136 | 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
137 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
138 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
139 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
140 | ]; |
141 | static _indic_syllable_machine_eof_trans: [i16; 143] = [ |
142 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 28, 22, 22, 22, 22, |
143 | 22, 22, 33, 33, 33, 33, 33, 33, 33, 33, 33, 1, 43, 45, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, |
144 | 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, |
145 | 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, |
146 | 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 122, 122, 123, 123, 123, 123, 123, 123, 123, |
147 | 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 105, 60, 60, 60, 60, 60, 60, |
148 | 60, 150, 150, 150, 150, 150, 122, 0, 0, |
149 | ]; |
150 | static indic_syllable_machine_start: i32 = 39; |
151 | static indic_syllable_machine_first_final: i32 = 39; |
152 | static indic_syllable_machine_error: i32 = -1; |
153 | static indic_syllable_machine_en_main: i32 = 39; |
154 | #[derive (Clone, Copy)] |
155 | pub enum SyllableType { |
156 | ConsonantSyllable = 0, |
157 | VowelSyllable, |
158 | StandaloneCluster, |
159 | SymbolCluster, |
160 | BrokenCluster, |
161 | NonIndicCluster, |
162 | } |
163 | |
164 | pub fn find_syllables_indic(buffer: &mut Buffer) { |
165 | let mut cs = 0; |
166 | let mut ts = 0; |
167 | let mut te = 0; |
168 | let mut act = 0; |
169 | let mut p = 0; |
170 | let pe = buffer.len; |
171 | let eof = buffer.len; |
172 | let mut syllable_serial = 1u8; |
173 | |
174 | macro_rules! found_syllable { |
175 | ($kind:expr) => {{ |
176 | found_syllable(ts, te, &mut syllable_serial, $kind, buffer) |
177 | }}; |
178 | } |
179 | |
180 | { |
181 | cs = (indic_syllable_machine_start) as i32; |
182 | ts = 0; |
183 | te = 0; |
184 | act = 0; |
185 | } |
186 | |
187 | { |
188 | let mut _trans = 0; |
189 | let mut _keys: i32 = 0; |
190 | let mut _inds: i32 = 0; |
191 | let mut _ic = 0; |
192 | '_resume: while (p != pe || p == eof) { |
193 | '_again: while (true) { |
194 | match (_indic_syllable_machine_from_state_actions[(cs) as usize]) { |
195 | 10 => { |
196 | ts = p; |
197 | } |
198 | |
199 | _ => {} |
200 | } |
201 | if (p == eof) { |
202 | { |
203 | if (_indic_syllable_machine_eof_trans[(cs) as usize] > 0) { |
204 | { |
205 | _trans = |
206 | (_indic_syllable_machine_eof_trans[(cs) as usize]) as u32 - 1; |
207 | } |
208 | } |
209 | } |
210 | } else { |
211 | { |
212 | _keys = (cs << 1) as i32; |
213 | _inds = (_indic_syllable_machine_index_offsets[(cs) as usize]) as i32; |
214 | if ((buffer.info[p].indic_category() as u8) <= 19 |
215 | && (buffer.info[p].indic_category() as u8) >= 1) |
216 | { |
217 | { |
218 | _ic = (_indic_syllable_machine_char_class |
219 | [((buffer.info[p].indic_category() as u8) as i32 - 1) as usize]) |
220 | as i32; |
221 | if (_ic |
222 | <= (_indic_syllable_machine_trans_keys[(_keys + 1) as usize]) |
223 | as i32 |
224 | && _ic |
225 | >= (_indic_syllable_machine_trans_keys[(_keys) as usize]) |
226 | as i32) |
227 | { |
228 | _trans = (_indic_syllable_machine_indices[(_inds |
229 | + (_ic |
230 | - (_indic_syllable_machine_trans_keys[(_keys) as usize]) |
231 | as i32) |
232 | as i32) |
233 | as usize]) |
234 | as u32; |
235 | } else { |
236 | _trans = (_indic_syllable_machine_index_defaults[(cs) as usize]) |
237 | as u32; |
238 | } |
239 | } |
240 | } else { |
241 | { |
242 | _trans = |
243 | (_indic_syllable_machine_index_defaults[(cs) as usize]) as u32; |
244 | } |
245 | } |
246 | } |
247 | } |
248 | cs = (_indic_syllable_machine_cond_targs[(_trans) as usize]) as i32; |
249 | if (_indic_syllable_machine_cond_actions[(_trans) as usize] != 0) { |
250 | { |
251 | match (_indic_syllable_machine_cond_actions[(_trans) as usize]) { |
252 | 2 => { |
253 | te = p + 1; |
254 | } |
255 | 11 => { |
256 | te = p + 1; |
257 | { |
258 | found_syllable!(SyllableType::NonIndicCluster); |
259 | } |
260 | } |
261 | 13 => { |
262 | te = p; |
263 | p = p - 1; |
264 | { |
265 | found_syllable!(SyllableType::ConsonantSyllable); |
266 | } |
267 | } |
268 | 14 => { |
269 | te = p; |
270 | p = p - 1; |
271 | { |
272 | found_syllable!(SyllableType::VowelSyllable); |
273 | } |
274 | } |
275 | 17 => { |
276 | te = p; |
277 | p = p - 1; |
278 | { |
279 | found_syllable!(SyllableType::StandaloneCluster); |
280 | } |
281 | } |
282 | 19 => { |
283 | te = p; |
284 | p = p - 1; |
285 | { |
286 | found_syllable!(SyllableType::SymbolCluster); |
287 | } |
288 | } |
289 | 15 => { |
290 | { |
291 | { |
292 | te = p; |
293 | p = p - 1; |
294 | { |
295 | found_syllable!(SyllableType::BrokenCluster); |
296 | /*buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE;*/ |
297 | } |
298 | } |
299 | } |
300 | } |
301 | 16 => { |
302 | te = p; |
303 | p = p - 1; |
304 | { |
305 | found_syllable!(SyllableType::NonIndicCluster); |
306 | } |
307 | } |
308 | 1 => { |
309 | p = (te) - 1; |
310 | { |
311 | found_syllable!(SyllableType::ConsonantSyllable); |
312 | } |
313 | } |
314 | 3 => { |
315 | p = (te) - 1; |
316 | { |
317 | found_syllable!(SyllableType::VowelSyllable); |
318 | } |
319 | } |
320 | 7 => { |
321 | p = (te) - 1; |
322 | { |
323 | found_syllable!(SyllableType::StandaloneCluster); |
324 | } |
325 | } |
326 | 8 => { |
327 | p = (te) - 1; |
328 | { |
329 | found_syllable!(SyllableType::SymbolCluster); |
330 | } |
331 | } |
332 | 4 => { |
333 | { |
334 | { |
335 | p = (te) - 1; |
336 | { |
337 | found_syllable!(SyllableType::BrokenCluster); |
338 | /*buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE;*/ |
339 | } |
340 | } |
341 | } |
342 | } |
343 | 6 => { |
344 | { |
345 | { |
346 | match (act) { |
347 | 1 => { |
348 | p = (te) - 1; |
349 | { |
350 | found_syllable!( |
351 | SyllableType::ConsonantSyllable |
352 | ); |
353 | } |
354 | } |
355 | 5 => { |
356 | p = (te) - 1; |
357 | { |
358 | found_syllable!(SyllableType::BrokenCluster); |
359 | /*buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE;*/ |
360 | } |
361 | } |
362 | 6 => { |
363 | p = (te) - 1; |
364 | { |
365 | found_syllable!(SyllableType::NonIndicCluster); |
366 | } |
367 | } |
368 | |
369 | _ => {} |
370 | } |
371 | } |
372 | } |
373 | } |
374 | 18 => { |
375 | { |
376 | { |
377 | te = p + 1; |
378 | } |
379 | } |
380 | { |
381 | { |
382 | act = 1; |
383 | } |
384 | } |
385 | } |
386 | 5 => { |
387 | { |
388 | { |
389 | te = p + 1; |
390 | } |
391 | } |
392 | { |
393 | { |
394 | act = 5; |
395 | } |
396 | } |
397 | } |
398 | 12 => { |
399 | { |
400 | { |
401 | te = p + 1; |
402 | } |
403 | } |
404 | { |
405 | { |
406 | act = 6; |
407 | } |
408 | } |
409 | } |
410 | |
411 | _ => {} |
412 | } |
413 | } |
414 | } |
415 | break '_again; |
416 | } |
417 | if (p == eof) { |
418 | { |
419 | if (cs >= 39) { |
420 | break '_resume; |
421 | } |
422 | } |
423 | } else { |
424 | { |
425 | match (_indic_syllable_machine_to_state_actions[(cs) as usize]) { |
426 | 9 => { |
427 | ts = 0; |
428 | } |
429 | |
430 | _ => {} |
431 | } |
432 | p += 1; |
433 | continue '_resume; |
434 | } |
435 | } |
436 | break '_resume; |
437 | } |
438 | } |
439 | } |
440 | |
441 | #[inline ] |
442 | fn found_syllable( |
443 | start: usize, |
444 | end: usize, |
445 | syllable_serial: &mut u8, |
446 | kind: SyllableType, |
447 | buffer: &mut Buffer, |
448 | ) { |
449 | for i: usize in start..end { |
450 | buffer.info[i].set_syllable((*syllable_serial << 4) | kind as u8); |
451 | } |
452 | |
453 | *syllable_serial += 1; |
454 | |
455 | if *syllable_serial == 16 { |
456 | *syllable_serial = 1; |
457 | } |
458 | } |
459 | |