1
2#line 1 "hb-buffer-deserialize-json.rl"
3/*
4 * Copyright © 2013 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_BUFFER_DESERIALIZE_JSON_HH
30#define HB_BUFFER_DESERIALIZE_JSON_HH
31
32#include "hb.hh"
33
34
35#line 33 "hb-buffer-deserialize-json.hh"
36static const unsigned char _deserialize_json_trans_keys[] = {
37 0u, 0u, 9u, 123u, 9u, 34u, 97u, 117u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u,
38 48u, 57u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u,
39 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u,
40 9u, 125u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u,
41 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u,
42 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u,
43 9u, 125u, 34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u,
44 9u, 123u, 0u, 0u, 0
45};
46
47static const char _deserialize_json_key_spans[] = {
48 0, 115, 26, 21, 2, 1, 50, 49,
49 10, 117, 117, 85, 117, 1, 50, 49,
50 10, 117, 117, 1, 1, 50, 49, 117,
51 117, 2, 1, 50, 49, 10, 117, 117,
52 1, 50, 49, 10, 117, 117, 1, 1,
53 50, 49, 117, 117, 1, 50, 49, 59,
54 117, 59, 117, 117, 1, 50, 49, 117,
55 115, 0
56};
57
58static const short _deserialize_json_index_offsets[] = {
59 0, 0, 116, 143, 165, 168, 170, 221,
60 271, 282, 400, 518, 604, 722, 724, 775,
61 825, 836, 954, 1072, 1074, 1076, 1127, 1177,
62 1295, 1413, 1416, 1418, 1469, 1519, 1530, 1648,
63 1766, 1768, 1819, 1869, 1880, 1998, 2116, 2118,
64 2120, 2171, 2221, 2339, 2457, 2459, 2510, 2560,
65 2620, 2738, 2798, 2916, 3034, 3036, 3087, 3137,
66 3255, 3371
67};
68
69static const char _deserialize_json_indicies[] = {
70 0, 0, 0, 0, 0, 1, 1,
71 1, 1, 1, 1, 1, 1, 1, 1,
72 1, 1, 1, 1, 1, 1, 1, 1,
73 0, 1, 1, 1, 1, 1, 1, 1,
74 1, 1, 1, 1, 1, 1, 1, 1,
75 1, 1, 1, 1, 1, 1, 1, 1,
76 1, 1, 1, 1, 1, 1, 1, 1,
77 1, 1, 1, 1, 1, 1, 1, 1,
78 1, 1, 1, 1, 1, 1, 1, 1,
79 1, 1, 1, 1, 1, 1, 1, 1,
80 1, 1, 1, 1, 1, 1, 1, 1,
81 1, 1, 1, 1, 1, 1, 1, 1,
82 1, 1, 1, 1, 1, 1, 1, 1,
83 1, 1, 1, 1, 1, 1, 1, 1,
84 1, 1, 1, 2, 1, 3, 3, 3,
85 3, 3, 1, 1, 1, 1, 1, 1,
86 1, 1, 1, 1, 1, 1, 1, 1,
87 1, 1, 1, 1, 3, 1, 4, 1,
88 5, 1, 6, 7, 1, 8, 9, 1,
89 1, 1, 1, 1, 1, 1, 1, 1,
90 1, 1, 1, 1, 10, 1, 11, 12,
91 1, 13, 1, 13, 13, 13, 13, 13,
92 1, 1, 1, 1, 1, 1, 1, 1,
93 1, 1, 1, 1, 1, 1, 1, 1,
94 1, 1, 13, 1, 1, 1, 1, 1,
95 1, 1, 1, 1, 1, 1, 1, 1,
96 1, 1, 1, 1, 1, 1, 1, 1,
97 1, 1, 1, 1, 14, 1, 14, 14,
98 14, 14, 14, 1, 1, 1, 1, 1,
99 1, 1, 1, 1, 1, 1, 1, 1,
100 1, 1, 1, 1, 1, 14, 1, 1,
101 1, 1, 1, 1, 1, 1, 1, 1,
102 1, 1, 15, 1, 1, 16, 17, 17,
103 17, 17, 17, 17, 17, 17, 17, 1,
104 18, 19, 19, 19, 19, 19, 19, 19,
105 19, 19, 1, 20, 20, 20, 20, 20,
106 1, 1, 1, 1, 1, 1, 1, 1,
107 1, 1, 1, 1, 1, 1, 1, 1,
108 1, 1, 20, 1, 1, 1, 1, 1,
109 1, 1, 1, 1, 1, 1, 21, 1,
110 1, 1, 1, 1, 1, 1, 1, 1,
111 1, 1, 1, 1, 1, 1, 1, 1,
112 1, 1, 1, 1, 1, 1, 1, 1,
113 1, 1, 1, 1, 1, 1, 1, 1,
114 1, 1, 1, 1, 1, 1, 1, 1,
115 1, 1, 1, 1, 1, 1, 1, 1,
116 1, 1, 1, 1, 1, 1, 1, 1,
117 1, 1, 1, 1, 1, 1, 1, 1,
118 1, 1, 1, 1, 1, 1, 1, 1,
119 1, 1, 1, 1, 1, 1, 1, 22,
120 1, 23, 23, 23, 23, 23, 1, 1,
121 1, 1, 1, 1, 1, 1, 1, 1,
122 1, 1, 1, 1, 1, 1, 1, 1,
123 23, 1, 1, 1, 1, 1, 1, 1,
124 1, 1, 1, 1, 3, 1, 1, 1,
125 1, 1, 1, 1, 1, 1, 1, 1,
126 1, 1, 1, 1, 1, 1, 1, 1,
127 1, 1, 1, 1, 1, 1, 1, 1,
128 1, 1, 1, 1, 1, 1, 1, 1,
129 1, 1, 1, 1, 1, 1, 1, 1,
130 1, 1, 1, 1, 1, 1, 1, 1,
131 1, 1, 1, 1, 1, 1, 1, 1,
132 1, 1, 1, 1, 1, 1, 1, 1,
133 1, 1, 1, 1, 1, 1, 1, 1,
134 1, 1, 1, 1, 1, 24, 1, 25,
135 25, 25, 25, 25, 1, 1, 1, 1,
136 1, 1, 1, 1, 1, 1, 1, 1,
137 1, 1, 1, 1, 1, 1, 25, 1,
138 1, 1, 1, 1, 1, 1, 1, 1,
139 1, 1, 26, 1, 1, 1, 1, 1,
140 1, 1, 1, 1, 1, 1, 1, 1,
141 1, 1, 1, 1, 1, 1, 1, 1,
142 1, 1, 1, 1, 1, 1, 1, 1,
143 1, 1, 1, 1, 1, 1, 1, 1,
144 1, 1, 1, 1, 1, 1, 1, 1,
145 1, 1, 1, 27, 1, 20, 20, 20,
146 20, 20, 1, 1, 1, 1, 1, 1,
147 1, 1, 1, 1, 1, 1, 1, 1,
148 1, 1, 1, 1, 20, 1, 1, 1,
149 1, 1, 1, 1, 1, 1, 1, 1,
150 21, 1, 1, 1, 19, 19, 19, 19,
151 19, 19, 19, 19, 19, 19, 1, 1,
152 1, 1, 1, 1, 1, 1, 1, 1,
153 1, 1, 1, 1, 1, 1, 1, 1,
154 1, 1, 1, 1, 1, 1, 1, 1,
155 1, 1, 1, 1, 1, 1, 1, 1,
156 1, 1, 1, 1, 1, 1, 1, 1,
157 1, 1, 1, 1, 1, 1, 1, 1,
158 1, 1, 1, 1, 1, 1, 1, 1,
159 1, 1, 1, 1, 1, 1, 1, 1,
160 1, 22, 1, 28, 1, 28, 28, 28,
161 28, 28, 1, 1, 1, 1, 1, 1,
162 1, 1, 1, 1, 1, 1, 1, 1,
163 1, 1, 1, 1, 28, 1, 1, 1,
164 1, 1, 1, 1, 1, 1, 1, 1,
165 1, 1, 1, 1, 1, 1, 1, 1,
166 1, 1, 1, 1, 1, 1, 29, 1,
167 29, 29, 29, 29, 29, 1, 1, 1,
168 1, 1, 1, 1, 1, 1, 1, 1,
169 1, 1, 1, 1, 1, 1, 1, 29,
170 1, 1, 1, 1, 1, 1, 1, 1,
171 1, 1, 1, 1, 30, 1, 1, 31,
172 32, 32, 32, 32, 32, 32, 32, 32,
173 32, 1, 33, 34, 34, 34, 34, 34,
174 34, 34, 34, 34, 1, 35, 35, 35,
175 35, 35, 1, 1, 1, 1, 1, 1,
176 1, 1, 1, 1, 1, 1, 1, 1,
177 1, 1, 1, 1, 35, 1, 1, 1,
178 1, 1, 1, 1, 1, 1, 1, 1,
179 36, 1, 1, 1, 1, 1, 1, 1,
180 1, 1, 1, 1, 1, 1, 1, 1,
181 1, 1, 1, 1, 1, 1, 1, 1,
182 1, 1, 1, 1, 1, 1, 1, 1,
183 1, 1, 1, 1, 1, 1, 1, 1,
184 1, 1, 1, 1, 1, 1, 1, 1,
185 1, 1, 1, 1, 1, 1, 1, 1,
186 1, 1, 1, 1, 1, 1, 1, 1,
187 1, 1, 1, 1, 1, 1, 1, 1,
188 1, 1, 1, 1, 1, 1, 1, 1,
189 1, 37, 1, 35, 35, 35, 35, 35,
190 1, 1, 1, 1, 1, 1, 1, 1,
191 1, 1, 1, 1, 1, 1, 1, 1,
192 1, 1, 35, 1, 1, 1, 1, 1,
193 1, 1, 1, 1, 1, 1, 36, 1,
194 1, 1, 34, 34, 34, 34, 34, 34,
195 34, 34, 34, 34, 1, 1, 1, 1,
196 1, 1, 1, 1, 1, 1, 1, 1,
197 1, 1, 1, 1, 1, 1, 1, 1,
198 1, 1, 1, 1, 1, 1, 1, 1,
199 1, 1, 1, 1, 1, 1, 1, 1,
200 1, 1, 1, 1, 1, 1, 1, 1,
201 1, 1, 1, 1, 1, 1, 1, 1,
202 1, 1, 1, 1, 1, 1, 1, 1,
203 1, 1, 1, 1, 1, 1, 1, 37,
204 1, 38, 1, 39, 1, 39, 39, 39,
205 39, 39, 1, 1, 1, 1, 1, 1,
206 1, 1, 1, 1, 1, 1, 1, 1,
207 1, 1, 1, 1, 39, 1, 1, 1,
208 1, 1, 1, 1, 1, 1, 1, 1,
209 1, 1, 1, 1, 1, 1, 1, 1,
210 1, 1, 1, 1, 1, 1, 40, 1,
211 40, 40, 40, 40, 40, 1, 1, 1,
212 1, 1, 1, 1, 1, 1, 1, 1,
213 1, 1, 1, 1, 1, 1, 1, 40,
214 1, 1, 1, 1, 1, 1, 1, 1,
215 1, 1, 1, 1, 1, 1, 1, 41,
216 42, 42, 42, 42, 42, 42, 42, 42,
217 42, 1, 43, 43, 43, 43, 43, 1,
218 1, 1, 1, 1, 1, 1, 1, 1,
219 1, 1, 1, 1, 1, 1, 1, 1,
220 1, 43, 1, 1, 1, 1, 1, 1,
221 1, 1, 1, 1, 1, 44, 1, 1,
222 1, 1, 1, 1, 1, 1, 1, 1,
223 1, 1, 1, 1, 1, 1, 1, 1,
224 1, 1, 1, 1, 1, 1, 1, 1,
225 1, 1, 1, 1, 1, 1, 1, 1,
226 1, 1, 1, 1, 1, 1, 1, 1,
227 1, 1, 1, 1, 1, 1, 1, 1,
228 1, 1, 1, 1, 1, 1, 1, 1,
229 1, 1, 1, 1, 1, 1, 1, 1,
230 1, 1, 1, 1, 1, 1, 1, 1,
231 1, 1, 1, 1, 1, 1, 45, 1,
232 43, 43, 43, 43, 43, 1, 1, 1,
233 1, 1, 1, 1, 1, 1, 1, 1,
234 1, 1, 1, 1, 1, 1, 1, 43,
235 1, 1, 1, 1, 1, 1, 1, 1,
236 1, 1, 1, 44, 1, 1, 1, 46,
237 46, 46, 46, 46, 46, 46, 46, 46,
238 46, 1, 1, 1, 1, 1, 1, 1,
239 1, 1, 1, 1, 1, 1, 1, 1,
240 1, 1, 1, 1, 1, 1, 1, 1,
241 1, 1, 1, 1, 1, 1, 1, 1,
242 1, 1, 1, 1, 1, 1, 1, 1,
243 1, 1, 1, 1, 1, 1, 1, 1,
244 1, 1, 1, 1, 1, 1, 1, 1,
245 1, 1, 1, 1, 1, 1, 1, 1,
246 1, 1, 1, 1, 45, 1, 47, 48,
247 1, 49, 1, 49, 49, 49, 49, 49,
248 1, 1, 1, 1, 1, 1, 1, 1,
249 1, 1, 1, 1, 1, 1, 1, 1,
250 1, 1, 49, 1, 1, 1, 1, 1,
251 1, 1, 1, 1, 1, 1, 1, 1,
252 1, 1, 1, 1, 1, 1, 1, 1,
253 1, 1, 1, 1, 50, 1, 50, 50,
254 50, 50, 50, 1, 1, 1, 1, 1,
255 1, 1, 1, 1, 1, 1, 1, 1,
256 1, 1, 1, 1, 1, 50, 1, 1,
257 1, 1, 1, 1, 1, 1, 1, 1,
258 1, 1, 51, 1, 1, 52, 53, 53,
259 53, 53, 53, 53, 53, 53, 53, 1,
260 54, 55, 55, 55, 55, 55, 55, 55,
261 55, 55, 1, 56, 56, 56, 56, 56,
262 1, 1, 1, 1, 1, 1, 1, 1,
263 1, 1, 1, 1, 1, 1, 1, 1,
264 1, 1, 56, 1, 1, 1, 1, 1,
265 1, 1, 1, 1, 1, 1, 57, 1,
266 1, 1, 1, 1, 1, 1, 1, 1,
267 1, 1, 1, 1, 1, 1, 1, 1,
268 1, 1, 1, 1, 1, 1, 1, 1,
269 1, 1, 1, 1, 1, 1, 1, 1,
270 1, 1, 1, 1, 1, 1, 1, 1,
271 1, 1, 1, 1, 1, 1, 1, 1,
272 1, 1, 1, 1, 1, 1, 1, 1,
273 1, 1, 1, 1, 1, 1, 1, 1,
274 1, 1, 1, 1, 1, 1, 1, 1,
275 1, 1, 1, 1, 1, 1, 1, 58,
276 1, 56, 56, 56, 56, 56, 1, 1,
277 1, 1, 1, 1, 1, 1, 1, 1,
278 1, 1, 1, 1, 1, 1, 1, 1,
279 56, 1, 1, 1, 1, 1, 1, 1,
280 1, 1, 1, 1, 57, 1, 1, 1,
281 55, 55, 55, 55, 55, 55, 55, 55,
282 55, 55, 1, 1, 1, 1, 1, 1,
283 1, 1, 1, 1, 1, 1, 1, 1,
284 1, 1, 1, 1, 1, 1, 1, 1,
285 1, 1, 1, 1, 1, 1, 1, 1,
286 1, 1, 1, 1, 1, 1, 1, 1,
287 1, 1, 1, 1, 1, 1, 1, 1,
288 1, 1, 1, 1, 1, 1, 1, 1,
289 1, 1, 1, 1, 1, 1, 1, 1,
290 1, 1, 1, 1, 1, 58, 1, 59,
291 1, 59, 59, 59, 59, 59, 1, 1,
292 1, 1, 1, 1, 1, 1, 1, 1,
293 1, 1, 1, 1, 1, 1, 1, 1,
294 59, 1, 1, 1, 1, 1, 1, 1,
295 1, 1, 1, 1, 1, 1, 1, 1,
296 1, 1, 1, 1, 1, 1, 1, 1,
297 1, 1, 60, 1, 60, 60, 60, 60,
298 60, 1, 1, 1, 1, 1, 1, 1,
299 1, 1, 1, 1, 1, 1, 1, 1,
300 1, 1, 1, 60, 1, 1, 1, 1,
301 1, 1, 1, 1, 1, 1, 1, 1,
302 61, 1, 1, 62, 63, 63, 63, 63,
303 63, 63, 63, 63, 63, 1, 64, 65,
304 65, 65, 65, 65, 65, 65, 65, 65,
305 1, 66, 66, 66, 66, 66, 1, 1,
306 1, 1, 1, 1, 1, 1, 1, 1,
307 1, 1, 1, 1, 1, 1, 1, 1,
308 66, 1, 1, 1, 1, 1, 1, 1,
309 1, 1, 1, 1, 67, 1, 1, 1,
310 1, 1, 1, 1, 1, 1, 1, 1,
311 1, 1, 1, 1, 1, 1, 1, 1,
312 1, 1, 1, 1, 1, 1, 1, 1,
313 1, 1, 1, 1, 1, 1, 1, 1,
314 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 68, 1, 66,
320 66, 66, 66, 66, 1, 1, 1, 1,
321 1, 1, 1, 1, 1, 1, 1, 1,
322 1, 1, 1, 1, 1, 1, 66, 1,
323 1, 1, 1, 1, 1, 1, 1, 1,
324 1, 1, 67, 1, 1, 1, 65, 65,
325 65, 65, 65, 65, 65, 65, 65, 65,
326 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 68, 1, 69, 1, 70,
335 1, 70, 70, 70, 70, 70, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1,
338 70, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1, 1, 1, 1,
341 1, 1, 71, 1, 71, 71, 71, 71,
342 71, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 71, 1, 1, 1, 1,
345 1, 1, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 72, 73, 73, 73, 73,
347 73, 73, 73, 73, 73, 1, 74, 74,
348 74, 74, 74, 1, 1, 1, 1, 1,
349 1, 1, 1, 1, 1, 1, 1, 1,
350 1, 1, 1, 1, 1, 74, 1, 1,
351 1, 1, 1, 1, 1, 1, 1, 1,
352 1, 75, 1, 1, 1, 1, 1, 1,
353 1, 1, 1, 1, 1, 1, 1, 1,
354 1, 1, 1, 1, 1, 1, 1, 1,
355 1, 1, 1, 1, 1, 1, 1, 1,
356 1, 1, 1, 1, 1, 1, 1, 1,
357 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 1, 1, 1, 1, 1, 1, 1,
360 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1,
362 1, 1, 76, 1, 74, 74, 74, 74,
363 74, 1, 1, 1, 1, 1, 1, 1,
364 1, 1, 1, 1, 1, 1, 1, 1,
365 1, 1, 1, 74, 1, 1, 1, 1,
366 1, 1, 1, 1, 1, 1, 1, 75,
367 1, 1, 1, 77, 77, 77, 77, 77,
368 77, 77, 77, 77, 77, 1, 1, 1,
369 1, 1, 1, 1, 1, 1, 1, 1,
370 1, 1, 1, 1, 1, 1, 1, 1,
371 1, 1, 1, 1, 1, 1, 1, 1,
372 1, 1, 1, 1, 1, 1, 1, 1,
373 1, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 1, 1, 1, 1, 1, 1, 1,
377 76, 1, 78, 1, 78, 78, 78, 78,
378 78, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 78, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 79, 1, 79,
384 79, 79, 79, 79, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 79, 1,
387 80, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 81, 82,
389 82, 82, 82, 82, 82, 82, 82, 82,
390 1, 84, 83, 83, 83, 83, 83, 83,
391 83, 83, 83, 83, 83, 83, 83, 83,
392 83, 83, 83, 83, 83, 83, 83, 83,
393 83, 83, 83, 83, 83, 83, 83, 83,
394 83, 83, 83, 83, 83, 83, 83, 83,
395 83, 83, 83, 83, 83, 83, 83, 83,
396 83, 83, 83, 83, 83, 83, 83, 83,
397 83, 83, 83, 85, 83, 86, 86, 86,
398 86, 86, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 86, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1,
402 87, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 88, 1, 83, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 83, 1, 89,
420 89, 89, 89, 89, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 89, 1,
423 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 90, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 91, 1, 89, 89, 89,
435 89, 89, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 89, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1,
439 90, 1, 1, 1, 92, 92, 92, 92,
440 92, 92, 92, 92, 92, 92, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 91, 1, 93, 1, 93, 93, 93,
450 93, 93, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 93, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 94, 1,
456 94, 94, 94, 94, 94, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 94,
459 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 95,
461 96, 96, 96, 96, 96, 96, 96, 96,
462 96, 1, 89, 89, 89, 89, 89, 1,
463 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 89, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 90, 1, 1,
467 1, 97, 97, 97, 97, 97, 97, 97,
468 97, 97, 97, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 91, 1,
477 0, 0, 0, 0, 0, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 0,
480 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1,
488 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 2, 1, 1, 0
492};
493
494static const char _deserialize_json_trans_targs[] = {
495 1, 0, 2, 2, 3, 4, 19, 25,
496 38, 44, 52, 5, 13, 6, 7, 8,
497 9, 12, 9, 12, 10, 2, 11, 10,
498 11, 11, 56, 57, 14, 15, 16, 17,
499 18, 17, 18, 10, 2, 11, 20, 21,
500 22, 23, 24, 10, 2, 11, 24, 26,
501 32, 27, 28, 29, 30, 31, 30, 31,
502 10, 2, 11, 33, 34, 35, 36, 37,
503 36, 37, 10, 2, 11, 39, 40, 41,
504 42, 43, 10, 2, 11, 43, 45, 46,
505 47, 50, 51, 47, 48, 49, 10, 2,
506 11, 10, 2, 11, 51, 53, 54, 50,
507 55, 55
508};
509
510static const char _deserialize_json_trans_actions[] = {
511 0, 0, 1, 0, 0, 0, 0, 0,
512 0, 0, 0, 0, 0, 0, 0, 2,
513 2, 2, 0, 0, 3, 3, 4, 0,
514 5, 0, 0, 0, 0, 0, 2, 2,
515 2, 0, 0, 6, 6, 7, 0, 0,
516 0, 2, 2, 8, 8, 9, 0, 0,
517 0, 0, 0, 2, 2, 2, 0, 0,
518 10, 10, 11, 0, 0, 2, 2, 2,
519 0, 0, 12, 12, 13, 0, 0, 0,
520 2, 2, 14, 14, 15, 0, 0, 0,
521 2, 16, 16, 0, 17, 0, 18, 18,
522 19, 20, 20, 21, 17, 0, 0, 22,
523 22, 23
524};
525
526static const int deserialize_json_start = 1;
527static const int deserialize_json_first_final = 56;
528static const int deserialize_json_error = 0;
529
530static const int deserialize_json_en_main = 1;
531
532
533#line 111 "hb-buffer-deserialize-json.rl"
534
535
536static hb_bool_t
537_hb_buffer_deserialize_json (hb_buffer_t *buffer,
538 const char *buf,
539 unsigned int buf_len,
540 const char **end_ptr,
541 hb_font_t *font)
542{
543 const char *p = buf, *pe = buf + buf_len;
544
545 /* Ensure we have positions. */
546 (void) hb_buffer_get_glyph_positions (buffer, nullptr);
547
548 while (p < pe && ISSPACE (*p))
549 p++;
550 if (p < pe && *p == (buffer->len ? ',' : '['))
551 *end_ptr = ++p;
552
553 const char *tok = nullptr;
554 int cs;
555 hb_glyph_info_t info = {0};
556 hb_glyph_position_t pos = {0};
557
558#line 552 "hb-buffer-deserialize-json.hh"
559 {
560 cs = deserialize_json_start;
561 }
562
563#line 555 "hb-buffer-deserialize-json.hh"
564 {
565 int _slen;
566 int _trans;
567 const unsigned char *_keys;
568 const char *_inds;
569 if ( p == pe )
570 goto _test_eof;
571 if ( cs == 0 )
572 goto _out;
573_resume:
574 _keys = _deserialize_json_trans_keys + (cs<<1);
575 _inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs];
576
577 _slen = _deserialize_json_key_spans[cs];
578 _trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
579 (*p) <= _keys[1] ?
580 (*p) - _keys[0] : _slen ];
581
582 cs = _deserialize_json_trans_targs[_trans];
583
584 if ( _deserialize_json_trans_actions[_trans] == 0 )
585 goto _again;
586
587 switch ( _deserialize_json_trans_actions[_trans] ) {
588 case 1:
589#line 38 "hb-buffer-deserialize-json.rl"
590 {
591 hb_memset (&info, 0, sizeof (info));
592 hb_memset (&pos , 0, sizeof (pos ));
593}
594 break;
595 case 5:
596#line 43 "hb-buffer-deserialize-json.rl"
597 {
598 buffer->add_info (info);
599 if (unlikely (!buffer->successful))
600 return false;
601 buffer->pos[buffer->len - 1] = pos;
602 *end_ptr = p;
603}
604 break;
605 case 2:
606#line 51 "hb-buffer-deserialize-json.rl"
607 {
608 tok = p;
609}
610 break;
611 case 17:
612#line 55 "hb-buffer-deserialize-json.rl"
613 { if (unlikely (!buffer->ensure_glyphs ())) return false; }
614 break;
615 case 23:
616#line 56 "hb-buffer-deserialize-json.rl"
617 { if (unlikely (!buffer->ensure_unicode ())) return false; }
618 break;
619 case 18:
620#line 58 "hb-buffer-deserialize-json.rl"
621 {
622 /* TODO Unescape \" and \\ if found. */
623 if (!hb_font_glyph_from_string (font,
624 tok+1, p - tok - 2, /* Skip "" */
625 &info.codepoint))
626 return false;
627}
628 break;
629 case 20:
630#line 66 "hb-buffer-deserialize-json.rl"
631 { if (!parse_uint (tok, p, &info.codepoint)) return false; }
632 break;
633 case 8:
634#line 67 "hb-buffer-deserialize-json.rl"
635 { if (!parse_uint (tok, p, &info.cluster )) return false; }
636 break;
637 case 10:
638#line 68 "hb-buffer-deserialize-json.rl"
639 { if (!parse_int (tok, p, &pos.x_offset )) return false; }
640 break;
641 case 12:
642#line 69 "hb-buffer-deserialize-json.rl"
643 { if (!parse_int (tok, p, &pos.y_offset )) return false; }
644 break;
645 case 3:
646#line 70 "hb-buffer-deserialize-json.rl"
647 { if (!parse_int (tok, p, &pos.x_advance)) return false; }
648 break;
649 case 6:
650#line 71 "hb-buffer-deserialize-json.rl"
651 { if (!parse_int (tok, p, &pos.y_advance)) return false; }
652 break;
653 case 14:
654#line 72 "hb-buffer-deserialize-json.rl"
655 { if (!parse_uint (tok, p, &info.mask )) return false; }
656 break;
657 case 16:
658#line 51 "hb-buffer-deserialize-json.rl"
659 {
660 tok = p;
661}
662#line 55 "hb-buffer-deserialize-json.rl"
663 { if (unlikely (!buffer->ensure_glyphs ())) return false; }
664 break;
665 case 22:
666#line 51 "hb-buffer-deserialize-json.rl"
667 {
668 tok = p;
669}
670#line 56 "hb-buffer-deserialize-json.rl"
671 { if (unlikely (!buffer->ensure_unicode ())) return false; }
672 break;
673 case 19:
674#line 58 "hb-buffer-deserialize-json.rl"
675 {
676 /* TODO Unescape \" and \\ if found. */
677 if (!hb_font_glyph_from_string (font,
678 tok+1, p - tok - 2, /* Skip "" */
679 &info.codepoint))
680 return false;
681}
682#line 43 "hb-buffer-deserialize-json.rl"
683 {
684 buffer->add_info (info);
685 if (unlikely (!buffer->successful))
686 return false;
687 buffer->pos[buffer->len - 1] = pos;
688 *end_ptr = p;
689}
690 break;
691 case 21:
692#line 66 "hb-buffer-deserialize-json.rl"
693 { if (!parse_uint (tok, p, &info.codepoint)) return false; }
694#line 43 "hb-buffer-deserialize-json.rl"
695 {
696 buffer->add_info (info);
697 if (unlikely (!buffer->successful))
698 return false;
699 buffer->pos[buffer->len - 1] = pos;
700 *end_ptr = p;
701}
702 break;
703 case 9:
704#line 67 "hb-buffer-deserialize-json.rl"
705 { if (!parse_uint (tok, p, &info.cluster )) return false; }
706#line 43 "hb-buffer-deserialize-json.rl"
707 {
708 buffer->add_info (info);
709 if (unlikely (!buffer->successful))
710 return false;
711 buffer->pos[buffer->len - 1] = pos;
712 *end_ptr = p;
713}
714 break;
715 case 11:
716#line 68 "hb-buffer-deserialize-json.rl"
717 { if (!parse_int (tok, p, &pos.x_offset )) return false; }
718#line 43 "hb-buffer-deserialize-json.rl"
719 {
720 buffer->add_info (info);
721 if (unlikely (!buffer->successful))
722 return false;
723 buffer->pos[buffer->len - 1] = pos;
724 *end_ptr = p;
725}
726 break;
727 case 13:
728#line 69 "hb-buffer-deserialize-json.rl"
729 { if (!parse_int (tok, p, &pos.y_offset )) return false; }
730#line 43 "hb-buffer-deserialize-json.rl"
731 {
732 buffer->add_info (info);
733 if (unlikely (!buffer->successful))
734 return false;
735 buffer->pos[buffer->len - 1] = pos;
736 *end_ptr = p;
737}
738 break;
739 case 4:
740#line 70 "hb-buffer-deserialize-json.rl"
741 { if (!parse_int (tok, p, &pos.x_advance)) return false; }
742#line 43 "hb-buffer-deserialize-json.rl"
743 {
744 buffer->add_info (info);
745 if (unlikely (!buffer->successful))
746 return false;
747 buffer->pos[buffer->len - 1] = pos;
748 *end_ptr = p;
749}
750 break;
751 case 7:
752#line 71 "hb-buffer-deserialize-json.rl"
753 { if (!parse_int (tok, p, &pos.y_advance)) return false; }
754#line 43 "hb-buffer-deserialize-json.rl"
755 {
756 buffer->add_info (info);
757 if (unlikely (!buffer->successful))
758 return false;
759 buffer->pos[buffer->len - 1] = pos;
760 *end_ptr = p;
761}
762 break;
763 case 15:
764#line 72 "hb-buffer-deserialize-json.rl"
765 { if (!parse_uint (tok, p, &info.mask )) return false; }
766#line 43 "hb-buffer-deserialize-json.rl"
767 {
768 buffer->add_info (info);
769 if (unlikely (!buffer->successful))
770 return false;
771 buffer->pos[buffer->len - 1] = pos;
772 *end_ptr = p;
773}
774 break;
775#line 733 "hb-buffer-deserialize-json.hh"
776 }
777
778_again:
779 if ( cs == 0 )
780 goto _out;
781 if ( ++p != pe )
782 goto _resume;
783 _test_eof: {}
784 _out: {}
785 }
786
787#line 137 "hb-buffer-deserialize-json.rl"
788
789
790 *end_ptr = p;
791
792 return p == pe && *(p-1) != ']';
793}
794
795#endif /* HB_BUFFER_DESERIALIZE_JSON_HH */
796