1 /* Generated by Nim Compiler v1.6.2 */
2 #define NIM_INTBITS 64
3 
4 #include "nimbase.h"
5 #include <string.h>
6 #undef LANGUAGE_C
7 #undef MIPSEB
8 #undef MIPSEL
9 #undef PPC
10 #undef R3000
11 #undef R4000
12 #undef i386
13 #undef linux
14 #undef mips
15 #undef near
16 #undef far
17 #undef powerpc
18 #undef unix
19 #define nimfr_(x, y)
20 #define nimln_(x, y)
21 typedef struct TNimType TNimType;
22 typedef struct TNimNode TNimNode;
23 typedef struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ;
24 typedef struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg;
25 typedef struct RootObj RootObj;
26 typedef struct NimStringDesc NimStringDesc;
27 typedef struct TGenericSeq TGenericSeq;
28 typedef struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ;
29 typedef struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q tySequence__Ih0V9cYug0VPJyBBGvgEH7Q;
30 typedef struct tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg;
31 typedef struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
32 typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
33 typedef struct Exception Exception;
34 typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
35 typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
36 typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
37 typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
38 typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
39 typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
40 typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
41 typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
42 typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
43 typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
44 typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
45 typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
46 typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
47 typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
48 typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
49 typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
50 typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
51 typedef struct tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g;
52 typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
53 typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
54 typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
55 typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
56 typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
57 struct TNimType {
58 NI size;
59 NI align;
60 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
61 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
62 TNimType* base;
63 TNimNode* node;
64 void* finalizer;
65 tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
66 tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
67 };
68 typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
69 struct TNimNode {
70 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
71 NI offset;
72 TNimType* typ;
73 NCSTRING name;
74 NI len;
75 TNimNode** sons;
76 };
77 struct RootObj {
78 TNimType* m_type;
79 };
80 struct TGenericSeq {
81 NI len;
82 NI reserved;
83 };
84 struct NimStringDesc {
85   TGenericSeq Sup;
86 NIM_CHAR data[SEQ_DECL_SIZE];
87 };
88 typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
89 struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg {
90   RootObj Sup;
91 NI bufpos;
92 NimStringDesc* buf;
93 tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input;
94 NI lineNumber;
95 NI sentinel;
96 NI lineStart;
97 NI offsetBase;
98 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars;
99 };
100 typedef NU8 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw;
101 typedef NU8 tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA;
102 typedef NU8 tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew;
103 struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ {
104   tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg Sup;
105 NimStringDesc* a;
106 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok;
107 tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA kind;
108 tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew err;
109 tySequence__Ih0V9cYug0VPJyBBGvgEH7Q* state;
110 NimStringDesc* filename;
111 NIM_BOOL rawStringLiterals;
112 };
113 typedef NU8 tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ;
114 struct Exception {
115   RootObj Sup;
116 Exception* parent;
117 NCSTRING name;
118 NimStringDesc* message;
119 tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
120 Exception* up;
121 };
122 struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
123   Exception Sup;
124 };
125 struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw {
126   tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup;
127 };
128 struct tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg {
129   tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw Sup;
130 };
131 typedef NimStringDesc* tyArray__sMpvt1sOxOJ3LFGulnbeMQ[4];
132 struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
133 NI refcount;
134 TNimType* typ;
135 };
136 struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
137 void* bottom;
138 };
139 struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
140 NI len;
141 NI cap;
142 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
143 };
144 typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
145 typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
146 typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
147 typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
148 typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
149 struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
150 tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
151 };
152 typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
153 struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
154 tyArray__0aOLqZchNi8nWtMTi8ND8w link;
155 NI key;
156 NI upperBound;
157 NI level;
158 };
159 struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
160 tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
161 NI Field1;
162 };
163 typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
164 struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
165 NI len;
166 tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
167 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
168 };
169 struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
170 NI minLargeObj;
171 NI maxLargeObj;
172 tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
173 NU32 flBitmap;
174 tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
175 tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
176 tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
177 NI currMem;
178 NI maxMem;
179 NI freeMem;
180 NI occ;
181 NI lastSize;
182 tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
183 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
184 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
185 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
186 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
187 NIM_BOOL locked;
188 NIM_BOOL blockChunkSizeIncrease;
189 NI nextChunkSize;
190 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
191 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
192 };
193 struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
194 NI stackScans;
195 NI cycleCollections;
196 NI maxThreshold;
197 NI maxStackSize;
198 NI maxStackCells;
199 NI cycleTableSize;
200 NI64 maxPause;
201 };
202 struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
203 NI counter;
204 NI max;
205 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
206 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
207 };
208 struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
209 tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
210 NI cycleThreshold;
211 NI zctThreshold;
212 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
213 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
214 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
215 NI recGcLock;
216 tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
217 tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
218 tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
219 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
220 NI gcThreadId;
221 };
222 struct tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g {
223   tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw Sup;
224 };
225 typedef NimStringDesc* tyArray__FkG8aLMyiZfDjueUwWl3WA[14];
226 struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
227 NCSTRING procname;
228 NI line;
229 NCSTRING filename;
230 };
231 struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q {
232   TGenericSeq Sup;
233   tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ data[SEQ_DECL_SIZE];
234 };
235 struct tySequence__uB9b75OUPRENsBAu4AnoePA {
236   TGenericSeq Sup;
237   tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
238 };
239 static N_NIMCALL(void, Marker_tySequence__Ih0V9cYug0VPJyBBGvgEH7Q)(void* p, NI op);
240 N_LIB_PRIVATE N_NIMCALL(void, open__pureZlexbase_122)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L, tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input, NI bufLen, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars);
241 N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
242 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
243 N_LIB_PRIVATE N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
244 N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, getTok__pureZparsejson_425)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
245 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
246 N_LIB_PRIVATE N_NIMCALL(void, skip__pureZparsejson_324)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
247 N_LIB_PRIVATE N_NIMCALL(NI, handleCR__pureZlexbase_79)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L, NI pos);
248 N_LIB_PRIVATE N_NIMCALL(NI, handleLF__pureZlexbase_90)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L, NI pos);
249 N_LIB_PRIVATE N_NIMCALL(void, parseNumber__pureZparsejson_355)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
250 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
251 static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
252 static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size);
253 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
254 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
255 N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_1635)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars);
256 N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, parseString__pureZparsejson_233)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
257 N_LIB_PRIVATE N_NIMCALL(NI, parseEscapedUTF16__pureZparsejson_220)(NCSTRING buf, NI* pos);
258 static N_INLINE(NIM_BOOL, handleHexChar__stdZprivateZdecode95helpers_1)(NIM_CHAR c, NI* x);
259 static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s);
260 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nuctoUTF8)(NI32 c);
261 N_LIB_PRIVATE N_NIMCALL(void, parseName__pureZparsejson_410)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
262 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
263 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
264 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
265 N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
266 static N_INLINE(tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ, pop__pureZparsejson_504)(tySequence__Ih0V9cYug0VPJyBBGvgEH7Q** s);
267 N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, setLengthSeqV2)(TGenericSeq* s, TNimType* typ, NI newLen);
268 N_LIB_PRIVATE N_NIMCALL(void, next__pureZparsejson_456)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
269 N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
270 static N_NIMCALL(void, Marker_tyRef__PyuSdojUZWOAnzN7dInq1Q)(void* p, NI op);
271 N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
272 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, errorMsgExpected__pureZparsejson_216)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, NimStringDesc* e);
273 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0);
274 static N_INLINE(void, nimZeroMem)(void* p, NI size);
275 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
276 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___systemZdollars_3)(NI x);
277 static N_INLINE(NI, getLine__pureZparsejson_200)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
278 static N_INLINE(NI, getColumn__pureZparsejson_188)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
279 N_LIB_PRIVATE N_NIMCALL(NI, getColNumber__pureZlexbase_137)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L, NI pos);
280 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
281 static N_INLINE(void, asgnRef)(void** dest, void* src);
282 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
283 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
284 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr);
285 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
286 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
287 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
288 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
289 N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5265)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
290 N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
291 static N_NIMCALL(void, Marker_tyRef__tn3kJ9cInprO2X2FSPir4WQ)(void* p, NI op);
292 N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__pureZparsejson_580)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NimStringDesc* msg) __attribute__((noreturn));
293 extern TNimType NTIbaselexer__MAw8rJZtJ279bVV3TWMtXSg_;
294 N_LIB_PRIVATE TNimType NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_;
295 extern TNimType NTIstring__77mFvmsOLKik79ci2hXkHEg_;
296 N_LIB_PRIVATE TNimType NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_;
297 N_LIB_PRIVATE TNimType NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_;
298 N_LIB_PRIVATE TNimType NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_;
299 N_LIB_PRIVATE TNimType NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_;
300 N_LIB_PRIVATE TNimType NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_;
301 extern TNimType NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_;
302 static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__nIinruGrC8EPIfjL3PuTvA_15 = {
303 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
305 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
306 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
307 ;
308 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_16, "0.", 2);
309 static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__nIinruGrC8EPIfjL3PuTvA_17 = {
310 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
311 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
313 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
314 ;
315 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_18, "null", 4);
316 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_19, "true", 4);
317 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_20, "false", 5);
318 extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
319 N_LIB_PRIVATE TNimType NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_;
320 N_LIB_PRIVATE TNimType NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_;
321 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_21, "$1($2, $3) Error: $4", 20);
322 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_22, " expected", 9);
323 N_LIB_PRIVATE TNimType NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_;
324 N_LIB_PRIVATE TNimType NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_;
325 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_23, "invalid token", 13);
326 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_24, "EOF", 3);
327 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_25, "string literal", 14);
328 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_26, "int literal", 11);
329 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_27, "float literal", 13);
330 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_28, "{", 1);
331 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_29, "}", 1);
332 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_30, "[", 1);
333 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_31, "]", 1);
334 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_32, ":", 1);
335 STRING_LITERAL(TM__nIinruGrC8EPIfjL3PuTvA_33, ",", 1);
336 N_LIB_PRIVATE NIM_CONST tyArray__FkG8aLMyiZfDjueUwWl3WA tokToStr__pureZparsejson_78 = {((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_23),
337 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_24),
338 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_25),
339 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_26),
340 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_27),
341 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_19),
342 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_20),
343 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_18),
344 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_28),
345 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_29),
346 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_30),
347 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_31),
348 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_32),
349 ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_33)}
350 ;
351 extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5218;
N_NIMCALL(void,Marker_tySequence__Ih0V9cYug0VPJyBBGvgEH7Q)352 static N_NIMCALL(void, Marker_tySequence__Ih0V9cYug0VPJyBBGvgEH7Q)(void* p, NI op) {
353 	tySequence__Ih0V9cYug0VPJyBBGvgEH7Q* a;
354 	NI T1_;
355 	a = (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*)p;
356 	T1_ = (NI)0;
357 }
N_NIMCALL(void,open__pureZparsejson_97)358 N_LIB_PRIVATE N_NIMCALL(void, open__pureZparsejson_97)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input, NimStringDesc* filename, NIM_BOOL rawStringLiterals) {
359 	open__pureZlexbase_122(&my->Sup, input, ((NI) 8192), TM__nIinruGrC8EPIfjL3PuTvA_15);
360 	unsureAsgnRef((void**) (&(*my).filename), copyString(filename));
361 	unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) newSeq((&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_), 1));
362 	(*my).state->data[0] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 1);
363 	(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
364 	unsureAsgnRef((void**) (&(*my).a), ((NimStringDesc*) NIM_NIL));
365 	(*my).rawStringLiterals = rawStringLiterals;
366 }
N_NIMCALL(void,skip__pureZparsejson_324)367 N_LIB_PRIVATE N_NIMCALL(void, skip__pureZparsejson_324)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
368 	NI pos;
369 	pos = (*my).Sup.bufpos;
370 	{
371 		while (1) {
372 			switch (((NU8)((*my).Sup.buf->data[pos]))) {
373 			case 47:
374 			{
375 				{
376 					if (!((NU8)((*my).Sup.buf->data[(NI)(pos + ((NI) 1))]) == (NU8)(47))) goto LA6_;
377 					pos += ((NI) 2);
378 					{
379 						while (1) {
380 							switch (((NU8)((*my).Sup.buf->data[pos]))) {
381 							case 0:
382 							{
383 								goto LA8;
384 							}
385 							break;
386 							case 13:
387 							{
388 								pos = handleCR__pureZlexbase_79(&my->Sup, pos);
389 								goto LA8;
390 							}
391 							break;
392 							case 10:
393 							{
394 								pos = handleLF__pureZlexbase_90(&my->Sup, pos);
395 								goto LA8;
396 							}
397 							break;
398 							default:
399 							{
400 								pos += ((NI) 1);
401 							}
402 							break;
403 							}
404 						}
405 					} LA8: ;
406 				}
407 				goto LA4_;
408 				LA6_: ;
409 				{
410 					if (!((NU8)((*my).Sup.buf->data[(NI)(pos + ((NI) 1))]) == (NU8)(42))) goto LA15_;
411 					pos += ((NI) 2);
412 					{
413 						while (1) {
414 							switch (((NU8)((*my).Sup.buf->data[pos]))) {
415 							case 0:
416 							{
417 								(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 8);
418 								goto LA17;
419 							}
420 							break;
421 							case 13:
422 							{
423 								pos = handleCR__pureZlexbase_79(&my->Sup, pos);
424 							}
425 							break;
426 							case 10:
427 							{
428 								pos = handleLF__pureZlexbase_90(&my->Sup, pos);
429 							}
430 							break;
431 							case 42:
432 							{
433 								pos += ((NI) 1);
434 								{
435 									if (!((NU8)((*my).Sup.buf->data[pos]) == (NU8)(47))) goto LA25_;
436 									pos += ((NI) 1);
437 									goto LA17;
438 								}
439 								LA25_: ;
440 							}
441 							break;
442 							default:
443 							{
444 								pos += ((NI) 1);
445 							}
446 							break;
447 							}
448 						}
449 					} LA17: ;
450 				}
451 				goto LA4_;
452 				LA15_: ;
453 				{
454 					goto LA1;
455 				}
456 				LA4_: ;
457 			}
458 			break;
459 			case 32:
460 			case 9:
461 			{
462 				pos += ((NI) 1);
463 			}
464 			break;
465 			case 13:
466 			{
467 				pos = handleCR__pureZlexbase_79(&my->Sup, pos);
468 			}
469 			break;
470 			case 10:
471 			{
472 				pos = handleLF__pureZlexbase_90(&my->Sup, pos);
473 			}
474 			break;
475 			default:
476 			{
477 				goto LA1;
478 			}
479 			break;
480 			}
481 		}
482 	} LA1: ;
483 	(*my).Sup.bufpos = pos;
484 }
N_INLINE(void,nimCopyMem)485 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
486 	void* T1_;
487 	T1_ = (void*)0;
488 	T1_ = memcpy(dest, source, ((size_t) (size)));
489 }
N_INLINE(void,copyMem__system_1727)490 static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size) {
491 	nimCopyMem(dest, source, size);
492 }
N_INLINE(void,appendString)493 static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
494 	{
495 		if (!!((src == ((NimStringDesc*) NIM_NIL)))) goto LA3_;
496 		copyMem__system_1727(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
497 		(*dest).Sup.len += (*src).Sup.len;
498 	}
499 	LA3_: ;
500 }
N_NIMCALL(void,parseNumber__pureZparsejson_355)501 N_LIB_PRIVATE N_NIMCALL(void, parseNumber__pureZparsejson_355)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
502 	NI pos;
503 	pos = (*my).Sup.bufpos;
504 	{
505 		if (!((NU8)((*my).Sup.buf->data[pos]) == (NU8)(45))) goto LA3_;
506 		unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 45));
507 		pos += ((NI) 1);
508 	}
509 	LA3_: ;
510 	{
511 		if (!((NU8)((*my).Sup.buf->data[pos]) == (NU8)(46))) goto LA7_;
512 		unsureAsgnRef((void**) (&(*my).a), resizeString((*my).a, 2));
513 appendString((*my).a, ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_16));
514 		pos += ((NI) 1);
515 	}
516 	goto LA5_;
517 	LA7_: ;
518 	{
519 		{
520 			while (1) {
521 				if (!(((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(48)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(57)))) goto LA11;
522 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
523 				pos += ((NI) 1);
524 			} LA11: ;
525 		}
526 		{
527 			if (!((NU8)((*my).Sup.buf->data[pos]) == (NU8)(46))) goto LA14_;
528 			unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 46));
529 			pos += ((NI) 1);
530 		}
531 		LA14_: ;
532 	}
533 	LA5_: ;
534 	{
535 		while (1) {
536 			if (!(((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(48)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(57)))) goto LA17;
537 			unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
538 			pos += ((NI) 1);
539 		} LA17: ;
540 	}
541 	{
542 		if (!(((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(69)) || ((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(101)))) goto LA20_;
543 		unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
544 		pos += ((NI) 1);
545 		{
546 			if (!(((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(43)) || ((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(45)))) goto LA24_;
547 			unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
548 			pos += ((NI) 1);
549 		}
550 		LA24_: ;
551 		{
552 			while (1) {
553 				if (!(((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(48)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(57)))) goto LA27;
554 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
555 				pos += ((NI) 1);
556 			} LA27: ;
557 		}
558 	}
559 	LA20_: ;
560 	(*my).Sup.bufpos = pos;
561 }
N_INLINE(NIM_BOOL,handleHexChar__stdZprivateZdecode95helpers_1)562 static N_INLINE(NIM_BOOL, handleHexChar__stdZprivateZdecode95helpers_1)(NIM_CHAR c, NI* x) {
563 	NIM_BOOL result;
564 	result = (NIM_BOOL)0;
565 	result = NIM_TRUE;
566 	switch (((NU8)(c))) {
567 	case 48 ... 57:
568 	{
569 		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((NI) 4))) | (NI)(((NU8)(c)) - ((NI) 48)));
570 	}
571 	break;
572 	case 97 ... 102:
573 	{
574 		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((NI) 4))) | (NI)((NI)(((NU8)(c)) - ((NI) 97)) + ((NI) 10)));
575 	}
576 	break;
577 	case 65 ... 70:
578 	{
579 		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((NI) 4))) | (NI)((NI)(((NU8)(c)) - ((NI) 65)) + ((NI) 10)));
580 	}
581 	break;
582 	default:
583 	{
584 		result = NIM_FALSE;
585 	}
586 	break;
587 	}
588 	return result;
589 }
N_NIMCALL(NI,parseEscapedUTF16__pureZparsejson_220)590 N_LIB_PRIVATE N_NIMCALL(NI, parseEscapedUTF16__pureZparsejson_220)(NCSTRING buf, NI* pos) {
591 	NI result;
592 {	result = (NI)0;
593 	result = ((NI) 0);
594 	{
595 		NI _;
596 		NI res;
597 		_ = (NI)0;
598 		res = ((NI) 0);
599 		{
600 			while (1) {
601 				if (!(res <= ((NI) 3))) goto LA3;
602 				_ = res;
603 				{
604 					NIM_BOOL T6_;
605 					T6_ = (NIM_BOOL)0;
606 					T6_ = handleHexChar__stdZprivateZdecode95helpers_1(buf[(*pos)], (&result));
607 					if (!T6_) goto LA7_;
608 					(*pos) += ((NI) 1);
609 				}
610 				goto LA4_;
611 				LA7_: ;
612 				{
613 					result = ((NI) -1);
614 					goto BeforeRet_;
615 				}
616 				LA4_: ;
617 				res += ((NI) 1);
618 			} LA3: ;
619 		}
620 	}
621 	}BeforeRet_: ;
622 	return result;
623 }
N_INLINE(NCSTRING,nimToCStringConv)624 static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) {
625 	NCSTRING result;
626 	result = (NCSTRING)0;
627 	{
628 		NIM_BOOL T3_;
629 		T3_ = (NIM_BOOL)0;
630 		T3_ = (s == ((NimStringDesc*) NIM_NIL));
631 		if (T3_) goto LA4_;
632 		T3_ = ((*s).Sup.len == ((NI) 0));
633 		LA4_: ;
634 		if (!T3_) goto LA5_;
635 		result = "";
636 	}
637 	goto LA1_;
638 	LA5_: ;
639 	{
640 		result = ((NCSTRING) ((*s).data));
641 	}
642 	LA1_: ;
643 	return result;
644 }
N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw,parseString__pureZparsejson_233)645 N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, parseString__pureZparsejson_233)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
646 	tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw result;
647 	NI pos;
648 	result = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
649 	result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2);
650 	pos = (NI)((*my).Sup.bufpos + ((NI) 1));
651 	{
652 		if (!(*my).rawStringLiterals) goto LA3_;
653 		unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 34));
654 	}
655 	LA3_: ;
656 	{
657 		while (1) {
658 			switch (((NU8)((*my).Sup.buf->data[pos]))) {
659 			case 0:
660 			{
661 				(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 7);
662 				result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 0);
663 				goto LA5;
664 			}
665 			break;
666 			case 34:
667 			{
668 				{
669 					if (!(*my).rawStringLiterals) goto LA11_;
670 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 34));
671 				}
672 				LA11_: ;
673 				pos += ((NI) 1);
674 				goto LA5;
675 			}
676 			break;
677 			case 92:
678 			{
679 				{
680 					if (!(*my).rawStringLiterals) goto LA16_;
681 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 92));
682 				}
683 				LA16_: ;
684 				switch (((NU8)((*my).Sup.buf->data[(NI)(pos + ((NI) 1))]))) {
685 				case 92:
686 				case 34:
687 				case 39:
688 				case 47:
689 				{
690 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[(NI)(pos + ((NI) 1))]));
691 					pos += ((NI) 2);
692 				}
693 				break;
694 				case 98:
695 				{
696 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 8));
697 					pos += ((NI) 2);
698 				}
699 				break;
700 				case 102:
701 				{
702 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 12));
703 					pos += ((NI) 2);
704 				}
705 				break;
706 				case 110:
707 				{
708 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 10));
709 					pos += ((NI) 2);
710 				}
711 				break;
712 				case 114:
713 				{
714 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 13));
715 					pos += ((NI) 2);
716 				}
717 				break;
718 				case 116:
719 				{
720 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 9));
721 					pos += ((NI) 2);
722 				}
723 				break;
724 				case 118:
725 				{
726 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 11));
727 					pos += ((NI) 2);
728 				}
729 				break;
730 				case 117:
731 				{
732 					NI pos2;
733 					NI r;
734 					{
735 						if (!(*my).rawStringLiterals) goto LA28_;
736 						unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 117));
737 					}
738 					LA28_: ;
739 					pos += ((NI) 2);
740 					pos2 = pos;
741 					r = parseEscapedUTF16__pureZparsejson_220(nimToCStringConv((*my).Sup.buf), (&pos));
742 					{
743 						if (!(r < ((NI) 0))) goto LA32_;
744 						(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 1);
745 						goto LA5;
746 					}
747 					LA32_: ;
748 					{
749 						NI s;
750 						if (!((NI)(r & ((NI) 64512)) == ((NI) 55296))) goto LA36_;
751 						{
752 							NIM_BOOL T40_;
753 							T40_ = (NIM_BOOL)0;
754 							T40_ = !(((NU8)((*my).Sup.buf->data[pos]) == (NU8)(92)));
755 							if (T40_) goto LA41_;
756 							T40_ = !(((NU8)((*my).Sup.buf->data[(NI)(pos + ((NI) 1))]) == (NU8)(117)));
757 							LA41_: ;
758 							if (!T40_) goto LA42_;
759 							(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 1);
760 							goto LA5;
761 						}
762 						LA42_: ;
763 						pos += ((NI) 2);
764 						s = parseEscapedUTF16__pureZparsejson_220(nimToCStringConv((*my).Sup.buf), (&pos));
765 						{
766 							NIM_BOOL T46_;
767 							T46_ = (NIM_BOOL)0;
768 							T46_ = ((NI)(s & ((NI) 64512)) == ((NI) 56320));
769 							if (!(T46_)) goto LA47_;
770 							T46_ = (((NI) 0) < s);
771 							LA47_: ;
772 							if (!T46_) goto LA48_;
773 							r = (NI)(((NI) 65536) + (NI)((NI)((NU64)((NI)(r - ((NI) 55296))) << (NU64)(((NI) 10))) | (NI)(s - ((NI) 56320))));
774 						}
775 						goto LA44_;
776 						LA48_: ;
777 						{
778 							(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 1);
779 							goto LA5;
780 						}
781 						LA44_: ;
782 					}
783 					LA36_: ;
784 					{
785 						NI length;
786 						if (!(*my).rawStringLiterals) goto LA53_;
787 						length = (NI)(pos - pos2);
788 						{
789 							NI i;
790 							NI res;
791 							i = (NI)0;
792 							res = ((NI) 1);
793 							{
794 								while (1) {
795 									if (!(res <= length)) goto LA57;
796 									i = res;
797 									{
798 										if (!(((NU8)((*my).Sup.buf->data[pos2])) >= ((NU8)(48)) && ((NU8)((*my).Sup.buf->data[pos2])) <= ((NU8)(57)) || ((NU8)((*my).Sup.buf->data[pos2])) >= ((NU8)(65)) && ((NU8)((*my).Sup.buf->data[pos2])) <= ((NU8)(70)) || ((NU8)((*my).Sup.buf->data[pos2])) >= ((NU8)(97)) && ((NU8)((*my).Sup.buf->data[pos2])) <= ((NU8)(102)))) goto LA60_;
799 										unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos2]));
800 										pos2 += ((NI) 1);
801 									}
802 									goto LA58_;
803 									LA60_: ;
804 									{
805 										goto LA55;
806 									}
807 									LA58_: ;
808 									res += ((NI) 1);
809 								} LA57: ;
810 							}
811 						} LA55: ;
812 					}
813 					goto LA51_;
814 					LA53_: ;
815 					{
816 						NimStringDesc* T64_;
817 						T64_ = NIM_NIL;
818 						T64_ = nuctoUTF8(((NI32) (r)));
819 						unsureAsgnRef((void**) (&(*my).a), resizeString((*my).a, (T64_ ? T64_->Sup.len : 0) + 0));
820 appendString((*my).a, T64_);
821 					}
822 					LA51_: ;
823 				}
824 				break;
825 				default:
826 				{
827 					unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
828 					pos += ((NI) 1);
829 				}
830 				break;
831 				}
832 			}
833 			break;
834 			case 13:
835 			{
836 				pos = handleCR__pureZlexbase_79(&my->Sup, pos);
837 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 13));
838 			}
839 			break;
840 			case 10:
841 			{
842 				pos = handleLF__pureZlexbase_90(&my->Sup, pos);
843 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, 10));
844 			}
845 			break;
846 			default:
847 			{
848 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
849 				pos += ((NI) 1);
850 			}
851 			break;
852 			}
853 		}
854 	} LA5: ;
855 	(*my).Sup.bufpos = pos;
856 	return result;
857 }
N_NIMCALL(void,parseName__pureZparsejson_410)858 N_LIB_PRIVATE N_NIMCALL(void, parseName__pureZparsejson_410)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
859 	NI pos;
860 	pos = (*my).Sup.bufpos;
861 	{
862 		if (!(((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(97)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(122)) || ((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(65)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(90)) || ((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(95)))) goto LA3_;
863 		{
864 			while (1) {
865 				if (!(((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(97)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(122)) || ((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(65)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(90)) || ((NU8)((*my).Sup.buf->data[pos])) >= ((NU8)(48)) && ((NU8)((*my).Sup.buf->data[pos])) <= ((NU8)(57)) || ((NU8)((*my).Sup.buf->data[pos])) == ((NU8)(95)))) goto LA6;
866 				unsureAsgnRef((void**) (&(*my).a), addChar((*my).a, (*my).Sup.buf->data[pos]));
867 				pos += ((NI) 1);
868 			} LA6: ;
869 		}
870 	}
871 	LA3_: ;
872 	(*my).Sup.bufpos = pos;
873 }
N_INLINE(int,nimCmpMem)874 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
875 	int result;
876 	result = (int)0;
877 	result = memcmp(a, b, ((size_t) (size)));
878 	return result;
879 }
N_INLINE(NIM_BOOL,equalMem__system_1735)880 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
881 	NIM_BOOL result;
882 	int T1_;
883 	result = (NIM_BOOL)0;
884 	T1_ = (int)0;
885 	T1_ = nimCmpMem(a, b, size);
886 	result = (T1_ == ((NI32) 0));
887 	return result;
888 }
N_INLINE(NIM_BOOL,eqStrings)889 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
890 	NIM_BOOL result;
891 	NI alen;
892 	NI blen;
893 {	result = (NIM_BOOL)0;
894 	alen = (a ? a->Sup.len : 0);
895 	blen = (b ? b->Sup.len : 0);
896 	{
897 		if (!(alen == blen)) goto LA3_;
898 		{
899 			if (!(alen == ((NI) 0))) goto LA7_;
900 			result = NIM_TRUE;
901 			goto BeforeRet_;
902 		}
903 		LA7_: ;
904 		result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
905 		goto BeforeRet_;
906 	}
907 	LA3_: ;
908 	}BeforeRet_: ;
909 	return result;
910 }
N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw,getTok__pureZparsejson_425)911 N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, getTok__pureZparsejson_425)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
912 	tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw result;
913 	result = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
914 	unsureAsgnRef((void**) (&(*my).a), setLengthStr((*my).a, ((NI) 0)));
915 	skip__pureZparsejson_324(my);
916 	switch (((NU8)((*my).Sup.buf->data[(*my).Sup.bufpos]))) {
917 	case 45:
918 	case 46:
919 	case 48 ... 57:
920 	{
921 		parseNumber__pureZparsejson_355(my);
922 		{
923 			NIM_BOOL T4_;
924 			T4_ = (NIM_BOOL)0;
925 			T4_ = contains__pureZstrutils_1635((*my).a, TM__nIinruGrC8EPIfjL3PuTvA_17);
926 			if (!T4_) goto LA5_;
927 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4);
928 		}
929 		goto LA2_;
930 		LA5_: ;
931 		{
932 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3);
933 		}
934 		LA2_: ;
935 	}
936 	break;
937 	case 34:
938 	{
939 		result = parseString__pureZparsejson_233(my);
940 	}
941 	break;
942 	case 91:
943 	{
944 		(*my).Sup.bufpos += ((NI) 1);
945 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10);
946 	}
947 	break;
948 	case 123:
949 	{
950 		(*my).Sup.bufpos += ((NI) 1);
951 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8);
952 	}
953 	break;
954 	case 93:
955 	{
956 		(*my).Sup.bufpos += ((NI) 1);
957 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11);
958 	}
959 	break;
960 	case 125:
961 	{
962 		(*my).Sup.bufpos += ((NI) 1);
963 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9);
964 	}
965 	break;
966 	case 44:
967 	{
968 		(*my).Sup.bufpos += ((NI) 1);
969 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13);
970 	}
971 	break;
972 	case 58:
973 	{
974 		(*my).Sup.bufpos += ((NI) 1);
975 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12);
976 	}
977 	break;
978 	case 0:
979 	{
980 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1);
981 	}
982 	break;
983 	case 97 ... 122:
984 	case 65 ... 90:
985 	case 95:
986 	{
987 		parseName__pureZparsejson_410(my);
988 		if (eqStrings((*my).a, ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_18))) goto LA17_;
989 		if (eqStrings((*my).a, ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_19))) goto LA18_;
990 		if (eqStrings((*my).a, ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_20))) goto LA19_;
991 		goto LA20_;
992 		LA17_: ;
993 		{
994 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7);
995 		}
996 		goto LA21_;
997 		LA18_: ;
998 		{
999 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5);
1000 		}
1001 		goto LA21_;
1002 		LA19_: ;
1003 		{
1004 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6);
1005 		}
1006 		goto LA21_;
1007 		LA20_: ;
1008 		{
1009 			result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 0);
1010 		}
1011 		LA21_: ;
1012 	}
1013 	break;
1014 	default:
1015 	{
1016 		(*my).Sup.bufpos += ((NI) 1);
1017 		result = ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 0);
1018 	}
1019 	break;
1020 	}
1021 	(*my).tok = result;
1022 	return result;
1023 }
N_INLINE(tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ,pop__pureZparsejson_504)1024 static N_INLINE(tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ, pop__pureZparsejson_504)(tySequence__Ih0V9cYug0VPJyBBGvgEH7Q** s) {
1025 	tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ result;
1026 	NI L;
1027 	NI T1_;
1028 	result = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1029 	T1_ = ((*s) ? (*s)->Sup.len : 0);
1030 	L = (NI)(T1_ - ((NI) 1));
1031 	result = (*s)->data[L];
1032 	unsureAsgnRef((void**) (&(*s)), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) setLengthSeqV2(&((*s))->Sup, (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_), ((NI) (L))));
1033 	return result;
1034 }
N_NIMCALL(void,next__pureZparsejson_456)1035 N_LIB_PRIVATE N_NIMCALL(void, next__pureZparsejson_456)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
1036 	tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tk;
1037 	NI i;
1038 	NI T1_;
1039 	tk = getTok__pureZparsejson_425(my);
1040 	T1_ = ((*my).state ? (*my).state->Sup.len : 0);
1041 	i = (NI)(T1_ - ((NI) 1));
1042 	switch ((*my).state->data[i]) {
1043 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 0):
1044 	{
1045 		{
1046 			if (!(tk == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1))) goto LA5_;
1047 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 1);
1048 		}
1049 		goto LA3_;
1050 		LA5_: ;
1051 		{
1052 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1053 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 9);
1054 		}
1055 		LA3_: ;
1056 	}
1057 	break;
1058 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 1):
1059 	{
1060 		switch (tk) {
1061 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
1062 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
1063 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
1064 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
1065 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
1066 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
1067 		{
1068 			(*my).state->data[i] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 0);
1069 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) (tk));
1070 		}
1071 		break;
1072 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
1073 		{
1074 			NI T11_;
1075 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1076 			T11_ = (*my).state->Sup.len++;
1077 			(*my).state->data[T11_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 3);
1078 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 10);
1079 		}
1080 		break;
1081 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
1082 		{
1083 			NI T13_;
1084 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1085 			T13_ = (*my).state->Sup.len++;
1086 			(*my).state->data[T13_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 2);
1087 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 8);
1088 		}
1089 		break;
1090 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1):
1091 		{
1092 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 1);
1093 		}
1094 		break;
1095 		default:
1096 		{
1097 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1098 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 9);
1099 		}
1100 		break;
1101 		}
1102 	}
1103 	break;
1104 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 2):
1105 	{
1106 		switch (tk) {
1107 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
1108 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
1109 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
1110 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
1111 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
1112 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
1113 		{
1114 			NI T18_;
1115 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1116 			T18_ = (*my).state->Sup.len++;
1117 			(*my).state->data[T18_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 6);
1118 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) (tk));
1119 		}
1120 		break;
1121 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
1122 		{
1123 			NI T20_;
1124 			NI T21_;
1125 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1126 			T20_ = (*my).state->Sup.len++;
1127 			(*my).state->data[T20_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 6);
1128 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1129 			T21_ = (*my).state->Sup.len++;
1130 			(*my).state->data[T21_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 3);
1131 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 10);
1132 		}
1133 		break;
1134 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
1135 		{
1136 			NI T23_;
1137 			NI T24_;
1138 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1139 			T23_ = (*my).state->Sup.len++;
1140 			(*my).state->data[T23_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 6);
1141 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1142 			T24_ = (*my).state->Sup.len++;
1143 			(*my).state->data[T24_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 2);
1144 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 8);
1145 		}
1146 		break;
1147 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9):
1148 		{
1149 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T26_;
1150 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 9);
1151 			T26_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1152 			T26_ = pop__pureZparsejson_504((&(*my).state));
1153 			(void)(T26_);
1154 		}
1155 		break;
1156 		default:
1157 		{
1158 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1159 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 6);
1160 		}
1161 		break;
1162 		}
1163 	}
1164 	break;
1165 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 3):
1166 	{
1167 		switch (tk) {
1168 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
1169 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
1170 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
1171 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
1172 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
1173 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
1174 		{
1175 			NI T30_;
1176 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1177 			T30_ = (*my).state->Sup.len++;
1178 			(*my).state->data[T30_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 4);
1179 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) (tk));
1180 		}
1181 		break;
1182 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
1183 		{
1184 			NI T32_;
1185 			NI T33_;
1186 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1187 			T32_ = (*my).state->Sup.len++;
1188 			(*my).state->data[T32_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 4);
1189 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1190 			T33_ = (*my).state->Sup.len++;
1191 			(*my).state->data[T33_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 3);
1192 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 10);
1193 		}
1194 		break;
1195 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
1196 		{
1197 			NI T35_;
1198 			NI T36_;
1199 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1200 			T35_ = (*my).state->Sup.len++;
1201 			(*my).state->data[T35_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 4);
1202 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1203 			T36_ = (*my).state->Sup.len++;
1204 			(*my).state->data[T36_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 2);
1205 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 8);
1206 		}
1207 		break;
1208 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11):
1209 		{
1210 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T38_;
1211 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 11);
1212 			T38_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1213 			T38_ = pop__pureZparsejson_504((&(*my).state));
1214 			(void)(T38_);
1215 		}
1216 		break;
1217 		default:
1218 		{
1219 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1220 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 5);
1221 		}
1222 		break;
1223 		}
1224 	}
1225 	break;
1226 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 4):
1227 	{
1228 		switch (tk) {
1229 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13):
1230 		{
1231 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T42_;
1232 			T42_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1233 			T42_ = pop__pureZparsejson_504((&(*my).state));
1234 			(void)(T42_);
1235 			next__pureZparsejson_456(my);
1236 		}
1237 		break;
1238 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11):
1239 		{
1240 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T44_;
1241 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T45_;
1242 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 11);
1243 			T44_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1244 			T44_ = pop__pureZparsejson_504((&(*my).state));
1245 			(void)(T44_);
1246 			T45_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1247 			T45_ = pop__pureZparsejson_504((&(*my).state));
1248 			(void)(T45_);
1249 		}
1250 		break;
1251 		default:
1252 		{
1253 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1254 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 5);
1255 		}
1256 		break;
1257 		}
1258 	}
1259 	break;
1260 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 5):
1261 	{
1262 		switch (tk) {
1263 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13):
1264 		{
1265 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T49_;
1266 			T49_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1267 			T49_ = pop__pureZparsejson_504((&(*my).state));
1268 			(void)(T49_);
1269 			next__pureZparsejson_456(my);
1270 		}
1271 		break;
1272 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9):
1273 		{
1274 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T51_;
1275 			tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ T52_;
1276 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 9);
1277 			T51_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1278 			T51_ = pop__pureZparsejson_504((&(*my).state));
1279 			(void)(T51_);
1280 			T52_ = (tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ)0;
1281 			T52_ = pop__pureZparsejson_504((&(*my).state));
1282 			(void)(T52_);
1283 		}
1284 		break;
1285 		default:
1286 		{
1287 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1288 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 6);
1289 		}
1290 		break;
1291 		}
1292 	}
1293 	break;
1294 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 6):
1295 	{
1296 		switch (tk) {
1297 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12):
1298 		{
1299 			(*my).state->data[i] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 7);
1300 			next__pureZparsejson_456(my);
1301 		}
1302 		break;
1303 		default:
1304 		{
1305 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1306 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 3);
1307 		}
1308 		break;
1309 		}
1310 	}
1311 	break;
1312 	case ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 7):
1313 	{
1314 		switch (tk) {
1315 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
1316 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
1317 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
1318 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
1319 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
1320 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
1321 		{
1322 			(*my).state->data[i] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 5);
1323 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) (tk));
1324 		}
1325 		break;
1326 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
1327 		{
1328 			NI T60_;
1329 			(*my).state->data[i] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 5);
1330 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1331 			T60_ = (*my).state->Sup.len++;
1332 			(*my).state->data[T60_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 3);
1333 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 10);
1334 		}
1335 		break;
1336 		case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
1337 		{
1338 			NI T62_;
1339 			(*my).state->data[i] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 5);
1340 			unsureAsgnRef((void**) (&(*my).state), (tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*) incrSeqV3((TGenericSeq*)((*my).state), (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_)));
1341 			T62_ = (*my).state->Sup.len++;
1342 			(*my).state->data[T62_] = ((tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ) 2);
1343 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 8);
1344 		}
1345 		break;
1346 		default:
1347 		{
1348 			(*my).kind = ((tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA) 0);
1349 			(*my).err = ((tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew) 10);
1350 		}
1351 		break;
1352 		}
1353 	}
1354 	break;
1355 	}
1356 }
N_NIMCALL(void,Marker_tyRef__PyuSdojUZWOAnzN7dInq1Q)1357 static N_NIMCALL(void, Marker_tyRef__PyuSdojUZWOAnzN7dInq1Q)(void* p, NI op) {
1358 	tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg* a;
1359 	a = (tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg*)p;
1360 	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
1361 	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
1362 	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
1363 	nimGCvisit((void*)(*a).Sup.Sup.Sup.up, op);
1364 }
N_INLINE(void,nimSetMem__systemZmemory_7)1365 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
1366 	void* T1_;
1367 	T1_ = (void*)0;
1368 	T1_ = memset(a, v, ((size_t) (size)));
1369 }
N_INLINE(void,nimZeroMem)1370 static N_INLINE(void, nimZeroMem)(void* p, NI size) {
1371 	nimSetMem__systemZmemory_7(p, ((int) 0), size);
1372 }
N_INLINE(NI,getLine__pureZparsejson_200)1373 static N_INLINE(NI, getLine__pureZparsejson_200)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
1374 	NI result;
1375 	result = (NI)0;
1376 	result = (*my).Sup.lineNumber;
1377 	return result;
1378 }
N_INLINE(NI,getColumn__pureZparsejson_188)1379 static N_INLINE(NI, getColumn__pureZparsejson_188)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
1380 	NI result;
1381 	result = (NI)0;
1382 	result = getColNumber__pureZlexbase_137((&(*my).Sup), (*my).Sup.bufpos);
1383 	return result;
1384 }
N_NIMCALL(NimStringDesc *,errorMsgExpected__pureZparsejson_216)1385 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, errorMsgExpected__pureZparsejson_216)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, NimStringDesc* e) {
1386 	NimStringDesc* result;
1387 	tyArray__sMpvt1sOxOJ3LFGulnbeMQ T1_;
1388 	NI T2_;
1389 	NI T3_;
1390 	NimStringDesc* T4_;
1391 	result = NIM_NIL;
1392 	nimZeroMem((void*)T1_, sizeof(tyArray__sMpvt1sOxOJ3LFGulnbeMQ));
1393 	T1_[0] = copyString((*my).filename);
1394 	T2_ = (NI)0;
1395 	T2_ = getLine__pureZparsejson_200(my);
1396 	T1_[1] = dollar___systemZdollars_3(T2_);
1397 	T3_ = (NI)0;
1398 	T3_ = getColumn__pureZparsejson_188(my);
1399 	T1_[2] = dollar___systemZdollars_3(T3_);
1400 	T4_ = NIM_NIL;
1401 	T4_ = rawNewString((e ? e->Sup.len : 0) + 9);
1402 appendString(T4_, e);
1403 appendString(T4_, ((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_22));
1404 	T1_[3] = T4_;
1405 	result = nsuFormatOpenArray(((NimStringDesc*) &TM__nIinruGrC8EPIfjL3PuTvA_21), T1_, 4);
1406 	return result;
1407 }
N_INLINE(NI,pluspercent___system_696)1408 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
1409 	NI result;
1410 	result = (NI)0;
1411 	result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
1412 	return result;
1413 }
N_INLINE(void,incRef__system_5309)1414 static N_INLINE(void, incRef__system_5309)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1415 	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
1416 }
N_INLINE(NI,minuspercent___system_716)1417 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
1418 	NI result;
1419 	result = (NI)0;
1420 	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
1421 	return result;
1422 }
N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g *,usrToCell__system_5271)1423 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5271)(void* usr) {
1424 	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
1425 	NI T1_;
1426 	result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1427 	T1_ = (NI)0;
1428 	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
1429 	result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
1430 	return result;
1431 }
N_INLINE(NIM_BOOL,ltpercent___system_1005)1432 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
1433 	NIM_BOOL result;
1434 	result = (NIM_BOOL)0;
1435 	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
1436 	return result;
1437 }
N_INLINE(void,rtlAddZCT__system_5314)1438 static N_INLINE(void, rtlAddZCT__system_5314)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1439 	addZCT__system_5265((&gch__system_5218.zct), c);
1440 }
N_INLINE(void,decRef__system_5316)1441 static N_INLINE(void, decRef__system_5316)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
1442 	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
1443 	{
1444 		NIM_BOOL T3_;
1445 		T3_ = (NIM_BOOL)0;
1446 		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
1447 		if (!T3_) goto LA4_;
1448 		rtlAddZCT__system_5314(c);
1449 	}
1450 	LA4_: ;
1451 }
N_INLINE(void,asgnRef)1452 static N_INLINE(void, asgnRef)(void** dest, void* src) {
1453 	{
1454 		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
1455 		if (!!((src == NIM_NIL))) goto LA3_;
1456 		T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1457 		T5_ = usrToCell__system_5271(src);
1458 		incRef__system_5309(T5_);
1459 	}
1460 	LA3_: ;
1461 	{
1462 		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
1463 		if (!!(((*dest) == NIM_NIL))) goto LA8_;
1464 		T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
1465 		T10_ = usrToCell__system_5271((*dest));
1466 		decRef__system_5316(T10_);
1467 	}
1468 	LA8_: ;
1469 	(*dest) = src;
1470 }
N_NOINLINE(void,raiseParseErr__pureZparsejson_580)1471 N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__pureZparsejson_580)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NimStringDesc* msg) {
1472 	tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg* T1_;
1473 	T1_ = NIM_NIL;
1474 	T1_ = (tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg*) newObj((&NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_), sizeof(tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg));
1475 	(*T1_).Sup.Sup.Sup.Sup.m_type = (&NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_);
1476 	(*T1_).Sup.Sup.Sup.name = "JsonParsingError";
1477 	asgnRef((void**) (&(*T1_).Sup.Sup.Sup.message), errorMsgExpected__pureZparsejson_216(p, msg));
1478 	asgnRef((void**) (&(*T1_).Sup.Sup.Sup.parent), ((Exception*) NIM_NIL));
1479 	raiseExceptionEx((Exception*)T1_, "JsonParsingError", "raiseParseErr", "parsejson.nim", 515);
1480 }
N_NIMCALL(void,Marker_tyRef__tn3kJ9cInprO2X2FSPir4WQ)1481 static N_NIMCALL(void, Marker_tyRef__tn3kJ9cInprO2X2FSPir4WQ)(void* p, NI op) {
1482 	tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g* a;
1483 	a = (tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g*)p;
1484 	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
1485 	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
1486 	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
1487 	nimGCvisit((void*)(*a).Sup.Sup.Sup.up, op);
1488 }
N_NIMCALL(void,eat__pureZparsejson_602)1489 N_LIB_PRIVATE N_NIMCALL(void, eat__pureZparsejson_602)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok) {
1490 	{
1491 		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T5_;
1492 		if (!((*p).tok == tok)) goto LA3_;
1493 		T5_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
1494 		T5_ = getTok__pureZparsejson_425(p);
1495 		(void)(T5_);
1496 	}
1497 	goto LA1_;
1498 	LA3_: ;
1499 	{
1500 		raiseParseErr__pureZparsejson_580((&(*p)), tokToStr__pureZparsejson_78[(tok)- 0]);
1501 	}
1502 	LA1_: ;
1503 }
N_NIMCALL(void,stdlib_parsejsonDatInit000)1504 N_LIB_PRIVATE N_NIMCALL(void, stdlib_parsejsonDatInit000)(void) {
1505 static TNimNode* TM__nIinruGrC8EPIfjL3PuTvA_2_7[7];
1506 static TNimNode* TM__nIinruGrC8EPIfjL3PuTvA_3_14[14];
1507 NI TM__nIinruGrC8EPIfjL3PuTvA_5;
1508 static char* NIM_CONST TM__nIinruGrC8EPIfjL3PuTvA_4[14] = {
1509 "tkError",
1510 "tkEof",
1511 "tkString",
1512 "tkInt",
1513 "tkFloat",
1514 "tkTrue",
1515 "tkFalse",
1516 "tkNull",
1517 "tkCurlyLe",
1518 "tkCurlyRi",
1519 "tkBracketLe",
1520 "tkBracketRi",
1521 "tkColon",
1522 "tkComma"};
1523 static TNimNode* TM__nIinruGrC8EPIfjL3PuTvA_6_12[12];
1524 NI TM__nIinruGrC8EPIfjL3PuTvA_8;
1525 static char* NIM_CONST TM__nIinruGrC8EPIfjL3PuTvA_7[12] = {
1526 "jsonError",
1527 "jsonEof",
1528 "jsonString",
1529 "jsonInt",
1530 "jsonFloat",
1531 "jsonTrue",
1532 "jsonFalse",
1533 "jsonNull",
1534 "jsonObjectStart",
1535 "jsonObjectEnd",
1536 "jsonArrayStart",
1537 "jsonArrayEnd"};
1538 static TNimNode* TM__nIinruGrC8EPIfjL3PuTvA_9_11[11];
1539 NI TM__nIinruGrC8EPIfjL3PuTvA_11;
1540 static char* NIM_CONST TM__nIinruGrC8EPIfjL3PuTvA_10[11] = {
1541 "errNone",
1542 "errInvalidToken",
1543 "errStringExpected",
1544 "errColonExpected",
1545 "errCommaExpected",
1546 "errBracketRiExpected",
1547 "errCurlyRiExpected",
1548 "errQuoteExpected",
1549 "errEOC_Expected",
1550 "errEofExpected",
1551 "errExprExpected"};
1552 static TNimNode* TM__nIinruGrC8EPIfjL3PuTvA_12_8[8];
1553 NI TM__nIinruGrC8EPIfjL3PuTvA_14;
1554 static char* NIM_CONST TM__nIinruGrC8EPIfjL3PuTvA_13[8] = {
1555 "stateEof",
1556 "stateStart",
1557 "stateObject",
1558 "stateArray",
1559 "stateExpectArrayComma",
1560 "stateExpectObjectComma",
1561 "stateExpectColon",
1562 "stateExpectValue"};
1563 static TNimNode TM__nIinruGrC8EPIfjL3PuTvA_0[59];
1564 NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_.size = sizeof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ);
1565 NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_.align = NIM_ALIGNOF(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ);
1566 NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_.kind = 17;
1567 NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_.base = (&NTIbaselexer__MAw8rJZtJ279bVV3TWMtXSg_);
1568 TM__nIinruGrC8EPIfjL3PuTvA_2_7[0] = &TM__nIinruGrC8EPIfjL3PuTvA_0[1];
1569 TM__nIinruGrC8EPIfjL3PuTvA_0[1].kind = 1;
1570 TM__nIinruGrC8EPIfjL3PuTvA_0[1].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, a);
1571 TM__nIinruGrC8EPIfjL3PuTvA_0[1].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
1572 TM__nIinruGrC8EPIfjL3PuTvA_0[1].name = "a";
1573 TM__nIinruGrC8EPIfjL3PuTvA_2_7[1] = &TM__nIinruGrC8EPIfjL3PuTvA_0[2];
1574 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.size = sizeof(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw);
1575 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.align = NIM_ALIGNOF(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw);
1576 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.kind = 14;
1577 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.base = 0;
1578 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.flags = 3;
1579 for (TM__nIinruGrC8EPIfjL3PuTvA_5 = 0; TM__nIinruGrC8EPIfjL3PuTvA_5 < 14; TM__nIinruGrC8EPIfjL3PuTvA_5++) {
1580 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_5+3].kind = 1;
1581 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_5+3].offset = TM__nIinruGrC8EPIfjL3PuTvA_5;
1582 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_5+3].name = TM__nIinruGrC8EPIfjL3PuTvA_4[TM__nIinruGrC8EPIfjL3PuTvA_5];
1583 TM__nIinruGrC8EPIfjL3PuTvA_3_14[TM__nIinruGrC8EPIfjL3PuTvA_5] = &TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_5+3];
1584 }
1585 TM__nIinruGrC8EPIfjL3PuTvA_0[17].len = 14; TM__nIinruGrC8EPIfjL3PuTvA_0[17].kind = 2; TM__nIinruGrC8EPIfjL3PuTvA_0[17].sons = &TM__nIinruGrC8EPIfjL3PuTvA_3_14[0];
1586 NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[17];
1587 TM__nIinruGrC8EPIfjL3PuTvA_0[2].kind = 1;
1588 TM__nIinruGrC8EPIfjL3PuTvA_0[2].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, tok);
1589 TM__nIinruGrC8EPIfjL3PuTvA_0[2].typ = (&NTItokkind__Q9c4KaNqJU4PbXaGht0C7iw_);
1590 TM__nIinruGrC8EPIfjL3PuTvA_0[2].name = "tok";
1591 TM__nIinruGrC8EPIfjL3PuTvA_2_7[2] = &TM__nIinruGrC8EPIfjL3PuTvA_0[18];
1592 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.size = sizeof(tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA);
1593 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.align = NIM_ALIGNOF(tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA);
1594 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.kind = 14;
1595 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.base = 0;
1596 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.flags = 3;
1597 for (TM__nIinruGrC8EPIfjL3PuTvA_8 = 0; TM__nIinruGrC8EPIfjL3PuTvA_8 < 12; TM__nIinruGrC8EPIfjL3PuTvA_8++) {
1598 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_8+19].kind = 1;
1599 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_8+19].offset = TM__nIinruGrC8EPIfjL3PuTvA_8;
1600 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_8+19].name = TM__nIinruGrC8EPIfjL3PuTvA_7[TM__nIinruGrC8EPIfjL3PuTvA_8];
1601 TM__nIinruGrC8EPIfjL3PuTvA_6_12[TM__nIinruGrC8EPIfjL3PuTvA_8] = &TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_8+19];
1602 }
1603 TM__nIinruGrC8EPIfjL3PuTvA_0[31].len = 12; TM__nIinruGrC8EPIfjL3PuTvA_0[31].kind = 2; TM__nIinruGrC8EPIfjL3PuTvA_0[31].sons = &TM__nIinruGrC8EPIfjL3PuTvA_6_12[0];
1604 NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[31];
1605 TM__nIinruGrC8EPIfjL3PuTvA_0[18].kind = 1;
1606 TM__nIinruGrC8EPIfjL3PuTvA_0[18].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, kind);
1607 TM__nIinruGrC8EPIfjL3PuTvA_0[18].typ = (&NTIjsoneventkind__0zjE9c54eTrq224F5wMcaFA_);
1608 TM__nIinruGrC8EPIfjL3PuTvA_0[18].name = "kind";
1609 TM__nIinruGrC8EPIfjL3PuTvA_2_7[3] = &TM__nIinruGrC8EPIfjL3PuTvA_0[32];
1610 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.size = sizeof(tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew);
1611 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.align = NIM_ALIGNOF(tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew);
1612 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.kind = 14;
1613 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.base = 0;
1614 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.flags = 3;
1615 for (TM__nIinruGrC8EPIfjL3PuTvA_11 = 0; TM__nIinruGrC8EPIfjL3PuTvA_11 < 11; TM__nIinruGrC8EPIfjL3PuTvA_11++) {
1616 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_11+33].kind = 1;
1617 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_11+33].offset = TM__nIinruGrC8EPIfjL3PuTvA_11;
1618 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_11+33].name = TM__nIinruGrC8EPIfjL3PuTvA_10[TM__nIinruGrC8EPIfjL3PuTvA_11];
1619 TM__nIinruGrC8EPIfjL3PuTvA_9_11[TM__nIinruGrC8EPIfjL3PuTvA_11] = &TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_11+33];
1620 }
1621 TM__nIinruGrC8EPIfjL3PuTvA_0[44].len = 11; TM__nIinruGrC8EPIfjL3PuTvA_0[44].kind = 2; TM__nIinruGrC8EPIfjL3PuTvA_0[44].sons = &TM__nIinruGrC8EPIfjL3PuTvA_9_11[0];
1622 NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[44];
1623 TM__nIinruGrC8EPIfjL3PuTvA_0[32].kind = 1;
1624 TM__nIinruGrC8EPIfjL3PuTvA_0[32].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, err);
1625 TM__nIinruGrC8EPIfjL3PuTvA_0[32].typ = (&NTIjsonerror__G9cw5MrJXJrcpID5JXaplew_);
1626 TM__nIinruGrC8EPIfjL3PuTvA_0[32].name = "err";
1627 TM__nIinruGrC8EPIfjL3PuTvA_2_7[4] = &TM__nIinruGrC8EPIfjL3PuTvA_0[45];
1628 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.size = sizeof(tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ);
1629 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.align = NIM_ALIGNOF(tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ);
1630 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.kind = 14;
1631 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.base = 0;
1632 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.flags = 3;
1633 for (TM__nIinruGrC8EPIfjL3PuTvA_14 = 0; TM__nIinruGrC8EPIfjL3PuTvA_14 < 8; TM__nIinruGrC8EPIfjL3PuTvA_14++) {
1634 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_14+46].kind = 1;
1635 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_14+46].offset = TM__nIinruGrC8EPIfjL3PuTvA_14;
1636 TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_14+46].name = TM__nIinruGrC8EPIfjL3PuTvA_13[TM__nIinruGrC8EPIfjL3PuTvA_14];
1637 TM__nIinruGrC8EPIfjL3PuTvA_12_8[TM__nIinruGrC8EPIfjL3PuTvA_14] = &TM__nIinruGrC8EPIfjL3PuTvA_0[TM__nIinruGrC8EPIfjL3PuTvA_14+46];
1638 }
1639 TM__nIinruGrC8EPIfjL3PuTvA_0[54].len = 8; TM__nIinruGrC8EPIfjL3PuTvA_0[54].kind = 2; TM__nIinruGrC8EPIfjL3PuTvA_0[54].sons = &TM__nIinruGrC8EPIfjL3PuTvA_12_8[0];
1640 NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[54];
1641 NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_.size = sizeof(tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*);
1642 NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_.align = NIM_ALIGNOF(tySequence__Ih0V9cYug0VPJyBBGvgEH7Q*);
1643 NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_.kind = 24;
1644 NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_.base = (&NTIparserstate__Na0rM2Zdr3RpxeNeXbvLrQ_);
1645 NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_.marker = Marker_tySequence__Ih0V9cYug0VPJyBBGvgEH7Q;
1646 TM__nIinruGrC8EPIfjL3PuTvA_0[45].kind = 1;
1647 TM__nIinruGrC8EPIfjL3PuTvA_0[45].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, state);
1648 TM__nIinruGrC8EPIfjL3PuTvA_0[45].typ = (&NTIseqLparserstateT__Ih0V9cYug0VPJyBBGvgEH7Q_);
1649 TM__nIinruGrC8EPIfjL3PuTvA_0[45].name = "state";
1650 TM__nIinruGrC8EPIfjL3PuTvA_2_7[5] = &TM__nIinruGrC8EPIfjL3PuTvA_0[55];
1651 TM__nIinruGrC8EPIfjL3PuTvA_0[55].kind = 1;
1652 TM__nIinruGrC8EPIfjL3PuTvA_0[55].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, filename);
1653 TM__nIinruGrC8EPIfjL3PuTvA_0[55].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
1654 TM__nIinruGrC8EPIfjL3PuTvA_0[55].name = "filename";
1655 TM__nIinruGrC8EPIfjL3PuTvA_2_7[6] = &TM__nIinruGrC8EPIfjL3PuTvA_0[56];
1656 TM__nIinruGrC8EPIfjL3PuTvA_0[56].kind = 1;
1657 TM__nIinruGrC8EPIfjL3PuTvA_0[56].offset = offsetof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ, rawStringLiterals);
1658 TM__nIinruGrC8EPIfjL3PuTvA_0[56].typ = (&NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_);
1659 TM__nIinruGrC8EPIfjL3PuTvA_0[56].name = "rawStringLiterals";
1660 TM__nIinruGrC8EPIfjL3PuTvA_0[0].len = 7; TM__nIinruGrC8EPIfjL3PuTvA_0[0].kind = 2; TM__nIinruGrC8EPIfjL3PuTvA_0[0].sons = &TM__nIinruGrC8EPIfjL3PuTvA_2_7[0];
1661 NTIjsonparser__KWIQnzXEOUqdWsnCUL9atyQ_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[0];
1662 NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_.size = sizeof(tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg);
1663 NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_.align = NIM_ALIGNOF(tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg);
1664 NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_.kind = 17;
1665 NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_.base = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
1666 TM__nIinruGrC8EPIfjL3PuTvA_0[57].len = 0; TM__nIinruGrC8EPIfjL3PuTvA_0[57].kind = 2;
1667 NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[57];
1668 NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_.size = sizeof(tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg*);
1669 NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_.align = NIM_ALIGNOF(tyObject_JsonParsingError__XTejXaID1NT7KS9byQm3Jxg*);
1670 NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_.kind = 22;
1671 NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_.base = (&NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_);
1672 NTIrefjsonparsingerror__PyuSdojUZWOAnzN7dInq1Q_.marker = Marker_tyRef__PyuSdojUZWOAnzN7dInq1Q;
1673 NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_.size = sizeof(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g);
1674 NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_.align = NIM_ALIGNOF(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g);
1675 NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_.kind = 17;
1676 NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_.base = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
1677 TM__nIinruGrC8EPIfjL3PuTvA_0[58].len = 0; TM__nIinruGrC8EPIfjL3PuTvA_0[58].kind = 2;
1678 NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_.node = &TM__nIinruGrC8EPIfjL3PuTvA_0[58];
1679 NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_.size = sizeof(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g*);
1680 NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_.align = NIM_ALIGNOF(tyObject_JsonKindError__GezlryuJLt9aOJ0RpuN6G8g*);
1681 NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_.kind = 22;
1682 NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_.base = (&NTIjsonkinderror__GezlryuJLt9aOJ0RpuN6G8g_);
1683 NTIrefjsonkinderror__tn3kJ9cInprO2X2FSPir4WQ_.marker = Marker_tyRef__tn3kJ9cInprO2X2FSPir4WQ;
1684 }
1685 
1686