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-private.hh"
33 
34 
35 #line 36 "hb-buffer-deserialize-json.hh"
36 static const unsigned char _deserialize_json_trans_keys[] = {
37 	0u, 0u, 9u, 123u, 9u, 34u, 97u, 103u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u,
38 	48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u,
39 	9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u,
40 	120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u,
41 	9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u,
42 	65u, 122u, 34u, 122u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 123u, 0u, 0u, 0
43 };
44 
45 static const char _deserialize_json_key_spans[] = {
46 	0, 115, 26, 7, 2, 1, 50, 49,
47 	10, 117, 117, 117, 1, 50, 49, 10,
48 	117, 117, 1, 1, 50, 49, 117, 117,
49 	2, 1, 50, 49, 10, 117, 117, 1,
50 	50, 49, 10, 117, 117, 1, 50, 49,
51 	58, 89, 117, 117, 85, 115, 0
52 };
53 
54 static const short _deserialize_json_index_offsets[] = {
55 	0, 0, 116, 143, 151, 154, 156, 207,
56 	257, 268, 386, 504, 622, 624, 675, 725,
57 	736, 854, 972, 974, 976, 1027, 1077, 1195,
58 	1313, 1316, 1318, 1369, 1419, 1430, 1548, 1666,
59 	1668, 1719, 1769, 1780, 1898, 2016, 2018, 2069,
60 	2119, 2178, 2268, 2386, 2504, 2590, 2706
61 };
62 
63 static const char _deserialize_json_indicies[] = {
64 	0, 0, 0, 0, 0, 1, 1,
65 	1, 1, 1, 1, 1, 1, 1, 1,
66 	1, 1, 1, 1, 1, 1, 1, 1,
67 	0, 1, 1, 1, 1, 1, 1, 1,
68 	1, 1, 1, 1, 1, 1, 1, 1,
69 	1, 1, 1, 1, 1, 1, 1, 1,
70 	1, 1, 1, 1, 1, 1, 1, 1,
71 	1, 1, 1, 1, 1, 1, 1, 1,
72 	1, 1, 1, 1, 1, 1, 1, 1,
73 	1, 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, 2, 1, 3, 3, 3,
79 	3, 3, 1, 1, 1, 1, 1, 1,
80 	1, 1, 1, 1, 1, 1, 1, 1,
81 	1, 1, 1, 1, 3, 1, 4, 1,
82 	5, 1, 6, 7, 1, 1, 8, 1,
83 	9, 10, 1, 11, 1, 11, 11, 11,
84 	11, 11, 1, 1, 1, 1, 1, 1,
85 	1, 1, 1, 1, 1, 1, 1, 1,
86 	1, 1, 1, 1, 11, 1, 1, 1,
87 	1, 1, 1, 1, 1, 1, 1, 1,
88 	1, 1, 1, 1, 1, 1, 1, 1,
89 	1, 1, 1, 1, 1, 1, 12, 1,
90 	12, 12, 12, 12, 12, 1, 1, 1,
91 	1, 1, 1, 1, 1, 1, 1, 1,
92 	1, 1, 1, 1, 1, 1, 1, 12,
93 	1, 1, 1, 1, 1, 1, 1, 1,
94 	1, 1, 1, 1, 13, 1, 1, 14,
95 	15, 15, 15, 15, 15, 15, 15, 15,
96 	15, 1, 16, 17, 17, 17, 17, 17,
97 	17, 17, 17, 17, 1, 18, 18, 18,
98 	18, 18, 1, 1, 1, 1, 1, 1,
99 	1, 1, 1, 1, 1, 1, 1, 1,
100 	1, 1, 1, 1, 18, 1, 1, 1,
101 	1, 1, 1, 1, 1, 1, 1, 1,
102 	19, 1, 1, 1, 1, 1, 1, 1,
103 	1, 1, 1, 1, 1, 1, 1, 1,
104 	1, 1, 1, 1, 1, 1, 1, 1,
105 	1, 1, 1, 1, 1, 1, 1, 1,
106 	1, 1, 1, 1, 1, 1, 1, 1,
107 	1, 1, 1, 1, 1, 1, 1, 1,
108 	1, 1, 1, 1, 1, 1, 1, 1,
109 	1, 1, 1, 1, 1, 1, 1, 1,
110 	1, 1, 1, 1, 1, 1, 1, 1,
111 	1, 1, 1, 1, 1, 1, 1, 1,
112 	1, 20, 1, 21, 21, 21, 21, 21,
113 	1, 1, 1, 1, 1, 1, 1, 1,
114 	1, 1, 1, 1, 1, 1, 1, 1,
115 	1, 1, 21, 1, 1, 1, 1, 1,
116 	1, 1, 1, 1, 1, 1, 3, 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, 1,
120 	1, 1, 1, 1, 1, 1, 1, 1,
121 	1, 1, 1, 1, 1, 1, 1, 1,
122 	1, 1, 1, 1, 1, 1, 1, 1,
123 	1, 1, 1, 1, 1, 1, 1, 1,
124 	1, 1, 1, 1, 1, 1, 1, 1,
125 	1, 1, 1, 1, 1, 1, 1, 1,
126 	1, 1, 1, 1, 1, 1, 1, 22,
127 	1, 18, 18, 18, 18, 18, 1, 1,
128 	1, 1, 1, 1, 1, 1, 1, 1,
129 	1, 1, 1, 1, 1, 1, 1, 1,
130 	18, 1, 1, 1, 1, 1, 1, 1,
131 	1, 1, 1, 1, 19, 1, 1, 1,
132 	17, 17, 17, 17, 17, 17, 17, 17,
133 	17, 17, 1, 1, 1, 1, 1, 1,
134 	1, 1, 1, 1, 1, 1, 1, 1,
135 	1, 1, 1, 1, 1, 1, 1, 1,
136 	1, 1, 1, 1, 1, 1, 1, 1,
137 	1, 1, 1, 1, 1, 1, 1, 1,
138 	1, 1, 1, 1, 1, 1, 1, 1,
139 	1, 1, 1, 1, 1, 1, 1, 1,
140 	1, 1, 1, 1, 1, 1, 1, 1,
141 	1, 1, 1, 1, 1, 20, 1, 23,
142 	1, 23, 23, 23, 23, 23, 1, 1,
143 	1, 1, 1, 1, 1, 1, 1, 1,
144 	1, 1, 1, 1, 1, 1, 1, 1,
145 	23, 1, 1, 1, 1, 1, 1, 1,
146 	1, 1, 1, 1, 1, 1, 1, 1,
147 	1, 1, 1, 1, 1, 1, 1, 1,
148 	1, 1, 24, 1, 24, 24, 24, 24,
149 	24, 1, 1, 1, 1, 1, 1, 1,
150 	1, 1, 1, 1, 1, 1, 1, 1,
151 	1, 1, 1, 24, 1, 1, 1, 1,
152 	1, 1, 1, 1, 1, 1, 1, 1,
153 	25, 1, 1, 26, 27, 27, 27, 27,
154 	27, 27, 27, 27, 27, 1, 28, 29,
155 	29, 29, 29, 29, 29, 29, 29, 29,
156 	1, 30, 30, 30, 30, 30, 1, 1,
157 	1, 1, 1, 1, 1, 1, 1, 1,
158 	1, 1, 1, 1, 1, 1, 1, 1,
159 	30, 1, 1, 1, 1, 1, 1, 1,
160 	1, 1, 1, 1, 31, 1, 1, 1,
161 	1, 1, 1, 1, 1, 1, 1, 1,
162 	1, 1, 1, 1, 1, 1, 1, 1,
163 	1, 1, 1, 1, 1, 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, 1, 1,
167 	1, 1, 1, 1, 1, 1, 1, 1,
168 	1, 1, 1, 1, 1, 1, 1, 1,
169 	1, 1, 1, 1, 1, 1, 1, 1,
170 	1, 1, 1, 1, 1, 32, 1, 30,
171 	30, 30, 30, 30, 1, 1, 1, 1,
172 	1, 1, 1, 1, 1, 1, 1, 1,
173 	1, 1, 1, 1, 1, 1, 30, 1,
174 	1, 1, 1, 1, 1, 1, 1, 1,
175 	1, 1, 31, 1, 1, 1, 29, 29,
176 	29, 29, 29, 29, 29, 29, 29, 29,
177 	1, 1, 1, 1, 1, 1, 1, 1,
178 	1, 1, 1, 1, 1, 1, 1, 1,
179 	1, 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, 32, 1, 33, 1, 34,
186 	1, 34, 34, 34, 34, 34, 1, 1,
187 	1, 1, 1, 1, 1, 1, 1, 1,
188 	1, 1, 1, 1, 1, 1, 1, 1,
189 	34, 1, 1, 1, 1, 1, 1, 1,
190 	1, 1, 1, 1, 1, 1, 1, 1,
191 	1, 1, 1, 1, 1, 1, 1, 1,
192 	1, 1, 35, 1, 35, 35, 35, 35,
193 	35, 1, 1, 1, 1, 1, 1, 1,
194 	1, 1, 1, 1, 1, 1, 1, 1,
195 	1, 1, 1, 35, 1, 1, 1, 1,
196 	1, 1, 1, 1, 1, 1, 1, 1,
197 	1, 1, 1, 36, 37, 37, 37, 37,
198 	37, 37, 37, 37, 37, 1, 38, 38,
199 	38, 38, 38, 1, 1, 1, 1, 1,
200 	1, 1, 1, 1, 1, 1, 1, 1,
201 	1, 1, 1, 1, 1, 38, 1, 1,
202 	1, 1, 1, 1, 1, 1, 1, 1,
203 	1, 39, 1, 1, 1, 1, 1, 1,
204 	1, 1, 1, 1, 1, 1, 1, 1,
205 	1, 1, 1, 1, 1, 1, 1, 1,
206 	1, 1, 1, 1, 1, 1, 1, 1,
207 	1, 1, 1, 1, 1, 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, 1, 1,
211 	1, 1, 1, 1, 1, 1, 1, 1,
212 	1, 1, 1, 1, 1, 1, 1, 1,
213 	1, 1, 40, 1, 38, 38, 38, 38,
214 	38, 1, 1, 1, 1, 1, 1, 1,
215 	1, 1, 1, 1, 1, 1, 1, 1,
216 	1, 1, 1, 38, 1, 1, 1, 1,
217 	1, 1, 1, 1, 1, 1, 1, 39,
218 	1, 1, 1, 41, 41, 41, 41, 41,
219 	41, 41, 41, 41, 41, 1, 1, 1,
220 	1, 1, 1, 1, 1, 1, 1, 1,
221 	1, 1, 1, 1, 1, 1, 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 	40, 1, 42, 43, 1, 44, 1, 44,
229 	44, 44, 44, 44, 1, 1, 1, 1,
230 	1, 1, 1, 1, 1, 1, 1, 1,
231 	1, 1, 1, 1, 1, 1, 44, 1,
232 	1, 1, 1, 1, 1, 1, 1, 1,
233 	1, 1, 1, 1, 1, 1, 1, 1,
234 	1, 1, 1, 1, 1, 1, 1, 1,
235 	45, 1, 45, 45, 45, 45, 45, 1,
236 	1, 1, 1, 1, 1, 1, 1, 1,
237 	1, 1, 1, 1, 1, 1, 1, 1,
238 	1, 45, 1, 1, 1, 1, 1, 1,
239 	1, 1, 1, 1, 1, 1, 46, 1,
240 	1, 47, 48, 48, 48, 48, 48, 48,
241 	48, 48, 48, 1, 49, 50, 50, 50,
242 	50, 50, 50, 50, 50, 50, 1, 51,
243 	51, 51, 51, 51, 1, 1, 1, 1,
244 	1, 1, 1, 1, 1, 1, 1, 1,
245 	1, 1, 1, 1, 1, 1, 51, 1,
246 	1, 1, 1, 1, 1, 1, 1, 1,
247 	1, 1, 52, 1, 1, 1, 1, 1,
248 	1, 1, 1, 1, 1, 1, 1, 1,
249 	1, 1, 1, 1, 1, 1, 1, 1,
250 	1, 1, 1, 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, 1, 1, 1, 1,
254 	1, 1, 1, 1, 1, 1, 1, 1,
255 	1, 1, 1, 1, 1, 1, 1, 1,
256 	1, 1, 1, 1, 1, 1, 1, 1,
257 	1, 1, 1, 53, 1, 51, 51, 51,
258 	51, 51, 1, 1, 1, 1, 1, 1,
259 	1, 1, 1, 1, 1, 1, 1, 1,
260 	1, 1, 1, 1, 51, 1, 1, 1,
261 	1, 1, 1, 1, 1, 1, 1, 1,
262 	52, 1, 1, 1, 50, 50, 50, 50,
263 	50, 50, 50, 50, 50, 50, 1, 1,
264 	1, 1, 1, 1, 1, 1, 1, 1,
265 	1, 1, 1, 1, 1, 1, 1, 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, 53, 1, 54, 1, 54, 54, 54,
273 	54, 54, 1, 1, 1, 1, 1, 1,
274 	1, 1, 1, 1, 1, 1, 1, 1,
275 	1, 1, 1, 1, 54, 1, 1, 1,
276 	1, 1, 1, 1, 1, 1, 1, 1,
277 	1, 1, 1, 1, 1, 1, 1, 1,
278 	1, 1, 1, 1, 1, 1, 55, 1,
279 	55, 55, 55, 55, 55, 1, 1, 1,
280 	1, 1, 1, 1, 1, 1, 1, 1,
281 	1, 1, 1, 1, 1, 1, 1, 55,
282 	1, 1, 1, 1, 1, 1, 1, 1,
283 	1, 1, 1, 1, 56, 1, 1, 57,
284 	58, 58, 58, 58, 58, 58, 58, 58,
285 	58, 1, 59, 60, 60, 60, 60, 60,
286 	60, 60, 60, 60, 1, 61, 61, 61,
287 	61, 61, 1, 1, 1, 1, 1, 1,
288 	1, 1, 1, 1, 1, 1, 1, 1,
289 	1, 1, 1, 1, 61, 1, 1, 1,
290 	1, 1, 1, 1, 1, 1, 1, 1,
291 	62, 1, 1, 1, 1, 1, 1, 1,
292 	1, 1, 1, 1, 1, 1, 1, 1,
293 	1, 1, 1, 1, 1, 1, 1, 1,
294 	1, 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, 1, 1, 1, 1, 1, 1,
298 	1, 1, 1, 1, 1, 1, 1, 1,
299 	1, 1, 1, 1, 1, 1, 1, 1,
300 	1, 1, 1, 1, 1, 1, 1, 1,
301 	1, 63, 1, 61, 61, 61, 61, 61,
302 	1, 1, 1, 1, 1, 1, 1, 1,
303 	1, 1, 1, 1, 1, 1, 1, 1,
304 	1, 1, 61, 1, 1, 1, 1, 1,
305 	1, 1, 1, 1, 1, 1, 62, 1,
306 	1, 1, 60, 60, 60, 60, 60, 60,
307 	60, 60, 60, 60, 1, 1, 1, 1,
308 	1, 1, 1, 1, 1, 1, 1, 1,
309 	1, 1, 1, 1, 1, 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, 63,
316 	1, 64, 1, 64, 64, 64, 64, 64,
317 	1, 1, 1, 1, 1, 1, 1, 1,
318 	1, 1, 1, 1, 1, 1, 1, 1,
319 	1, 1, 64, 1, 1, 1, 1, 1,
320 	1, 1, 1, 1, 1, 1, 1, 1,
321 	1, 1, 1, 1, 1, 1, 1, 1,
322 	1, 1, 1, 1, 65, 1, 65, 65,
323 	65, 65, 65, 1, 1, 1, 1, 1,
324 	1, 1, 1, 1, 1, 1, 1, 1,
325 	1, 1, 1, 1, 1, 65, 1, 66,
326 	1, 1, 1, 1, 1, 1, 1, 1,
327 	1, 1, 1, 1, 1, 67, 68, 68,
328 	68, 68, 68, 68, 68, 68, 68, 1,
329 	69, 69, 69, 69, 69, 69, 69, 69,
330 	69, 69, 69, 69, 69, 69, 69, 69,
331 	69, 69, 69, 69, 69, 69, 69, 69,
332 	69, 69, 1, 1, 1, 1, 1, 1,
333 	69, 69, 69, 69, 69, 69, 69, 69,
334 	69, 69, 69, 69, 69, 69, 69, 69,
335 	69, 69, 69, 69, 69, 69, 69, 69,
336 	69, 69, 1, 70, 1, 1, 1, 1,
337 	1, 1, 1, 1, 1, 1, 71, 71,
338 	1, 71, 71, 71, 71, 71, 71, 71,
339 	71, 71, 71, 1, 1, 1, 1, 1,
340 	1, 1, 71, 71, 71, 71, 71, 71,
341 	71, 71, 71, 71, 71, 71, 71, 71,
342 	71, 71, 71, 71, 71, 71, 71, 71,
343 	71, 71, 71, 71, 1, 1, 1, 1,
344 	71, 1, 71, 71, 71, 71, 71, 71,
345 	71, 71, 71, 71, 71, 71, 71, 71,
346 	71, 71, 71, 71, 71, 71, 71, 71,
347 	71, 71, 71, 71, 1, 72, 72, 72,
348 	72, 72, 1, 1, 1, 1, 1, 1,
349 	1, 1, 1, 1, 1, 1, 1, 1,
350 	1, 1, 1, 1, 72, 1, 1, 1,
351 	1, 1, 1, 1, 1, 1, 1, 1,
352 	73, 1, 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, 74, 1, 72, 72, 72, 72, 72,
363 	1, 1, 1, 1, 1, 1, 1, 1,
364 	1, 1, 1, 1, 1, 1, 1, 1,
365 	1, 1, 72, 1, 1, 1, 1, 1,
366 	1, 1, 1, 1, 1, 1, 73, 1,
367 	1, 1, 75, 75, 75, 75, 75, 75,
368 	75, 75, 75, 75, 1, 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, 74,
377 	1, 76, 76, 76, 76, 76, 1, 1,
378 	1, 1, 1, 1, 1, 1, 1, 1,
379 	1, 1, 1, 1, 1, 1, 1, 1,
380 	76, 1, 1, 1, 1, 1, 1, 1,
381 	1, 1, 1, 1, 77, 1, 1, 1,
382 	1, 1, 1, 1, 1, 1, 1, 1,
383 	1, 1, 1, 1, 1, 1, 1, 1,
384 	1, 1, 1, 1, 1, 1, 1, 1,
385 	1, 1, 1, 1, 1, 1, 1, 1,
386 	1, 1, 1, 1, 1, 1, 1, 1,
387 	1, 1, 1, 1, 1, 78, 1, 0,
388 	0, 0, 0, 0, 1, 1, 1, 1,
389 	1, 1, 1, 1, 1, 1, 1, 1,
390 	1, 1, 1, 1, 1, 1, 0, 1,
391 	1, 1, 1, 1, 1, 1, 1, 1,
392 	1, 1, 1, 1, 1, 1, 1, 1,
393 	1, 1, 1, 1, 1, 1, 1, 1,
394 	1, 1, 1, 1, 1, 1, 1, 1,
395 	1, 1, 1, 1, 1, 1, 1, 1,
396 	1, 1, 1, 1, 1, 1, 1, 1,
397 	1, 1, 1, 1, 1, 1, 1, 1,
398 	1, 1, 1, 1, 1, 1, 1, 1,
399 	1, 1, 1, 1, 1, 1, 1, 1,
400 	1, 1, 1, 1, 1, 1, 1, 1,
401 	1, 1, 1, 1, 1, 1, 1, 1,
402 	1, 2, 1, 1, 0
403 };
404 
405 static const char _deserialize_json_trans_targs[] = {
406 	1, 0, 2, 2, 3, 4, 18, 24,
407 	37, 5, 12, 6, 7, 8, 9, 11,
408 	9, 11, 10, 2, 44, 10, 44, 13,
409 	14, 15, 16, 17, 16, 17, 10, 2,
410 	44, 19, 20, 21, 22, 23, 10, 2,
411 	44, 23, 25, 31, 26, 27, 28, 29,
412 	30, 29, 30, 10, 2, 44, 32, 33,
413 	34, 35, 36, 35, 36, 10, 2, 44,
414 	38, 39, 40, 42, 43, 41, 10, 41,
415 	10, 2, 44, 43, 44, 45, 46
416 };
417 
418 static const char _deserialize_json_trans_actions[] = {
419 	0, 0, 1, 0, 0, 0, 0, 0,
420 	0, 0, 0, 0, 0, 2, 2, 2,
421 	0, 0, 3, 3, 4, 0, 5, 0,
422 	0, 2, 2, 2, 0, 0, 6, 6,
423 	7, 0, 0, 0, 2, 2, 8, 8,
424 	9, 0, 0, 0, 0, 0, 2, 2,
425 	2, 0, 0, 10, 10, 11, 0, 0,
426 	2, 2, 2, 0, 0, 12, 12, 13,
427 	0, 0, 0, 2, 2, 2, 14, 0,
428 	15, 15, 16, 0, 0, 0, 0
429 };
430 
431 static const int deserialize_json_start = 1;
432 static const int deserialize_json_first_final = 44;
433 static const int deserialize_json_error = 0;
434 
435 static const int deserialize_json_en_main = 1;
436 
437 
438 #line 97 "hb-buffer-deserialize-json.rl"
439 
440 
441 static hb_bool_t
_hb_buffer_deserialize_glyphs_json(hb_buffer_t * buffer,const char * buf,unsigned int buf_len,const char ** end_ptr,hb_font_t * font)442 _hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer,
443 				    const char *buf,
444 				    unsigned int buf_len,
445 				    const char **end_ptr,
446 				    hb_font_t *font)
447 {
448   const char *p = buf, *pe = buf + buf_len;
449 
450   /* Ensure we have positions. */
451   (void) hb_buffer_get_glyph_positions (buffer, NULL);
452 
453   while (p < pe && ISSPACE (*p))
454     p++;
455   if (p < pe && *p == (buffer->len ? ',' : '['))
456   {
457     *end_ptr = ++p;
458   }
459 
460   const char *tok = NULL;
461   int cs;
462   hb_glyph_info_t info = {0};
463   hb_glyph_position_t pos = {0};
464 
465 #line 466 "hb-buffer-deserialize-json.hh"
466 	{
467 	cs = deserialize_json_start;
468 	}
469 
470 #line 471 "hb-buffer-deserialize-json.hh"
471 	{
472 	int _slen;
473 	int _trans;
474 	const unsigned char *_keys;
475 	const char *_inds;
476 	if ( p == pe )
477 		goto _test_eof;
478 	if ( cs == 0 )
479 		goto _out;
480 _resume:
481 	_keys = _deserialize_json_trans_keys + (cs<<1);
482 	_inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs];
483 
484 	_slen = _deserialize_json_key_spans[cs];
485 	_trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
486 		(*p) <= _keys[1] ?
487 		(*p) - _keys[0] : _slen ];
488 
489 	cs = _deserialize_json_trans_targs[_trans];
490 
491 	if ( _deserialize_json_trans_actions[_trans] == 0 )
492 		goto _again;
493 
494 	switch ( _deserialize_json_trans_actions[_trans] ) {
495 	case 1:
496 #line 38 "hb-buffer-deserialize-json.rl"
497 	{
498 	memset (&info, 0, sizeof (info));
499 	memset (&pos , 0, sizeof (pos ));
500 }
501 	break;
502 	case 5:
503 #line 43 "hb-buffer-deserialize-json.rl"
504 	{
505 	buffer->add_info (info);
506 	if (buffer->in_error)
507 	  return false;
508 	buffer->pos[buffer->len - 1] = pos;
509 	*end_ptr = p;
510 }
511 	break;
512 	case 2:
513 #line 51 "hb-buffer-deserialize-json.rl"
514 	{
515 	tok = p;
516 }
517 	break;
518 	case 14:
519 #line 55 "hb-buffer-deserialize-json.rl"
520 	{
521 	if (!hb_font_glyph_from_string (font,
522 					tok, p - tok,
523 					&info.codepoint))
524 	  return false;
525 }
526 	break;
527 	case 15:
528 #line 62 "hb-buffer-deserialize-json.rl"
529 	{ if (!parse_uint (tok, p, &info.codepoint)) return false; }
530 	break;
531 	case 8:
532 #line 63 "hb-buffer-deserialize-json.rl"
533 	{ if (!parse_uint (tok, p, &info.cluster )) return false; }
534 	break;
535 	case 10:
536 #line 64 "hb-buffer-deserialize-json.rl"
537 	{ if (!parse_int  (tok, p, &pos.x_offset )) return false; }
538 	break;
539 	case 12:
540 #line 65 "hb-buffer-deserialize-json.rl"
541 	{ if (!parse_int  (tok, p, &pos.y_offset )) return false; }
542 	break;
543 	case 3:
544 #line 66 "hb-buffer-deserialize-json.rl"
545 	{ if (!parse_int  (tok, p, &pos.x_advance)) return false; }
546 	break;
547 	case 6:
548 #line 67 "hb-buffer-deserialize-json.rl"
549 	{ if (!parse_int  (tok, p, &pos.y_advance)) return false; }
550 	break;
551 	case 16:
552 #line 62 "hb-buffer-deserialize-json.rl"
553 	{ if (!parse_uint (tok, p, &info.codepoint)) return false; }
554 #line 43 "hb-buffer-deserialize-json.rl"
555 	{
556 	buffer->add_info (info);
557 	if (buffer->in_error)
558 	  return false;
559 	buffer->pos[buffer->len - 1] = pos;
560 	*end_ptr = p;
561 }
562 	break;
563 	case 9:
564 #line 63 "hb-buffer-deserialize-json.rl"
565 	{ if (!parse_uint (tok, p, &info.cluster )) return false; }
566 #line 43 "hb-buffer-deserialize-json.rl"
567 	{
568 	buffer->add_info (info);
569 	if (buffer->in_error)
570 	  return false;
571 	buffer->pos[buffer->len - 1] = pos;
572 	*end_ptr = p;
573 }
574 	break;
575 	case 11:
576 #line 64 "hb-buffer-deserialize-json.rl"
577 	{ if (!parse_int  (tok, p, &pos.x_offset )) return false; }
578 #line 43 "hb-buffer-deserialize-json.rl"
579 	{
580 	buffer->add_info (info);
581 	if (buffer->in_error)
582 	  return false;
583 	buffer->pos[buffer->len - 1] = pos;
584 	*end_ptr = p;
585 }
586 	break;
587 	case 13:
588 #line 65 "hb-buffer-deserialize-json.rl"
589 	{ if (!parse_int  (tok, p, &pos.y_offset )) return false; }
590 #line 43 "hb-buffer-deserialize-json.rl"
591 	{
592 	buffer->add_info (info);
593 	if (buffer->in_error)
594 	  return false;
595 	buffer->pos[buffer->len - 1] = pos;
596 	*end_ptr = p;
597 }
598 	break;
599 	case 4:
600 #line 66 "hb-buffer-deserialize-json.rl"
601 	{ if (!parse_int  (tok, p, &pos.x_advance)) return false; }
602 #line 43 "hb-buffer-deserialize-json.rl"
603 	{
604 	buffer->add_info (info);
605 	if (buffer->in_error)
606 	  return false;
607 	buffer->pos[buffer->len - 1] = pos;
608 	*end_ptr = p;
609 }
610 	break;
611 	case 7:
612 #line 67 "hb-buffer-deserialize-json.rl"
613 	{ if (!parse_int  (tok, p, &pos.y_advance)) return false; }
614 #line 43 "hb-buffer-deserialize-json.rl"
615 	{
616 	buffer->add_info (info);
617 	if (buffer->in_error)
618 	  return false;
619 	buffer->pos[buffer->len - 1] = pos;
620 	*end_ptr = p;
621 }
622 	break;
623 #line 624 "hb-buffer-deserialize-json.hh"
624 	}
625 
626 _again:
627 	if ( cs == 0 )
628 		goto _out;
629 	if ( ++p != pe )
630 		goto _resume;
631 	_test_eof: {}
632 	_out: {}
633 	}
634 
635 #line 125 "hb-buffer-deserialize-json.rl"
636 
637 
638   *end_ptr = p;
639 
640   return p == pe && *(p-1) != ']';
641 }
642 
643 #endif /* HB_BUFFER_DESERIALIZE_JSON_HH */
644