Coverage Report

Created: 2025-11-16 07:45

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/pango/subprojects/harfbuzz/src/hb-ot-shaper-indic-machine.hh
Line
Count
Source
1
2
#line 1 "hb-ot-shaper-indic-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_SHAPER_INDIC_MACHINE_HH
30
#define HB_OT_SHAPER_INDIC_MACHINE_HH
31
32
#include "hb.hh"
33
34
#include "hb-ot-layout.hh"
35
#include "hb-ot-shaper-indic.hh"
36
37
/* buffer var allocations */
38
0
#define indic_category() ot_shaper_var_u8_category() /* indic_category_t */
39
0
#define indic_position() ot_shaper_var_u8_auxiliary() /* indic_position_t */
40
41
using indic_category_t = unsigned;
42
using indic_position_t = ot_position_t;
43
44
0
#define I_Cat(Cat) indic_syllable_machine_ex_##Cat
45
46
enum indic_syllable_type_t {
47
  indic_consonant_syllable,
48
  indic_vowel_syllable,
49
  indic_standalone_cluster,
50
  indic_symbol_cluster,
51
  indic_broken_cluster,
52
  indic_non_indic_cluster,
53
};
54
55
56
#line 57 "hb-ot-shaper-indic-machine.hh"
57
#define indic_syllable_machine_ex_A 9u
58
#define indic_syllable_machine_ex_C 1u
59
#define indic_syllable_machine_ex_CM 16u
60
#define indic_syllable_machine_ex_CS 18u
61
0
#define indic_syllable_machine_ex_DOTTEDCIRCLE 11u
62
0
#define indic_syllable_machine_ex_H 4u
63
#define indic_syllable_machine_ex_M 7u
64
0
#define indic_syllable_machine_ex_MPst 13u
65
#define indic_syllable_machine_ex_N 3u
66
#define indic_syllable_machine_ex_PLACEHOLDER 10u
67
#define indic_syllable_machine_ex_RS 12u
68
0
#define indic_syllable_machine_ex_Ra 15u
69
0
#define indic_syllable_machine_ex_Repha 14u
70
0
#define indic_syllable_machine_ex_SM 8u
71
#define indic_syllable_machine_ex_Symbol 17u
72
#define indic_syllable_machine_ex_V 2u
73
#define indic_syllable_machine_ex_VD 9u
74
#define indic_syllable_machine_ex_X 0u
75
0
#define indic_syllable_machine_ex_ZWJ 6u
76
0
#define indic_syllable_machine_ex_ZWNJ 5u
77
78
79
#line 80 "hb-ot-shaper-indic-machine.hh"
80
static const unsigned char _indic_syllable_machine_trans_keys[] = {
81
  8u, 8u, 4u, 13u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 
82
  8u, 8u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 
83
  8u, 8u, 5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 4u, 13u, 8u, 8u, 
84
  5u, 13u, 5u, 13u, 13u, 13u, 4u, 13u, 4u, 13u, 5u, 13u, 8u, 8u, 1u, 18u, 
85
  3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 9u, 5u, 9u, 9u, 9u, 5u, 9u, 
86
  1u, 15u, 1u, 15u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 4u, 13u, 
87
  5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 3u, 16u, 3u, 16u, 4u, 16u, 
88
  1u, 15u, 3u, 16u, 3u, 16u, 4u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 
89
  1u, 15u, 1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 4u, 13u, 5u, 9u, 
90
  5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 3u, 16u, 4u, 13u, 3u, 16u, 3u, 16u, 
91
  4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u, 
92
  1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 3u, 16u, 4u, 13u, 5u, 9u, 
93
  5u, 9u, 3u, 9u, 5u, 9u, 3u, 16u, 4u, 13u, 4u, 13u, 3u, 16u, 3u, 16u, 
94
  4u, 16u, 1u, 15u, 3u, 16u, 1u, 15u, 5u, 9u, 9u, 9u, 5u, 9u, 1u, 15u, 
95
  1u, 15u, 3u, 13u, 4u, 13u, 5u, 13u, 5u, 13u, 3u, 16u, 4u, 13u, 5u, 9u, 
96
  5u, 9u, 3u, 9u, 5u, 9u, 1u, 16u, 3u, 16u, 1u, 16u, 4u, 13u, 5u, 13u, 
97
  5u, 13u, 9u, 9u, 5u, 9u, 1u, 15u, 3u, 9u, 5u, 9u, 5u, 9u, 9u, 9u, 
98
  5u, 9u, 1u, 15u, 0
99
};
100
101
static const char _indic_syllable_machine_key_spans[] = {
102
  1, 10, 9, 9, 1, 10, 10, 10, 
103
  1, 9, 9, 1, 10, 10, 10, 10, 
104
  1, 9, 9, 1, 10, 10, 10, 1, 
105
  9, 9, 1, 10, 10, 9, 1, 18, 
106
  14, 14, 13, 15, 5, 5, 1, 5, 
107
  15, 15, 15, 11, 10, 9, 9, 10, 
108
  5, 7, 5, 14, 14, 14, 14, 13, 
109
  15, 14, 14, 13, 15, 5, 1, 5, 
110
  15, 15, 11, 10, 9, 9, 10, 5, 
111
  5, 7, 5, 14, 14, 10, 14, 14, 
112
  13, 15, 14, 15, 5, 1, 5, 15, 
113
  15, 11, 10, 9, 9, 14, 10, 5, 
114
  5, 7, 5, 14, 10, 10, 14, 14, 
115
  13, 15, 14, 15, 5, 1, 5, 15, 
116
  15, 11, 10, 9, 9, 14, 10, 5, 
117
  5, 7, 5, 16, 14, 16, 10, 9, 
118
  9, 1, 5, 15, 7, 5, 5, 1, 
119
  5, 15
120
};
121
122
static const short _indic_syllable_machine_index_offsets[] = {
123
  0, 2, 13, 23, 33, 35, 46, 57, 
124
  68, 70, 80, 90, 92, 103, 114, 125, 
125
  136, 138, 148, 158, 160, 171, 182, 193, 
126
  195, 205, 215, 217, 228, 239, 249, 251, 
127
  270, 285, 300, 314, 330, 336, 342, 344, 
128
  350, 366, 382, 398, 410, 421, 431, 441, 
129
  452, 458, 466, 472, 487, 502, 517, 532, 
130
  546, 562, 577, 592, 606, 622, 628, 630, 
131
  636, 652, 668, 680, 691, 701, 711, 722, 
132
  728, 734, 742, 748, 763, 778, 789, 804, 
133
  819, 833, 849, 864, 880, 886, 888, 894, 
134
  910, 926, 938, 949, 959, 969, 984, 995, 
135
  1001, 1007, 1015, 1021, 1036, 1047, 1058, 1073, 
136
  1088, 1102, 1118, 1133, 1149, 1155, 1157, 1163, 
137
  1179, 1195, 1207, 1218, 1228, 1238, 1253, 1264, 
138
  1270, 1276, 1284, 1290, 1307, 1322, 1339, 1350, 
139
  1360, 1370, 1372, 1378, 1394, 1402, 1408, 1414, 
140
  1416, 1422
141
};
142
143
static const unsigned char _indic_syllable_machine_indicies[] = {
144
  1, 0, 2, 3, 3, 4, 5, 0, 
145
  0, 0, 0, 4, 0, 3, 3, 4, 
146
  6, 0, 0, 0, 0, 4, 0, 3, 
147
  3, 4, 5, 0, 0, 0, 0, 4, 
148
  0, 4, 0, 7, 3, 3, 4, 5, 
149
  0, 0, 0, 0, 4, 0, 2, 3, 
150
  3, 4, 5, 0, 0, 0, 8, 4, 
151
  0, 10, 11, 11, 12, 13, 9, 9, 
152
  9, 9, 12, 9, 14, 9, 11, 11, 
153
  12, 15, 9, 9, 9, 9, 12, 9, 
154
  11, 11, 12, 13, 9, 9, 9, 9, 
155
  12, 9, 12, 9, 16, 11, 11, 12, 
156
  13, 9, 9, 9, 9, 12, 9, 10, 
157
  11, 11, 12, 13, 9, 9, 9, 17, 
158
  12, 9, 10, 11, 11, 12, 13, 9, 
159
  9, 9, 18, 12, 9, 20, 21, 21, 
160
  22, 23, 19, 19, 19, 24, 22, 19, 
161
  25, 19, 21, 21, 22, 27, 26, 26, 
162
  26, 26, 22, 26, 21, 21, 22, 23, 
163
  19, 19, 19, 19, 22, 19, 22, 26, 
164
  20, 21, 21, 22, 23, 19, 19, 19, 
165
  19, 22, 19, 28, 21, 21, 22, 23, 
166
  19, 19, 19, 19, 22, 19, 30, 31, 
167
  31, 32, 33, 29, 29, 29, 34, 32, 
168
  29, 35, 29, 31, 31, 32, 36, 29, 
169
  29, 29, 29, 32, 29, 31, 31, 32, 
170
  33, 29, 29, 29, 29, 32, 29, 32, 
171
  29, 30, 31, 31, 32, 33, 29, 29, 
172
  29, 29, 32, 29, 37, 31, 31, 32, 
173
  33, 29, 29, 29, 29, 32, 29, 21, 
174
  21, 22, 38, 0, 0, 0, 0, 22, 
175
  0, 40, 39, 42, 43, 44, 45, 46, 
176
  47, 22, 23, 48, 49, 49, 24, 22, 
177
  50, 51, 52, 53, 54, 41, 56, 57, 
178
  58, 59, 4, 5, 60, 55, 55, 8, 
179
  4, 55, 55, 61, 55, 62, 57, 63, 
180
  63, 4, 5, 60, 55, 55, 55, 4, 
181
  55, 55, 61, 55, 57, 63, 63, 4, 
182
  5, 60, 55, 55, 55, 4, 55, 55, 
183
  61, 55, 42, 55, 55, 55, 64, 65, 
184
  55, 1, 60, 55, 55, 55, 55, 55, 
185
  42, 55, 66, 66, 55, 1, 60, 55, 
186
  60, 55, 55, 67, 60, 55, 60, 55, 
187
  60, 55, 55, 55, 60, 55, 42, 55, 
188
  68, 55, 66, 66, 55, 1, 60, 55, 
189
  55, 55, 55, 55, 42, 55, 42, 55, 
190
  55, 55, 66, 66, 55, 1, 60, 55, 
191
  55, 55, 55, 55, 42, 55, 42, 55, 
192
  55, 55, 66, 65, 55, 1, 60, 55, 
193
  55, 55, 55, 55, 42, 55, 69, 70, 
194
  71, 71, 4, 5, 60, 55, 55, 55, 
195
  4, 55, 70, 71, 71, 4, 5, 60, 
196
  55, 55, 55, 4, 55, 71, 71, 4, 
197
  5, 60, 55, 55, 55, 4, 55, 60, 
198
  55, 55, 67, 60, 55, 55, 55, 4, 
199
  55, 72, 73, 73, 4, 5, 60, 55, 
200
  55, 55, 4, 55, 64, 74, 55, 1, 
201
  60, 55, 64, 55, 66, 66, 55, 1, 
202
  60, 55, 66, 74, 55, 1, 60, 55, 
203
  56, 57, 63, 63, 4, 5, 60, 55, 
204
  55, 55, 4, 55, 55, 61, 55, 56, 
205
  57, 58, 63, 4, 5, 60, 55, 55, 
206
  8, 4, 55, 55, 61, 55, 76, 77, 
207
  78, 79, 12, 13, 80, 75, 75, 18, 
208
  12, 75, 75, 81, 75, 82, 77, 83, 
209
  79, 12, 13, 80, 75, 75, 75, 12, 
210
  75, 75, 81, 75, 77, 83, 79, 12, 
211
  13, 80, 75, 75, 75, 12, 75, 75, 
212
  81, 75, 84, 75, 75, 75, 85, 86, 
213
  75, 14, 80, 75, 75, 75, 75, 75, 
214
  84, 75, 87, 77, 88, 89, 12, 13, 
215
  80, 75, 75, 17, 12, 75, 75, 81, 
216
  75, 90, 77, 83, 83, 12, 13, 80, 
217
  75, 75, 75, 12, 75, 75, 81, 75, 
218
  77, 83, 83, 12, 13, 80, 75, 75, 
219
  75, 12, 75, 75, 81, 75, 84, 75, 
220
  75, 75, 91, 86, 75, 14, 80, 75, 
221
  75, 75, 75, 75, 84, 75, 80, 75, 
222
  75, 92, 80, 75, 80, 75, 80, 75, 
223
  75, 75, 80, 75, 84, 75, 93, 75, 
224
  91, 91, 75, 14, 80, 75, 75, 75, 
225
  75, 75, 84, 75, 84, 75, 75, 75, 
226
  91, 91, 75, 14, 80, 75, 75, 75, 
227
  75, 75, 84, 75, 94, 95, 96, 96, 
228
  12, 13, 80, 75, 75, 75, 12, 75, 
229
  95, 96, 96, 12, 13, 80, 75, 75, 
230
  75, 12, 75, 96, 96, 12, 13, 80, 
231
  75, 75, 75, 12, 75, 80, 75, 75, 
232
  92, 80, 75, 75, 75, 12, 75, 97, 
233
  98, 98, 12, 13, 80, 75, 75, 75, 
234
  12, 75, 85, 99, 75, 14, 80, 75, 
235
  91, 91, 75, 14, 80, 75, 85, 75, 
236
  91, 91, 75, 14, 80, 75, 91, 99, 
237
  75, 14, 80, 75, 87, 77, 83, 83, 
238
  12, 13, 80, 75, 75, 75, 12, 75, 
239
  75, 81, 75, 87, 77, 88, 83, 12, 
240
  13, 80, 75, 75, 17, 12, 75, 75, 
241
  81, 75, 10, 11, 11, 12, 13, 75, 
242
  75, 75, 75, 12, 75, 76, 77, 83, 
243
  79, 12, 13, 80, 75, 75, 75, 12, 
244
  75, 75, 81, 75, 101, 45, 102, 102, 
245
  22, 23, 48, 100, 100, 100, 22, 100, 
246
  100, 52, 100, 45, 102, 102, 22, 23, 
247
  48, 100, 100, 100, 22, 100, 100, 52, 
248
  100, 103, 100, 100, 100, 104, 105, 100, 
249
  25, 48, 100, 100, 100, 100, 100, 103, 
250
  100, 44, 45, 106, 107, 22, 23, 48, 
251
  100, 100, 24, 22, 100, 100, 52, 100, 
252
  103, 100, 100, 100, 108, 105, 100, 25, 
253
  48, 100, 100, 100, 100, 100, 103, 100, 
254
  48, 100, 100, 109, 48, 100, 48, 100, 
255
  48, 100, 100, 100, 48, 100, 103, 100, 
256
  110, 100, 108, 108, 100, 25, 48, 100, 
257
  100, 100, 100, 100, 103, 100, 103, 100, 
258
  100, 100, 108, 108, 100, 25, 48, 100, 
259
  100, 100, 100, 100, 103, 100, 111, 112, 
260
  113, 113, 22, 23, 48, 100, 100, 100, 
261
  22, 100, 112, 113, 113, 22, 23, 48, 
262
  100, 100, 100, 22, 100, 113, 113, 22, 
263
  23, 48, 100, 100, 100, 22, 100, 48, 
264
  100, 100, 109, 48, 100, 100, 100, 22, 
265
  100, 44, 45, 102, 102, 22, 23, 48, 
266
  100, 100, 100, 22, 100, 100, 52, 100, 
267
  114, 115, 115, 22, 23, 48, 100, 100, 
268
  100, 22, 100, 104, 116, 100, 25, 48, 
269
  100, 108, 108, 100, 25, 48, 100, 104, 
270
  100, 108, 108, 100, 25, 48, 100, 108, 
271
  116, 100, 25, 48, 100, 44, 45, 106, 
272
  102, 22, 23, 48, 100, 100, 24, 22, 
273
  100, 100, 52, 100, 20, 21, 21, 22, 
274
  23, 117, 117, 117, 24, 22, 117, 20, 
275
  21, 21, 22, 23, 117, 117, 117, 117, 
276
  22, 117, 119, 120, 121, 122, 32, 33, 
277
  123, 118, 118, 34, 32, 118, 118, 124, 
278
  118, 125, 120, 122, 122, 32, 33, 123, 
279
  118, 118, 118, 32, 118, 118, 124, 118, 
280
  120, 122, 122, 32, 33, 123, 118, 118, 
281
  118, 32, 118, 118, 124, 118, 126, 118, 
282
  118, 118, 127, 128, 118, 35, 123, 118, 
283
  118, 118, 118, 118, 126, 118, 119, 120, 
284
  121, 49, 32, 33, 123, 118, 118, 34, 
285
  32, 118, 118, 124, 118, 126, 118, 118, 
286
  118, 129, 128, 118, 35, 123, 118, 118, 
287
  118, 118, 118, 126, 118, 123, 118, 118, 
288
  130, 123, 118, 123, 118, 123, 118, 118, 
289
  118, 123, 118, 126, 118, 131, 118, 129, 
290
  129, 118, 35, 123, 118, 118, 118, 118, 
291
  118, 126, 118, 126, 118, 118, 118, 129, 
292
  129, 118, 35, 123, 118, 118, 118, 118, 
293
  118, 126, 118, 132, 133, 134, 134, 32, 
294
  33, 123, 118, 118, 118, 32, 118, 133, 
295
  134, 134, 32, 33, 123, 118, 118, 118, 
296
  32, 118, 134, 134, 32, 33, 123, 118, 
297
  118, 118, 32, 118, 123, 118, 118, 130, 
298
  123, 118, 118, 118, 32, 118, 119, 120, 
299
  122, 122, 32, 33, 123, 118, 118, 118, 
300
  32, 118, 118, 124, 118, 135, 136, 136, 
301
  32, 33, 123, 118, 118, 118, 32, 118, 
302
  127, 137, 118, 35, 123, 118, 129, 129, 
303
  118, 35, 123, 118, 127, 118, 129, 129, 
304
  118, 35, 123, 118, 129, 137, 118, 35, 
305
  123, 118, 42, 43, 44, 45, 106, 102, 
306
  22, 23, 48, 49, 49, 24, 22, 100, 
307
  42, 52, 100, 56, 138, 58, 59, 4, 
308
  5, 60, 55, 55, 8, 4, 55, 55, 
309
  61, 55, 42, 43, 44, 45, 139, 140, 
310
  22, 141, 142, 55, 49, 24, 22, 55, 
311
  42, 52, 55, 20, 143, 143, 22, 141, 
312
  60, 55, 55, 24, 22, 55, 60, 55, 
313
  55, 67, 60, 55, 55, 55, 22, 55, 
314
  142, 55, 55, 144, 142, 55, 55, 55, 
315
  22, 55, 142, 55, 142, 55, 55, 55, 
316
  142, 55, 42, 55, 68, 20, 143, 143, 
317
  22, 141, 60, 55, 55, 55, 22, 55, 
318
  42, 55, 146, 145, 147, 147, 145, 40, 
319
  148, 145, 147, 147, 145, 40, 148, 145, 
320
  148, 145, 145, 149, 148, 145, 148, 145, 
321
  148, 145, 145, 145, 148, 145, 42, 117, 
322
  117, 117, 117, 117, 117, 117, 117, 49, 
323
  117, 117, 117, 117, 42, 117, 0
324
};
325
326
static const unsigned char _indic_syllable_machine_trans_targs[] = {
327
  31, 37, 42, 2, 43, 46, 4, 50, 
328
  51, 31, 60, 9, 66, 69, 61, 11, 
329
  74, 75, 78, 31, 83, 17, 89, 92, 
330
  93, 84, 31, 19, 98, 31, 107, 24, 
331
  113, 116, 117, 108, 26, 122, 127, 31, 
332
  134, 31, 32, 53, 79, 81, 100, 101, 
333
  85, 102, 123, 124, 94, 132, 137, 31, 
334
  33, 35, 6, 52, 38, 47, 34, 1, 
335
  36, 40, 0, 39, 41, 44, 45, 3, 
336
  48, 5, 49, 31, 54, 56, 14, 77, 
337
  62, 70, 55, 7, 57, 72, 64, 58, 
338
  13, 76, 59, 8, 63, 65, 67, 68, 
339
  10, 71, 12, 73, 31, 80, 20, 82, 
340
  96, 87, 15, 99, 16, 86, 88, 90, 
341
  91, 18, 95, 21, 97, 31, 31, 103, 
342
  105, 22, 27, 109, 118, 104, 106, 120, 
343
  111, 23, 110, 112, 114, 115, 25, 119, 
344
  28, 121, 125, 126, 131, 128, 129, 29, 
345
  130, 31, 133, 30, 135, 136
346
};
347
348
static const char _indic_syllable_machine_trans_actions[] = {
349
  1, 0, 2, 0, 2, 0, 0, 2, 
350
  2, 3, 2, 0, 2, 0, 0, 0, 
351
  2, 2, 2, 4, 2, 0, 5, 0, 
352
  5, 0, 6, 0, 2, 7, 2, 0, 
353
  2, 0, 2, 0, 0, 2, 0, 8, 
354
  0, 11, 2, 2, 5, 0, 12, 12, 
355
  0, 2, 5, 2, 5, 2, 0, 13, 
356
  2, 0, 0, 2, 0, 2, 2, 0, 
357
  2, 2, 0, 0, 2, 2, 2, 0, 
358
  0, 0, 2, 14, 2, 0, 0, 2, 
359
  0, 2, 2, 0, 2, 2, 2, 2, 
360
  0, 2, 2, 0, 0, 2, 2, 2, 
361
  0, 0, 0, 2, 15, 5, 0, 5, 
362
  2, 2, 0, 5, 0, 0, 2, 5, 
363
  5, 0, 0, 0, 2, 16, 17, 2, 
364
  0, 0, 0, 0, 2, 2, 2, 2, 
365
  2, 0, 0, 2, 2, 2, 0, 0, 
366
  0, 2, 0, 18, 18, 0, 0, 0, 
367
  0, 19, 2, 0, 0, 0
368
};
369
370
static const char _indic_syllable_machine_to_state_actions[] = {
371
  0, 0, 0, 0, 0, 0, 0, 0, 
372
  0, 0, 0, 0, 0, 0, 0, 0, 
373
  0, 0, 0, 0, 0, 0, 0, 0, 
374
  0, 0, 0, 0, 0, 0, 0, 9, 
375
  0, 0, 0, 0, 0, 0, 0, 0, 
376
  0, 0, 0, 0, 0, 0, 0, 0, 
377
  0, 0, 0, 0, 0, 0, 0, 0, 
378
  0, 0, 0, 0, 0, 0, 0, 0, 
379
  0, 0, 0, 0, 0, 0, 0, 0, 
380
  0, 0, 0, 0, 0, 0, 0, 0, 
381
  0, 0, 0, 0, 0, 0, 0, 0, 
382
  0, 0, 0, 0, 0, 0, 0, 0, 
383
  0, 0, 0, 0, 0, 0, 0, 0, 
384
  0, 0, 0, 0, 0, 0, 0, 0, 
385
  0, 0, 0, 0, 0, 0, 0, 0, 
386
  0, 0, 0, 0, 0, 0, 0, 0, 
387
  0, 0, 0, 0, 0, 0, 0, 0, 
388
  0, 0
389
};
390
391
static const char _indic_syllable_machine_from_state_actions[] = {
392
  0, 0, 0, 0, 0, 0, 0, 0, 
393
  0, 0, 0, 0, 0, 0, 0, 0, 
394
  0, 0, 0, 0, 0, 0, 0, 0, 
395
  0, 0, 0, 0, 0, 0, 0, 10, 
396
  0, 0, 0, 0, 0, 0, 0, 0, 
397
  0, 0, 0, 0, 0, 0, 0, 0, 
398
  0, 0, 0, 0, 0, 0, 0, 0, 
399
  0, 0, 0, 0, 0, 0, 0, 0, 
400
  0, 0, 0, 0, 0, 0, 0, 0, 
401
  0, 0, 0, 0, 0, 0, 0, 0, 
402
  0, 0, 0, 0, 0, 0, 0, 0, 
403
  0, 0, 0, 0, 0, 0, 0, 0, 
404
  0, 0, 0, 0, 0, 0, 0, 0, 
405
  0, 0, 0, 0, 0, 0, 0, 0, 
406
  0, 0, 0, 0, 0, 0, 0, 0, 
407
  0, 0, 0, 0, 0, 0, 0, 0, 
408
  0, 0, 0, 0, 0, 0, 0, 0, 
409
  0, 0
410
};
411
412
static const short _indic_syllable_machine_eof_trans[] = {
413
  1, 1, 1, 1, 1, 1, 1, 10, 
414
  10, 10, 10, 10, 10, 10, 10, 20, 
415
  20, 27, 20, 27, 20, 20, 30, 30, 
416
  30, 30, 30, 30, 30, 1, 40, 0, 
417
  56, 56, 56, 56, 56, 56, 56, 56, 
418
  56, 56, 56, 56, 56, 56, 56, 56, 
419
  56, 56, 56, 56, 56, 76, 76, 76, 
420
  76, 76, 76, 76, 76, 76, 76, 76, 
421
  76, 76, 76, 76, 76, 76, 76, 76, 
422
  76, 76, 76, 76, 76, 76, 76, 101, 
423
  101, 101, 101, 101, 101, 101, 101, 101, 
424
  101, 101, 101, 101, 101, 101, 101, 101, 
425
  101, 101, 101, 101, 118, 118, 119, 119, 
426
  119, 119, 119, 119, 119, 119, 119, 119, 
427
  119, 119, 119, 119, 119, 119, 119, 119, 
428
  119, 119, 119, 101, 56, 56, 56, 56, 
429
  56, 56, 56, 56, 146, 146, 146, 146, 
430
  146, 118
431
};
432
433
static const int indic_syllable_machine_start = 31;
434
static const int indic_syllable_machine_first_final = 31;
435
static const int indic_syllable_machine_error = -1;
436
437
static const int indic_syllable_machine_en_main = 31;
438
439
440
#line 58 "hb-ot-shaper-indic-machine.rl"
441
442
443
444
#line 118 "hb-ot-shaper-indic-machine.rl"
445
446
447
#define found_syllable(syllable_type) \
448
0
  HB_STMT_START { \
449
0
    if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \
450
0
    for (unsigned int i = ts; i < te; i++) \
451
0
      info[i].syllable() = (syllable_serial << 4) | syllable_type; \
452
0
    syllable_serial++; \
453
0
    if (syllable_serial == 16) syllable_serial = 1; \
454
0
  } HB_STMT_END
