/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct trstnode343011 trstnode343011;
typedef struct trstnodeseq343009 trstnodeseq343009;
typedef struct trstparser344659 trstparser344659;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttokenseq344137 ttokenseq344137;
typedef struct ttoken344135 ttoken344135;
typedef struct tsharedstate344655 tsharedstate344655;
typedef struct TY344680 TY344680;
typedef struct TY344669 TY344669;
typedef struct tsubstitution344653 tsubstitution344653;
typedef struct tcell44933 tcell44933;
typedef struct tcellseq44949 tcellseq44949;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44945 tcellset44945;
typedef struct tpagedesc44941 tpagedesc44941;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct eparseerror344661 eparseerror344661;
typedef struct valueerror3249 valueerror3249;
typedef struct Exception Exception;
typedef struct tlexer344139 tlexer344139;
typedef struct keyvaluepair131008 keyvaluepair131008;
typedef struct TY119808 TY119808;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  trstnode343011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq343009* Sons;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler344023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler344021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  ttoken344135  {
NU8 Kind;
NI Ival;
NimStringDesc* Symbol;
NI Line;
NI Col;
};
struct  trstparser344659  {
  TNimObject Sup;
NI Idx;
ttokenseq344137* Tok;
tsharedstate344655* S;
TY344680* Indentstack;
NimStringDesc* Filename;
NI Line;
NI Col;
NIM_BOOL Hastoc;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tsubstitution344653  {
NimStringDesc* Key;
trstnode343011* Value;
};
typedef NI skiptable96742[256];
struct  tsharedstate344655  {
NU8 Options;
NI Ulevel;
NI Olevel;
TY344669* Subs;
TY344669* Refs;
skiptable96742 Underlinetolevel;
skiptable96742 Overlinetolevel;
tmsghandler344021 Msghandler;
tfindfilehandler344023 Findfile;
};
struct  tcell44933  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44949  {
NI Len;
NI Cap;
tcell44933** D;
};
struct  tcellset44945  {
NI Counter;
NI Max;
tpagedesc44941* Head;
tpagedesc44941** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44949 Zct;
tcellseq44949 Decstack;
tcellset44945 Cycleroots;
tcellseq44949 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
typedef NimStringDesc* TY344053[10];
typedef NimStringDesc* TY344825[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  valueerror3249  {
  Exception Sup;
};
struct  eparseerror344661  {
  valueerror3249 Sup;
};
typedef NimStringDesc* TY198301[1];
struct  tlexer344139  {
  TNimObject Sup;
NCSTRING Buf;
NI Bufpos;
NI Line;
NI Col;
NI Baseindent;
NIM_BOOL Skippounds;
};
typedef NU8 TY212607[32];
typedef NimStringDesc* TY347584[13];
typedef N_NIMCALL_PTR(trstnode343011*, tsectionparser351012) (trstparser344659* p);
struct keyvaluepair131008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef keyvaluepair131008 TY344093[34];
typedef NimStringDesc* TY350530[3];
typedef NI TY350535[3];
typedef NI TY26420[16];
struct  tpagedesc44941  {
tpagedesc44941* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct trstnodeseq343009 {
  TGenericSeq Sup;
  trstnode343011* data[SEQ_DECL_SIZE];
};
struct ttokenseq344137 {
  TGenericSeq Sup;
  ttoken344135 data[SEQ_DECL_SIZE];
};
struct TY344680 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY344669 {
  TGenericSeq Sup;
  tsubstitution344653 data[SEQ_DECL_SIZE];
};
struct TY119808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_345397)(trstnode343011* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_343084)(trstnode343011* n);
N_NIMCALL(void, addnodesaux_345338)(trstnode343011* n, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, addnodes_344067)(trstnode343011* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2461)(void* p, NI op);
N_NIMCALL(void, TMP2473)(void* p, NI op);
N_NIMCALL(void, TMP2474)(void* p, NI op);
N_NIMCALL(void, TMP2475)(void* p, NI op);
N_NIMCALL(void, initparser_345289)(trstparser344659* p, tsharedstate344655* sharedstate);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(tsharedstate344655*, newsharedstate_344890)(NU8 options, tfindfilehandler344023 findfile, tmsghandler344021 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44933*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44933* c);
N_NOINLINE(void, addzct_48617)(tcellseq44949* s, tcell44933* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_344807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_344689)(NU8 k);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_80907, TNimType* typ);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, TMP2495)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeln_171205)(FILE* f_171209, NimStringDesc** x_171213, NI x_171213Len0);
N_NIMCALL(void, write_12865)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_344880)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_344465)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq344137** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_344410)(tlexer344139* l, ttoken344135* tok);
N_NIMCALL(void, getthing_344161)(tlexer344139* l, ttoken344135* tok, TY212607 s);
N_NIMCALL(void, getindent_344383)(tlexer344139* l, ttoken344135* tok);
N_NIMCALL(NI, getindentaux_344265)(tlexer344139* l, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NI count, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_344220)(tlexer344139* l, ttoken344135* tok);
N_NIMCALL(trstnode343011*, resolvesubs_352086)(trstparser344659* p, trstnode343011* n);
N_NIMCALL(NI, findsub_345517)(trstparser344659* p, trstnode343011* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_120442)(NimStringDesc* key);
N_NIMCALL(trstnode343011*, newrstnode_343151)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_344972)(trstparser344659* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(trstnode343011*, findref_345722)(trstparser344659* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_344061)(trstnode343011* n);
N_NIMCALL(trstnode343011*, newrstnode_343105)(NU8 kind);
N_NIMCALL(void, add_343183)(trstnode343011* father, trstnode343011* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(trstnode343011*, parsedoc_349678)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsesectionwrapper_350925)(trstparser344659* p);
N_NIMCALL(void, parsesection_347719)(trstparser344659* p, trstnode343011* result);
N_NIMCALL(NI, currind_345201)(trstparser344659* p);
N_NIMCALL(void, pushind_345211)(trstparser344659* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_345240)(trstparser344659* p);
N_NIMCALL(NU8, whichsection_348941)(trstparser344659* p);
N_NIMCALL(NIM_BOOL, match_345995)(trstparser344659* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_96479)(NimStringDesc* s, TY212607 theset);
N_NIMCALL(NI, tokenafternewline_348832)(trstparser344659* p);
N_NIMCALL(NIM_BOOL, prednl_348885)(trstparser344659* p);
N_NIMCALL(NIM_BOOL, islineblock_348873)(trstparser344659* p);
N_NIMCALL(void, rstmessage_344996)(trstparser344659* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_348905)(trstparser344659* p);
N_NIMCALL(NIM_BOOL, isoptionlist_348931)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parseliteralblock_348707)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsebulletlist_350234)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parselineblock_348960)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsedotdot_348700)(trstparser344659* p);
N_NIMCALL(NimStringDesc*, getdirective_347329)(trstparser344659* p);
N_NIMCALL(NU8, getdirkind_347591)(NimStringDesc* s);
static N_INLINE(NI, find_347596)(TY347584 a_347601, NimStringDesc* item_347603);
N_NIMCALL(trstnode343011*, dirinclude_351221)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsedirective_351188)(trstparser344659* p, NU8 flags, tsectionparser351012 contentparser);
N_NIMCALL(trstnode343011*, parsedirective_351023)(trstparser344659* p, NU8 flags);
N_NIMCALL(trstnode343011*, newleaf_345762)(trstparser344659* p);
N_NIMCALL(void, parseline_347683)(trstparser344659* p, trstnode343011* father);
N_NIMCALL(void, parseinline_347182)(trstparser344659* p, trstnode343011* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_345938)(trstparser344659* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_347001)(trstparser344659* p, trstnode343011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_345884)(trstparser344659* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_346749)(trstparser344659* p, trstnode343011* father);
N_NIMCALL(void, rstmessage_344983)(trstparser344659* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(trstnode343011*, parsemarkdowncodeblock_347104)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsepostfix_346275)(trstparser344659* p, trstnode343011* n);
N_NIMCALL(void, fixupembeddedref_346178)(trstnode343011* n, trstnode343011* a, trstnode343011* b);
N_NIMCALL(void, setref_345654)(trstparser344659* p, NimStringDesc* key, trstnode343011* value);
N_NIMCALL(trstnode343011*, parsesmiley_346380)(trstparser344659* p);
N_NIMCALL(NI, matchverbatim_346322)(trstparser344659* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_346691)(trstparser344659* p, trstnode343011* father);
N_NIMCALL(NIM_BOOL, isurl_346601)(trstparser344659* p, NI i);
static N_INLINE(NIM_BOOL, contains_346619)(NimStringDesc** a_346625, NI a_346625Len0, NimStringDesc* item_346628);
static N_INLINE(NI, find_346631)(NimStringDesc** a_346636, NI a_346636Len0, NimStringDesc* item_346638);
N_NIMCALL(trstnode343011*, parsefields_347761)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsefield_347727)(trstparser344659* p);
N_NIMCALL(NIM_BOOL, indfollows_351168)(trstparser344659* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_344073)(trstnode343011* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_12842)(NimStringDesc* filename);
N_NIMCALL(trstnode343011*, dirimage_351807)(trstparser344659* p);
N_NIMCALL(trstnode343011*, dirfigure_351819)(trstparser344659* p);
N_NIMCALL(trstnode343011*, dirtitle_351831)(trstparser344659* p);
N_NIMCALL(trstnode343011*, dircontainer_351408)(trstparser344659* p);
N_NIMCALL(trstnode343011*, dircontents_351843)(trstparser344659* p);
N_NIMCALL(trstnode343011*, dirraw_351886)(trstparser344659* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_351868)(trstparser344659* p, trstnode343011** result, NU8 kind, tsectionparser351012 contentparser);
N_NIMCALL(trstnode343011*, parsedirbody_351209)(trstparser344659* p, tsectionparser351012 contentparser);
N_NIMCALL(trstnode343011*, dircodeblock_351253)(trstparser344659* p, NIM_BOOL nimrodextension);
N_NIMCALL(trstnode343011*, dirindex_351855)(trstparser344659* p);
N_NIMCALL(trstnode343011*, getreferencename_345773)(trstparser344659* p, NimStringDesc* endstr);
N_NIMCALL(trstnode343011*, untileol_345817)(trstparser344659* p);
N_NIMCALL(void, expect_345861)(trstparser344659* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_345586)(trstparser344659* p, NimStringDesc* key, trstnode343011* value);
N_NIMCALL(trstnode343011*, parsecomment_347470)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parseenumlist_350524)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsedefinitionlist_350427)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsetransition_350072)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parseheadline_349104)(trstparser344659* p);
N_NIMCALL(void, parseuntilnewline_347701)(trstparser344659* p, trstnode343011* father);
N_NIMCALL(NI, getlevel_348806)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(trstnode343011*, parseoverline_350137)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parsesimpletable_349685)(trstparser344659* p);
N_NIMCALL(void, getcolumns_349437)(trstparser344659* p, TY344680** cols);
N_NIMCALL(NI, tokend_349427)(trstparser344659* p);
N_NIMCALL(trstnode343011*, parseoptionlist_350306)(trstparser344659* p);
N_NIMCALL(void, parseparagraph_349031)(trstparser344659* p, trstnode343011* result);
N_NIMCALL(void, addifnotnil_343211)(trstnode343011* father, trstnode343011* son);
N_NIMCALL(NU8, sonkind_350620)(trstnode343011* father, NI i);
STRING_LITERAL(TMP2114, "", 0);
STRING_LITERAL(TMP2202, "\001\001", 2);
NIM_CONST struct {
  TGenericSeq Sup;
  NI data[1];
} CNSTSEQ2478 = {{1, 1}, {0}};
NIM_CONST TY344680* TMP2476 = ((TY344680*)&CNSTSEQ2478);
STRING_LITERAL(TMP2481, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2482, "\'$1\' expected", 13);
STRING_LITERAL(TMP2483, "grid table is not implemented", 29);
STRING_LITERAL(TMP2484, "new section expected", 20);
STRING_LITERAL(TMP2485, "general parse error", 19);
STRING_LITERAL(TMP2486, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2487, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2488, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2489, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2490, "field \'$1\' not supported", 24);
NIM_CONST TY344053 messages_344052 = {((NimStringDesc*) &TMP2481),
((NimStringDesc*) &TMP2482),
((NimStringDesc*) &TMP2483),
((NimStringDesc*) &TMP2484),
((NimStringDesc*) &TMP2485),
((NimStringDesc*) &TMP2486),
((NimStringDesc*) &TMP2487),
((NimStringDesc*) &TMP2488),
((NimStringDesc*) &TMP2489),
((NimStringDesc*) &TMP2490)}
;
STRING_LITERAL(TMP2491, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2496, "\012", 1);
static NIM_CONST TY212607 TMP2498 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
;
static NIM_CONST TY212607 TMP2499 = {
0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2500, "#", 1);
static NIM_CONST TY212607 TMP2501 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2502, "ii", 2);
STRING_LITERAL(TMP2503, " a", 2);
STRING_LITERAL(TMP2504, "i", 1);
STRING_LITERAL(TMP2505, "ai", 2);
STRING_LITERAL(TMP2506, "::", 2);
STRING_LITERAL(TMP2507, "+", 1);
STRING_LITERAL(TMP2508, "*", 1);
STRING_LITERAL(TMP2509, "-", 1);
STRING_LITERAL(TMP2510, "|", 1);
STRING_LITERAL(TMP2511, "..", 2);
STRING_LITERAL(TMP2512, ":w:", 3);
STRING_LITERAL(TMP2513, "(e) ", 4);
STRING_LITERAL(TMP2514, "+a+", 3);
STRING_LITERAL(TMP2515, "-w", 2);
STRING_LITERAL(TMP2516, "--w", 3);
STRING_LITERAL(TMP2517, "/w", 2);
STRING_LITERAL(TMP2518, "//w", 3);
STRING_LITERAL(TMP2519, "e) ", 3);
STRING_LITERAL(TMP2520, "e. ", 3);
STRING_LITERAL(TMP2521, "author", 6);
STRING_LITERAL(TMP2522, "authors", 7);
STRING_LITERAL(TMP2523, "code", 4);
STRING_LITERAL(TMP2524, "code-block", 10);
STRING_LITERAL(TMP2525, "container", 9);
STRING_LITERAL(TMP2526, "contents", 8);
STRING_LITERAL(TMP2527, "figure", 6);
STRING_LITERAL(TMP2528, "image", 5);
STRING_LITERAL(TMP2529, "include", 7);
STRING_LITERAL(TMP2530, "index", 5);
STRING_LITERAL(TMP2531, "raw", 3);
STRING_LITERAL(TMP2532, "title", 5);
NIM_CONST TY347584 dirids_347583 = {((NimStringDesc*) &TMP2114),
((NimStringDesc*) &TMP2521),
((NimStringDesc*) &TMP2522),
((NimStringDesc*) &TMP2523),
((NimStringDesc*) &TMP2524),
((NimStringDesc*) &TMP2525),
((NimStringDesc*) &TMP2526),
((NimStringDesc*) &TMP2527),
((NimStringDesc*) &TMP2528),
((NimStringDesc*) &TMP2529),
((NimStringDesc*) &TMP2530),
((NimStringDesc*) &TMP2531),
((NimStringDesc*) &TMP2532)}
;
static NIM_CONST TY212607 TMP2533 = {
0x00, 0x00, 0x00, 0x00, 0x84, 0xA1, 0x00, 0x14,
0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2534, "\\", 1);
STRING_LITERAL(TMP2535, "***", 3);
static NIM_CONST TY212607 TMP2536 = {
0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x00, 0xCC,
0x00, 0x00, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2537, "``", 2);
STRING_LITERAL(TMP2538, "\\\\", 2);
STRING_LITERAL(TMP2539, " ", 1);
STRING_LITERAL(TMP2540, "**", 2);
STRING_LITERAL(TMP2541, "```", 3);
STRING_LITERAL(TMP2542, "`", 1);
STRING_LITERAL(TMP2543, "_", 1);
STRING_LITERAL(TMP2544, ">", 1);
STRING_LITERAL(TMP2545, "<", 1);
STRING_LITERAL(TMP2546, "idx", 3);
STRING_LITERAL(TMP2547, "literal", 7);
STRING_LITERAL(TMP2548, "strong", 6);
STRING_LITERAL(TMP2549, "emphasis", 8);
STRING_LITERAL(TMP2550, "sub", 3);
STRING_LITERAL(TMP2551, "subscript", 9);
STRING_LITERAL(TMP2552, "sup", 3);
STRING_LITERAL(TMP2553, "supscript", 9);
STRING_LITERAL(TMP2554, ":D", 2);
STRING_LITERAL(TMP2555, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2556, ":-D", 3);
STRING_LITERAL(TMP2557, ":)", 2);
STRING_LITERAL(TMP2558, "icon_e_smile", 12);
STRING_LITERAL(TMP2559, ":-)", 3);
STRING_LITERAL(TMP2560, ";)", 2);
STRING_LITERAL(TMP2561, "icon_e_wink", 11);
STRING_LITERAL(TMP2562, ";-)", 3);
STRING_LITERAL(TMP2563, ":(", 2);
STRING_LITERAL(TMP2564, "icon_e_sad", 10);
STRING_LITERAL(TMP2565, ":-(", 3);
STRING_LITERAL(TMP2566, ":o", 2);
STRING_LITERAL(TMP2567, "icon_e_surprised", 16);
STRING_LITERAL(TMP2568, ":-o", 3);
STRING_LITERAL(TMP2569, ":shock:", 7);
STRING_LITERAL(TMP2570, "icon_eek", 8);
STRING_LITERAL(TMP2571, ":?", 2);
STRING_LITERAL(TMP2572, "icon_e_confused", 15);
STRING_LITERAL(TMP2573, ":-?", 3);
STRING_LITERAL(TMP2574, ":-/", 3);
STRING_LITERAL(TMP2575, "8-)", 3);
STRING_LITERAL(TMP2576, "icon_cool", 9);
STRING_LITERAL(TMP2577, ":lol:", 5);
STRING_LITERAL(TMP2578, "icon_lol", 8);
STRING_LITERAL(TMP2579, ":x", 2);
STRING_LITERAL(TMP2580, "icon_mad", 8);
STRING_LITERAL(TMP2581, ":-x", 3);
STRING_LITERAL(TMP2582, ":P", 2);
STRING_LITERAL(TMP2583, "icon_razz", 9);
STRING_LITERAL(TMP2584, ":-P", 3);
STRING_LITERAL(TMP2585, ":oops:", 6);
STRING_LITERAL(TMP2586, "icon_redface", 12);
STRING_LITERAL(TMP2587, ":cry:", 5);
STRING_LITERAL(TMP2588, "icon_cry", 8);
STRING_LITERAL(TMP2589, ":evil:", 6);
STRING_LITERAL(TMP2590, "icon_evil", 9);
STRING_LITERAL(TMP2591, ":twisted:", 9);
STRING_LITERAL(TMP2592, "icon_twisted", 12);
STRING_LITERAL(TMP2593, ":roll:", 6);
STRING_LITERAL(TMP2594, "icon_rolleyes", 13);
STRING_LITERAL(TMP2595, ":!:", 3);
STRING_LITERAL(TMP2596, "icon_exclaim", 12);
STRING_LITERAL(TMP2597, ":?:", 3);
STRING_LITERAL(TMP2598, "icon_question", 13);
STRING_LITERAL(TMP2599, ":idea:", 6);
STRING_LITERAL(TMP2600, "icon_idea", 9);
STRING_LITERAL(TMP2601, ":arrow:", 7);
STRING_LITERAL(TMP2602, "icon_arrow", 10);
STRING_LITERAL(TMP2603, ":|", 2);
STRING_LITERAL(TMP2604, "icon_neutral", 12);
STRING_LITERAL(TMP2605, ":-|", 3);
STRING_LITERAL(TMP2606, ":mrgreen:", 9);
STRING_LITERAL(TMP2607, "icon_mrgreen", 12);
STRING_LITERAL(TMP2608, ":geek:", 6);
STRING_LITERAL(TMP2609, "icon_e_geek", 11);
STRING_LITERAL(TMP2610, ":ugeek:", 7);
STRING_LITERAL(TMP2611, "icon_e_ugeek", 12);
NIM_CONST TY344093 smilies_344092 = {{((NimStringDesc*) &TMP2554),
((NimStringDesc*) &TMP2555)}
,
{((NimStringDesc*) &TMP2556),
((NimStringDesc*) &TMP2555)}
,
{((NimStringDesc*) &TMP2557),
((NimStringDesc*) &TMP2558)}
,
{((NimStringDesc*) &TMP2559),
((NimStringDesc*) &TMP2558)}
,
{((NimStringDesc*) &TMP2560),
((NimStringDesc*) &TMP2561)}
,
{((NimStringDesc*) &TMP2562),
((NimStringDesc*) &TMP2561)}
,
{((NimStringDesc*) &TMP2563),
((NimStringDesc*) &TMP2564)}
,
{((NimStringDesc*) &TMP2565),
((NimStringDesc*) &TMP2564)}
,
{((NimStringDesc*) &TMP2566),
((NimStringDesc*) &TMP2567)}
,
{((NimStringDesc*) &TMP2568),
((NimStringDesc*) &TMP2567)}
,
{((NimStringDesc*) &TMP2569),
((NimStringDesc*) &TMP2570)}
,
{((NimStringDesc*) &TMP2571),
((NimStringDesc*) &TMP2572)}
,
{((NimStringDesc*) &TMP2573),
((NimStringDesc*) &TMP2572)}
,
{((NimStringDesc*) &TMP2574),
((NimStringDesc*) &TMP2572)}
,
{((NimStringDesc*) &TMP2575),
((NimStringDesc*) &TMP2576)}
,
{((NimStringDesc*) &TMP2577),
((NimStringDesc*) &TMP2578)}
,
{((NimStringDesc*) &TMP2579),
((NimStringDesc*) &TMP2580)}
,
{((NimStringDesc*) &TMP2581),
((NimStringDesc*) &TMP2580)}
,
{((NimStringDesc*) &TMP2582),
((NimStringDesc*) &TMP2583)}
,
{((NimStringDesc*) &TMP2584),
((NimStringDesc*) &TMP2583)}
,
{((NimStringDesc*) &TMP2585),
((NimStringDesc*) &TMP2586)}
,
{((NimStringDesc*) &TMP2587),
((NimStringDesc*) &TMP2588)}
,
{((NimStringDesc*) &TMP2589),
((NimStringDesc*) &TMP2590)}
,
{((NimStringDesc*) &TMP2591),
((NimStringDesc*) &TMP2592)}
,
{((NimStringDesc*) &TMP2593),
((NimStringDesc*) &TMP2594)}
,
{((NimStringDesc*) &TMP2595),
((NimStringDesc*) &TMP2596)}
,
{((NimStringDesc*) &TMP2597),
((NimStringDesc*) &TMP2598)}
,
{((NimStringDesc*) &TMP2599),
((NimStringDesc*) &TMP2600)}
,
{((NimStringDesc*) &TMP2601),
((NimStringDesc*) &TMP2602)}
,
{((NimStringDesc*) &TMP2603),
((NimStringDesc*) &TMP2604)}
,
{((NimStringDesc*) &TMP2605),
((NimStringDesc*) &TMP2604)}
,
{((NimStringDesc*) &TMP2606),
((NimStringDesc*) &TMP2607)}
,
{((NimStringDesc*) &TMP2608),
((NimStringDesc*) &TMP2609)}
,
{((NimStringDesc*) &TMP2610),
((NimStringDesc*) &TMP2611)}
}
;
STRING_LITERAL(TMP2612, ":", 1);
STRING_LITERAL(TMP2613, "//", 2);
STRING_LITERAL(TMP2615, "http", 4);
STRING_LITERAL(TMP2616, "https", 5);
STRING_LITERAL(TMP2617, "ftp", 3);
STRING_LITERAL(TMP2618, "telnet", 6);
STRING_LITERAL(TMP2619, "file", 4);
NIM_CONST TY344825 TMP2614 = {((NimStringDesc*) &TMP2615),
((NimStringDesc*) &TMP2616),
((NimStringDesc*) &TMP2617),
((NimStringDesc*) &TMP2618),
((NimStringDesc*) &TMP2619)}
;
STRING_LITERAL(TMP2622, "html", 4);
STRING_LITERAL(TMP2623, "latex", 5);
STRING_LITERAL(TMP2624, "default-language", 16);
STRING_LITERAL(TMP2625, "Nimrod", 6);
STRING_LITERAL(TMP2626, " _", 2);
STRING_LITERAL(TMP2627, " |", 2);
STRING_LITERAL(TMP2628, "replace", 7);
STRING_LITERAL(TMP2629, " [", 2);
STRING_LITERAL(TMP2630, "]", 1);
NIM_CONST TY350530 wildcards_350529 = {((NimStringDesc*) &TMP2513),
((NimStringDesc*) &TMP2519),
((NimStringDesc*) &TMP2520)}
;
NIM_CONST TY350535 wildpos_350534 = {1,
0,
0}
;
extern TNimType NTI3211; /* RootObj */
TNimType NTI344659; /* TRstParser */
extern TNimType NTI108; /* int */
TNimType NTI344135; /* TToken */
TNimType NTI344133; /* TTokType */
extern TNimType NTI149; /* string */
TNimType NTI344137; /* TTokenSeq */
TNimType NTI344655; /* TSharedState */
TNimType NTI344013; /* TRstParseOption */
TNimType NTI344015; /* TRstParseOptions */
TNimType NTI344653; /* TSubstitution */
extern TNimType NTI343007; /* PRstNode */
TNimType NTI344669; /* seq[TSubstitution] */
extern TNimType NTI96742; /* SkipTable */
TNimType NTI344021; /* TMsgHandler */
TNimType NTI344023; /* TFindFileHandler */
TNimType NTI344657; /* PSharedState */
TNimType NTI344680; /* seq[int] */
extern TNimType NTI138; /* bool */
extern tgcheap47016 gch_47044;
TNimType NTI344019; /* TMsgKind */
TNimType NTI344017; /* TMsgClass */
extern TNimType NTI3249; /* ValueError */
TNimType NTI344661; /* EParseError */
TNimType NTI344840; /* ref EParseError */
TNimType NTI344139; /* TLexer */
extern TNimType NTI151; /* cstring */
extern TNimType NTI119808; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_345397)(trstnode343011* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).Kind == ((NU8) 64))) goto LA3;
		{
			NI i_345425;
			NI HEX3Atmp_345469;
			NI res_345472;
			i_345425 = 0;
			HEX3Atmp_345469 = 0;
			HEX3Atmp_345469 = (NI32)((*n).Text->Sup.len - 1);
			res_345472 = 0;
			{
				while (1) {
					if (!(res_345472 <= HEX3Atmp_345469)) goto LA7;
					i_345425 = res_345472;
					switch (((NU8)((*n).Text->data[i_345425]))) {
					case 48 ... 57:
					{
						{
							if (!(*b)) goto LA11;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA11: ;
						{
							if (!((*r)->Sup.len == 0)) goto LA15;
							(*r) = addChar((*r), 90);
						}
						LA15: ;
						(*r) = addChar((*r), (*n).Text->data[i_345425]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).Text->data[i_345425]);
					}
					break;
					case 65 ... 90:
					{
						{
							if (!(*b)) goto LA25;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA25: ;
						(*r) = addChar((*r), ((NIM_CHAR) (((NI) ((NI32)(((NI) ((NI32)(((NI) (((NU8)((*n).Text->data[i_345425])))) - 65))) + 97))))));
					}
					break;
					default:
					{
						{
							if (!(0 < (*r)->Sup.len)) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_345472 += 1;
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_345467;
			NI HEX3Atmp_345475;
			NI LOC34;
			NI res_345478;
			i_345467 = 0;
			HEX3Atmp_345475 = 0;
			LOC34 = 0;
			LOC34 = len_343084(n);
			HEX3Atmp_345475 = (NI32)(LOC34 - 1);
			res_345478 = 0;
			{
				while (1) {
					if (!(res_345478 <= HEX3Atmp_345475)) goto LA36;
					i_345467 = res_345478;
					rstnodetorefnameaux_345397((*n).Sons->data[i_345467], r, b);
					res_345478 += 1;
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_344061)(trstnode343011* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2114));
	b = NIM_FALSE;
	rstnodetorefnameaux_345397(n, (&result), (&b));
	return result;
}

static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	memcpy(((NCSTRING) ((&(*dest).data[((*dest).Sup.len)- 0]))), ((NCSTRING) ((*src).data)), (NI32)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(void, addnodesaux_345338)(trstnode343011* n, NimStringDesc** result) {
	{
		if (!((*n).Kind == ((NU8) 64))) goto LA3;
		(*result) = resizeString((*result), (*n).Text->Sup.len + 0);
appendString((*result), (*n).Text);
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_345364;
			NI HEX3Atmp_345366;
			NI LOC7;
			NI res_345369;
			i_345364 = 0;
			HEX3Atmp_345366 = 0;
			LOC7 = 0;
			LOC7 = len_343084(n);
			HEX3Atmp_345366 = (NI32)(LOC7 - 1);
			res_345369 = 0;
			{
				while (1) {
					if (!(res_345369 <= HEX3Atmp_345366)) goto LA9;
					i_345364 = res_345369;
					addnodesaux_345338((*n).Sons->data[i_345364], result);
					res_345369 += 1;
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_344067)(trstnode343011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2114));
	addnodesaux_345338(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_344073)(trstnode343011* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2114));
	{
		if (!((*n).Sons->data[1] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(((*(*n).Sons->data[1]).Kind == ((NU8) 13)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	{
		NI i_348650;
		NI HEX3Atmp_348653;
		NI LOC10;
		NI res_348656;
		i_348650 = 0;
		HEX3Atmp_348653 = 0;
		LOC10 = 0;
		LOC10 = len_343084((*n).Sons->data[1]);
		HEX3Atmp_348653 = (NI32)(LOC10 - 1);
		res_348656 = 0;
		{
			while (1) {
				trstnode343011* f;
				if (!(res_348656 <= HEX3Atmp_348653)) goto LA12;
				i_348650 = res_348656;
				f = (*(*n).Sons->data[1]).Sons->data[i_348650];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_344067((*f).Sons->data[0]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == 0)) goto LA17;
					result = addnodes_344067((*f).Sons->data[1]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2202));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_348656 += 1;
			} LA12: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_344080)(trstnode343011* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).Sons->data[0] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2114));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_344067((*n).Sons->data[0]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_347823)(trstnode343011* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_344067((*n).Sons->data[1]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	return result;
}
N_NIMCALL(void, TMP2461)(void* p, NI op) {
	ttokenseq344137* a;
	NI LOC1;
	a = (ttokenseq344137*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Symbol, op);
	}
}
N_NIMCALL(void, TMP2473)(void* p, NI op) {
	TY344669* a;
	NI LOC1;
	a = (TY344669*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Key, op);
	nimGCvisit((void*)a->data[LOC1].Value, op);
	}
}
N_NIMCALL(void, TMP2474)(void* p, NI op) {
	tsharedstate344655* a;
	NI LOC1;
	NI LOC2;
	a = (tsharedstate344655*)p;
	nimGCvisit((void*)(*a).Subs, op);
	nimGCvisit((void*)(*a).Refs, op);
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < 256; LOC1++) {
	}
	LOC2 = 0;
	for (LOC2 = 0; LOC2 < 256; LOC2++) {
	}
}
N_NIMCALL(void, TMP2475)(void* p, NI op) {
	TY344680* a;
	NI LOC1;
	a = (TY344680*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_345289)(trstparser344659* p, tsharedstate344655* sharedstate) {
	genericSeqAssign((&(*p).Indentstack), TMP2476, (&NTI344680));
	unsureAsgnRef((void**) (&(*p).Tok), (ttokenseq344137*) newSeq((&NTI344137), 0));
	(*p).Idx = 0;
	unsureAsgnRef((void**) (&(*p).Filename), copyString(((NimStringDesc*) &TMP2114)));
	(*p).Hastoc = NIM_FALSE;
	(*p).Col = 0;
	(*p).Line = 1;
	unsureAsgnRef((void**) (&(*p).S), sharedstate);
}

static N_INLINE(tcell44933*, usrtocell_48646)(void* usr) {
	tcell44933* result;
	result = 0;
	result = ((tcell44933*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell44933))))));
	return result;
}

static N_INLINE(void, rtladdzct_50204)(tcell44933* c) {
	addzct_48617((&gch_47044.Zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell44933* c;
	c = usrtocell_48646(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	LA3: ;
}

N_NIMCALL(NU8, whichmsgclass_344689)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI344019))->data[1]))) {
	case 101:
	case 69:
	{
		result = ((NU8) 2);
	}
	break;
	case 119:
	case 87:
	{
		result = ((NU8) 1);
	}
	break;
	case 104:
	case 72:
	{
		result = ((NU8) 0);
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}
N_NIMCALL(void, TMP2495)(void* p, NI op) {
	eparseerror344661* a;
	a = (eparseerror344661*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

static N_INLINE(void, writeln_171205)(FILE* f_171209, NimStringDesc** x_171213, NI x_171213Len0) {
	{
		NimStringDesc* i_171226;
		NI i_171234;
		i_171226 = 0;
		i_171234 = 0;
		{
			while (1) {
				if (!(i_171234 < x_171213Len0)) goto LA3;
				i_171226 = x_171213[i_171234];
				write_12865(f_171209, i_171226);
				i_171234 += 1;
			} LA3: ;
		}
	}
	write_12865(f_171209, ((NimStringDesc*) &TMP2496));
}

N_NIMCALL(void, defaultmsghandler_344807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY344825 LOC1;
	mc = whichmsgclass_344689(msgkind);
	a = nsuFormatSingleElem(messages_344052[(msgkind)- 0], arg);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString(filename);
	LOC1[1] = nimIntToStr(line);
	LOC1[2] = nimIntToStr(col);
	LOC1[3] = copyString(reprEnum(mc, (&NTI344017)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2491), LOC1, 5);
	{
		eparseerror344661* e_344839;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_344839 = 0;
		e_344839 = (eparseerror344661*) newObj((&NTI344840), sizeof(eparseerror344661));
		(*e_344839).Sup.Sup.Sup.m_type = (&NTI344661);
		LOC6 = 0;
		LOC6 = (*e_344839).Sup.Sup.message; (*e_344839).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_344839, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY198301 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeln_171205(stdout, LOC8, 1);
	}
	LA2: ;
}

N_NIMCALL(NimStringDesc*, defaultfindfile_344880)(NimStringDesc* filename) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = nosexistsFile(filename);
		if (!LOC3) goto LA4;
		result = copyString(filename);
	}
	goto LA1;
	LA4: ;
	{
		result = copyString(((NimStringDesc*) &TMP2114));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsharedstate344655*, newsharedstate_344890)(NU8 options, tfindfilehandler344023 findfile, tmsghandler344021 msghandler) {
	tsharedstate344655* result;
	result = 0;
	result = (tsharedstate344655*) newObj((&NTI344657), sizeof(tsharedstate344655));
	if ((*result).Subs) nimGCunrefNoCycle((*result).Subs);
	(*result).Subs = (TY344669*) newSeqRC1((&NTI344669), 0);
	if ((*result).Refs) nimGCunrefNoCycle((*result).Refs);
	(*result).Refs = (TY344669*) newSeqRC1((&NTI344669), 0);
	(*result).Options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).Msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).Msghandler = defaultmsghandler_344807;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).Findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).Findfile = defaultfindfile_344880;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_344161)(tlexer344139* l, ttoken344135* tok, TY212607 s) {
	NI pos;
	(*tok).Kind = ((NU8) 3);
	(*tok).Line = (*l).Line;
	(*tok).Col = (*l).Col;
	pos = (*l).Bufpos;
	{
		while (1) {
			(*tok).Symbol = addChar((*tok).Symbol, (*l).Buf[pos]);
			pos += 1;
			{
				if (!!(((s[((NU8)((*l).Buf[pos]))/8] &(1<<(((NU8)((*l).Buf[pos]))%8)))!=0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*l).Col += (NI32)(pos - (*l).Bufpos);
	(*l).Bufpos = pos;
}

N_NIMCALL(NI, getindentaux_344265)(tlexer344139* l, NI start) {
	NI result;
	NI pos;
	NCSTRING buf;
	result = 0;
	pos = start;
	buf = (*l).Buf;
	{
		if (!((NU8)(buf[pos]) == (NU8)(13))) goto LA3;
		{
			if (!((NU8)(buf[(NI32)(pos + 1)]) == (NU8)(10))) goto LA7;
			pos += 2;
		}
		goto LA5;
		LA7: ;
		{
			pos += 1;
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(10))) goto LA11;
		pos += 1;
	}
	goto LA1;
	LA11: ;
	LA1: ;
	{
		if (!(*l).Skippounds) goto LA15;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA19;
			pos += 1;
		}
		LA19: ;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA23;
			pos += 1;
		}
		LA23: ;
	}
	LA15: ;
	{
		while (1) {
			switch (((NU8)(buf[pos]))) {
			case 32:
			case 11:
			case 12:
			{
				pos += 1;
				result += 1;
			}
			break;
			case 9:
			{
				pos += 1;
				result = (NI32)((NI32)(result - ((NI) ((NI32)(result % 8)))) + 8);
			}
			break;
			default:
			{
				goto LA25;
			}
			break;
			}
		}
	} LA25: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(0))) goto LA32;
		result = 0;
	}
	goto LA30;
	LA32: ;
	{
		NIM_BOOL LOC35;
		LOC35 = 0;
		LOC35 = ((NU8)(buf[pos]) == (NU8)(10));
		if (LOC35) goto LA36;
		LOC35 = ((NU8)(buf[pos]) == (NU8)(13));
		LA36: ;
		if (!LOC35) goto LA37;
		result = getindentaux_344265(l, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*l).Bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_344383)(tlexer344139* l, ttoken344135* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).Col = 0;
	(*tok).Kind = ((NU8) 1);
	(*tok).Ival = getindentaux_344265(l, (*l).Bufpos);
	(*l).Line += 1;
	(*tok).Line = (*l).Line;
	(*l).Col = (*tok).Ival;
	(*tok).Ival = (((NI32)((*tok).Ival - (*l).Baseindent) >= 0) ? (NI32)((*tok).Ival - (*l).Baseindent) : 0);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nsuRepeatChar((*tok).Ival, 32);
	LOC1 = rawNewString(LOC2->Sup.len + 1);
appendString(LOC1, ((NimStringDesc*) &TMP2496));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).Symbol), LOC1);
}

