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::collapsible_if,
13 clippy::comparison_chain,
14 clippy::double_parens,
15 clippy::unnecessary_cast,
16 clippy::single_match,
17 clippy::never_loop
18)]
19
20use crate::buffer::Buffer;
21use crate::complex::machine_cursor::MachineCursor;
22use crate::complex::universal::category;
23use crate::GlyphInfo;
24use core::cell::Cell;
25
26static _use_syllable_machine_trans_keys: [u8; 226] = [
27 0, 36, 5, 33, 5, 33, 1, 33, 10, 33, 11, 32, 12, 32, 13, 32, 30, 31, 31, 31, 11, 33, 11, 33, 11,
28 33, 1, 1, 11, 33, 9, 33, 10, 33, 10, 33, 10, 33, 6, 33, 6, 33, 6, 33, 6, 33, 5, 33, 1, 1, 5,
29 33, 26, 27, 27, 27, 5, 33, 5, 33, 1, 33, 10, 33, 11, 32, 12, 32, 13, 32, 30, 31, 31, 31, 11,
30 33, 11, 33, 11, 33, 1, 1, 11, 33, 9, 33, 10, 33, 10, 33, 10, 33, 6, 33, 6, 33, 6, 33, 6, 33, 5,
31 33, 1, 1, 7, 7, 3, 3, 5, 33, 5, 33, 1, 33, 10, 33, 11, 32, 12, 32, 13, 32, 30, 31, 31, 31, 11,
32 33, 11, 33, 11, 33, 1, 1, 11, 33, 9, 33, 10, 33, 10, 33, 10, 33, 6, 33, 6, 33, 6, 33, 6, 33, 5,
33 33, 1, 1, 5, 33, 5, 33, 1, 33, 10, 33, 11, 32, 12, 32, 13, 32, 30, 31, 31, 31, 11, 33, 11, 33,
34 11, 33, 1, 1, 11, 33, 9, 33, 10, 33, 10, 33, 10, 33, 6, 33, 6, 33, 6, 33, 6, 33, 5, 33, 1, 1,
35 3, 3, 7, 7, 1, 33, 5, 33, 26, 27, 27, 27, 1, 4, 35, 37, 34, 37, 34, 36, 0, 0,
36];
37static _use_syllable_machine_char_class: [i8; 55] = [
38 0, 1, 2, 2, 3, 4, 2, 2, 2, 2, 2, 5, 6, 7, 2, 2, 2, 2, 8, 2, 2, 2, 9, 10, 11, 12, 13, 14, 15,
39 16, 17, 18, 19, 20, 21, 22, 2, 23, 24, 25, 2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
40 0, 0,
41];
42static _use_syllable_machine_index_offsets: [i16; 114] = [
43 0, 37, 66, 95, 128, 152, 174, 195, 215, 217, 218, 241, 264, 287, 288, 311, 336, 360, 384, 408,
44 436, 464, 492, 520, 549, 550, 579, 581, 582, 611, 640, 673, 697, 719, 740, 760, 762, 763, 786,
45 809, 832, 833, 856, 881, 905, 929, 953, 981, 1009, 1037, 1065, 1094, 1095, 1096, 1097, 1126,
46 1155, 1188, 1212, 1234, 1255, 1275, 1277, 1278, 1301, 1324, 1347, 1348, 1371, 1396, 1420, 1444,
47 1468, 1496, 1524, 1552, 1580, 1609, 1610, 1639, 1668, 1701, 1725, 1747, 1768, 1788, 1790, 1791,
48 1814, 1837, 1860, 1861, 1884, 1909, 1933, 1957, 1981, 2009, 2037, 2065, 2093, 2122, 2123, 2124,
49 2125, 2158, 2187, 2189, 2190, 2194, 2197, 2201, 0, 0,
50];
51static _use_syllable_machine_indices: [i8; 2206] = [
52 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
53 27, 28, 29, 30, 31, 32, 33, 30, 34, 3, 35, 37, 38, 36, 36, 39, 40, 41, 42, 43, 44, 45, 46, 47,
54 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 36, 58, 59, 60, 61, 58, 37, 38, 36, 36, 39, 40, 41, 42,
55 43, 44, 45, 46, 47, 49, 49, 50, 51, 52, 53, 54, 55, 36, 36, 36, 58, 59, 60, 61, 58, 37, 36, 36,
56 36, 36, 36, 36, 36, 36, 40, 41, 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 53, 54, 55, 36, 36,
57 36, 36, 59, 60, 61, 62, 40, 41, 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 53, 54, 55, 36, 36,
58 36, 36, 59, 60, 61, 62, 41, 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
59 36, 59, 60, 61, 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 59, 60,
60 61, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 59, 60, 61, 59, 60, 60,
61 41, 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 41,
62 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 41, 42,
63 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 55, 36, 36, 36, 36, 59, 60, 61, 62, 63, 41, 42,
64 43, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 59, 60, 61, 62, 39, 40, 41,
65 42, 43, 36, 36, 36, 36, 36, 36, 50, 51, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 40, 41,
66 42, 43, 36, 36, 36, 36, 36, 36, 50, 51, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 40, 41,
67 42, 43, 36, 36, 36, 36, 36, 36, 36, 51, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 40, 41,
68 42, 43, 36, 36, 36, 36, 36, 36, 36, 36, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 40, 36,
69 36, 39, 40, 41, 42, 43, 36, 45, 46, 36, 36, 36, 50, 51, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60,
70 61, 62, 40, 36, 36, 39, 40, 41, 42, 43, 36, 36, 46, 36, 36, 36, 50, 51, 52, 53, 54, 55, 36, 36,
71 36, 36, 59, 60, 61, 62, 40, 36, 36, 39, 40, 41, 42, 43, 36, 36, 36, 36, 36, 36, 50, 51, 52, 53,
72 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 40, 36, 36, 39, 40, 41, 42, 43, 44, 45, 46, 36, 36, 36,
73 50, 51, 52, 53, 54, 55, 36, 36, 36, 36, 59, 60, 61, 62, 37, 38, 36, 36, 39, 40, 41, 42, 43, 44,
74 45, 46, 47, 36, 49, 50, 51, 52, 53, 54, 55, 36, 36, 36, 58, 59, 60, 61, 58, 37, 37, 38, 36, 36,
75 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 36, 36, 36, 58, 59, 60, 61,
76 58, 56, 57, 57, 65, 66, 64, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 2, 76, 77, 78, 79, 80, 81,
77 82, 64, 64, 64, 83, 84, 85, 86, 87, 65, 66, 64, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76,
78 77, 78, 79, 80, 81, 82, 64, 64, 64, 83, 84, 85, 86, 87, 65, 64, 64, 64, 64, 64, 64, 64, 64, 68,
79 69, 70, 71, 64, 64, 64, 64, 64, 64, 64, 64, 64, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68,
80 69, 70, 71, 64, 64, 64, 64, 64, 64, 64, 64, 64, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 69,
81 70, 71, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 84, 85, 86, 70, 71, 64,
82 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 84, 85, 86, 71, 64, 64, 64, 64, 64,
83 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 84, 85, 86, 84, 85, 85, 69, 70, 71, 64, 64, 64, 64,
84 64, 64, 64, 64, 64, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 69, 70, 71, 64, 64, 64, 64, 64,
85 64, 64, 64, 64, 64, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 69, 70, 71, 64, 64, 64, 64, 64, 64,
86 64, 64, 64, 64, 64, 82, 64, 64, 64, 64, 84, 85, 86, 88, 90, 69, 70, 71, 64, 64, 64, 64, 64, 64,
87 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 84, 85, 86, 88, 67, 68, 69, 70, 71, 64, 64, 64, 64, 64,
88 64, 77, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68, 69, 70, 71, 64, 64, 64, 64, 64,
89 64, 77, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68, 69, 70, 71, 64, 64, 64, 64, 64,
90 64, 64, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68, 69, 70, 71, 64, 64, 64, 64, 64,
91 64, 64, 64, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68, 64, 64, 67, 68, 69, 70, 71, 64,
92 73, 74, 64, 64, 64, 77, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68, 64, 64, 67, 68,
93 69, 70, 71, 64, 64, 74, 64, 64, 64, 77, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84, 85, 86, 88, 68,
94 64, 64, 67, 68, 69, 70, 71, 64, 64, 64, 64, 64, 64, 77, 78, 79, 80, 81, 82, 64, 64, 64, 64, 84,
95 85, 86, 88, 68, 64, 64, 67, 68, 69, 70, 71, 72, 73, 74, 64, 64, 64, 77, 78, 79, 80, 81, 82, 64,
96 64, 64, 64, 84, 85, 86, 88, 65, 66, 64, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 64, 76, 77, 78,
97 79, 80, 81, 82, 64, 64, 64, 83, 84, 85, 86, 87, 65, 93, 4, 95, 96, 64, 64, 97, 98, 99, 100,
98 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 56, 57, 64, 114, 115, 116, 86,
99 117, 95, 96, 64, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 107, 107, 108, 109, 110, 111,
100 112, 113, 64, 64, 64, 114, 115, 116, 86, 117, 95, 64, 64, 64, 64, 64, 64, 64, 64, 98, 99, 100,
101 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98,
102 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86,
103 118, 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 115, 116,
104 86, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 115, 116, 86,
105 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 115, 116, 86, 115, 116,
106 116, 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 111, 112, 113, 64, 64, 64, 64, 115, 116,
107 86, 118, 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 112, 113, 64, 64, 64, 64, 115,
108 116, 86, 118, 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 113, 64, 64, 64, 64,
109 115, 116, 86, 118, 119, 99, 100, 101, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
110 64, 64, 115, 116, 86, 118, 97, 98, 99, 100, 101, 64, 64, 64, 64, 64, 64, 108, 109, 110, 111,
111 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 99, 100, 101, 64, 64, 64, 64, 64, 64, 108,
112 109, 110, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 99, 100, 101, 64, 64, 64, 64,
113 64, 64, 64, 109, 110, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 99, 100, 101, 64,
114 64, 64, 64, 64, 64, 64, 64, 110, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 64, 64,
115 97, 98, 99, 100, 101, 64, 103, 104, 64, 64, 64, 108, 109, 110, 111, 112, 113, 64, 64, 64, 64,
116 115, 116, 86, 118, 98, 64, 64, 97, 98, 99, 100, 101, 64, 64, 104, 64, 64, 64, 108, 109, 110,
117 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 64, 64, 97, 98, 99, 100, 101, 64, 64, 64,
118 64, 64, 64, 108, 109, 110, 111, 112, 113, 64, 64, 64, 64, 115, 116, 86, 118, 98, 64, 64, 97,
119 98, 99, 100, 101, 102, 103, 104, 64, 64, 64, 108, 109, 110, 111, 112, 113, 64, 64, 64, 64, 115,
120 116, 86, 118, 95, 96, 64, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 64, 107, 108, 109, 110,
121 111, 112, 113, 64, 64, 64, 114, 115, 116, 86, 117, 95, 95, 96, 64, 64, 97, 98, 99, 100, 101,
122 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 64, 64, 64, 114, 115, 116, 86, 117,
123 6, 7, 120, 120, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 20, 21, 22, 23, 24, 25, 26, 120, 120,
124 120, 30, 31, 32, 33, 30, 6, 120, 120, 120, 120, 120, 120, 120, 120, 11, 12, 13, 14, 120, 120,
125 120, 120, 120, 120, 120, 120, 120, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 11, 12, 13,
126 14, 120, 120, 120, 120, 120, 120, 120, 120, 120, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33,
127 121, 12, 13, 14, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
128 120, 31, 32, 33, 13, 14, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
129 120, 120, 31, 32, 33, 14, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
130 120, 120, 31, 32, 33, 31, 32, 32, 12, 13, 14, 120, 120, 120, 120, 120, 120, 120, 120, 120, 24,
131 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 12, 13, 14, 120, 120, 120, 120, 120, 120, 120,
132 120, 120, 120, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 12, 13, 14, 120, 120, 120, 120,
133 120, 120, 120, 120, 120, 120, 120, 26, 120, 120, 120, 120, 31, 32, 33, 121, 122, 12, 13, 14,
134 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 31, 32, 33,
135 121, 10, 11, 12, 13, 14, 120, 120, 120, 120, 120, 120, 21, 22, 23, 24, 25, 26, 120, 120, 120,
136 120, 31, 32, 33, 121, 11, 12, 13, 14, 120, 120, 120, 120, 120, 120, 21, 22, 23, 24, 25, 26,
137 120, 120, 120, 120, 31, 32, 33, 121, 11, 12, 13, 14, 120, 120, 120, 120, 120, 120, 120, 22, 23,
138 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 11, 12, 13, 14, 120, 120, 120, 120, 120, 120,
139 120, 120, 23, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 11, 120, 120, 10, 11, 12, 13,
140 14, 120, 16, 17, 120, 120, 120, 21, 22, 23, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121,
141 11, 120, 120, 10, 11, 12, 13, 14, 120, 120, 17, 120, 120, 120, 21, 22, 23, 24, 25, 26, 120,
142 120, 120, 120, 31, 32, 33, 121, 11, 120, 120, 10, 11, 12, 13, 14, 120, 120, 120, 120, 120, 120,
143 21, 22, 23, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 11, 120, 120, 10, 11, 12, 13, 14,
144 15, 16, 17, 120, 120, 120, 21, 22, 23, 24, 25, 26, 120, 120, 120, 120, 31, 32, 33, 121, 6, 7,
145 120, 120, 10, 11, 12, 13, 14, 15, 16, 17, 18, 120, 20, 21, 22, 23, 24, 25, 26, 120, 120, 120,
146 30, 31, 32, 33, 30, 6, 123, 8, 2, 120, 120, 2, 6, 7, 8, 120, 10, 11, 12, 13, 14, 15, 16, 17,
147 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 120, 30, 31, 32, 33, 30, 6, 7, 120, 120, 10, 11,
148 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 120, 120, 120, 30, 31, 32, 33, 30,
149 27, 28, 28, 2, 124, 124, 2, 126, 125, 34, 34, 126, 125, 126, 34, 125, 35, 0, 0,
150];
151static _use_syllable_machine_index_defaults: [i8; 114] = [
152 3, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
153 36, 36, 36, 36, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 89, 64, 64, 64, 64, 64, 64, 64,
154 64, 64, 64, 91, 92, 94, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 89, 64, 64, 64, 64, 64,
155 64, 64, 64, 64, 64, 91, 64, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
156 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 124, 125, 125,
157 125, 0, 0,
158];
159static _use_syllable_machine_cond_targs: [i8; 129] = [
160 0, 1, 28, 0, 52, 54, 79, 80, 102, 104, 92, 81, 82, 83, 84, 96, 97, 98, 99, 105, 100, 93, 94,
161 95, 87, 88, 89, 106, 107, 108, 101, 85, 86, 0, 109, 111, 0, 2, 3, 15, 4, 5, 6, 7, 19, 20, 21,
162 22, 25, 23, 16, 17, 18, 10, 11, 12, 26, 27, 24, 8, 9, 0, 13, 14, 0, 29, 30, 42, 31, 32, 33, 34,
163 46, 47, 48, 49, 50, 43, 44, 45, 37, 38, 39, 51, 35, 36, 0, 51, 40, 0, 41, 0, 0, 53, 0, 55, 56,
164 68, 57, 58, 59, 60, 72, 73, 74, 75, 78, 76, 69, 70, 71, 63, 64, 65, 77, 61, 62, 77, 66, 67, 0,
165 90, 91, 103, 0, 0, 110, 0, 0,
166];
167static _use_syllable_machine_cond_actions: [i8; 129] = [
168 0, 0, 0, 3, 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,
169 0, 4, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0,
170 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 9, 10, 0, 11, 0, 12, 13, 0,
171 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 10, 0, 0, 15, 0, 0, 0,
172 16, 17, 0, 0, 0,
173];
174static _use_syllable_machine_to_state_actions: [i8; 114] = [
175 1, 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,
176 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,
177 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,
178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
179];
180static _use_syllable_machine_from_state_actions: [i8; 114] = [
181 2, 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,
182 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,
183 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,
184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
185];
186static _use_syllable_machine_eof_trans: [i8; 114] = [
187 1, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
188 37, 37, 37, 37, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 90, 65, 65, 65, 65, 65, 65, 65,
189 65, 65, 65, 92, 93, 95, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 90, 65, 65, 65, 65, 65,
190 65, 65, 65, 65, 65, 92, 65, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
191 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 125, 126, 126,
192 126, 0, 0,
193];
194static use_syllable_machine_start: i32 = 0;
195static use_syllable_machine_first_final: i32 = 0;
196static use_syllable_machine_error: i32 = -1;
197static use_syllable_machine_en_main: i32 = 0;
198#[derive(Clone, Copy)]
199pub enum SyllableType {
200 IndependentCluster,
201 ViramaTerminatedCluster,
202 SakotTerminatedCluster,
203 StandardCluster,
204 NumberJoinerTerminatedCluster,
205 NumeralCluster,
206 SymbolCluster,
207 HieroglyphCluster,
208 BrokenCluster,
209 NonCluster,
210}
211
212pub fn find_syllables(buffer: &mut Buffer) {
213 let mut cs = 0;
214 let infos = Cell::as_slice_of_cells(Cell::from_mut(&mut buffer.info));
215 let p0 = MachineCursor::new(infos, included);
216 let mut p = p0;
217 let mut ts = p0;
218 let mut te = p0;
219 let mut act = p0;
220 let pe = p.end();
221 let eof = p.end();
222 let mut syllable_serial = 1u8;
223
224 // Please manually replace assignments of 0 to p, ts, and te
225 // to use p0 instead
226
227 macro_rules! found_syllable {
228 ($kind:expr) => {{
229 found_syllable(ts.index(), te.index(), &mut syllable_serial, $kind, infos);
230 }};
231 }
232
233 {
234 cs = (use_syllable_machine_start) as i32;
235 ts = p0;
236 te = p0;
237 act = p0;
238 }
239
240 {
241 let mut _trans = 0;
242 let mut _keys: i32 = 0;
243 let mut _inds: i32 = 0;
244 let mut _ic = 0;
245 '_resume: while (p != pe || p == eof) {
246 '_again: while (true) {
247 match (_use_syllable_machine_from_state_actions[(cs) as usize]) {
248 2 => {
249 ts = p;
250 }
251
252 _ => {}
253 }
254 if (p == eof) {
255 {
256 if (_use_syllable_machine_eof_trans[(cs) as usize] > 0) {
257 {
258 _trans =
259 (_use_syllable_machine_eof_trans[(cs) as usize]) as u32 - 1;
260 }
261 }
262 }
263 } else {
264 {
265 _keys = (cs << 1) as i32;
266 _inds = (_use_syllable_machine_index_offsets[(cs) as usize]) as i32;
267 if ((infos[p.index()].get().use_category() as u8) <= 52) {
268 {
269 _ic = (_use_syllable_machine_char_class[((infos[p.index()]
270 .get()
271 .use_category()
272 as u8)
273 as i32
274 - 0)
275 as usize]) as i32;
276 if (_ic
277 <= (_use_syllable_machine_trans_keys[(_keys + 1) as usize])
278 as i32
279 && _ic
280 >= (_use_syllable_machine_trans_keys[(_keys) as usize])
281 as i32)
282 {
283 _trans = (_use_syllable_machine_indices[(_inds
284 + (_ic
285 - (_use_syllable_machine_trans_keys[(_keys) as usize])
286 as i32)
287 as i32)
288 as usize])
289 as u32;
290 } else {
291 _trans = (_use_syllable_machine_index_defaults[(cs) as usize])
292 as u32;
293 }
294 }
295 } else {
296 {
297 _trans =
298 (_use_syllable_machine_index_defaults[(cs) as usize]) as u32;
299 }
300 }
301 }
302 }
303 cs = (_use_syllable_machine_cond_targs[(_trans) as usize]) as i32;
304 if (_use_syllable_machine_cond_actions[(_trans) as usize] != 0) {
305 {
306 match (_use_syllable_machine_cond_actions[(_trans) as usize]) {
307 9 => {
308 te = p + 1;
309 {
310 found_syllable!(SyllableType::StandardCluster);
311 }
312 }
313 6 => {
314 te = p + 1;
315 {
316 found_syllable!(SyllableType::SymbolCluster);
317 }
318 }
319 4 => {
320 te = p + 1;
321 {
322 found_syllable!(SyllableType::BrokenCluster);
323 }
324 }
325 3 => {
326 te = p + 1;
327 {
328 found_syllable!(SyllableType::NonCluster);
329 }
330 }
331 11 => {
332 te = p;
333 p = p - 1;
334 {
335 found_syllable!(SyllableType::SakotTerminatedCluster);
336 }
337 }
338 7 => {
339 te = p;
340 p = p - 1;
341 {
342 found_syllable!(SyllableType::StandardCluster);
343 }
344 }
345 14 => {
346 te = p;
347 p = p - 1;
348 {
349 found_syllable!(SyllableType::NumberJoinerTerminatedCluster);
350 }
351 }
352 13 => {
353 te = p;
354 p = p - 1;
355 {
356 found_syllable!(SyllableType::NumeralCluster);
357 }
358 }
359 5 => {
360 te = p;
361 p = p - 1;
362 {
363 found_syllable!(SyllableType::SymbolCluster);
364 }
365 }
366 17 => {
367 te = p;
368 p = p - 1;
369 {
370 found_syllable!(SyllableType::HieroglyphCluster);
371 }
372 }
373 15 => {
374 te = p;
375 p = p - 1;
376 {
377 found_syllable!(SyllableType::BrokenCluster);
378 }
379 }
380 16 => {
381 te = p;
382 p = p - 1;
383 {
384 found_syllable!(SyllableType::NonCluster);
385 }
386 }
387 12 => match (act).index() {
388 1 => {
389 p = (te) - 1;
390 {
391 found_syllable!(SyllableType::ViramaTerminatedCluster);
392 }
393 }
394 2 => {
395 p = (te) - 1;
396 {
397 found_syllable!(SyllableType::SakotTerminatedCluster);
398 }
399 }
400
401 _ => {}
402 },
403 8 => {
404 {
405 {
406 te = p + 1;
407 }
408 }
409 {
410 {
411 act = p + 1;
412 }
413 }
414 }
415 10 => {
416 {
417 {
418 te = p + 1;
419 }
420 }
421 {
422 {
423 act = p + 2;
424 }
425 }
426 }
427
428 _ => {}
429 }
430 }
431 }
432 break '_again;
433 }
434 if (p == eof) {
435 {
436 if (cs >= 0) {
437 break '_resume;
438 }
439 }
440 } else {
441 {
442 match (_use_syllable_machine_to_state_actions[(cs) as usize]) {
443 1 => {
444 ts = p0;
445 }
446
447 _ => {}
448 }
449 p += 1;
450 continue '_resume;
451 }
452 }
453 break '_resume;
454 }
455 }
456}
457
458#[inline]
459fn found_syllable(
460 start: usize,
461 end: usize,
462 syllable_serial: &mut u8,
463 kind: SyllableType,
464 buffer: &[Cell<GlyphInfo>],
465) {
466 for i: usize in start..end {
467 let mut glyph: GlyphInfo = buffer[i].get();
468 glyph.set_syllable((*syllable_serial << 4) | kind as u8);
469 buffer[i].set(val:glyph);
470 }
471
472 *syllable_serial += 1;
473
474 if *syllable_serial == 16 {
475 *syllable_serial = 1;
476 }
477}
478
479fn not_ccs_default_ignorable(i: &GlyphInfo) -> bool {
480 i.use_category() != category::CGJ
481}
482
483fn included(infos: &[Cell<GlyphInfo>], i: usize) -> bool {
484 let glyph: GlyphInfo = infos[i].get();
485 if !not_ccs_default_ignorable(&glyph) {
486 return false;
487 }
488 if glyph.use_category() == category::ZWNJ {
489 for glyph2: &Cell in &infos[i + 1..] {
490 if not_ccs_default_ignorable(&glyph2.get()) {
491 return !glyph2.get().is_unicode_mark();
492 }
493 }
494 }
495 true
496}
497