455
456
inline void
457
find_syllables_indic (hb_buffer_t *buffer)
458
0
{
459
0
  unsigned int p, pe, eof, ts, te, act;
460
0
  int cs;
461
0
  hb_glyph_info_t *info = buffer->info;
462
  
463
0
#line 464 "hb-ot-shaper-indic-machine.hh"
464
0
  {
465
0
  cs = indic_syllable_machine_start;
466
0
  ts = 0;
467
0
  te = 0;
468
0
  act = 0;
469
0
  }
470
471
0
#line 138 "hb-ot-shaper-indic-machine.rl"
472
473
474
0
  p = 0;
475
0
  pe = eof = buffer->len;
476
477
0
  unsigned int syllable_serial = 1;
478
  
479
0
#line 480 "hb-ot-shaper-indic-machine.hh"
480
0
  {
481
0
  int _slen;
482
0
  int _trans;
483
0
  const unsigned char *_keys;
484
0
  const unsigned char *_inds;
485
0
  if ( p == pe )
486
0
    goto _test_eof;
487
0
_resume:
488
0
  switch ( _indic_syllable_machine_from_state_actions[cs] ) {
489
0
  case 10:
490
0
#line 1 "NONE"
491
0
  {ts = p;}
492
0
  break;
493
0
#line 494 "hb-ot-shaper-indic-machine.hh"
494
0
  }
495
496
0
  _keys = _indic_syllable_machine_trans_keys + (cs<<1);
497
0
  _inds = _indic_syllable_machine_indicies + _indic_syllable_machine_index_offsets[cs];
498
499
0
  _slen = _indic_syllable_machine_key_spans[cs];
500
0
  _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].indic_category()) &&