N_NIMCALL(void, getadornment_344220)(tlexer344139* l, ttoken344135* tok) {
	NI pos;
	NIM_CHAR c;
	(*tok).Kind = ((NU8) 4);
	(*tok).Line = (*l).Line;
	(*tok).Col = (*l).Col;
	pos = (*l).Bufpos;
	c = (*l).Buf[pos];
	{
		while (1) {
			(*tok).Symbol = addChar((*tok).Symbol, (*l).Buf[pos]);
			pos += 1;
			{
				if (!!(((NU8)((*l).Buf[pos]) == (NU8)(c)))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*l).Col += (NI32)(pos - (*l).Bufpos);
	(*l).Bufpos = pos;
}

N_NIMCALL(void, rawgettok_344410)(tlexer344139* l, ttoken344135* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).Symbol), copyString(((NimStringDesc*) &TMP2114)));
	(*tok).Ival = 0;
	c = (*l).Buf[(*l).Bufpos];
	switch (((NU8)(c))) {
	case 97 ... 122:
	case 65 ... 90:
	case 128 ... 255:
	case 48 ... 57:
	{
		getthing_344161(l, tok, TMP2498);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_344161(l, tok, TMP2499);
		(*tok).Kind = ((NU8) 2);
		{
			if (!(((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(13)) || ((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_344410(l, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_344383(l, tok);
	}
	break;
	case 33:
	case 34:
	case 35:
	case 36:
	case 37:
	case 38:
	case 39:
	case 40:
	case 41:
	case 42:
	case 43:
	case 44:
	case 45:
	case 46:
	case 47:
	case 58:
	case 59:
	case 60:
	case 61:
	case 62:
	case 63:
	case 64:
	case 91:
	case 92:
	case 93:
	case 94:
	case 95:
	case 96:
	case 123:
	case 124:
	case 125:
	case 126:
	{
		getadornment_344220(l, tok);
		{
			if (!((*tok).Symbol->Sup.len <= 3)) goto LA11;
			(*tok).Kind = ((NU8) 5);
		}
		LA11: ;
	}
	break;
	default:
	{
		(*tok).Line = (*l).Line;
		(*tok).Col = (*l).Col;
		{
			if (!((NU8)(c) == (NU8)(0))) goto LA16;
			(*tok).Kind = ((NU8) 0);
		}
		goto LA14;
		LA16: ;
		{
			(*tok).Kind = ((NU8) 6);
			(*tok).Symbol = addChar((*tok).Symbol, c);
			(*l).Bufpos += 1;
			(*l).Col += 1;
		}
		LA14: ;
	}
	break;
	}
	(*tok).Col = (((NI32)((*tok).Col - (*l).Baseindent) >= 0) ? (NI32)((*tok).Col - (*l).Baseindent) : 0);
}

N_NIMCALL(NI, gettokens_344465)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq344137** tokens) {
	NI result;
	tlexer344139 l;
	NI length;
	result = 0;
	memset((void*)(&l), 0, sizeof(l));
	l.Sup.m_type = (&NTI344139);
	length = (*tokens)->Sup.len;
	l.Buf = buffer->data;
	l.Line = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = ((NU8)(l.Buf[0]) == (NU8)(239));
		if (!(LOC4)) goto LA5;
		LOC4 = ((NU8)(l.Buf[1]) == (NU8)(187));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = ((NU8)(l.Buf[2]) == (NU8)(191));
		LA6: ;
		if (!LOC3) goto LA7;
		l.Bufpos += 3;
	}
	LA7: ;
	l.Skippounds = skippounds;
	{
		if (!skippounds) goto LA11;
		{
			if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(35))) goto LA15;
			l.Bufpos += 1;
			result += 1;
		}
		LA15: ;
		{
			if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(35))) goto LA19;
			l.Bufpos += 1;
			result += 1;
		}
		LA19: ;
		l.Baseindent = 0;
		{
			while (1) {
				if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(32))) goto LA22;
				l.Bufpos += 1;
				l.Baseindent += 1;
				result += 1;
			} LA22: ;
		}
	}
	LA11: ;
	{
		while (1) {
			length += 1;
			(*tokens) = (ttokenseq344137*) setLengthSeq(&((*tokens))->Sup, sizeof(ttoken344135), length);
			rawgettok_344410((&l), (&(*tokens)->data[(NI32)(length - 1)]));
			{
				if (!((*tokens)->data[(NI32)(length - 1)].Kind == ((NU8) 0))) goto LA27;
				goto LA23;
			}
			LA27: ;
		}
	} LA23: ;
	{
		if (!((*tokens)->data[0].Kind == ((NU8) 2))) goto LA31;
		(*tokens)->data[0].Ival = (*tokens)->data[0].Symbol->Sup.len;
		(*tokens)->data[0].Kind = ((NU8) 1);
	}
	LA31: ;
	return result;
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, findsub_345517)(trstparser344659* p, trstnode343011* n) {
	NI result;
	NimStringDesc* key;
	result = 0;
	key = addnodes_344067(n);
	{
		NI i_345536;
		NI HEX3Atmp_345551;
		NI res_345554;
		i_345536 = 0;
		HEX3Atmp_345551 = 0;
		HEX3Atmp_345551 = ((*(*p).S).Subs->Sup.len-1);
		res_345554 = 0;
		{
			while (1) {
				if (!(res_345554 <= HEX3Atmp_345551)) goto LA3;
				i_345536 = res_345554;
				{
					if (!eqStrings(key, (*(*p).S).Subs->data[i_345536].Key)) goto LA6;
					result = i_345536;
					goto BeforeRet;
				}
				LA6: ;
				res_345554 += 1;
			} LA3: ;
		}
	}
	{
		NI i_345549;
		NI HEX3Atmp_345557;
		NI res_345560;
		i_345549 = 0;
		HEX3Atmp_345557 = 0;
		HEX3Atmp_345557 = ((*(*p).S).Subs->Sup.len-1);
		res_345560 = 0;
		{
			while (1) {
				if (!(res_345560 <= HEX3Atmp_345557)) goto LA10;
				i_345549 = res_345560;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).S).Subs->data[i_345549].Key);
					if (!(LOC13 == 0)) goto LA14;
					result = i_345549;
					goto BeforeRet;
				}
				LA14: ;
				res_345560 += 1;
			} LA10: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_344972)(trstparser344659* p, NU8 msgkind, NimStringDesc* arg) {
	(*(*p).S).Msghandler((*p).Filename, (NI32)((*p).Line + (*p).Tok->data[(*p).Idx].Line), (NI32)((*p).Col + (*p).Tok->data[(*p).Idx].Col), msgkind, arg);
}

