• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
36 static 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, 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, 108u, 108u, 34u, 34u, 9u, 58u,
42 	9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u, 9u, 125u,
43 	34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 93u,
44 	9u, 123u, 0u, 0u, 0
45 };
46 
47 static const char _deserialize_json_key_spans[] = {
48 	0, 115, 26, 21, 2, 1, 50, 49,
49 	10, 117, 117, 117, 1, 50, 49, 10,
50 	117, 117, 1, 1, 50, 49, 117, 117,
51 	2, 1, 50, 49, 10, 117, 117, 1,
52 	50, 49, 10, 117, 117, 1, 1, 50,
53 	49, 117, 117, 1, 50, 49, 59, 117,
54 	59, 117, 117, 1, 50, 49, 117, 85,
55 	115, 0
56 };
57 
58 static const short _deserialize_json_index_offsets[] = {
59 	0, 0, 116, 143, 165, 168, 170, 221,
60 	271, 282, 400, 518, 636, 638, 689, 739,
61 	750, 868, 986, 988, 990, 1041, 1091, 1209,
62 	1327, 1330, 1332, 1383, 1433, 1444, 1562, 1680,
63 	1682, 1733, 1783, 1794, 1912, 2030, 2032, 2034,
64 	2085, 2135, 2253, 2371, 2373, 2424, 2474, 2534,
65 	2652, 2712, 2830, 2948, 2950, 3001, 3051, 3169,
66 	3255, 3371
67 };
68 
69 static 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, 20,
135 	20, 20, 20, 20, 1, 1, 1, 1,
136 	1, 1, 1, 1, 1, 1, 1, 1,
137 	1, 1, 1, 1, 1, 1, 20, 1,
138 	1, 1, 1, 1, 1, 1, 1, 1,
139 	1, 1, 21, 1, 1, 1, 19, 19,
140 	19, 19, 19, 19, 19, 19, 19, 19,
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, 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, 1, 1, 1, 1, 1, 1,
149 	1, 1, 1, 22, 1, 25, 1, 25,
150 	25, 25, 25, 25, 1, 1, 1, 1,
151 	1, 1, 1, 1, 1, 1, 1, 1,
152 	1, 1, 1, 1, 1, 1, 25, 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 	26, 1, 26, 26, 26, 26, 26, 1,
157 	1, 1, 1, 1, 1, 1, 1, 1,
158 	1, 1, 1, 1, 1, 1, 1, 1,
159 	1, 26, 1, 1, 1, 1, 1, 1,
160 	1, 1, 1, 1, 1, 1, 27, 1,
161 	1, 28, 29, 29, 29, 29, 29, 29,
162 	29, 29, 29, 1, 30, 31, 31, 31,
163 	31, 31, 31, 31, 31, 31, 1, 32,
164 	32, 32, 32, 32, 1, 1, 1, 1,
165 	1, 1, 1, 1, 1, 1, 1, 1,
166 	1, 1, 1, 1, 1, 1, 32, 1,
167 	1, 1, 1, 1, 1, 1, 1, 1,
168 	1, 1, 33, 1, 1, 1, 1, 1,
169 	1, 1, 1, 1, 1, 1, 1, 1,
170 	1, 1, 1, 1, 1, 1, 1, 1,
171 	1, 1, 1, 1, 1, 1, 1, 1,
172 	1, 1, 1, 1, 1, 1, 1, 1,
173 	1, 1, 1, 1, 1, 1, 1, 1,
174 	1, 1, 1, 1, 1, 1, 1, 1,
175 	1, 1, 1, 1, 1, 1, 1, 1,
176 	1, 1, 1, 1, 1, 1, 1, 1,
177 	1, 1, 1, 1, 1, 1, 1, 1,
178 	1, 1, 1, 34, 1, 32, 32, 32,
179 	32, 32, 1, 1, 1, 1, 1, 1,
180 	1, 1, 1, 1, 1, 1, 1, 1,
181 	1, 1, 1, 1, 32, 1, 1, 1,
182 	1, 1, 1, 1, 1, 1, 1, 1,
183 	33, 1, 1, 1, 31, 31, 31, 31,
184 	31, 31, 31, 31, 31, 31, 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, 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, 1, 1, 1, 1, 1, 1,
193 	1, 34, 1, 35, 1, 36, 1, 36,
194 	36, 36, 36, 36, 1, 1, 1, 1,
195 	1, 1, 1, 1, 1, 1, 1, 1,
196 	1, 1, 1, 1, 1, 1, 36, 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 	37, 1, 37, 37, 37, 37, 37, 1,
201 	1, 1, 1, 1, 1, 1, 1, 1,
202 	1, 1, 1, 1, 1, 1, 1, 1,
203 	1, 37, 1, 1, 1, 1, 1, 1,
204 	1, 1, 1, 1, 1, 1, 1, 1,
205 	1, 38, 39, 39, 39, 39, 39, 39,
206 	39, 39, 39, 1, 40, 40, 40, 40,
207 	40, 1, 1, 1, 1, 1, 1, 1,
208 	1, 1, 1, 1, 1, 1, 1, 1,
209 	1, 1, 1, 40, 1, 1, 1, 1,
210 	1, 1, 1, 1, 1, 1, 1, 41,
211 	1, 1, 1, 1, 1, 1, 1, 1,
212 	1, 1, 1, 1, 1, 1, 1, 1,
213 	1, 1, 1, 1, 1, 1, 1, 1,
214 	1, 1, 1, 1, 1, 1, 1, 1,
215 	1, 1, 1, 1, 1, 1, 1, 1,
216 	1, 1, 1, 1, 1, 1, 1, 1,
217 	1, 1, 1, 1, 1, 1, 1, 1,
218 	1, 1, 1, 1, 1, 1, 1, 1,
219 	1, 1, 1, 1, 1, 1, 1, 1,
220 	1, 1, 1, 1, 1, 1, 1, 1,
221 	42, 1, 40, 40, 40, 40, 40, 1,
222 	1, 1, 1, 1, 1, 1, 1, 1,
223 	1, 1, 1, 1, 1, 1, 1, 1,
224 	1, 40, 1, 1, 1, 1, 1, 1,
225 	1, 1, 1, 1, 1, 41, 1, 1,
226 	1, 43, 43, 43, 43, 43, 43, 43,
227 	43, 43, 43, 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, 1, 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 	1, 1, 1, 1, 1, 1, 42, 1,
236 	44, 45, 1, 46, 1, 46, 46, 46,
237 	46, 46, 1, 1, 1, 1, 1, 1,
238 	1, 1, 1, 1, 1, 1, 1, 1,
239 	1, 1, 1, 1, 46, 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, 47, 1,
243 	47, 47, 47, 47, 47, 1, 1, 1,
244 	1, 1, 1, 1, 1, 1, 1, 1,
245 	1, 1, 1, 1, 1, 1, 1, 47,
246 	1, 1, 1, 1, 1, 1, 1, 1,
247 	1, 1, 1, 1, 48, 1, 1, 49,
248 	50, 50, 50, 50, 50, 50, 50, 50,
249 	50, 1, 51, 52, 52, 52, 52, 52,
250 	52, 52, 52, 52, 1, 53, 53, 53,
251 	53, 53, 1, 1, 1, 1, 1, 1,
252 	1, 1, 1, 1, 1, 1, 1, 1,
253 	1, 1, 1, 1, 53, 1, 1, 1,
254 	1, 1, 1, 1, 1, 1, 1, 1,
255 	54, 1, 1, 1, 1, 1, 1, 1,
256 	1, 1, 1, 1, 1, 1, 1, 1,
257 	1, 1, 1, 1, 1, 1, 1, 1,
258 	1, 1, 1, 1, 1, 1, 1, 1,
259 	1, 1, 1, 1, 1, 1, 1, 1,
260 	1, 1, 1, 1, 1, 1, 1, 1,
261 	1, 1, 1, 1, 1, 1, 1, 1,
262 	1, 1, 1, 1, 1, 1, 1, 1,
263 	1, 1, 1, 1, 1, 1, 1, 1,
264 	1, 1, 1, 1, 1, 1, 1, 1,
265 	1, 55, 1, 53, 53, 53, 53, 53,
266 	1, 1, 1, 1, 1, 1, 1, 1,
267 	1, 1, 1, 1, 1, 1, 1, 1,
268 	1, 1, 53, 1, 1, 1, 1, 1,
269 	1, 1, 1, 1, 1, 1, 54, 1,
270 	1, 1, 52, 52, 52, 52, 52, 52,
271 	52, 52, 52, 52, 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, 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, 1, 1,
279 	1, 1, 1, 1, 1, 1, 1, 55,
280 	1, 56, 1, 56, 56, 56, 56, 56,
281 	1, 1, 1, 1, 1, 1, 1, 1,
282 	1, 1, 1, 1, 1, 1, 1, 1,
283 	1, 1, 56, 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, 57, 1, 57, 57,
287 	57, 57, 57, 1, 1, 1, 1, 1,
288 	1, 1, 1, 1, 1, 1, 1, 1,
289 	1, 1, 1, 1, 1, 57, 1, 1,
290 	1, 1, 1, 1, 1, 1, 1, 1,
291 	1, 1, 58, 1, 1, 59, 60, 60,
292 	60, 60, 60, 60, 60, 60, 60, 1,
293 	61, 62, 62, 62, 62, 62, 62, 62,
294 	62, 62, 1, 63, 63, 63, 63, 63,
295 	1, 1, 1, 1, 1, 1, 1, 1,
296 	1, 1, 1, 1, 1, 1, 1, 1,
297 	1, 1, 63, 1, 1, 1, 1, 1,
298 	1, 1, 1, 1, 1, 1, 64, 1,
299 	1, 1, 1, 1, 1, 1, 1, 1,
300 	1, 1, 1, 1, 1, 1, 1, 1,
301 	1, 1, 1, 1, 1, 1, 1, 1,
302 	1, 1, 1, 1, 1, 1, 1, 1,
303 	1, 1, 1, 1, 1, 1, 1, 1,
304 	1, 1, 1, 1, 1, 1, 1, 1,
305 	1, 1, 1, 1, 1, 1, 1, 1,
306 	1, 1, 1, 1, 1, 1, 1, 1,
307 	1, 1, 1, 1, 1, 1, 1, 1,
308 	1, 1, 1, 1, 1, 1, 1, 65,
309 	1, 63, 63, 63, 63, 63, 1, 1,
310 	1, 1, 1, 1, 1, 1, 1, 1,
311 	1, 1, 1, 1, 1, 1, 1, 1,
312 	63, 1, 1, 1, 1, 1, 1, 1,
313 	1, 1, 1, 1, 64, 1, 1, 1,
314 	62, 62, 62, 62, 62, 62, 62, 62,
315 	62, 62, 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, 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, 1, 1, 1, 1,
323 	1, 1, 1, 1, 1, 65, 1, 66,
324 	1, 67, 1, 67, 67, 67, 67, 67,
325 	1, 1, 1, 1, 1, 1, 1, 1,
326 	1, 1, 1, 1, 1, 1, 1, 1,
327 	1, 1, 67, 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, 68, 1, 68, 68,
331 	68, 68, 68, 1, 1, 1, 1, 1,
332 	1, 1, 1, 1, 1, 1, 1, 1,
333 	1, 1, 1, 1, 1, 68, 1, 1,
334 	1, 1, 1, 1, 1, 1, 1, 1,
335 	1, 1, 1, 1, 1, 69, 70, 70,
336 	70, 70, 70, 70, 70, 70, 70, 1,
337 	71, 71, 71, 71, 71, 1, 1, 1,
338 	1, 1, 1, 1, 1, 1, 1, 1,
339 	1, 1, 1, 1, 1, 1, 1, 71,
340 	1, 1, 1, 1, 1, 1, 1, 1,
341 	1, 1, 1, 72, 1, 1, 1, 1,
342 	1, 1, 1, 1, 1, 1, 1, 1,
343 	1, 1, 1, 1, 1, 1, 1, 1,
344 	1, 1, 1, 1, 1, 1, 1, 1,
345 	1, 1, 1, 1, 1, 1, 1, 1,
346 	1, 1, 1, 1, 1, 1, 1, 1,
347 	1, 1, 1, 1, 1, 1, 1, 1,
348 	1, 1, 1, 1, 1, 1, 1, 1,
349 	1, 1, 1, 1, 1, 1, 1, 1,
350 	1, 1, 1, 1, 1, 1, 1, 1,
351 	1, 1, 1, 1, 73, 1, 71, 71,
352 	71, 71, 71, 1, 1, 1, 1, 1,
353 	1, 1, 1, 1, 1, 1, 1, 1,
354 	1, 1, 1, 1, 1, 71, 1, 1,
355 	1, 1, 1, 1, 1, 1, 1, 1,
356 	1, 72, 1, 1, 1, 74, 74, 74,
357 	74, 74, 74, 74, 74, 74, 74, 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, 1, 1, 1, 1, 1, 1,
363 	1, 1, 1, 1, 1, 1, 1, 1,
364 	1, 1, 1, 1, 1, 1, 1, 1,
365 	1, 1, 1, 1, 1, 1, 1, 1,
366 	1, 1, 73, 1, 75, 1, 75, 75,
367 	75, 75, 75, 1, 1, 1, 1, 1,
368 	1, 1, 1, 1, 1, 1, 1, 1,
369 	1, 1, 1, 1, 1, 75, 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, 76,
373 	1, 76, 76, 76, 76, 76, 1, 1,
374 	1, 1, 1, 1, 1, 1, 1, 1,
375 	1, 1, 1, 1, 1, 1, 1, 1,
376 	76, 1, 77, 1, 1, 1, 1, 1,
377 	1, 1, 1, 1, 1, 1, 1, 1,
378 	78, 79, 79, 79, 79, 79, 79, 79,
379 	79, 79, 1, 81, 80, 80, 80, 80,
380 	80, 80, 80, 80, 80, 80, 80, 80,
381 	80, 80, 80, 80, 80, 80, 80, 80,
382 	80, 80, 80, 80, 80, 80, 80, 80,
383 	80, 80, 80, 80, 80, 80, 80, 80,
384 	80, 80, 80, 80, 80, 80, 80, 80,
385 	80, 80, 80, 80, 80, 80, 80, 80,
386 	80, 80, 80, 80, 80, 82, 80, 83,
387 	83, 83, 83, 83, 1, 1, 1, 1,
388 	1, 1, 1, 1, 1, 1, 1, 1,
389 	1, 1, 1, 1, 1, 1, 83, 1,
390 	1, 1, 1, 1, 1, 1, 1, 1,
391 	1, 1, 84, 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, 85, 1, 80, 1, 1,
402 	1, 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, 80,
409 	1, 86, 86, 86, 86, 86, 1, 1,
410 	1, 1, 1, 1, 1, 1, 1, 1,
411 	1, 1, 1, 1, 1, 1, 1, 1,
412 	86, 1, 1, 1, 1, 1, 1, 1,
413 	1, 1, 1, 1, 87, 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, 1, 1, 1,
420 	1, 1, 1, 1, 1, 1, 1, 1,
421 	1, 1, 1, 1, 1, 1, 1, 1,
422 	1, 1, 1, 1, 1, 1, 1, 1,
423 	1, 1, 1, 1, 1, 88, 1, 86,
424 	86, 86, 86, 86, 1, 1, 1, 1,
425 	1, 1, 1, 1, 1, 1, 1, 1,
426 	1, 1, 1, 1, 1, 1, 86, 1,
427 	1, 1, 1, 1, 1, 1, 1, 1,
428 	1, 1, 87, 1, 1, 1, 89, 89,
429 	89, 89, 89, 89, 89, 89, 89, 89,
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, 1, 1, 1, 1, 1,
435 	1, 1, 1, 1, 1, 1, 1, 1,
436 	1, 1, 1, 1, 1, 1, 1, 1,
437 	1, 1, 1, 1, 1, 1, 1, 1,
438 	1, 1, 1, 88, 1, 90, 1, 90,
439 	90, 90, 90, 90, 1, 1, 1, 1,
440 	1, 1, 1, 1, 1, 1, 1, 1,
441 	1, 1, 1, 1, 1, 1, 90, 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 	91, 1, 91, 91, 91, 91, 91, 1,
446 	1, 1, 1, 1, 1, 1, 1, 1,
447 	1, 1, 1, 1, 1, 1, 1, 1,
448 	1, 91, 1, 1, 1, 1, 1, 1,
449 	1, 1, 1, 1, 1, 1, 1, 1,
450 	1, 92, 93, 93, 93, 93, 93, 93,
451 	93, 93, 93, 1, 86, 86, 86, 86,
452 	86, 1, 1, 1, 1, 1, 1, 1,
453 	1, 1, 1, 1, 1, 1, 1, 1,
454 	1, 1, 1, 86, 1, 1, 1, 1,
455 	1, 1, 1, 1, 1, 1, 1, 87,
456 	1, 1, 1, 94, 94, 94, 94, 94,
457 	94, 94, 94, 94, 94, 1, 1, 1,
458 	1, 1, 1, 1, 1, 1, 1, 1,
459 	1, 1, 1, 1, 1, 1, 1, 1,
460 	1, 1, 1, 1, 1, 1, 1, 1,
461 	1, 1, 1, 1, 1, 1, 1, 1,
462 	1, 1, 1, 1, 1, 1, 1, 1,
463 	1, 1, 1, 1, 1, 1, 1, 1,
464 	1, 1, 1, 1, 1, 1, 1, 1,
465 	1, 1, 1, 1, 1, 1, 1, 1,
466 	88, 1, 95, 95, 95, 95, 95, 1,
467 	1, 1, 1, 1, 1, 1, 1, 1,
468 	1, 1, 1, 1, 1, 1, 1, 1,
469 	1, 95, 1, 1, 1, 1, 1, 1,
470 	1, 1, 1, 1, 1, 96, 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, 97, 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 
494 static const char _deserialize_json_trans_targs[] = {
495 	1, 0, 2, 2, 3, 4, 18, 24,
496 	37, 43, 51, 5, 12, 6, 7, 8,
497 	9, 11, 9, 11, 10, 2, 55, 10,
498 	55, 13, 14, 15, 16, 17, 16, 17,
499 	10, 2, 55, 19, 20, 21, 22, 23,
500 	10, 2, 55, 23, 25, 31, 26, 27,
501 	28, 29, 30, 29, 30, 10, 2, 55,
502 	32, 33, 34, 35, 36, 35, 36, 10,
503 	2, 55, 38, 39, 40, 41, 42, 10,
504 	2, 55, 42, 44, 45, 46, 49, 50,
505 	46, 47, 48, 10, 2, 55, 10, 2,
506 	55, 50, 52, 53, 49, 54, 54, 55,
507 	56, 57
508 };
509 
510 static 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, 2, 2, 2, 0, 0,
515 	6, 6, 7, 0, 0, 0, 2, 2,
516 	8, 8, 9, 0, 0, 0, 0, 0,
517 	2, 2, 2, 0, 0, 10, 10, 11,
518 	0, 0, 2, 2, 2, 0, 0, 12,
519 	12, 13, 0, 0, 0, 2, 2, 14,
520 	14, 15, 0, 0, 0, 2, 16, 16,
521 	0, 17, 0, 18, 18, 19, 20, 20,
522 	21, 17, 0, 0, 22, 22, 23, 0,
523 	0, 0
524 };
525 
526 static const int deserialize_json_start = 1;
527 static const int deserialize_json_first_final = 55;
528 static const int deserialize_json_error = 0;
529 
530 static const int deserialize_json_en_main = 1;
531 
532 
533 #line 111 "hb-buffer-deserialize-json.rl"
534 
535 
536 static hb_bool_t
_hb_buffer_deserialize_json(hb_buffer_t * buffer,const char * buf,unsigned int buf_len,const char ** end_ptr,hb_font_t * font)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   {
552     *end_ptr = ++p;
553   }
554 
555   const char *tok = nullptr;
556   int cs;
557   hb_glyph_info_t info = {0};
558   hb_glyph_position_t pos = {0};
559 
560 #line 554 "hb-buffer-deserialize-json.hh"
561 	{
562 	cs = deserialize_json_start;
563 	}
564 
565 #line 557 "hb-buffer-deserialize-json.hh"
566 	{
567 	int _slen;
568 	int _trans;
569 	const unsigned char *_keys;
570 	const char *_inds;
571 	if ( p == pe )
572 		goto _test_eof;
573 	if ( cs == 0 )
574 		goto _out;
575 _resume:
576 	_keys = _deserialize_json_trans_keys + (cs<<1);
577 	_inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs];
578 
579 	_slen = _deserialize_json_key_spans[cs];
580 	_trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
581 		(*p) <= _keys[1] ?
582 		(*p) - _keys[0] : _slen ];
583 
584 	cs = _deserialize_json_trans_targs[_trans];
585 
586 	if ( _deserialize_json_trans_actions[_trans] == 0 )
587 		goto _again;
588 
589 	switch ( _deserialize_json_trans_actions[_trans] ) {
590 	case 1:
591 #line 38 "hb-buffer-deserialize-json.rl"
592 	{
593 	hb_memset (&info, 0, sizeof (info));
594 	hb_memset (&pos , 0, sizeof (pos ));
595 }
596 	break;
597 	case 5:
598 #line 43 "hb-buffer-deserialize-json.rl"
599 	{
600 	buffer->add_info (info);
601 	if (unlikely (!buffer->successful))
602 	  return false;
603 	buffer->pos[buffer->len - 1] = pos;
604 	*end_ptr = p;
605 }
606 	break;
607 	case 2:
608 #line 51 "hb-buffer-deserialize-json.rl"
609 	{
610 	tok = p;
611 }
612 	break;
613 	case 17:
614 #line 55 "hb-buffer-deserialize-json.rl"
615 	{ if (unlikely (!buffer->ensure_glyphs ())) return false; }
616 	break;
617 	case 23:
618 #line 56 "hb-buffer-deserialize-json.rl"
619 	{ if (unlikely (!buffer->ensure_unicode ())) return false; }
620 	break;
621 	case 18:
622 #line 58 "hb-buffer-deserialize-json.rl"
623 	{
624 	/* TODO Unescape \" and \\ if found. */
625 	if (!hb_font_glyph_from_string (font,
626 					tok+1, p - tok - 2, /* Skip "" */
627 					&info.codepoint))
628 	  return false;
629 }
630 	break;
631 	case 20:
632 #line 66 "hb-buffer-deserialize-json.rl"
633 	{ if (!parse_uint (tok, p, &info.codepoint)) return false; }
634 	break;
635 	case 8:
636 #line 67 "hb-buffer-deserialize-json.rl"
637 	{ if (!parse_uint (tok, p, &info.cluster )) return false; }
638 	break;
639 	case 10:
640 #line 68 "hb-buffer-deserialize-json.rl"
641 	{ if (!parse_int  (tok, p, &pos.x_offset )) return false; }
642 	break;
643 	case 12:
644 #line 69 "hb-buffer-deserialize-json.rl"
645 	{ if (!parse_int  (tok, p, &pos.y_offset )) return false; }
646 	break;
647 	case 3:
648 #line 70 "hb-buffer-deserialize-json.rl"
649 	{ if (!parse_int  (tok, p, &pos.x_advance)) return false; }
650 	break;
651 	case 6:
652 #line 71 "hb-buffer-deserialize-json.rl"
653 	{ if (!parse_int  (tok, p, &pos.y_advance)) return false; }
654 	break;
655 	case 14:
656 #line 72 "hb-buffer-deserialize-json.rl"
657 	{ if (!parse_uint (tok, p, &info.mask    )) return false; }
658 	break;
659 	case 16:
660 #line 51 "hb-buffer-deserialize-json.rl"
661 	{
662 	tok = p;
663 }
664 #line 55 "hb-buffer-deserialize-json.rl"
665 	{ if (unlikely (!buffer->ensure_glyphs ())) return false; }
666 	break;
667 	case 22:
668 #line 51 "hb-buffer-deserialize-json.rl"
669 	{
670 	tok = p;
671 }
672 #line 56 "hb-buffer-deserialize-json.rl"
673 	{ if (unlikely (!buffer->ensure_unicode ())) return false; }
674 	break;
675 	case 19:
676 #line 58 "hb-buffer-deserialize-json.rl"
677 	{
678 	/* TODO Unescape \" and \\ if found. */
679 	if (!hb_font_glyph_from_string (font,
680 					tok+1, p - tok - 2, /* Skip "" */
681 					&info.codepoint))
682 	  return false;
683 }
684 #line 43 "hb-buffer-deserialize-json.rl"
685 	{
686 	buffer->add_info (info);
687 	if (unlikely (!buffer->successful))
688 	  return false;
689 	buffer->pos[buffer->len - 1] = pos;
690 	*end_ptr = p;
691 }
692 	break;
693 	case 21:
694 #line 66 "hb-buffer-deserialize-json.rl"
695 	{ if (!parse_uint (tok, p, &info.codepoint)) return false; }
696 #line 43 "hb-buffer-deserialize-json.rl"
697 	{
698 	buffer->add_info (info);
699 	if (unlikely (!buffer->successful))
700 	  return false;
701 	buffer->pos[buffer->len - 1] = pos;
702 	*end_ptr = p;
703 }
704 	break;
705 	case 9:
706 #line 67 "hb-buffer-deserialize-json.rl"
707 	{ if (!parse_uint (tok, p, &info.cluster )) return false; }
708 #line 43 "hb-buffer-deserialize-json.rl"
709 	{
710 	buffer->add_info (info);
711 	if (unlikely (!buffer->successful))
712 	  return false;
713 	buffer->pos[buffer->len - 1] = pos;
714 	*end_ptr = p;
715 }
716 	break;
717 	case 11:
718 #line 68 "hb-buffer-deserialize-json.rl"
719 	{ if (!parse_int  (tok, p, &pos.x_offset )) return false; }
720 #line 43 "hb-buffer-deserialize-json.rl"
721 	{
722 	buffer->add_info (info);
723 	if (unlikely (!buffer->successful))
724 	  return false;
725 	buffer->pos[buffer->len - 1] = pos;
726 	*end_ptr = p;
727 }
728 	break;
729 	case 13:
730 #line 69 "hb-buffer-deserialize-json.rl"
731 	{ if (!parse_int  (tok, p, &pos.y_offset )) return false; }
732 #line 43 "hb-buffer-deserialize-json.rl"
733 	{
734 	buffer->add_info (info);
735 	if (unlikely (!buffer->successful))
736 	  return false;
737 	buffer->pos[buffer->len - 1] = pos;
738 	*end_ptr = p;
739 }
740 	break;
741 	case 4:
742 #line 70 "hb-buffer-deserialize-json.rl"
743 	{ if (!parse_int  (tok, p, &pos.x_advance)) return false; }
744 #line 43 "hb-buffer-deserialize-json.rl"
745 	{
746 	buffer->add_info (info);
747 	if (unlikely (!buffer->successful))
748 	  return false;
749 	buffer->pos[buffer->len - 1] = pos;
750 	*end_ptr = p;
751 }
752 	break;
753 	case 7:
754 #line 71 "hb-buffer-deserialize-json.rl"
755 	{ if (!parse_int  (tok, p, &pos.y_advance)) return false; }
756 #line 43 "hb-buffer-deserialize-json.rl"
757 	{
758 	buffer->add_info (info);
759 	if (unlikely (!buffer->successful))
760 	  return false;
761 	buffer->pos[buffer->len - 1] = pos;
762 	*end_ptr = p;
763 }
764 	break;
765 	case 15:
766 #line 72 "hb-buffer-deserialize-json.rl"
767 	{ if (!parse_uint (tok, p, &info.mask    )) return false; }
768 #line 43 "hb-buffer-deserialize-json.rl"
769 	{
770 	buffer->add_info (info);
771 	if (unlikely (!buffer->successful))
772 	  return false;
773 	buffer->pos[buffer->len - 1] = pos;
774 	*end_ptr = p;
775 }
776 	break;
777 #line 735 "hb-buffer-deserialize-json.hh"
778 	}
779 
780 _again:
781 	if ( cs == 0 )
782 		goto _out;
783 	if ( ++p != pe )
784 		goto _resume;
785 	_test_eof: {}
786 	_out: {}
787 	}
788 
789 #line 139 "hb-buffer-deserialize-json.rl"
790 
791 
792   *end_ptr = p;
793 
794   return p == pe && *(p-1) != ']';
795 }
796 
797 #endif /* HB_BUFFER_DESERIALIZE_JSON_HH */
798