501
0
    ( info[p].indic_category()) <= _keys[1] ?
502
0
    ( info[p].indic_category()) - _keys[0] : _slen ];
503
504
0
_eof_trans:
505
0
  cs = _indic_syllable_machine_trans_targs[_trans];
506
507
0
  if ( _indic_syllable_machine_trans_actions[_trans] == 0 )
508
0
    goto _again;
509
510
0
  switch ( _indic_syllable_machine_trans_actions[_trans] ) {
511
0
  case 2:
512
0
#line 1 "NONE"
513
0
  {te = p+1;}
514
0
  break;
515
0
  case 11:
516
0
#line 114 "hb-ot-shaper-indic-machine.rl"
517
0
  {te = p+1;{ found_syllable (indic_non_indic_cluster); }}
518
0
  break;
519
0
  case 13:
520
0
#line 109 "hb-ot-shaper-indic-machine.rl"
521
0
  {te = p;p--;{ found_syllable (indic_consonant_syllable); }}
522
0
  break;
523
0
  case 14:
524
0
#line 110 "hb-ot-shaper-indic-machine.rl"
525
0
  {te = p;p--;{ found_syllable (indic_vowel_syllable); }}
526
0
  break;
527
0
  case 17:
528
0
#line 111 "hb-ot-shaper-indic-machine.rl"
529
0
  {te = p;p--;{ found_syllable (indic_standalone_cluster); }}
530
0
  break;
531
0
  case 19:
532
0
#line 112 "hb-ot-shaper-indic-machine.rl"
533
0
  {te = p;p--;{ found_syllable (indic_symbol_cluster); }}
534
0
  break;
535
0
  case 15:
536
0
#line 113 "hb-ot-shaper-indic-machine.rl"
537
0
  {te = p;p--;{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
538
0
  break;
539
0
  case 16:
540
0
#line 114 "hb-ot-shaper-indic-machine.rl"
541
0
  {te = p;p--;{ found_syllable (indic_non_indic_cluster); }}
542
0
  break;
543
0
  case 1:
544
0
#line 109 "hb-ot-shaper-indic-machine.rl"
545
0
  {{p = ((te))-1;}{ found_syllable (indic_consonant_syllable); }}
546
0
  break;
547
0
  case 3:
548
0
#line 110 "hb-ot-shaper-indic-machine.rl"
549
0
  {{p = ((te))-1;}{ found_syllable (indic_vowel_syllable); }}
550
0
  break;
551
0
  case 7:
552
0
#line 111 "hb-ot-shaper-indic-machine.rl"
553
0
  {{p = ((te))-1;}{ found_syllable (indic_standalone_cluster); }}
554
0
  break;
555
0
  case 8:
556
0
#line 112 "hb-ot-shaper-indic-machine.rl"
557
0
  {{p = ((te))-1;}{ found_syllable (indic_symbol_cluster); }}
558
0
  break;
559
0
  case 4:
560
0
#line 113 "hb-ot-shaper-indic-machine.rl"
561
0
  {{p = ((te))-1;}{ found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
562
0
  break;
563
0
  case 6:
564
0
#line 1 "NONE"
565
0
  { switch( act ) {
566
0
  case 1:
567
0
  {{p = ((te))-1;} found_syllable (indic_consonant_syllable); }
568
0
  break;
569
0
  case 5:
570
0
  {{p = ((te))-1;} found_syllable (indic_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }
571
0
  break;
572
0
  case 6:
573
0
  {{p = ((te))-1;} found_syllable (indic_non_indic_cluster); }
574
0
  break;
575
0
  }
576
0
  }
577
0
  break;
578
0
  case 18:
579
0
#line 1 "NONE"
580
0
  {te = p+1;}
581
0
#line 109 "hb-ot-shaper-indic-machine.rl"
582
0
  {act = 1;}
583
0
  break;
584
0
  case 5:
585
0
#line 1 "NONE"
586
0
  {te = p+1;}
587
0
#line 113 "hb-ot-shaper-indic-machine.rl"
588
0
  {act = 5;}
589
0
  break;
590
0
  case 12:
591
0
#line 1 "NONE"
592
0
  {te = p+1;}
593
0
#line 114 "hb-ot-shaper-indic-machine.rl"
594
0
  {act = 6;}
595
0
  break;
596
0
#line 597 "hb-ot-shaper-indic-machine.hh"
597
0
  }
598
599
0
_again:
600
0
  switch ( _indic_syllable_machine_to_state_actions[cs] ) {
601
0
  case 9:
602
0
#line 1 "NONE"
603
0
  {ts = 0;}
604
0
  break;
605
0
#line 606 "hb-ot-shaper-indic-machine.hh"
606
0
  }
607
608
0
  if ( ++p != pe )
609
0
    goto _resume;
610
0
  _test_eof: {}
611
0
  if ( p == eof )
612
0
  {
613
0
  if ( _indic_syllable_machine_eof_trans[cs] > 0 ) {
614
0
    _trans = _indic_syllable_machine_eof_trans[cs] - 1;
615
0
    goto _eof_trans;
616
0
  }
617
0
  }
618
619
0
  }
620
621
0
#line 146 "hb-ot-shaper-indic-machine.rl"
622
623
0
}
624
625
#undef found_syllable
626
627
#endif /* HB_OT_SHAPER_INDIC_MACHINE_HH */