N_NIMCALL(trstnode343011*, findref_345722)(trstparser344659* p, NimStringDesc* key) {
	trstnode343011* result;
	result = 0;
	{
		NI i_345740;
		NI HEX3Atmp_345742;
		NI res_345745;
		i_345740 = 0;
		HEX3Atmp_345742 = 0;
		HEX3Atmp_345742 = ((*(*p).S).Refs->Sup.len-1);
		res_345745 = 0;
		{
			while (1) {
				if (!(res_345745 <= HEX3Atmp_345742)) goto LA3;
				i_345740 = res_345745;
				{
					if (!eqStrings(key, (*(*p).S).Refs->data[i_345740].Key)) goto LA6;
					result = (*(*p).S).Refs->data[i_345740].Value;
					goto BeforeRet;
				}
				LA6: ;
				res_345745 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell44933* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48646(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell44933* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_48646((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_50204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(trstnode343011*, resolvesubs_352086)(trstparser344659* p, trstnode343011* n) {
	trstnode343011* result;
	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_345517(p, n);
		{
			if (!(0 <= x)) goto LA8;
			result = (*(*p).S).Subs->data[x].Value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_344067(n);
			e = getenv_120442(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_343151(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_344972((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		trstnode343011* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_344061(n);
		y = findref_345722(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_343105(((NU8) 38));
			(*n).Kind = ((NU8) 0);
			add_343183(result, n);
			add_343183(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).Hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_352142;
			NI HEX3Atmp_352144;
			NI LOC26;
			NI res_352147;
			i_352142 = 0;
			HEX3Atmp_352144 = 0;
			LOC26 = 0;
			LOC26 = len_343084(n);
			HEX3Atmp_352144 = (NI32)(LOC26 - 1);
			res_352147 = 0;
			{
				while (1) {
					if (!(res_352147 <= HEX3Atmp_352144)) goto LA28;
					i_352142 = res_352147;
					asgnRefNoCycle((void**) (&(*n).Sons->data[i_352142]), resolvesubs_352086(p, (*n).Sons->data[i_352142]));
					res_352147 += 1;
				} LA28: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, currind_345201)(trstparser344659* p) {
	NI result;
	result = 0;
	result = (*p).Indentstack->data[((*p).Indentstack->Sup.len-1)];
	return result;
}

N_NIMCALL(void, pushind_345211)(trstparser344659* p, NI ind) {
	(*p).Indentstack = (TY344680*) incrSeq(&((*p).Indentstack)->Sup, sizeof(NI));
	(*p).Indentstack->data[(*p).Indentstack->Sup.len-1] = ind;
}

N_NIMCALL(void, popind_345240)(trstparser344659* p) {
	{
		if (!(1 < (*p).Indentstack->Sup.len)) goto LA3;
		(*p).Indentstack = (TY344680*) setLengthSeq(&((*p).Indentstack)->Sup, sizeof(NI), (NI32)((*p).Indentstack->Sup.len - 1));
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, match_345995)(trstparser344659* p, NI start, NimStringDesc* expr) {
	NIM_BOOL result;
	NI i;
	NI j;
	NI last;
	result = 0;
	i = 0;
	j = start;
	last = (NI32)(expr->Sup.len - 1);
	{
		while (1) {
			if (!(i <= last)) goto LA2;
			switch (((NU8)(expr->data[i]))) {
			case 119:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 3));
			}
			break;
			case 32:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 2));
			}
			break;
			case 105:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 1));
			}
			break;
			case 112:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 5));
			}
			break;
			case 97:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 4));
			}
			break;
			case 111:
			{
				result = ((*p).Tok->data[j].Kind == ((NU8) 6));
			}
			break;
			case 84:
			{
				result = NIM_TRUE;
			}
			break;
			case 69:
			{
				result = ((7 &(1<<(((*p).Tok->data[j].Kind)&7)))!=0);
			}
			break;
			case 101:
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = ((*p).Tok->data[j].Kind == ((NU8) 3));
				if (LOC12) goto LA13;
				LOC12 = eqStrings((*p).Tok->data[j].Symbol, ((NimStringDesc*) &TMP2500));
				LA13: ;
				result = LOC12;
				{
					if (!result) goto LA16;
					switch (((NU8)((*p).Tok->data[j].Symbol->data[0]))) {
					case 97 ... 122:
					case 65 ... 90:
					{
						result = ((*p).Tok->data[j].Symbol->Sup.len == 1);
					}
					break;
					case 48 ... 57:
					{
						result = allcharsinset_96479((*p).Tok->data[j].Symbol, TMP2501);
					}
					break;
					default:
					{
					}
					break;
					}
				}
				LA16: ;
			}
			break;
			default:
			{
				NIM_CHAR c;
				NI length;
				NIM_BOOL LOC26;
				NIM_BOOL LOC27;
				c = expr->data[i];
				length = 0;
				{
					while (1) {
						NIM_BOOL LOC24;
						LOC24 = 0;
						LOC24 = (i <= last);
						if (!(LOC24)) goto LA25;
						LOC24 = ((NU8)(expr->data[i]) == (NU8)(c));
						LA25: ;
						if (!LOC24) goto LA23;
						i += 1;
						length += 1;
					} LA23: ;
				}
				i -= 1;
				LOC26 = 0;
				LOC27 = 0;
				LOC27 = ((48 &(1<<(((*p).Tok->data[j].Kind)&7)))!=0);
				if (!(LOC27)) goto LA28;
				LOC27 = ((*p).Tok->data[j].Symbol->Sup.len == length);
				LA28: ;
				LOC26 = LOC27;
				if (!(LOC26)) goto LA29;
				LOC26 = ((NU8)((*p).Tok->data[j].Symbol->data[0]) == (NU8)(c));
				LA29: ;
				result = LOC26;
			}
			break;
			}
			{
				if (!!(result)) goto LA32;
				goto BeforeRet;
			}
			LA32: ;
			j += 1;
			i += 1;
		} LA2: ;
	}
	result = NIM_TRUE;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, tokenafternewline_348832)(trstparser344659* p) {
	NI result;
	result = 0;
	result = (*p).Idx;
	{
		while (1) {
			switch ((*p).Tok->data[result].Kind) {
			case ((NU8) 0):
			{
				goto LA1;
			}
			break;
			case ((NU8) 1):
			{
				result += 1;
				goto LA1;
			}
			break;
			default:
			{
				result += 1;
			}
			break;
			}
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, prednl_348885)(trstparser344659* p) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	{
		NIM_BOOL LOC5;
		NI LOC7;
		if (!(0 < (*p).Idx)) goto LA3;
		LOC5 = 0;
		LOC5 = ((*p).Tok->data[(NI32)((*p).Idx - 1)].Kind == ((NU8) 1));
		if (!(LOC5)) goto LA6;
		LOC7 = 0;
		LOC7 = currind_345201(p);
		LOC5 = ((*p).Tok->data[(NI32)((*p).Idx - 1)].Ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_348873)(trstparser344659* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_348832(p);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*p).Tok->data[(*p).Idx].Col == (*p).Tok->data[j].Col);
	if (!(LOC2)) goto LA3;
	LOC2 = eqStrings((*p).Tok->data[j].Symbol, ((NimStringDesc*) &TMP2510));
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = ((*p).Tok->data[(*p).Idx].Col < (*p).Tok->data[j].Col);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, rstmessage_344996)(trstparser344659* p, NU8 msgkind) {
	(*(*p).S).Msghandler((*p).Filename, (NI32)((*p).Line + (*p).Tok->data[(*p).Idx].Line), (NI32)((*p).Col + (*p).Tok->data[(*p).Idx].Col), msgkind, (*p).Tok->data[(*p).Idx].Symbol);
}

N_NIMCALL(NIM_BOOL, isdeflist_348905)(trstparser344659* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_348832(p);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*p).Tok->data[(*p).Idx].Col < (*p).Tok->data[j].Col);
	if (!(LOC2)) goto LA3;
	LOC2 = ((104 &(1<<(((*p).Tok->data[j].Kind)&7)))!=0);
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = !(eqStrings((*p).Tok->data[(NI32)(j - 2)].Symbol, ((NimStringDesc*) &TMP2506)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_348931)(trstparser344659* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2515));
	if (LOC3) goto LA4;
	LOC3 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2516));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2517));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2518));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_348941)(trstparser344659* p) {
	NU8 result;
	result = 0;
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_345995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2502));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_345995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2503));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_345995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2504));
			if (!LOC12) goto LA13;
			result = ((NU8) 2);
		}
		goto LA2;
		LA13: ;
		{
			result = ((NU8) 64);
		}
		LA2: ;
	}
	break;
	case ((NU8) 5):
	{
		{
			NI LOC19;
			NIM_BOOL LOC20;
			LOC19 = 0;
			LOC19 = tokenafternewline_348832(p);
			LOC20 = 0;
			LOC20 = match_345995(p, LOC19, ((NimStringDesc*) &TMP2505));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2506))) goto LA24;
			result = ((NU8) 24);
		}
		goto LA17;
		LA24: ;
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NIM_BOOL LOC30;
			NIM_BOOL LOC31;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = prednl_348885(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2507));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2508));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2509));
			LA33: ;
			LOC28 = LOC30;
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA34;
			LOC27 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2));
			LA34: ;
			if (!LOC27) goto LA35;
			result = ((NU8) 5);
		}
		goto LA17;
		LA35: ;
		{
			NIM_BOOL LOC38;
			LOC38 = 0;
			LOC38 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2510));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_348873(p);
			LA39: ;
			if (!LOC38) goto LA40;
			result = ((NU8) 26);
		}
		goto LA17;
		LA40: ;
		{
			NIM_BOOL LOC43;
			LOC43 = 0;
			LOC43 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2511));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_348885(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2512));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_348885(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2513));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2514));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_344996(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_348905(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_348931(p);
			if (!LOC65) goto LA66;
			result = ((NU8) 17);
		}
		goto LA17;
		LA66: ;
		{
			result = ((NU8) 4);
		}
		LA17: ;
	}
	break;
	case ((NU8) 3):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		{
			NI LOC72;
			NIM_BOOL LOC73;
			LOC72 = 0;
			LOC72 = tokenafternewline_348832(p);
			LOC73 = 0;
			LOC73 = match_345995(p, LOC72, ((NimStringDesc*) &TMP2505));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2519));
			if (LOC77) goto LA78;
			LOC77 = match_345995(p, (*p).Idx, ((NimStringDesc*) &TMP2520));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_348905(p);
			if (!LOC82) goto LA83;
			result = ((NU8) 9);
		}
		goto LA70;
		LA83: ;
		{
			result = ((NU8) 4);
		}
		LA70: ;
	}
	break;
	default:
	{
		result = ((NU8) 64);
	}
	break;
	}
	return result;
}

N_NIMCALL(trstnode343011*, parseliteralblock_348707)(trstparser344659* p) {
	trstnode343011* result;
	trstnode343011* n;
	result = 0;
	result = newrstnode_343105(((NU8) 24));
	n = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2114));
	{
		NI indent;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA3;
		indent = (*p).Tok->data[(*p).Idx].Ival;
		(*p).Idx += 1;
		{
			while (1) {
				switch ((*p).Tok->data[(*p).Idx].Kind) {
				case ((NU8) 0):
				{
					goto LA5;
				}
				break;
				case ((NU8) 1):
				{
					{
						if (!((*p).Tok->data[(*p).Idx].Ival < indent)) goto LA11;
						goto LA5;
					}
					goto LA9;
					LA11: ;
					{
						NimStringDesc* LOC14;
						(*n).Text = resizeString((*n).Text, 1);
appendString((*n).Text, ((NimStringDesc*) &TMP2496));
						LOC14 = 0;
						LOC14 = nsuRepeatChar((NI32)((*p).Tok->data[(*p).Idx].Ival - indent), 32);
						(*n).Text = resizeString((*n).Text, LOC14->Sup.len + 0);
appendString((*n).Text, LOC14);
						(*p).Idx += 1;
					}
					LA9: ;
				}
				break;
				default:
				{
					(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
					(*p).Idx += 1;
				}
				break;
				}
			}
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			while (1) {
				if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA18;
				(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
				(*p).Idx += 1;
			} LA18: ;
		}
	}
	LA1: ;
	add_343183(result, n);
	return result;
}

N_NIMCALL(trstnode343011*, parsebulletlist_350234)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = NIM_NIL;
	{
		NimStringDesc* bullet;
		NI col;
		if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2))) goto LA3;
		bullet = copyString((*p).Tok->data[(*p).Idx].Symbol);
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_343105(((NU8) 5));
		pushind_345211(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		{
			while (1) {
				trstnode343011* item;
				item = newrstnode_343105(((NU8) 6));
				parsesection_347719(p, item);
				add_343183(result, item);
				{
					NIM_BOOL LOC9;
					NIM_BOOL LOC10;
					NIM_BOOL LOC11;
					LOC9 = 0;
					LOC10 = 0;
					LOC11 = 0;
					LOC11 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC11)) goto LA12;
					LOC11 = ((*p).Tok->data[(*p).Idx].Ival == col);
					LA12: ;
					LOC10 = LOC11;
					if (!(LOC10)) goto LA13;
					LOC10 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, bullet);
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).Tok->data[(NI32)((*p).Idx + 2)].Kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).Idx += 3;
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_345240(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode343011*, parselineblock_348960)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = NIM_NIL;
	{
		NI col;
		if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2))) goto LA3;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_343105(((NU8) 26));
		pushind_345211(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		{
			while (1) {
				trstnode343011* item;
				item = newrstnode_343105(((NU8) 27));
				parsesection_347719(p, item);
				add_343183(result, item);
				{
					NIM_BOOL LOC9;
					NIM_BOOL LOC10;
					NIM_BOOL LOC11;
					LOC9 = 0;
					LOC10 = 0;
					LOC11 = 0;
					LOC11 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC11)) goto LA12;
					LOC11 = ((*p).Tok->data[(*p).Idx].Ival == col);
					LA12: ;
					LOC10 = LOC11;
					if (!(LOC10)) goto LA13;
					LOC10 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2510));
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).Tok->data[(NI32)((*p).Idx + 2)].Kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).Idx += 3;
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_345240(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_347329)(trstparser344659* p) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI j;
		LOC3 = 0;
		LOC3 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 3));
		LA4: ;
		if (!LOC3) goto LA5;
		j = (*p).Idx;
		(*p).Idx += 1;
		result = copyString((*p).Tok->data[(*p).Idx].Symbol);
		(*p).Idx += 1;
		{
			while (1) {
				if (!((120 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0)) goto LA8;
				{
					if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2506))) goto LA11;
					goto LA7;
				}
				LA11: ;
				result = resizeString(result, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString(result, (*p).Tok->data[(*p).Idx].Symbol);
				(*p).Idx += 1;
			} LA8: ;
		} LA7: ;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA15;
			(*p).Idx += 1;
		}
		LA15: ;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2506))) goto LA19;
			(*p).Idx += 1;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA23;
				(*p).Idx += 1;
			}
			LA23: ;
		}
		goto LA17;
		LA19: ;
		{
			(*p).Idx = j;
			result = copyString(((NimStringDesc*) &TMP2114));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2114));
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, find_347596)(TY347584 a_347601, NimStringDesc* item_347603) {
	NI result;
	result = 0;
	{
		NimStringDesc* i_347647;
		NI i_347663;
		i_347647 = 0;
		i_347663 = 0;
		{
			if (!(((NI) (i_347663)) <= 12)) goto LA4;
			{
				while (1) {
					i_347647 = a_347601[(i_347663)- 0];
					{
						if (!eqStrings(i_347647, item_347603)) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
					result += 1;
					{
						if (!(12 <= ((NI) (i_347663)))) goto LA14;
						goto LA6;
					}
					LA14: ;
					i_347663 += 1;
				}
			} LA6: ;
		}
		LA4: ;
	}
	result = -1;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, getdirkind_347591)(NimStringDesc* s) {
	NU8 result;
	NI i;
	result = 0;
	i = find_347596(dirids_347583, s);
	{
		if (!(0 <= i)) goto LA3;
		result = ((NU8) (i));
	}
	goto LA1;
	LA3: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode343011*, newleaf_345762)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = newrstnode_343151(((NU8) 64), (*p).Tok->data[(*p).Idx].Symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_345938)(trstparser344659* p, NimStringDesc* markup) {
	NIM_BOOL result;
	NIM_CHAR d;
	NIM_BOOL LOC5;
	NIM_BOOL LOC6;
	result = 0;
	d = 0;
	result = eqStrings((*p).Tok->data[(*p).Idx].Symbol, markup);
	{
		if (!!(result)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC6 = 0;
	LOC6 = ((*p).Idx == 0);
	if (LOC6) goto LA7;
	LOC6 = ((6 &(1<<(((*p).Tok->data[(NI32)((*p).Idx - 1)].Kind)&7)))!=0);
	LA7: ;
	LOC5 = LOC6;
	if (LOC5) goto LA8;
	LOC5 = ((TMP2533[((NU8)((*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol->data[0]))/8] &(1<<(((NU8)((*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol->data[0]))%8)))!=0);
	LA8: ;
	result = LOC5;
	{
		if (!!(result)) goto LA11;
		goto BeforeRet;
	}
	LA11: ;
	result = !(((7 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0));
	{
		if (!!(result)) goto LA15;
		goto BeforeRet;
	}
	LA15: ;
	{
		if (!(0 < (*p).Idx)) goto LA19;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol, ((NimStringDesc*) &TMP2534))) goto LA23;
			result = NIM_FALSE;
		}
		goto LA21;
		LA23: ;
		{
			NIM_CHAR c;
			c = (*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol->data[0];
			switch (((NU8)(c))) {
			case 39:
			case 34:
			{
				d = c;
			}
			break;
			case 40:
			{
				d = 41;
			}
			break;
			case 91:
			{
				d = 93;
			}
			break;
			case 123:
			{
				d = 125;
			}
			break;
			case 60:
			{
				d = 62;
			}
			break;
			default:
			{
				d = 0;
			}
			break;
			}
			{
				if (!!(((NU8)(d) == (NU8)(0)))) goto LA34;
				result = !(((NU8)((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0]) == (NU8)(d)));
			}
			LA34: ;
		}
		LA21: ;
	}
	LA19: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupend_345884)(trstparser344659* p, NimStringDesc* markup) {
	NIM_BOOL result;
	NIM_BOOL LOC9;
	result = 0;
	result = eqStrings((*p).Tok->data[(*p).Idx].Symbol, markup);
	{
		if (!!(result)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = !(((6 &(1<<(((*p).Tok->data[(NI32)((*p).Idx - 1)].Kind)&7)))!=0));
	{
		if (!!(result)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	LOC9 = 0;
	LOC9 = ((7 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0);
	if (LOC9) goto LA10;
	LOC9 = ((TMP2536[((NU8)((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0]))/8] &(1<<(((NU8)((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0]))%8)))!=0);
	LA10: ;
	result = LOC9;
	{
		if (!!(result)) goto LA13;
		goto BeforeRet;
	}
	LA13: ;
	{
		if (!(0 < (*p).Idx)) goto LA17;
		{
			NIM_BOOL LOC21;
			LOC21 = 0;
			LOC21 = !(eqStrings(markup, ((NimStringDesc*) &TMP2537)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol, ((NimStringDesc*) &TMP2534));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_346749)(trstparser344659* p, trstnode343011* father) {
	{
		trstnode343011* LOC5;
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2538))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2534));
		add_343183(father, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2534))) goto LA7;
		(*p).Idx += 1;
		{
			trstnode343011* LOC13;
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_345762(p);
			add_343183(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA16;
			(*p).Idx += 1;
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		trstnode343011* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_345762(p);
		add_343183(father, LOC19);
		(*p).Idx += 1;
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_344983)(trstparser344659* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col) {
	(*(*p).S).Msghandler((*p).Filename, (NI32)((*p).Line + line), (NI32)((*p).Col + col), msgkind, arg);
}

N_NIMCALL(void, parseuntil_347001)(trstparser344659* p, trstnode343011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash) {
	NI line;
	NI col;
	line = (*p).Tok->data[(*p).Idx].Line;
	col = (*p).Tok->data[(*p).Idx].Col;
	(*p).Idx += 1;
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 5):
			{
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = isinlinemarkupend_345884((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).Idx += 1;
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_346749(p, father);
				}
				goto LA4;
				LA10: ;
				{
					trstnode343011* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_345762(p);
					add_343183(father, LOC13);
					(*p).Idx += 1;
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				trstnode343011* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_345762(p);
				add_343183(father, LOC15);
				(*p).Idx += 1;
			}
			break;
			case ((NU8) 1):
			{
				trstnode343011* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2539));
				add_343183(father, LOC17);
				(*p).Idx += 1;
				{
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA20;
					rstmessage_344983((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				trstnode343011* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2539));
				add_343183(father, LOC23);
				(*p).Idx += 1;
			}
			break;
			default:
			{
				rstmessage_344983((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(trstnode343011*, parsemarkdowncodeblock_347104)(trstparser344659* p) {
	trstnode343011* result;
	trstnode343011* args;
	trstnode343011* n;
	trstnode343011* lb;
	result = 0;
	args = newrstnode_343105(((NU8) 41));
	{
		trstnode343011* LOC5;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_345762(p);
		add_343183(args, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2114));
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 0):
			{
				rstmessage_344972((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2541));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2541))) goto LA13;
					(*p).Idx += 1;
					goto LA7;
				}
				goto LA11;
				LA13: ;
				{
					(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
					(*p).Idx += 1;
				}
				LA11: ;
			}
			break;
			default:
			{
				(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
				(*p).Idx += 1;
			}
			break;
			}
		}
	} LA7: ;
	lb = newrstnode_343105(((NU8) 24));
	add_343183(lb, n);
	result = newrstnode_343105(((NU8) 47));
	add_343183(result, args);
	add_343183(result, NIM_NIL);
	add_343183(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_346178)(trstnode343011* n, trstnode343011* a, trstnode343011* b) {
	NI sep;
	NI incr;
	sep = -1;
	{
		NI i_346195;
		NI HEX3Atmp_346225;
		NI LOC2;
		NI res_346228;
		i_346195 = 0;
		HEX3Atmp_346225 = 0;
		LOC2 = 0;
		LOC2 = len_343084(n);
		HEX3Atmp_346225 = (NI32)(LOC2 - 2);
		res_346228 = HEX3Atmp_346225;
		{
			while (1) {
				if (!(0 <= res_346228)) goto LA4;
				i_346195 = res_346228;
				{
					if (!eqStrings((*(*n).Sons->data[i_346195]).Text, ((NimStringDesc*) &TMP2545))) goto LA7;
					sep = i_346195;
					goto LA1;
				}
				LA7: ;
				res_346228 -= 1;
			} LA4: ;
		}
	} LA1: ;
	{
		NIM_BOOL LOC11;
		LOC11 = 0;
		LOC11 = (0 < sep);
		if (!(LOC11)) goto LA12;
		LOC11 = ((NU8)((*(*n).Sons->data[(NI32)(sep - 1)]).Text->data[0]) == (NU8)(32));
		LA12: ;
		if (!LOC11) goto LA13;
		incr = 2;
	}
	goto LA9;
	LA13: ;
	{
		incr = 1;
	}
	LA9: ;
	{
		NI i_346210;
		NI HEX3Atmp_346230;
		NI res_346233;
		i_346210 = 0;
		HEX3Atmp_346230 = 0;
		HEX3Atmp_346230 = (NI32)(sep - incr);
		res_346233 = 0;
		{
			while (1) {
				if (!(res_346233 <= HEX3Atmp_346230)) goto LA18;
				i_346210 = res_346233;
				add_343183(a, (*n).Sons->data[i_346210]);
				res_346233 += 1;
			} LA18: ;
		}
	}
	{
		NI i_346223;
		NI HEX3Atmp_346236;
		NI HEX3Atmp_346237;
		NI LOC20;
		NI res_346240;
		i_346223 = 0;
		HEX3Atmp_346236 = 0;
		HEX3Atmp_346237 = 0;
		HEX3Atmp_346236 = (NI32)(sep + 1);
		LOC20 = 0;
		LOC20 = len_343084(n);
		HEX3Atmp_346237 = (NI32)(LOC20 - 2);
		res_346240 = HEX3Atmp_346236;
		{
			while (1) {
				if (!(res_346240 <= HEX3Atmp_346237)) goto LA22;
				i_346223 = res_346240;
				add_343183(b, (*n).Sons->data[i_346223]);
				res_346240 += 1;
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_345654)(trstparser344659* p, NimStringDesc* key, trstnode343011* value) {
	NI length;
	NimStringDesc* LOC14;
	length = (*(*p).S).Refs->Sup.len;
	{
		NI i_345684;
		NI HEX3Atmp_345702;
		NI res_345705;
		i_345684 = 0;
		HEX3Atmp_345702 = 0;
		HEX3Atmp_345702 = (NI32)(length - 1);
		res_345705 = 0;
		{
			while (1) {
				if (!(res_345705 <= HEX3Atmp_345702)) goto LA3;
				i_345684 = res_345705;
				{
					if (!eqStrings(key, (*(*p).S).Refs->data[i_345684].Key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_344067((*(*p).S).Refs->data[i_345684].Value);
						LOC11 = 0;
						LOC11 = addnodes_344067(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_344972((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).S).Refs->data[i_345684].Value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_345705 += 1;
			} LA3: ;
		}
	}
	(*(*p).S).Refs = (TY344669*) setLengthSeq(&((*(*p).S).Refs)->Sup, sizeof(tsubstitution344653), (NI32)(length + 1));
	LOC14 = 0;
	LOC14 = (*(*p).S).Refs->data[length].Key; (*(*p).S).Refs->data[length].Key = copyStringRC1(key);
	if (LOC14) nimGCunrefNoCycle(LOC14);
	asgnRefNoCycle((void**) (&(*(*p).S).Refs->data[length].Value), value);
	BeforeRet: ;
}

N_NIMCALL(trstnode343011*, parsepostfix_346275)(trstparser344659* p, trstnode343011* n) {
	trstnode343011* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_345884((&(*p)), ((NimStringDesc*) &TMP2543));
		if (!LOC3) goto LA4;
		(*p).Idx += 1;
		{
			NIM_BOOL LOC8;
			trstnode343011* a;
			trstnode343011* b;
			LOC8 = 0;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 2)].Symbol, ((NimStringDesc*) &TMP2542));
			if (!(LOC8)) goto LA9;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 3)].Symbol, ((NimStringDesc*) &TMP2544));
			LA9: ;
			if (!LOC8) goto LA10;
			a = newrstnode_343105(((NU8) 0));
			b = newrstnode_343105(((NU8) 0));
			fixupembeddedref_346178(n, a, b);
			{
				NI LOC14;
				LOC14 = 0;
				LOC14 = len_343084(a);
				if (!(LOC14 == 0)) goto LA15;
				result = newrstnode_343105(((NU8) 37));
				add_343183(result, b);
			}
			goto LA12;
			LA15: ;
			{
				NimStringDesc* LOC18;
				result = newrstnode_343105(((NU8) 38));
				add_343183(result, a);
				add_343183(result, b);
				LOC18 = 0;
				LOC18 = rstnodetorefname_344061(a);
				setref_345654(p, LOC18, b);
			}
			LA12: ;
		}
		goto LA6;
		LA10: ;
		{
			if (!((*n).Kind == ((NU8) 60))) goto LA20;
			(*n).Kind = ((NU8) 39);
		}
		goto LA6;
		LA20: ;
		{
			result = newrstnode_343105(((NU8) 39));
			add_343183(result, n);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = match_345995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2512));
		if (!LOC24) goto LA25;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2546))) goto LA29;
			(*n).Kind = ((NU8) 56);
		}
		goto LA27;
		LA29: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2547))) goto LA32;
			(*n).Kind = ((NU8) 61);
		}
		goto LA27;
		LA32: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2548))) goto LA35;
			(*n).Kind = ((NU8) 58);
		}
		goto LA27;
		LA35: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2549))) goto LA38;
			(*n).Kind = ((NU8) 57);
		}
		goto LA27;
		LA38: ;
		{
			NIM_BOOL LOC41;
			LOC41 = 0;
			LOC41 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2550));
			if (LOC41) goto LA42;
			LOC41 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2551));
			LA42: ;
			if (!LOC41) goto LA43;
			(*n).Kind = ((NU8) 54);
		}
		goto LA27;
		LA43: ;
		{
			NIM_BOOL LOC46;
			LOC46 = 0;
			LOC46 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2552));
			if (LOC46) goto LA47;
			LOC46 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2553));
			LA47: ;
			if (!LOC46) goto LA48;
			(*n).Kind = ((NU8) 55);
		}
		goto LA27;
		LA48: ;
		{
			trstnode343011* LOC51;
			result = newrstnode_343105(((NU8) 53));
			(*n).Kind = ((NU8) 0);
			add_343183(result, n);
			LOC51 = 0;
			LOC51 = newrstnode_343151(((NU8) 64), (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol);
			add_343183(result, LOC51);
		}
		LA27: ;
		(*p).Idx += 3;
	}
	goto LA1;
	LA25: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_346322)(trstparser344659* p, NI start, NimStringDesc* expr) {
	NI result;
	NI j;
	result = 0;
	result = start;
	j = 0;
	{
		while (1) {
			NIM_BOOL LOC3;
			NIM_BOOL LOC4;
			LOC3 = 0;
			LOC4 = 0;
			LOC4 = (j < expr->Sup.len);
			if (!(LOC4)) goto LA5;
			LOC4 = (result < (*p).Tok->Sup.len);
			LA5: ;
			LOC3 = LOC4;
			if (!(LOC3)) goto LA6;
			LOC3 = nsuContinuesWith(expr, (*p).Tok->data[result].Symbol, j);
			LA6: ;
			if (!LOC3) goto LA2;
			j += (*p).Tok->data[result].Symbol->Sup.len;
			result += 1;
		} LA2: ;
	}
	{
		if (!(j < expr->Sup.len)) goto LA9;
		result = 0;
	}
	LA9: ;
	return result;
}

N_NIMCALL(trstnode343011*, parsesmiley_346380)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	{
		if (!!((((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(58)) || ((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(59)) || ((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(56))))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NimStringDesc* key_346441;
		NimStringDesc* val_346442;
		NI i_346448;
		key_346441 = 0;
		val_346442 = 0;
		i_346448 = 0;
		{
			if (!(((NI) (i_346448)) <= 33)) goto LA8;
			{
				while (1) {
					NI m;
					key_346441 = smilies_344092[(i_346448)- 0].Field0;
					val_346442 = smilies_344092[(i_346448)- 0].Field1;
					m = matchverbatim_346322((&(*p)), (*p).Idx, key_346441);
					{
						NimStringDesc* LOC16;
						if (!(0 < m)) goto LA14;
						(*p).Idx = m;
						result = newrstnode_343105(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).Text; (*result).Text = copyStringRC1(val_346442);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(33 <= ((NI) (i_346448)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_346448 += 1;
				}
			} LA10: ;
		}
		LA8: ;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, find_346631)(NimStringDesc** a_346636, NI a_346636Len0, NimStringDesc* item_346638) {
	NI result;
	result = 0;
	{
		NimStringDesc* i_346651;
		NI i_346667;
		i_346651 = 0;
		i_346667 = 0;
		{
			while (1) {
				if (!(i_346667 < a_346636Len0)) goto LA3;
				i_346651 = a_346636[i_346667];
				{
					if (!eqStrings(i_346651, item_346638)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += 1;
				i_346667 += 1;
			} LA3: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_346619)(NimStringDesc** a_346625, NI a_346625Len0, NimStringDesc* item_346628) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = find_346631(a_346625, a_346625Len0, item_346628);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isurl_346601)(trstparser344659* p, NI i) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = eqStrings((*p).Tok->data[(NI32)(i + 1)].Symbol, ((NimStringDesc*) &TMP2612));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).Tok->data[(NI32)(i + 2)].Symbol, ((NimStringDesc*) &TMP2613));
	LA4: ;
	LOC2 = LOC3;
	if (!(LOC2)) goto LA5;
	LOC2 = ((*p).Tok->data[(NI32)(i + 3)].Kind == ((NU8) 3));
	LA5: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA6;
	LOC1 = contains_346619(TMP2614, 5, (*p).Tok->data[i].Symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_346691)(trstparser344659* p, trstnode343011* father) {
	{
		NIM_BOOL LOC3;
		trstnode343011* n;
		LOC3 = 0;
		LOC3 = isurl_346601((&(*p)), (*p).Idx);
		if (!LOC3) goto LA4;
		n = newrstnode_343105(((NU8) 37));
		{
			while (1) {
				trstnode343011* LOC15;
				switch ((*p).Tok->data[(*p).Idx].Kind) {
				case ((NU8) 3):
				case ((NU8) 4):
				case ((NU8) 6):
				{
				}
				break;
				case ((NU8) 5):
				{
					{
						if (!!(((120 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0))) goto LA12;
						goto LA6;
					}
					LA12: ;
				}
				break;
				default:
				{
					goto LA6;
				}
				break;
				}
				LOC15 = 0;
				LOC15 = newleaf_345762(p);
				add_343183(n, LOC15);
				(*p).Idx += 1;
			}
		} LA6: ;
		add_343183(father, n);
	}
	goto LA1;
	LA4: ;
	{
		trstnode343011* n;
		n = newleaf_345762(p);
		(*p).Idx += 1;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2543))) goto LA19;
			n = parsepostfix_346275(p, n);
		}
		LA19: ;
		add_343183(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_347182)(trstparser344659* p, trstnode343011* father) {
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			trstnode343011* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2535));
			if (!LOC4) goto LA5;
			n = newrstnode_343105(((NU8) 59));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2535), NIM_TRUE);
			add_343183(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			trstnode343011* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2540));
			if (!LOC8) goto LA9;
			n = newrstnode_343105(((NU8) 58));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2540), NIM_TRUE);
			add_343183(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			trstnode343011* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2508));
			if (!LOC12) goto LA13;
			n = newrstnode_343105(((NU8) 57));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2508), NIM_TRUE);
			add_343183(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			trstnode343011* LOC20;
			LOC16 = 0;
			LOC16 = (((*(*p).S).Options &(1<<((((NU8) 3))&7)))!=0);
			if (!(LOC16)) goto LA17;
			LOC16 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2541));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).Idx += 1;
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_347104(p);
			add_343183(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			trstnode343011* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2537));
			if (!LOC22) goto LA23;
			n = newrstnode_343105(((NU8) 61));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2537), NIM_FALSE);
			add_343183(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			trstnode343011* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2542));
			if (!LOC26) goto LA27;
			n = newrstnode_343105(((NU8) 60));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2542), NIM_TRUE);
			n = parsepostfix_346275(p, n);
			add_343183(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			trstnode343011* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_345938((&(*p)), ((NimStringDesc*) &TMP2510));
			if (!LOC30) goto LA31;
			n = newrstnode_343105(((NU8) 62));
			parseuntil_347001(p, n, ((NimStringDesc*) &TMP2510), NIM_FALSE);
			add_343183(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				trstnode343011* n;
				if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_346380(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_343183(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_346749(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			trstnode343011* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_346380(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_343183(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_346691(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		trstnode343011* LOC60;
		{
			trstnode343011* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_346380(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_343183(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_345762(p);
		add_343183(father, LOC60);
		(*p).Idx += 1;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(void, parseline_347683)(trstparser344659* p, trstnode343011* father) {
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 5):
			{
				parseinline_347182(p, father);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(trstnode343011*, parsefield_347727)(trstparser344659* p) {
	trstnode343011* result;
	NI col;
	trstnode343011* fieldname;
	trstnode343011* fieldbody;
	result = 0;
	result = newrstnode_343105(((NU8) 14));
	col = (*p).Tok->data[(*p).Idx].Col;
	fieldname = newrstnode_343105(((NU8) 15));
	parseuntil_347001(p, fieldname, ((NimStringDesc*) &TMP2612), NIM_FALSE);
	fieldbody = newrstnode_343105(((NU8) 16));
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1)))) goto LA3;
		parseline_347683(p, fieldbody);
	}
	LA3: ;
	{
		NI indent;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA7;
		indent = (*p).Tok->data[(*p).Idx].Ival;
		{
			if (!(col < indent)) goto LA11;
			pushind_345211(p, indent);
			parsesection_347719(p, fieldbody);
			popind_345240(p);
		}
		LA11: ;
	}
	LA7: ;
	add_343183(result, fieldname);
	add_343183(result, fieldbody);
	return result;
}

N_NIMCALL(trstnode343011*, parsefields_347761)(trstparser344659* p) {
	trstnode343011* result;
	NIM_BOOL atstart;
	NIM_BOOL LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = ((*p).Idx == 0);
	if (!(LOC1)) goto LA2;
	LOC1 = eqStrings((*p).Tok->data[0].Symbol, ((NimStringDesc*) &TMP2612));
	LA2: ;
	atstart = LOC1;
	{
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI col;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
		if (!(LOC6)) goto LA7;
		LOC6 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2612));
		LA7: ;
		LOC5 = LOC6;
		if (LOC5) goto LA8;
		LOC5 = atstart;
		LA8: ;
		if (!LOC5) goto LA9;
		{
			if (!atstart) goto LA13;
			col = (*p).Tok->data[(*p).Idx].Col;
		}
		goto LA11;
		LA13: ;
		{
			col = (*p).Tok->data[(*p).Idx].Ival;
		}
		LA11: ;
		result = newrstnode_343105(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).Idx += 1;
		}
		LA18: ;
		{
			while (1) {
				trstnode343011* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_347727(p);
				add_343183(result, LOC22);
				{
					NIM_BOOL LOC25;
					NIM_BOOL LOC26;
					LOC25 = 0;
					LOC26 = 0;
					LOC26 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC26)) goto LA27;
					LOC26 = ((*p).Tok->data[(*p).Idx].Ival == col);
					LA27: ;
					LOC25 = LOC26;
					if (!(LOC25)) goto LA28;
					LOC25 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2612));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).Idx += 1;
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(trstnode343011*, parsedirective_351023)(trstparser344659* p, NU8 flags) {
	trstnode343011* result;
	trstnode343011* args;
	trstnode343011* options;
	result = 0;
	result = newrstnode_343105(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_343105(((NU8) 41));
		{
			if (!((flags &(1<<((((NU8) 2))&7)))!=0)) goto LA7;
			{
				while (1) {
					switch ((*p).Tok->data[(*p).Idx].Kind) {
					case ((NU8) 3):
					case ((NU8) 6):
					case ((NU8) 5):
					case ((NU8) 4):
					{
						trstnode343011* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_345762(p);
						add_343183(args, LOC12);
						(*p).Idx += 1;
					}
					break;
					default:
					{
						goto LA9;
					}
					break;
					}
				}
			} LA9: ;
		}
		goto LA5;
		LA7: ;
		{
			if (!((flags &(1<<((((NU8) 3))&7)))!=0)) goto LA15;
			{
				while (1) {
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA18;
					(*p).Idx += 1;
				} LA18: ;
			}
			{
				trstnode343011* LOC23;
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_345762(p);
				add_343183(args, LOC23);
				(*p).Idx += 1;
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_347683(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_343183(result, args);
	{
		if (!((flags &(1<<((((NU8) 1))&7)))!=0)) goto LA28;
		{
			NIM_BOOL LOC32;
			NIM_BOOL LOC33;
			LOC32 = 0;
			LOC33 = 0;
			LOC33 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
			if (!(LOC33)) goto LA34;
			LOC33 = (3 <= (*p).Tok->data[(*p).Idx].Ival);
			LA34: ;
			LOC32 = LOC33;
			if (!(LOC32)) goto LA35;
			LOC32 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2612));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_347761(p);
		}
		LA36: ;
	}
	LA28: ;
	add_343183(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_351168)(trstparser344659* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NI LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
	if (!(LOC1)) goto LA2;
	LOC3 = 0;
	LOC3 = currind_345201(p);
	LOC1 = (LOC3 < (*p).Tok->data[(*p).Idx].Ival);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(trstnode343011*, parsedirective_351188)(trstparser344659* p, NU8 flags, tsectionparser351012 contentparser) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351023(p, flags);
	{
		NIM_BOOL LOC3;
		trstnode343011* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_351168((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_345211(p, (*p).Tok->data[(*p).Idx].Ival);
		content = contentparser(p);
		popind_345240(p);
		add_343183(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_343183(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode343011*, dirinclude_351221)(trstparser344659* p) {
	trstnode343011* result;
	trstnode343011* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_351188(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_344067((*n).Sons->data[0]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	path = (*(*p).S).Findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_344972((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			trstnode343011* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_344073(n, ((NimStringDesc*) &TMP2547));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_343105(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_12842(path);
			LOC13 = 0;
			LOC13 = newrstnode_343151(((NU8) 64), LOC12);
			add_343183(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			trstparser344659 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI344659);
			initparser_345289((&q), (*p).S);
			q.Filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_12842(path);
			LOC16 = 0;
			LOC16 = gettokens_344465(LOC15, NIM_FALSE, (&q.Tok));
			q.Col += LOC16;
			result = parsedoc_349678((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(trstnode343011*, dirimage_351807)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 7, NIM_NIL);
	(*result).Kind = ((NU8) 45);
	return result;
}

N_NIMCALL(trstnode343011*, dirfigure_351819)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 7, parsesectionwrapper_350925);
	(*result).Kind = ((NU8) 46);
	return result;
}

N_NIMCALL(trstnode343011*, dirtitle_351831)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 43);
	return result;
}

N_NIMCALL(trstnode343011*, dircontainer_351408)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 1, parsesectionwrapper_350925);
	(*result).Kind = ((NU8) 50);
	return result;
}

N_NIMCALL(trstnode343011*, dircontents_351843)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 44);
	return result;
}

N_NIMCALL(trstnode343011*, parsedirbody_351209)(trstparser344659* p, tsectionparser351012 contentparser) {
	trstnode343011* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_351168((&(*p)));
		if (!LOC3) goto LA4;
		pushind_345211(p, (*p).Tok->data[(*p).Idx].Ival);
		result = contentparser(p);
		popind_345240(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_351868)(trstparser344659* p, trstnode343011** result, NU8 kind, tsectionparser351012 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_344073((*result), ((NimStringDesc*) &TMP2619));
	{
		NimStringDesc* path;
		if (!(0 < filename->Sup.len)) goto LA3;
		path = (*(*p).S).Findfile(filename);
		{
			if (!(path->Sup.len == 0)) goto LA7;
			rstmessage_344972((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			trstnode343011* LOC10;
			f = readfile_12842(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_343105(kind));
			LOC10 = 0;
			LOC10 = newrstnode_343151(((NU8) 64), f);
			add_343183((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		trstnode343011* LOC12;
		(*(*result)).Kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_351209(p, contentparser);
		add_343183((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(trstnode343011*, dirraw_351886)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351023(p, 11);
	{
		if (!!(((*result).Sons->data[0] == NIM_NIL))) goto LA3;
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = nsuCmpIgnoreCase((*(*(*result).Sons->data[0]).Sons->data[0]).Text, ((NimStringDesc*) &TMP2622));
			if (!(LOC7 == 0)) goto LA8;
			dirrawaux_351868(p, &result, ((NU8) 48), parseliteralblock_348707);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).Sons->data[0]).Sons->data[0]).Text, ((NimStringDesc*) &TMP2623));
			if (!(LOC11 == 0)) goto LA12;
			dirrawaux_351868(p, &result, ((NU8) 49), parseliteralblock_348707);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_344972((&(*p)), ((NU8) 5), (*(*(*result).Sons->data[0]).Sons->data[0]).Text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_351868(p, &result, ((NU8) 42), parsesectionwrapper_350925);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode343011*, dircodeblock_351253)(trstparser344659* p, NIM_BOOL nimrodextension) {
	trstnode343011* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_351188(p, 3, parseliteralblock_348707);
	LOC1 = 0;
	LOC1 = getfieldvalue_344073(result, ((NimStringDesc*) &TMP2619));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		NimStringDesc* path;
		trstnode343011* n;
		NimStringDesc* LOC10;
		trstnode343011* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).S).Findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_344972((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_343105(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_12842(path);
		LOC11 = 0;
		LOC11 = newrstnode_343151(((NU8) 64), LOC10);
		add_343183(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).Sons->data[2]), n);
	}
	LA4: ;
	{
		trstnode343011* extranode;
		trstnode343011* LOC20;
		trstnode343011* LOC21;
		trstnode343011* LOC22;
		trstnode343011* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).Sons->data[1] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).Sons->data[1]), newrstnode_343105(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_343105(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_343105(((NU8) 15));
		add_343183(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_343105(((NU8) 16));
		add_343183(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2624));
		add_343183((*extranode).Sons->data[0], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2625));
		add_343183((*extranode).Sons->data[1], LOC23);
		add_343183((*result).Sons->data[1], extranode);
	}
	LA14: ;
	(*result).Kind = ((NU8) 47);
	return result;
}

N_NIMCALL(trstnode343011*, dirindex_351855)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsedirective_351188(p, 0, parsesectionwrapper_350925);
	(*result).Kind = ((NU8) 51);
	return result;
}

N_NIMCALL(trstnode343011*, getreferencename_345773)(trstparser344659* p, NimStringDesc* endstr) {
	trstnode343011* result;
	trstnode343011* res;
	result = 0;
	res = newrstnode_343105(((NU8) 0));
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				trstnode343011* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_345762(p);
				add_343183(res, LOC4);
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, endstr)) goto LA8;
					(*p).Idx += 1;
					goto LA1;
				}
				goto LA6;
				LA8: ;
				{
					trstnode343011* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_345762(p);
					add_343183(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_344972((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).Idx += 1;
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(trstnode343011*, untileol_345817)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = newrstnode_343105(((NU8) 0));
	{
		while (1) {
			trstnode343011* LOC3;
			if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_345762(p);
			add_343183(result, LOC3);
			(*p).Idx += 1;
		} LA2: ;
	}
	return result;
}

N_NIMCALL(void, expect_345861)(trstparser344659* p, NimStringDesc* tok) {
	{
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, tok)) goto LA3;
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		rstmessage_344972((&(*p)), ((NU8) 1), tok);
	}
	LA1: ;
}

N_NIMCALL(void, setsub_345586)(trstparser344659* p, NimStringDesc* key, trstnode343011* value) {
	NI length;
	NimStringDesc* LOC8;
	length = (*(*p).S).Subs->Sup.len;
	{
		NI i_345616;
		NI HEX3Atmp_345634;
		NI res_345637;
		i_345616 = 0;
		HEX3Atmp_345634 = 0;
		HEX3Atmp_345634 = (NI32)(length - 1);
		res_345637 = 0;
		{
			while (1) {
				if (!(res_345637 <= HEX3Atmp_345634)) goto LA3;
				i_345616 = res_345637;
				{
					if (!eqStrings(key, (*(*p).S).Subs->data[i_345616].Key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).S).Subs->data[i_345616].Value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_345637 += 1;
			} LA3: ;
		}
	}
	(*(*p).S).Subs = (TY344669*) setLengthSeq(&((*(*p).S).Subs)->Sup, sizeof(tsubstitution344653), (NI32)(length + 1));
	LOC8 = 0;
	LOC8 = (*(*p).S).Subs->data[length].Key; (*(*p).S).Subs->data[length].Key = copyStringRC1(key);
	if (LOC8) nimGCunrefNoCycle(LOC8);
	asgnRefNoCycle((void**) (&(*(*p).S).Subs->data[length].Value), value);
	BeforeRet: ;
}

N_NIMCALL(trstnode343011*, parsecomment_347470)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 1):
	case ((NU8) 0):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)));
			if (!(LOC4)) goto LA5;
			LOC4 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 1));
			LA5: ;
			if (!LOC4) goto LA6;
			(*p).Idx += 1;
		}
		goto LA2;
		LA6: ;
		{
			NI indent;
			indent = (*p).Tok->data[(*p).Idx].Ival;
			{
				while (1) {
					switch ((*p).Tok->data[(*p).Idx].Kind) {
					case ((NU8) 0):
					{
						goto LA9;
					}
					break;
					case ((NU8) 1):
					{
						{
							if (!((*p).Tok->data[(*p).Idx].Ival < indent)) goto LA15;
							goto LA9;
						}
						LA15: ;
					}
					break;
					default:
					{
					}
					break;
					}
					(*p).Idx += 1;
				}
			} LA9: ;
		}
		LA2: ;
	}
	break;
	default:
	{
		{
			while (1) {
				if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA20;
				(*p).Idx += 1;
			} LA20: ;
		}
	}
	break;
	}
	result = NIM_NIL;
	return result;
}

N_NIMCALL(trstnode343011*, parsedotdot_348700)(trstparser344659* p) {
	trstnode343011* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).Tok->data[(*p).Idx].Col;
	(*p).Idx += 1;
	d = getdirective_347329(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_345211(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_347591(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_351221(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_351807(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_351819(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_351831(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_351408(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_351843(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).S).Options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_351886(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_344972((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_351253(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_351253(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_351855(p);
		}
		break;
		default:
		{
			rstmessage_344972((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_345240(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		trstnode343011* a;
		trstnode343011* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_345995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2626));
		if (!LOC23) goto LA24;
		(*p).Idx += 2;
		a = getreferencename_345773(p, ((NimStringDesc*) &TMP2612));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA28;
			(*p).Idx += 1;
		}
		LA28: ;
		b = untileol_345817(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_344061(a);
		setref_345654(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		trstnode343011* a;
		trstnode343011* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_345995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2627));
		if (!LOC32) goto LA33;
		(*p).Idx += 2;
		a = getreferencename_345773(p, ((NimStringDesc*) &TMP2510));
		b = 0;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA37;
			(*p).Idx += 1;
		}
		LA37: ;
		{
			NI LOC41;
			LOC41 = 0;
			LOC41 = nsuCmpIgnoreStyle((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2628));
			if (!(LOC41 == 0)) goto LA42;
			(*p).Idx += 1;
			expect_345861(p, ((NimStringDesc*) &TMP2506));
			b = untileol_345817(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2528));
			if (!(LOC45 == 0)) goto LA46;
			(*p).Idx += 1;
			b = dirimage_351807(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_344972((&(*p)), ((NU8) 5), (*p).Tok->data[(*p).Idx].Symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_344067(a);
		setsub_345586(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		trstnode343011* a;
		trstnode343011* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_345995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2629));
		if (!LOC51) goto LA52;
		(*p).Idx += 2;
		a = getreferencename_345773(p, ((NimStringDesc*) &TMP2630));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA56;
			(*p).Idx += 1;
		}
		LA56: ;
		b = untileol_345817(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_344061(a);
		setref_345654(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_347470(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode343011*, parseenumlist_350524)(trstparser344659* p) {
	trstnode343011* result;
	NI w;
	result = 0;
	result = NIM_NIL;
	w = 0;
	{
		while (1) {
			if (!(w <= 2)) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = match_345995((&(*p)), (*p).Idx, wildcards_350529[(w)- 0]);
				if (!LOC5) goto LA6;
				goto LA1;
			}
			LA6: ;
			w += 1;
		} LA2: ;
	} LA1: ;
	{
		NI col;
		NI j;
		if (!(w <= 2)) goto LA10;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_343105(((NU8) 7));
		(*p).Idx += (NI32)(wildpos_350534[(w)- 0] + 3);
		j = tokenafternewline_348832((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).Tok->data[j].Col == (*p).Tok->data[(*p).Idx].Col);
			if (LOC14) goto LA15;
			LOC14 = match_345995((&(*p)), j, wildcards_350529[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_345211(p, (*p).Tok->data[(*p).Idx].Col);
			{
				while (1) {
					trstnode343011* item;
					item = newrstnode_343105(((NU8) 8));
					parsesection_347719(p, item);
					add_343183(result, item);
					{
						NIM_BOOL LOC22;
						NIM_BOOL LOC23;
						LOC22 = 0;
						LOC23 = 0;
						LOC23 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
						if (!(LOC23)) goto LA24;
						LOC23 = ((*p).Tok->data[(*p).Idx].Ival == col);
						LA24: ;
						LOC22 = LOC23;
						if (!(LOC22)) goto LA25;
						LOC22 = match_345995((&(*p)), (NI32)((*p).Idx + 1), wildcards_350529[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).Idx += (NI32)(wildpos_350534[(w)- 0] + 4);
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_345240(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).Idx -= (NI32)(wildpos_350534[(w)- 0] + 3);
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(trstnode343011*, parsedefinitionlist_350427)(trstparser344659* p) {
	trstnode343011* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_348832((&(*p)));
	j = (NI32)(LOC1 - 1);
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI LOC9;
		NI col;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = (1 <= j);
		if (!(LOC6)) goto LA7;
		LOC6 = ((*p).Tok->data[j].Kind == ((NU8) 1));
		LA7: ;
		LOC5 = LOC6;
		if (!(LOC5)) goto LA8;
		LOC9 = 0;
		LOC9 = currind_345201((&(*p)));
		LOC5 = (LOC9 < (*p).Tok->data[j].Ival);
		LA8: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA10;
		LOC4 = !(eqStrings((*p).Tok->data[(NI32)(j - 1)].Symbol, ((NimStringDesc*) &TMP2506)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_343105(((NU8) 9));
		{
			while (1) {
				trstnode343011* a;
				j = (*p).Idx;
				a = newrstnode_343105(((NU8) 11));
				parseline_347683(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					trstnode343011* b;
					trstnode343011* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_345201((&(*p)));
					LOC19 = (LOC21 < (*p).Tok->data[(*p).Idx].Ival);
					LA20: ;
					LOC18 = LOC19;
					if (!(LOC18)) goto LA22;
					LOC18 = !(eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2506)));
					LA22: ;
					LOC17 = LOC18;
					if (!(LOC17)) goto LA23;
					LOC17 = !(((3 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0));
					LA23: ;
					if (!LOC17) goto LA24;
					pushind_345211(p, (*p).Tok->data[(*p).Idx].Ival);
					b = newrstnode_343105(((NU8) 12));
					parsesection_347719(p, b);
					c = newrstnode_343105(((NU8) 10));
					add_343183(c, a);
					add_343183(c, b);
					add_343183(result, c);
					popind_345240(p);
				}
				goto LA15;
				LA24: ;
				{
					(*p).Idx = j;
					goto LA13;
				}
				LA15: ;
				{
					NIM_BOOL LOC29;
					NI LOC33;
					LOC29 = 0;
					LOC29 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC29)) goto LA30;
					LOC29 = ((*p).Tok->data[(*p).Idx].Ival == col);
					LA30: ;
					if (!LOC29) goto LA31;
					(*p).Idx += 1;
					LOC33 = 0;
					LOC33 = tokenafternewline_348832((&(*p)));
					j = (NI32)(LOC33 - 1);
					{
						NIM_BOOL LOC36;
						NIM_BOOL LOC37;
						NIM_BOOL LOC38;
						NIM_BOOL LOC39;
						LOC36 = 0;
						LOC37 = 0;
						LOC38 = 0;
						LOC39 = 0;
						LOC39 = (1 <= j);
						if (!(LOC39)) goto LA40;
						LOC39 = ((*p).Tok->data[j].Kind == ((NU8) 1));
						LA40: ;
						LOC38 = LOC39;
						if (!(LOC38)) goto LA41;
						LOC38 = (col < (*p).Tok->data[j].Ival);
						LA41: ;
						LOC37 = LOC38;
						if (!(LOC37)) goto LA42;
						LOC37 = !(eqStrings((*p).Tok->data[(NI32)(j - 1)].Symbol, ((NimStringDesc*) &TMP2506)));
						LA42: ;
						LOC36 = LOC37;
						if (!(LOC36)) goto LA43;
						LOC36 = !(((*p).Tok->data[(NI32)(j + 1)].Kind == ((NU8) 1)));
						LA43: ;
						if (!LOC36) goto LA44;
					}
					goto LA34;
					LA44: ;
					{
						goto LA13;
					}
					LA34: ;
				}
				LA31: ;
			}
		} LA13: ;
		{
			NI LOC49;
			LOC49 = 0;
			LOC49 = len_343084(result);
			if (!(LOC49 == 0)) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(trstnode343011*, parsetransition_350072)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = newrstnode_343105(((NU8) 3));
	(*p).Idx += 1;
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA3;
		(*p).Idx += 1;
	}
	LA3: ;
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA7;
		(*p).Idx += 1;
	}
	LA7: ;
	return result;
}

N_NIMCALL(void, parseuntilnewline_347701)(trstparser344659* p, trstnode343011* father) {
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			case ((NU8) 5):
			{
				parseinline_347182(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NI, getlevel_348806)(NI* map, NI* lvl, NIM_CHAR c) {
	NI result;
	result = 0;
	{
		if (!(map[(((NU8)(c)))- 0] == 0)) goto LA3;
		(*lvl) += 1;
		map[(((NU8)(c)))- 0] = (*lvl);
	}
	LA3: ;
	result = map[(((NU8)(c)))- 0];
	return result;
}

N_NIMCALL(trstnode343011*, parseheadline_349104)(trstparser344659* p) {
	trstnode343011* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_343105(((NU8) 1));
	parseuntilnewline_347701(p, result);
	c = (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0];
	(*p).Idx += 2;
	(*result).Level = getlevel_348806((*(*p).S).Underlinetolevel, (&(*(*p).S).Ulevel), c);
	return result;
}

N_NIMCALL(trstnode343011*, parseoverline_350137)(trstparser344659* p) {
	trstnode343011* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).Tok->data[(*p).Idx].Symbol->data[0];
	(*p).Idx += 2;
	result = newrstnode_343105(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_347701(p, result);
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA5;
				(*p).Idx += 1;
				{
					NI LOC9;
					trstnode343011* LOC12;
					LOC9 = 0;
					LOC9 = currind_345201((&(*p)));
					if (!(LOC9 < (*p).Tok->data[(NI32)((*p).Idx - 1)].Ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2539));
					add_343183(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).Level = getlevel_348806((*(*p).S).Overlinetolevel, (&(*(*p).S).Olevel), c);
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4))) goto LA17;
		(*p).Idx += 1;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA21;
			(*p).Idx += 1;
		}
		LA21: ;
	}
	LA17: ;
	return result;
}

N_NIMCALL(NI, tokend_349427)(trstparser344659* p) {
	NI result;
	result = 0;
	result = (NI32)((NI32)((*p).Tok->data[(*p).Idx].Col + (*p).Tok->data[(*p).Idx].Symbol->Sup.len) - 1);
	return result;
}

N_NIMCALL(void, getcolumns_349437)(trstparser344659* p, TY344680** cols) {
	NI l;
	l = 0;
	{
		while (1) {
			l += 1;
			(*cols) = (TY344680*) setLengthSeq(&((*cols))->Sup, sizeof(NI), l);
			(*cols)->data[(NI32)(l - 1)] = tokend_349427((&(*p)));
			(*p).Idx += 1;
			{
				if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			(*p).Idx += 1;
			{
				if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4)))) goto LA9;
				goto LA1;
			}
			LA9: ;
		}
	} LA1: ;
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA13;
		(*p).Idx += 1;
	}
	LA13: ;
	(*cols)->data[(NI32)(l - 1)] = 32000;
}

N_NIMCALL(trstnode343011*, parsesimpletable_349685)(trstparser344659* p) {
	trstnode343011* result;
	TY344680* cols;
	TY119808* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	trstparser344659 q;
	trstnode343011* a;
	trstnode343011* b;
	result = 0;
	cols = 0;
	row = 0;
	i = 0;
	last = 0;
	line = 0;
	c = 0;
	memset((void*)(&q), 0, sizeof(q));
	q.Sup.m_type = (&NTI344659);
	a = 0;
	b = 0;
	result = newrstnode_343105(((NU8) 29));
	cols = (TY344680*) newSeq((&NTI344680), 0);
	row = (TY119808*) newSeq((&NTI119808), 0);
	a = NIM_NIL;
	c = (*p).Tok->data[(*p).Idx].Symbol->data[0];
	{
		while (1) {
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4))) goto LA5;
				last = tokenafternewline_348832((&(*p)));
				{
					if (!((3 &(1<<(((*p).Tok->data[last].Kind)&7)))!=0)) goto LA9;
					(*p).Idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_349437(p, (&cols));
				row = (TY119808*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), cols->Sup.len);
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_349818;
						NI HEX3Atmp_349987;
						NI LOC16;
						NI res_349990;
						j_349818 = 0;
						HEX3Atmp_349987 = 0;
						LOC16 = 0;
						LOC16 = len_343084(a);
						HEX3Atmp_349987 = (NI32)(LOC16 - 1);
						res_349990 = 0;
						{
							while (1) {
								if (!(res_349990 <= HEX3Atmp_349987)) goto LA18;
								j_349818 = res_349990;
								(*(*a).Sons->data[j_349818]).Kind = ((NU8) 32);
								res_349990 += 1;
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_349840;
				NI HEX3Atmp_349993;
				NI res_349996;
				j_349840 = 0;
				HEX3Atmp_349993 = 0;
				HEX3Atmp_349993 = (row->Sup.len-1);
				res_349996 = 0;
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_349996 <= HEX3Atmp_349993)) goto LA25;
						j_349840 = res_349996;
						LOC26 = 0;
						LOC26 = row->data[j_349840]; row->data[j_349840] = copyStringRC1(((NimStringDesc*) &TMP2114));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_349996 += 1;
					} LA25: ;
				}
			}
			line = (*p).Tok->data[(*p).Idx].Line;
			{
				while (1) {
					i = 0;
					{
						while (1) {
							if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA30;
							{
								NI LOC33;
								LOC33 = 0;
								LOC33 = tokend_349427((&(*p)));
								if (!(LOC33 <= cols->data[i])) goto LA34;
								row->data[i] = resizeString(row->data[i], (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString(row->data[i], (*p).Tok->data[(*p).Idx].Symbol);
								(*p).Idx += 1;
							}
							goto LA31;
							LA34: ;
							{
								{
									if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA39;
									(*p).Idx += 1;
								}
								LA39: ;
								i += 1;
							}
							LA31: ;
						} LA30: ;
					}
					{
						if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA43;
						(*p).Idx += 1;
					}
					LA43: ;
					{
						NI LOC47;
						LOC47 = 0;
						LOC47 = tokend_349427((&(*p)));
						if (!(LOC47 <= cols->data[0])) goto LA48;
						goto LA27;
					}
					LA48: ;
					{
						if (!((17 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0)) goto LA52;
						goto LA27;
					}
					LA52: ;
					{
						NI j_349947;
						NI HEX3Atmp_350001;
						NI res_350004;
						j_349947 = 0;
						HEX3Atmp_350001 = 0;
						HEX3Atmp_350001 = (row->Sup.len-1);
						res_350004 = 1;
						{
							while (1) {
								if (!(res_350004 <= HEX3Atmp_350001)) goto LA56;
								j_349947 = res_350004;
								row->data[j_349947] = addChar(row->data[j_349947], 10);
								res_350004 += 1;
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_343105(((NU8) 31));
			{
				NI j_349960;
				NI HEX3Atmp_350007;
				NI res_350010;
				j_349960 = 0;
				HEX3Atmp_350007 = 0;
				HEX3Atmp_350007 = (row->Sup.len-1);
				res_350010 = 0;
				{
					while (1) {
						NI LOC60;
						trstnode343011* LOC61;
						if (!(res_350010 <= HEX3Atmp_350007)) goto LA59;
						j_349960 = res_350010;
						initparser_345289((&q), (*p).S);
						q.Col = cols->data[j_349960];
						q.Line = (NI32)(line - 1);
						q.Filename = copyString((*p).Filename);
						LOC60 = 0;
						LOC60 = gettokens_344465(row->data[j_349960], NIM_FALSE, (&q.Tok));
						q.Col += LOC60;
						b = newrstnode_343105(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_349678((&q));
						add_343183(b, LOC61);
						add_343183(a, b);
						res_350010 += 1;
					} LA59: ;
				}
			}
			add_343183(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(trstnode343011*, parseoptionlist_350306)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = newrstnode_343105(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				trstnode343011* a;
				trstnode343011* b;
				trstnode343011* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_348931((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_343105(((NU8) 19));
				b = newrstnode_343105(((NU8) 23));
				c = newrstnode_343105(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_345995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2518));
					if (!LOC10) goto LA11;
					(*p).Idx += 1;
				}
				LA11: ;
				{
					while (1) {
						trstnode343011* LOC21;
						if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA14;
						{
							NIM_BOOL LOC17;
							LOC17 = 0;
							LOC17 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2));
							if (!(LOC17)) goto LA18;
							LOC17 = (1 < (*p).Tok->data[(*p).Idx].Symbol->Sup.len);
							LA18: ;
							if (!LOC17) goto LA19;
							(*p).Idx += 1;
							goto LA13;
						}
						LA19: ;
						LOC21 = 0;
						LOC21 = newleaf_345762(p);
						add_343183(a, LOC21);
						(*p).Idx += 1;
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_348832((&(*p)));
				{
					NIM_BOOL LOC24;
					NIM_BOOL LOC25;
					NI LOC28;
					LOC24 = 0;
					LOC25 = 0;
					LOC25 = (0 < j);
					if (!(LOC25)) goto LA26;
					LOC25 = ((*p).Tok->data[(NI32)(j - 1)].Kind == ((NU8) 1));
					LA26: ;
					LOC24 = LOC25;
					if (!(LOC24)) goto LA27;
					LOC28 = 0;
					LOC28 = currind_345201((&(*p)));
					LOC24 = (LOC28 < (*p).Tok->data[(NI32)(j - 1)].Ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_345211(p, (*p).Tok->data[(NI32)(j - 1)].Ival);
					parsesection_347719(p, b);
					popind_345240(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_347683(p, b);
				}
				LA22: ;
				{
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA34;
					(*p).Idx += 1;
				}
				LA34: ;
				add_343183(c, a);
				add_343183(c, b);
				add_343183(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_349031)(trstparser344659* p, trstnode343011* result) {
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 1):
			{
				{
					if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 1))) goto LA6;
					(*p).Idx += 1;
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					NI LOC9;
					NU8 LOC12;
					LOC9 = 0;
					LOC9 = currind_345201((&(*p)));
					if (!((*p).Tok->data[(*p).Idx].Ival == LOC9)) goto LA10;
					(*p).Idx += 1;
					LOC12 = 0;
					LOC12 = whichsection_348941((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						trstnode343011* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2539));
						add_343183(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						trstnode343011* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_348960(p);
						addifnotnil_343211(result, LOC16);
					}
					break;
					default:
					{
						goto LA1;
					}
					break;
					}
				}
				goto LA4;
				LA10: ;
				{
					goto LA1;
				}
				LA4: ;
			}
			break;
			case ((NU8) 5):
			{
				{
					NIM_BOOL LOC22;
					NIM_BOOL LOC23;
					NI LOC26;
					trstnode343011* LOC29;
					trstnode343011* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2506));
					if (!(LOC23)) goto LA24;
					LOC23 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 1));
					LA24: ;
					LOC22 = LOC23;
					if (!(LOC22)) goto LA25;
					LOC26 = 0;
					LOC26 = currind_345201((&(*p)));
					LOC22 = (LOC26 < (*p).Tok->data[(NI32)((*p).Idx + 1)].Ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_343151(((NU8) 64), ((NimStringDesc*) &TMP2612));
					add_343183(result, LOC29);
					(*p).Idx += 1;
					LOC30 = 0;
					LOC30 = parseliteralblock_348707(p);
					add_343183(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_347182(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_347182(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NU8, sonkind_350620)(trstnode343011* father, NI i) {
	NU8 result;
	result = 0;
	result = ((NU8) 64);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_343084(father);
		if (!(i < LOC3)) goto LA4;
		result = (*(*father).Sons->data[i]).Kind;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, parsesection_347719)(trstparser344659* p, trstnode343011* result) {
	{
		while (1) {
			NIM_BOOL leave;
			trstnode343011* a;
			NU8 k;
			leave = NIM_FALSE;
			{
				while (1) {
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA4;
					{
						NI LOC7;
						LOC7 = 0;
						LOC7 = currind_345201((&(*p)));
						if (!(LOC7 == (*p).Tok->data[(*p).Idx].Ival)) goto LA8;
						(*p).Idx += 1;
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						trstnode343011* a;
						LOC11 = 0;
						LOC11 = currind_345201((&(*p)));
						if (!(LOC11 < (*p).Tok->data[(*p).Idx].Ival)) goto LA12;
						pushind_345211(p, (*p).Tok->data[(*p).Idx].Ival);
						a = newrstnode_343105(((NU8) 28));
						parsesection_347719(p, a);
						add_343183(result, a);
						popind_345240(p);
					}
					goto LA5;
					LA12: ;
					{
						leave = NIM_TRUE;
						goto LA3;
					}
					LA5: ;
				} LA4: ;
			} LA3: ;
			{
				NIM_BOOL LOC17;
				LOC17 = 0;
				LOC17 = leave;
				if (LOC17) goto LA18;
				LOC17 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0));
				LA18: ;
				if (!LOC17) goto LA19;
				goto LA1;
			}
			LA19: ;
			a = NIM_NIL;
			k = whichsection_348941((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).Idx += 1;
				a = parseliteralblock_348707(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_350234(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_348960(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_348700(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_350524(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_344996((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_350427(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(0 < (*p).Idx)) goto LA32;
					(*p).Idx -= 1;
				}
				LA32: ;
				a = parsefields_347761(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_350072(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_349104(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_350137(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_349685(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_350306(p);
			}
			break;
			default:
			{
			}
			break;
			}
			{
				NIM_BOOL LOC42;
				LOC42 = 0;
				LOC42 = (a == NIM_NIL);
				if (!(LOC42)) goto LA43;
				LOC42 = !((k == ((NU8) 40)));
				LA43: ;
				if (!LOC42) goto LA44;
				a = newrstnode_343105(((NU8) 4));
				parseparagraph_349031(p, a);
			}
			LA44: ;
			addifnotnil_343211(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_350620(result, 0);
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_350620(result, 1);
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).Sons->data[0]).Kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(trstnode343011*, parsesectionwrapper_350925)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = newrstnode_343105(((NU8) 0));
	parsesection_347719(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).Kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_343084(result);
			LOC3 = (LOC5 == 1);
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).Sons->data[0];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(trstnode343011*, parsedoc_349678)(trstparser344659* p) {
	trstnode343011* result;
	result = 0;
	result = parsesectionwrapper_350925(p);
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA3;
		rstmessage_344996((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode343011*, rstparse_352164)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, tfindfilehandler344023 findfile, tmsghandler344021 msghandler) {
	trstnode343011* result;
	trstparser344659 p;
	tsharedstate344655* LOC1;
	NI LOC2;
	trstnode343011* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI344659);
	LOC1 = 0;
	LOC1 = newsharedstate_344890(options, findfile, msghandler);
	initparser_345289((&p), LOC1);
	p.Filename = copyString(filename);
	p.Line = line;
	LOC2 = 0;
	LOC2 = gettokens_344465(text, ((options &(1<<((((NU8) 0))&7)))!=0), (&p.Tok));
	p.Col = (NI32)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_349678((&p));
	result = resolvesubs_352086((&p), LOC3);
	(*hastoc) = p.Hastoc;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, docutils_rstInit)(void) {
}

NIM_EXTERNC N_NOINLINE(void, docutils_rstDatInit)(void) {
static TNimNode* TMP2456[8];
static TNimNode* TMP2457[5];
static TNimNode* TMP2458[7];
NI TMP2460;
static char* NIM_CONST TMP2459[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2462[9];
static TNimNode* TMP2463[4];
NI TMP2465;
static char* NIM_CONST TMP2464[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2466[2];
static TNimNode* TMP2478[10];
NI TMP2480;
static char* NIM_CONST TMP2479[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2492[3];
NI TMP2494;
static char* NIM_CONST TMP2493[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2497[6];
static TNimNode TMP886[65];
NTI344659.size = sizeof(trstparser344659);
NTI344659.kind = 17;
NTI344659.base = (&NTI3211);
TMP2456[0] = &TMP886[1];
TMP886[1].kind = 1;
TMP886[1].offset = offsetof(trstparser344659, Idx);
TMP886[1].typ = (&NTI108);
TMP886[1].name = "idx";
TMP2456[1] = &TMP886[2];
NTI344135.size = sizeof(ttoken344135);
NTI344135.kind = 18;
NTI344135.base = 0;
NTI344135.flags = 2;
TMP2457[0] = &TMP886[4];
NTI344133.size = sizeof(NU8);
NTI344133.kind = 14;
NTI344133.base = 0;
NTI344133.flags = 3;
for (TMP2460 = 0; TMP2460 < 7; TMP2460++) {
TMP886[TMP2460+5].kind = 1;
TMP886[TMP2460+5].offset = TMP2460;
TMP886[TMP2460+5].name = TMP2459[TMP2460];
TMP2458[TMP2460] = &TMP886[TMP2460+5];
}
TMP886[12].len = 7; TMP886[12].kind = 2; TMP886[12].sons = &TMP2458[0];
NTI344133.node = &TMP886[12];
TMP886[4].kind = 1;
TMP886[4].offset = offsetof(ttoken344135, Kind);
TMP886[4].typ = (&NTI344133);
TMP886[4].name = "kind";
TMP2457[1] = &TMP886[13];
TMP886[13].kind = 1;
TMP886[13].offset = offsetof(ttoken344135, Ival);
TMP886[13].typ = (&NTI108);
TMP886[13].name = "ival";
TMP2457[2] = &TMP886[14];
TMP886[14].kind = 1;
TMP886[14].offset = offsetof(ttoken344135, Symbol);
TMP886[14].typ = (&NTI149);
TMP886[14].name = "symbol";
TMP2457[3] = &TMP886[15];
TMP886[15].kind = 1;
TMP886[15].offset = offsetof(ttoken344135, Line);
TMP886[15].typ = (&NTI108);
TMP886[15].name = "line";
TMP2457[4] = &TMP886[16];
TMP886[16].kind = 1;
TMP886[16].offset = offsetof(ttoken344135, Col);
TMP886[16].typ = (&NTI108);
TMP886[16].name = "col";
TMP886[3].len = 5; TMP886[3].kind = 2; TMP886[3].sons = &TMP2457[0];
NTI344135.node = &TMP886[3];
NTI344137.size = sizeof(ttokenseq344137*);
NTI344137.kind = 24;
NTI344137.base = (&NTI344135);
NTI344137.flags = 2;
NTI344137.marker = TMP2461;
TMP886[2].kind = 1;
TMP886[2].offset = offsetof(trstparser344659, Tok);
TMP886[2].typ = (&NTI344137);
TMP886[2].name = "tok";
TMP2456[2] = &TMP886[17];
NTI344655.size = sizeof(tsharedstate344655);
NTI344655.kind = 18;
NTI344655.base = 0;
NTI344655.flags = 2;
TMP2462[0] = &TMP886[19];
NTI344013.size = sizeof(NU8);
NTI344013.kind = 14;
NTI344013.base = 0;
NTI344013.flags = 3;
for (TMP2465 = 0; TMP2465 < 4; TMP2465++) {
TMP886[TMP2465+20].kind = 1;
TMP886[TMP2465+20].offset = TMP2465;
TMP886[TMP2465+20].name = TMP2464[TMP2465];
TMP2463[TMP2465] = &TMP886[TMP2465+20];
}
TMP886[24].len = 4; TMP886[24].kind = 2; TMP886[24].sons = &TMP2463[0];
NTI344013.node = &TMP886[24];
NTI344015.size = sizeof(NU8);
NTI344015.kind = 19;
NTI344015.base = (&NTI344013);
NTI344015.flags = 3;
TMP886[25].len = 0; TMP886[25].kind = 0;
NTI344015.node = &TMP886[25];
TMP886[19].kind = 1;
TMP886[19].offset = offsetof(tsharedstate344655, Options);
TMP886[19].typ = (&NTI344015);
TMP886[19].name = "options";
TMP2462[1] = &TMP886[26];
TMP886[26].kind = 1;
TMP886[26].offset = offsetof(tsharedstate344655, Ulevel);
TMP886[26].typ = (&NTI108);
TMP886[26].name = "uLevel";
TMP2462[2] = &TMP886[27];
TMP886[27].kind = 1;
TMP886[27].offset = offsetof(tsharedstate344655, Olevel);
TMP886[27].typ = (&NTI108);
TMP886[27].name = "oLevel";
TMP2462[3] = &TMP886[28];
NTI344653.size = sizeof(tsubstitution344653);
NTI344653.kind = 18;
NTI344653.base = 0;
NTI344653.flags = 2;
TMP2466[0] = &TMP886[30];
TMP886[30].kind = 1;
TMP886[30].offset = offsetof(tsubstitution344653, Key);
TMP886[30].typ = (&NTI149);
TMP886[30].name = "key";
TMP2466[1] = &TMP886[31];
TMP886[31].kind = 1;
TMP886[31].offset = offsetof(tsubstitution344653, Value);
TMP886[31].typ = (&NTI343007);
TMP886[31].name = "value";
TMP886[29].len = 2; TMP886[29].kind = 2; TMP886[29].sons = &TMP2466[0];
NTI344653.node = &TMP886[29];
NTI344669.size = sizeof(TY344669*);
NTI344669.kind = 24;
NTI344669.base = (&NTI344653);
NTI344669.flags = 2;
NTI344669.marker = TMP2473;
TMP886[28].kind = 1;
TMP886[28].offset = offsetof(tsharedstate344655, Subs);
TMP886[28].typ = (&NTI344669);
TMP886[28].name = "subs";
TMP2462[4] = &TMP886[32];
TMP886[32].kind = 1;
TMP886[32].offset = offsetof(tsharedstate344655, Refs);
TMP886[32].typ = (&NTI344669);
TMP886[32].name = "refs";
TMP2462[5] = &TMP886[33];
TMP886[33].kind = 1;
TMP886[33].offset = offsetof(tsharedstate344655, Underlinetolevel);
TMP886[33].typ = (&NTI96742);
TMP886[33].name = "underlineToLevel";
TMP2462[6] = &TMP886[34];
TMP886[34].kind = 1;
TMP886[34].offset = offsetof(tsharedstate344655, Overlinetolevel);
TMP886[34].typ = (&NTI96742);
TMP886[34].name = "overlineToLevel";
TMP2462[7] = &TMP886[35];
NTI344021.size = sizeof(tmsghandler344021);
NTI344021.kind = 25;
NTI344021.base = 0;
NTI344021.flags = 3;
TMP886[35].kind = 1;
TMP886[35].offset = offsetof(tsharedstate344655, Msghandler);
TMP886[35].typ = (&NTI344021);
TMP886[35].name = "msgHandler";
TMP2462[8] = &TMP886[36];
NTI344023.size = sizeof(tfindfilehandler344023);
NTI344023.kind = 25;
NTI344023.base = 0;
NTI344023.flags = 3;
TMP886[36].kind = 1;
TMP886[36].offset = offsetof(tsharedstate344655, Findfile);
TMP886[36].typ = (&NTI344023);
TMP886[36].name = "findFile";
TMP886[18].len = 9; TMP886[18].kind = 2; TMP886[18].sons = &TMP2462[0];
NTI344655.node = &TMP886[18];
NTI344657.size = sizeof(tsharedstate344655*);
NTI344657.kind = 22;
NTI344657.base = (&NTI344655);
NTI344657.flags = 2;
NTI344657.marker = TMP2474;
TMP886[17].kind = 1;
TMP886[17].offset = offsetof(trstparser344659, S);
TMP886[17].typ = (&NTI344657);
TMP886[17].name = "s";
TMP2456[3] = &TMP886[37];
NTI344680.size = sizeof(TY344680*);
NTI344680.kind = 24;
NTI344680.base = (&NTI108);
NTI344680.flags = 2;
NTI344680.marker = TMP2475;
TMP886[37].kind = 1;
TMP886[37].offset = offsetof(trstparser344659, Indentstack);
TMP886[37].typ = (&NTI344680);
TMP886[37].name = "indentStack";
TMP2456[4] = &TMP886[38];
TMP886[38].kind = 1;
TMP886[38].offset = offsetof(trstparser344659, Filename);
TMP886[38].typ = (&NTI149);
TMP886[38].name = "filename";
TMP2456[5] = &TMP886[39];
TMP886[39].kind = 1;
TMP886[39].offset = offsetof(trstparser344659, Line);
TMP886[39].typ = (&NTI108);
TMP886[39].name = "line";
TMP2456[6] = &TMP886[40];
TMP886[40].kind = 1;
TMP886[40].offset = offsetof(trstparser344659, Col);
TMP886[40].typ = (&NTI108);
TMP886[40].name = "col";
TMP2456[7] = &TMP886[41];
TMP886[41].kind = 1;
TMP886[41].offset = offsetof(trstparser344659, Hastoc);
TMP886[41].typ = (&NTI138);
TMP886[41].name = "hasToc";
TMP886[0].len = 8; TMP886[0].kind = 2; TMP886[0].sons = &TMP2456[0];
NTI344659.node = &TMP886[0];
NTI344019.size = sizeof(NU8);
NTI344019.kind = 14;
NTI344019.base = 0;
NTI344019.flags = 3;
for (TMP2480 = 0; TMP2480 < 10; TMP2480++) {
TMP886[TMP2480+42].kind = 1;
TMP886[TMP2480+42].offset = TMP2480;
TMP886[TMP2480+42].name = TMP2479[TMP2480];
TMP2478[TMP2480] = &TMP886[TMP2480+42];
}
TMP886[52].len = 10; TMP886[52].kind = 2; TMP886[52].sons = &TMP2478[0];
NTI344019.node = &TMP886[52];
NTI344017.size = sizeof(NU8);
NTI344017.kind = 14;
NTI344017.base = 0;
NTI344017.flags = 3;
for (TMP2494 = 0; TMP2494 < 3; TMP2494++) {
TMP886[TMP2494+53].kind = 1;
TMP886[TMP2494+53].offset = TMP2494;
TMP886[TMP2494+53].name = TMP2493[TMP2494];
TMP2492[TMP2494] = &TMP886[TMP2494+53];
}
TMP886[56].len = 3; TMP886[56].kind = 2; TMP886[56].sons = &TMP2492[0];
NTI344017.node = &TMP886[56];
NTI344661.size = sizeof(eparseerror344661);
NTI344661.kind = 17;
NTI344661.base = (&NTI3249);
TMP886[57].len = 0; TMP886[57].kind = 2;
NTI344661.node = &TMP886[57];
NTI344840.size = sizeof(eparseerror344661*);
NTI344840.kind = 22;
NTI344840.base = (&NTI344661);
NTI344840.marker = TMP2495;
NTI344139.size = sizeof(tlexer344139);
NTI344139.kind = 17;
NTI344139.base = (&NTI3211);
NTI344139.flags = 1;
TMP2497[0] = &TMP886[59];
TMP886[59].kind = 1;
TMP886[59].offset = offsetof(tlexer344139, Buf);
TMP886[59].typ = (&NTI151);
TMP886[59].name = "buf";
TMP2497[1] = &TMP886[60];
TMP886[60].kind = 1;
TMP886[60].offset = offsetof(tlexer344139, Bufpos);
TMP886[60].typ = (&NTI108);
TMP886[60].name = "bufpos";
TMP2497[2] = &TMP886[61];
TMP886[61].kind = 1;
TMP886[61].offset = offsetof(tlexer344139, Line);
TMP886[61].typ = (&NTI108);
TMP886[61].name = "line";
TMP2497[3] = &TMP886[62];
TMP886[62].kind = 1;
TMP886[62].offset = offsetof(tlexer344139, Col);
TMP886[62].typ = (&NTI108);
TMP886[62].name = "col";
TMP2497[4] = &TMP886[63];
TMP886[63].kind = 1;
TMP886[63].offset = offsetof(tlexer344139, Baseindent);
TMP886[63].typ = (&NTI108);
TMP886[63].name = "baseIndent";
TMP2497[5] = &TMP886[64];
TMP886[64].kind = 1;
TMP886[64].offset = offsetof(tlexer344139, Skippounds);
TMP886[64].typ = (&NTI138);
TMP886[64].name = "skipPounds";
TMP886[58].len = 6; TMP886[58].kind = 2; TMP886[58].sons = &TMP2497[0];
NTI344139.node = &TMP886[58];
}

