/* 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 trstnode341011 trstnode341011;
typedef struct trstnodeseq341009 trstnodeseq341009;
typedef struct trstparser342659 trstparser342659;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttokenseq342137 ttokenseq342137;
typedef struct ttoken342135 ttoken342135;
typedef struct tsharedstate342655 tsharedstate342655;
typedef struct TY342680 TY342680;
typedef struct TY342669 TY342669;
typedef struct tsubstitution342653 tsubstitution342653;
typedef struct tcell44935 tcell44935;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
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 eparseerror342661 eparseerror342661;
typedef struct valueerror3249 valueerror3249;
typedef struct Exception Exception;
typedef struct tlexer342139 tlexer342139;
typedef struct keyvaluepair130008 keyvaluepair130008;
typedef struct TY118808 TY118808;
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  trstnode341011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq341009* Sons;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler342023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler342021) (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  ttoken342135  {
NU8 Kind;
NI Ival;
NimStringDesc* Symbol;
NI Line;
NI Col;
};
struct  trstparser342659  {
  TNimObject Sup;
NI Idx;
ttokenseq342137* Tok;
tsharedstate342655* S;
TY342680* 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  tsubstitution342653  {
NimStringDesc* Key;
trstnode341011* Value;
};
typedef NI skiptable96742[256];
struct  tsharedstate342655  {
NU8 Options;
NI Ulevel;
NI Olevel;
TY342669* Subs;
TY342669* Refs;
skiptable96742 Underlinetolevel;
skiptable96742 Overlinetolevel;
tmsghandler342021 Msghandler;
tfindfilehandler342023 Findfile;
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** 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;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
typedef NimStringDesc* TY342053[10];
typedef NimStringDesc* TY342825[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  valueerror3249  {
  Exception Sup;
};
struct  eparseerror342661  {
  valueerror3249 Sup;
};
typedef NimStringDesc* TY196301[1];
struct  tlexer342139  {
  TNimObject Sup;
NCSTRING Buf;
NI Bufpos;
NI Line;
NI Col;
NI Baseindent;
NIM_BOOL Skippounds;
};
typedef NU8 TY210607[32];
typedef NimStringDesc* TY345584[13];
typedef N_NIMCALL_PTR(trstnode341011*, tsectionparser349012) (trstparser342659* p);
struct keyvaluepair130008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef keyvaluepair130008 TY342093[34];
typedef NimStringDesc* TY348530[3];
typedef NI TY348535[3];
typedef NI TY26420[16];
struct  tpagedesc44943  {
tpagedesc44943* 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 trstnodeseq341009 {
  TGenericSeq Sup;
  trstnode341011* data[SEQ_DECL_SIZE];
};
struct ttokenseq342137 {
  TGenericSeq Sup;
  ttoken342135 data[SEQ_DECL_SIZE];
};
struct TY342680 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY342669 {
  TGenericSeq Sup;
  tsubstitution342653 data[SEQ_DECL_SIZE];
};
struct TY118808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_343397)(trstnode341011* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_341084)(trstnode341011* n);
N_NIMCALL(void, addnodesaux_343338)(trstnode341011* 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_342067)(trstnode341011* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2459)(void* p, NI op);
N_NIMCALL(void, TMP2471)(void* p, NI op);
N_NIMCALL(void, TMP2472)(void* p, NI op);
N_NIMCALL(void, TMP2473)(void* p, NI op);
N_NIMCALL(void, initparser_343289)(trstparser342659* p, tsharedstate342655* 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(tsharedstate342655*, newsharedstate_342890)(NU8 options, tfindfilehandler342023 findfile, tmsghandler342021 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_342807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_342689)(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, TMP2493)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeln_169205)(FILE* f_169209, NimStringDesc** x_169213, NI x_169213Len0);
N_NIMCALL(void, write_12865)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_342880)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_342465)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq342137** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_342410)(tlexer342139* l, ttoken342135* tok);
N_NIMCALL(void, getthing_342161)(tlexer342139* l, ttoken342135* tok, TY210607 s);
N_NIMCALL(void, getindent_342383)(tlexer342139* l, ttoken342135* tok);
N_NIMCALL(NI, getindentaux_342265)(tlexer342139* l, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NI count, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_342220)(tlexer342139* l, ttoken342135* tok);
N_NIMCALL(trstnode341011*, resolvesubs_350086)(trstparser342659* p, trstnode341011* n);
N_NIMCALL(NI, findsub_343517)(trstparser342659* p, trstnode341011* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_119442)(NimStringDesc* key);
N_NIMCALL(trstnode341011*, newrstnode_341151)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_342972)(trstparser342659* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(trstnode341011*, findref_343722)(trstparser342659* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_342061)(trstnode341011* n);
N_NIMCALL(trstnode341011*, newrstnode_341105)(NU8 kind);
N_NIMCALL(void, add_341183)(trstnode341011* father, trstnode341011* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(trstnode341011*, parsedoc_347678)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsesectionwrapper_348925)(trstparser342659* p);
N_NIMCALL(void, parsesection_345719)(trstparser342659* p, trstnode341011* result);
N_NIMCALL(NI, currind_343201)(trstparser342659* p);
N_NIMCALL(void, pushind_343211)(trstparser342659* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_343240)(trstparser342659* p);
N_NIMCALL(NU8, whichsection_346941)(trstparser342659* p);
N_NIMCALL(NIM_BOOL, match_343995)(trstparser342659* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_96479)(NimStringDesc* s, TY210607 theset);
N_NIMCALL(NI, tokenafternewline_346832)(trstparser342659* p);
N_NIMCALL(NIM_BOOL, prednl_346885)(trstparser342659* p);
N_NIMCALL(NIM_BOOL, islineblock_346873)(trstparser342659* p);
N_NIMCALL(void, rstmessage_342996)(trstparser342659* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_346905)(trstparser342659* p);
N_NIMCALL(NIM_BOOL, isoptionlist_346931)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parseliteralblock_346707)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsebulletlist_348234)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parselineblock_346960)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsedotdot_346700)(trstparser342659* p);
N_NIMCALL(NimStringDesc*, getdirective_345329)(trstparser342659* p);
N_NIMCALL(NU8, getdirkind_345591)(NimStringDesc* s);
static N_INLINE(NI, find_345596)(TY345584 a_345601, NimStringDesc* item_345603);
N_NIMCALL(trstnode341011*, dirinclude_349221)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsedirective_349188)(trstparser342659* p, NU8 flags, tsectionparser349012 contentparser);
N_NIMCALL(trstnode341011*, parsedirective_349023)(trstparser342659* p, NU8 flags);
N_NIMCALL(trstnode341011*, newleaf_343762)(trstparser342659* p);
N_NIMCALL(void, parseline_345683)(trstparser342659* p, trstnode341011* father);
N_NIMCALL(void, parseinline_345182)(trstparser342659* p, trstnode341011* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_343938)(trstparser342659* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_345001)(trstparser342659* p, trstnode341011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_343884)(trstparser342659* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_344749)(trstparser342659* p, trstnode341011* father);
N_NIMCALL(void, rstmessage_342983)(trstparser342659* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(trstnode341011*, parsemarkdowncodeblock_345104)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsepostfix_344275)(trstparser342659* p, trstnode341011* n);
N_NIMCALL(void, fixupembeddedref_344178)(trstnode341011* n, trstnode341011* a, trstnode341011* b);
N_NIMCALL(void, setref_343654)(trstparser342659* p, NimStringDesc* key, trstnode341011* value);
N_NIMCALL(trstnode341011*, parsesmiley_344380)(trstparser342659* p);
N_NIMCALL(NI, matchverbatim_344322)(trstparser342659* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_344691)(trstparser342659* p, trstnode341011* father);
N_NIMCALL(NIM_BOOL, isurl_344601)(trstparser342659* p, NI i);
static N_INLINE(NIM_BOOL, contains_344619)(NimStringDesc** a_344625, NI a_344625Len0, NimStringDesc* item_344628);
static N_INLINE(NI, find_344631)(NimStringDesc** a_344636, NI a_344636Len0, NimStringDesc* item_344638);
N_NIMCALL(trstnode341011*, parsefields_345761)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsefield_345727)(trstparser342659* p);
N_NIMCALL(NIM_BOOL, indfollows_349168)(trstparser342659* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_342073)(trstnode341011* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_12842)(NimStringDesc* filename);
N_NIMCALL(trstnode341011*, dirimage_349807)(trstparser342659* p);
N_NIMCALL(trstnode341011*, dirfigure_349819)(trstparser342659* p);
N_NIMCALL(trstnode341011*, dirtitle_349831)(trstparser342659* p);
N_NIMCALL(trstnode341011*, dircontainer_349408)(trstparser342659* p);
N_NIMCALL(trstnode341011*, dircontents_349843)(trstparser342659* p);
N_NIMCALL(trstnode341011*, dirraw_349886)(trstparser342659* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_349868)(trstparser342659* p, trstnode341011** result, NU8 kind, tsectionparser349012 contentparser);
N_NIMCALL(trstnode341011*, parsedirbody_349209)(trstparser342659* p, tsectionparser349012 contentparser);
N_NIMCALL(trstnode341011*, dircodeblock_349253)(trstparser342659* p, NIM_BOOL nimrodextension);
N_NIMCALL(trstnode341011*, dirindex_349855)(trstparser342659* p);
N_NIMCALL(trstnode341011*, getreferencename_343773)(trstparser342659* p, NimStringDesc* endstr);
N_NIMCALL(trstnode341011*, untileol_343817)(trstparser342659* p);
N_NIMCALL(void, expect_343861)(trstparser342659* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_343586)(trstparser342659* p, NimStringDesc* key, trstnode341011* value);
N_NIMCALL(trstnode341011*, parsecomment_345470)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parseenumlist_348524)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsedefinitionlist_348427)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsetransition_348072)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parseheadline_347104)(trstparser342659* p);
N_NIMCALL(void, parseuntilnewline_345701)(trstparser342659* p, trstnode341011* father);
N_NIMCALL(NI, getlevel_346806)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(trstnode341011*, parseoverline_348137)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parsesimpletable_347685)(trstparser342659* p);
N_NIMCALL(void, getcolumns_347437)(trstparser342659* p, TY342680** cols);
N_NIMCALL(NI, tokend_347427)(trstparser342659* p);
N_NIMCALL(trstnode341011*, parseoptionlist_348306)(trstparser342659* p);
N_NIMCALL(void, parseparagraph_347031)(trstparser342659* p, trstnode341011* result);
N_NIMCALL(void, addifnotnil_341211)(trstnode341011* father, trstnode341011* son);
N_NIMCALL(NU8, sonkind_348620)(trstnode341011* father, NI i);
STRING_LITERAL(TMP2112, "", 0);
STRING_LITERAL(TMP2200, "\001\001", 2);
NIM_CONST struct {
  TGenericSeq Sup;
  NI data[1];
} CNSTSEQ2476 = {{1, 1}, {0}};
NIM_CONST TY342680* TMP2474 = ((TY342680*)&CNSTSEQ2476);
STRING_LITERAL(TMP2479, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2480, "\'$1\' expected", 13);
STRING_LITERAL(TMP2481, "grid table is not implemented", 29);
STRING_LITERAL(TMP2482, "new section expected", 20);
STRING_LITERAL(TMP2483, "general parse error", 19);
STRING_LITERAL(TMP2484, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2485, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2486, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2487, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2488, "field \'$1\' not supported", 24);
NIM_CONST TY342053 messages_342052 = {((NimStringDesc*) &TMP2479),
((NimStringDesc*) &TMP2480),
((NimStringDesc*) &TMP2481),
((NimStringDesc*) &TMP2482),
((NimStringDesc*) &TMP2483),
((NimStringDesc*) &TMP2484),
((NimStringDesc*) &TMP2485),
((NimStringDesc*) &TMP2486),
((NimStringDesc*) &TMP2487),
((NimStringDesc*) &TMP2488)}
;
STRING_LITERAL(TMP2489, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2494, "\012", 1);
static NIM_CONST TY210607 TMP2496 = {
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 TY210607 TMP2497 = {
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(TMP2498, "#", 1);
static NIM_CONST TY210607 TMP2499 = {
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(TMP2500, "ii", 2);
STRING_LITERAL(TMP2501, " a", 2);
STRING_LITERAL(TMP2502, "i", 1);
STRING_LITERAL(TMP2503, "ai", 2);
STRING_LITERAL(TMP2504, "::", 2);
STRING_LITERAL(TMP2505, "+", 1);
STRING_LITERAL(TMP2506, "*", 1);
STRING_LITERAL(TMP2507, "-", 1);
STRING_LITERAL(TMP2508, "|", 1);
STRING_LITERAL(TMP2509, "..", 2);
STRING_LITERAL(TMP2510, ":w:", 3);
STRING_LITERAL(TMP2511, "(e) ", 4);
STRING_LITERAL(TMP2512, "+a+", 3);
STRING_LITERAL(TMP2513, "-w", 2);
STRING_LITERAL(TMP2514, "--w", 3);
STRING_LITERAL(TMP2515, "/w", 2);
STRING_LITERAL(TMP2516, "//w", 3);
STRING_LITERAL(TMP2517, "e) ", 3);
STRING_LITERAL(TMP2518, "e. ", 3);
STRING_LITERAL(TMP2519, "author", 6);
STRING_LITERAL(TMP2520, "authors", 7);
STRING_LITERAL(TMP2521, "code", 4);
STRING_LITERAL(TMP2522, "code-block", 10);
STRING_LITERAL(TMP2523, "container", 9);
STRING_LITERAL(TMP2524, "contents", 8);
STRING_LITERAL(TMP2525, "figure", 6);
STRING_LITERAL(TMP2526, "image", 5);
STRING_LITERAL(TMP2527, "include", 7);
STRING_LITERAL(TMP2528, "index", 5);
STRING_LITERAL(TMP2529, "raw", 3);
STRING_LITERAL(TMP2530, "title", 5);
NIM_CONST TY345584 dirids_345583 = {((NimStringDesc*) &TMP2112),
((NimStringDesc*) &TMP2519),
((NimStringDesc*) &TMP2520),
((NimStringDesc*) &TMP2521),
((NimStringDesc*) &TMP2522),
((NimStringDesc*) &TMP2523),
((NimStringDesc*) &TMP2524),
((NimStringDesc*) &TMP2525),
((NimStringDesc*) &TMP2526),
((NimStringDesc*) &TMP2527),
((NimStringDesc*) &TMP2528),
((NimStringDesc*) &TMP2529),
((NimStringDesc*) &TMP2530)}
;
static NIM_CONST TY210607 TMP2531 = {
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(TMP2532, "\\", 1);
STRING_LITERAL(TMP2533, "***", 3);
static NIM_CONST TY210607 TMP2534 = {
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(TMP2535, "``", 2);
STRING_LITERAL(TMP2536, "\\\\", 2);
STRING_LITERAL(TMP2537, " ", 1);
STRING_LITERAL(TMP2538, "**", 2);
STRING_LITERAL(TMP2539, "```", 3);
STRING_LITERAL(TMP2540, "`", 1);
STRING_LITERAL(TMP2541, "_", 1);
STRING_LITERAL(TMP2542, ">", 1);
STRING_LITERAL(TMP2543, "<", 1);
STRING_LITERAL(TMP2544, "idx", 3);
STRING_LITERAL(TMP2545, "literal", 7);
STRING_LITERAL(TMP2546, "strong", 6);
STRING_LITERAL(TMP2547, "emphasis", 8);
STRING_LITERAL(TMP2548, "sub", 3);
STRING_LITERAL(TMP2549, "subscript", 9);
STRING_LITERAL(TMP2550, "sup", 3);
STRING_LITERAL(TMP2551, "supscript", 9);
STRING_LITERAL(TMP2552, ":D", 2);
STRING_LITERAL(TMP2553, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2554, ":-D", 3);
STRING_LITERAL(TMP2555, ":)", 2);
STRING_LITERAL(TMP2556, "icon_e_smile", 12);
STRING_LITERAL(TMP2557, ":-)", 3);
STRING_LITERAL(TMP2558, ";)", 2);
STRING_LITERAL(TMP2559, "icon_e_wink", 11);
STRING_LITERAL(TMP2560, ";-)", 3);
STRING_LITERAL(TMP2561, ":(", 2);
STRING_LITERAL(TMP2562, "icon_e_sad", 10);
STRING_LITERAL(TMP2563, ":-(", 3);
STRING_LITERAL(TMP2564, ":o", 2);
STRING_LITERAL(TMP2565, "icon_e_surprised", 16);
STRING_LITERAL(TMP2566, ":-o", 3);
STRING_LITERAL(TMP2567, ":shock:", 7);
STRING_LITERAL(TMP2568, "icon_eek", 8);
STRING_LITERAL(TMP2569, ":?", 2);
STRING_LITERAL(TMP2570, "icon_e_confused", 15);
STRING_LITERAL(TMP2571, ":-?", 3);
STRING_LITERAL(TMP2572, ":-/", 3);
STRING_LITERAL(TMP2573, "8-)", 3);
STRING_LITERAL(TMP2574, "icon_cool", 9);
STRING_LITERAL(TMP2575, ":lol:", 5);
STRING_LITERAL(TMP2576, "icon_lol", 8);
STRING_LITERAL(TMP2577, ":x", 2);
STRING_LITERAL(TMP2578, "icon_mad", 8);
STRING_LITERAL(TMP2579, ":-x", 3);
STRING_LITERAL(TMP2580, ":P", 2);
STRING_LITERAL(TMP2581, "icon_razz", 9);
STRING_LITERAL(TMP2582, ":-P", 3);
STRING_LITERAL(TMP2583, ":oops:", 6);
STRING_LITERAL(TMP2584, "icon_redface", 12);
STRING_LITERAL(TMP2585, ":cry:", 5);
STRING_LITERAL(TMP2586, "icon_cry", 8);
STRING_LITERAL(TMP2587, ":evil:", 6);
STRING_LITERAL(TMP2588, "icon_evil", 9);
STRING_LITERAL(TMP2589, ":twisted:", 9);
STRING_LITERAL(TMP2590, "icon_twisted", 12);
STRING_LITERAL(TMP2591, ":roll:", 6);
STRING_LITERAL(TMP2592, "icon_rolleyes", 13);
STRING_LITERAL(TMP2593, ":!:", 3);
STRING_LITERAL(TMP2594, "icon_exclaim", 12);
STRING_LITERAL(TMP2595, ":?:", 3);
STRING_LITERAL(TMP2596, "icon_question", 13);
STRING_LITERAL(TMP2597, ":idea:", 6);
STRING_LITERAL(TMP2598, "icon_idea", 9);
STRING_LITERAL(TMP2599, ":arrow:", 7);
STRING_LITERAL(TMP2600, "icon_arrow", 10);
STRING_LITERAL(TMP2601, ":|", 2);
STRING_LITERAL(TMP2602, "icon_neutral", 12);
STRING_LITERAL(TMP2603, ":-|", 3);
STRING_LITERAL(TMP2604, ":mrgreen:", 9);
STRING_LITERAL(TMP2605, "icon_mrgreen", 12);
STRING_LITERAL(TMP2606, ":geek:", 6);
STRING_LITERAL(TMP2607, "icon_e_geek", 11);
STRING_LITERAL(TMP2608, ":ugeek:", 7);
STRING_LITERAL(TMP2609, "icon_e_ugeek", 12);
NIM_CONST TY342093 smilies_342092 = {{((NimStringDesc*) &TMP2552),
((NimStringDesc*) &TMP2553)}
,
{((NimStringDesc*) &TMP2554),
((NimStringDesc*) &TMP2553)}
,
{((NimStringDesc*) &TMP2555),
((NimStringDesc*) &TMP2556)}
,
{((NimStringDesc*) &TMP2557),
((NimStringDesc*) &TMP2556)}
,
{((NimStringDesc*) &TMP2558),
((NimStringDesc*) &TMP2559)}
,
{((NimStringDesc*) &TMP2560),
((NimStringDesc*) &TMP2559)}
,
{((NimStringDesc*) &TMP2561),
((NimStringDesc*) &TMP2562)}
,
{((NimStringDesc*) &TMP2563),
((NimStringDesc*) &TMP2562)}
,
{((NimStringDesc*) &TMP2564),
((NimStringDesc*) &TMP2565)}
,
{((NimStringDesc*) &TMP2566),
((NimStringDesc*) &TMP2565)}
,
{((NimStringDesc*) &TMP2567),
((NimStringDesc*) &TMP2568)}
,
{((NimStringDesc*) &TMP2569),
((NimStringDesc*) &TMP2570)}
,
{((NimStringDesc*) &TMP2571),
((NimStringDesc*) &TMP2570)}
,
{((NimStringDesc*) &TMP2572),
((NimStringDesc*) &TMP2570)}
,
{((NimStringDesc*) &TMP2573),
((NimStringDesc*) &TMP2574)}
,
{((NimStringDesc*) &TMP2575),
((NimStringDesc*) &TMP2576)}
,
{((NimStringDesc*) &TMP2577),
((NimStringDesc*) &TMP2578)}
,
{((NimStringDesc*) &TMP2579),
((NimStringDesc*) &TMP2578)}
,
{((NimStringDesc*) &TMP2580),
((NimStringDesc*) &TMP2581)}
,
{((NimStringDesc*) &TMP2582),
((NimStringDesc*) &TMP2581)}
,
{((NimStringDesc*) &TMP2583),
((NimStringDesc*) &TMP2584)}
,
{((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*) &TMP2602)}
,
{((NimStringDesc*) &TMP2604),
((NimStringDesc*) &TMP2605)}
,
{((NimStringDesc*) &TMP2606),
((NimStringDesc*) &TMP2607)}
,
{((NimStringDesc*) &TMP2608),
((NimStringDesc*) &TMP2609)}
}
;
STRING_LITERAL(TMP2610, ":", 1);
STRING_LITERAL(TMP2611, "//", 2);
STRING_LITERAL(TMP2613, "http", 4);
STRING_LITERAL(TMP2614, "https", 5);
STRING_LITERAL(TMP2615, "ftp", 3);
STRING_LITERAL(TMP2616, "telnet", 6);
STRING_LITERAL(TMP2617, "file", 4);
NIM_CONST TY342825 TMP2612 = {((NimStringDesc*) &TMP2613),
((NimStringDesc*) &TMP2614),
((NimStringDesc*) &TMP2615),
((NimStringDesc*) &TMP2616),
((NimStringDesc*) &TMP2617)}
;
STRING_LITERAL(TMP2620, "html", 4);
STRING_LITERAL(TMP2621, "latex", 5);
STRING_LITERAL(TMP2622, "default-language", 16);
STRING_LITERAL(TMP2623, "Nimrod", 6);
STRING_LITERAL(TMP2624, " _", 2);
STRING_LITERAL(TMP2625, " |", 2);
STRING_LITERAL(TMP2626, "replace", 7);
STRING_LITERAL(TMP2627, " [", 2);
STRING_LITERAL(TMP2628, "]", 1);
NIM_CONST TY348530 wildcards_348529 = {((NimStringDesc*) &TMP2511),
((NimStringDesc*) &TMP2517),
((NimStringDesc*) &TMP2518)}
;
NIM_CONST TY348535 wildpos_348534 = {1,
0,
0}
;
extern TNimType NTI3211; /* RootObj */
TNimType NTI342659; /* TRstParser */
extern TNimType NTI108; /* int */
TNimType NTI342135; /* TToken */
TNimType NTI342133; /* TTokType */
extern TNimType NTI149; /* string */
TNimType NTI342137; /* TTokenSeq */
TNimType NTI342655; /* TSharedState */
TNimType NTI342013; /* TRstParseOption */
TNimType NTI342015; /* TRstParseOptions */
TNimType NTI342653; /* TSubstitution */
extern TNimType NTI341007; /* PRstNode */
TNimType NTI342669; /* seq[TSubstitution] */
extern TNimType NTI96742; /* SkipTable */
TNimType NTI342021; /* TMsgHandler */
TNimType NTI342023; /* TFindFileHandler */
TNimType NTI342657; /* PSharedState */
TNimType NTI342680; /* seq[int] */
extern TNimType NTI138; /* bool */
extern tgcheap47016 gch_47044;
TNimType NTI342019; /* TMsgKind */
TNimType NTI342017; /* TMsgClass */
extern TNimType NTI3249; /* ValueError */
TNimType NTI342661; /* EParseError */
TNimType NTI342840; /* ref EParseError */
TNimType NTI342139; /* TLexer */
extern TNimType NTI151; /* cstring */
extern TNimType NTI118808; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_343397)(trstnode341011* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).Kind == ((NU8) 64))) goto LA3;
		{
			NI i_343425;
			NI HEX3Atmp_343469;
			NI res_343472;
			i_343425 = 0;
			HEX3Atmp_343469 = 0;
			HEX3Atmp_343469 = (NI32)((*n).Text->Sup.len - 1);
			res_343472 = 0;
			{
				while (1) {
					if (!(res_343472 <= HEX3Atmp_343469)) goto LA7;
					i_343425 = res_343472;
					switch (((NU8)((*n).Text->data[i_343425]))) {
					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_343425]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).Text->data[i_343425]);
					}
					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_343425])))) - 65))) + 97))))));
					}
					break;
					default:
					{
						{
							if (!(0 < (*r)->Sup.len)) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_343472 += 1;
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_343467;
			NI HEX3Atmp_343475;
			NI LOC34;
			NI res_343478;
			i_343467 = 0;
			HEX3Atmp_343475 = 0;
			LOC34 = 0;
			LOC34 = len_341084(n);
			HEX3Atmp_343475 = (NI32)(LOC34 - 1);
			res_343478 = 0;
			{
				while (1) {
					if (!(res_343478 <= HEX3Atmp_343475)) goto LA36;
					i_343467 = res_343478;
					rstnodetorefnameaux_343397((*n).Sons->data[i_343467], r, b);
					res_343478 += 1;
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_342061)(trstnode341011* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2112));
	b = NIM_FALSE;
	rstnodetorefnameaux_343397(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_343338)(trstnode341011* 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_343364;
			NI HEX3Atmp_343366;
			NI LOC7;
			NI res_343369;
			i_343364 = 0;
			HEX3Atmp_343366 = 0;
			LOC7 = 0;
			LOC7 = len_341084(n);
			HEX3Atmp_343366 = (NI32)(LOC7 - 1);
			res_343369 = 0;
			{
				while (1) {
					if (!(res_343369 <= HEX3Atmp_343366)) goto LA9;
					i_343364 = res_343369;
					addnodesaux_343338((*n).Sons->data[i_343364], result);
					res_343369 += 1;
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_342067)(trstnode341011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2112));
	addnodesaux_343338(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_342073)(trstnode341011* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2112));
	{
		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_346650;
		NI HEX3Atmp_346653;
		NI LOC10;
		NI res_346656;
		i_346650 = 0;
		HEX3Atmp_346653 = 0;
		LOC10 = 0;
		LOC10 = len_341084((*n).Sons->data[1]);
		HEX3Atmp_346653 = (NI32)(LOC10 - 1);
		res_346656 = 0;
		{
			while (1) {
				trstnode341011* f;
				if (!(res_346656 <= HEX3Atmp_346653)) goto LA12;
				i_346650 = res_346656;
				f = (*(*n).Sons->data[1]).Sons->data[i_346650];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_342067((*f).Sons->data[0]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == 0)) goto LA17;
					result = addnodes_342067((*f).Sons->data[1]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2200));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_346656 += 1;
			} LA12: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_342080)(trstnode341011* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).Sons->data[0] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2112));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_342067((*n).Sons->data[0]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_345823)(trstnode341011* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_342067((*n).Sons->data[1]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	return result;
}
N_NIMCALL(void, TMP2459)(void* p, NI op) {
	ttokenseq342137* a;
	NI LOC1;
	a = (ttokenseq342137*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Symbol, op);
	}
}
N_NIMCALL(void, TMP2471)(void* p, NI op) {
	TY342669* a;
	NI LOC1;
	a = (TY342669*)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, TMP2472)(void* p, NI op) {
	tsharedstate342655* a;
	NI LOC1;
	NI LOC2;
	a = (tsharedstate342655*)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, TMP2473)(void* p, NI op) {
	TY342680* a;
	NI LOC1;
	a = (TY342680*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_343289)(trstparser342659* p, tsharedstate342655* sharedstate) {
	genericSeqAssign((&(*p).Indentstack), TMP2474, (&NTI342680));
	unsureAsgnRef((void**) (&(*p).Tok), (ttokenseq342137*) newSeq((&NTI342137), 0));
	(*p).Idx = 0;
	unsureAsgnRef((void**) (&(*p).Filename), copyString(((NimStringDesc*) &TMP2112)));
	(*p).Hastoc = NIM_FALSE;
	(*p).Col = 0;
	(*p).Line = 1;
	unsureAsgnRef((void**) (&(*p).S), sharedstate);
}

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

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

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

N_NIMCALL(NU8, whichmsgclass_342689)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI342019))->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, TMP2493)(void* p, NI op) {
	eparseerror342661* a;
	a = (eparseerror342661*)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_169205)(FILE* f_169209, NimStringDesc** x_169213, NI x_169213Len0) {
	{
		NimStringDesc* i_169226;
		NI i_169234;
		i_169226 = 0;
		i_169234 = 0;
		{
			while (1) {
				if (!(i_169234 < x_169213Len0)) goto LA3;
				i_169226 = x_169213[i_169234];
				write_12865(f_169209, i_169226);
				i_169234 += 1;
			} LA3: ;
		}
	}
	write_12865(f_169209, ((NimStringDesc*) &TMP2494));
}

N_NIMCALL(void, defaultmsghandler_342807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY342825 LOC1;
	mc = whichmsgclass_342689(msgkind);
	a = nsuFormatSingleElem(messages_342052[(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, (&NTI342017)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2489), LOC1, 5);
	{
		eparseerror342661* e_342839;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_342839 = 0;
		e_342839 = (eparseerror342661*) newObj((&NTI342840), sizeof(eparseerror342661));
		(*e_342839).Sup.Sup.Sup.m_type = (&NTI342661);
		LOC6 = 0;
		LOC6 = (*e_342839).Sup.Sup.message; (*e_342839).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_342839, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY196301 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeln_169205(stdout, LOC8, 1);
	}
	LA2: ;
}

N_NIMCALL(NimStringDesc*, defaultfindfile_342880)(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*) &TMP2112));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsharedstate342655*, newsharedstate_342890)(NU8 options, tfindfilehandler342023 findfile, tmsghandler342021 msghandler) {
	tsharedstate342655* result;
	result = 0;
	result = (tsharedstate342655*) newObj((&NTI342657), sizeof(tsharedstate342655));
	if ((*result).Subs) nimGCunrefNoCycle((*result).Subs);
	(*result).Subs = (TY342669*) newSeqRC1((&NTI342669), 0);
	if ((*result).Refs) nimGCunrefNoCycle((*result).Refs);
	(*result).Refs = (TY342669*) newSeqRC1((&NTI342669), 0);
	(*result).Options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).Msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).Msghandler = defaultmsghandler_342807;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).Findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).Findfile = defaultfindfile_342880;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_342161)(tlexer342139* l, ttoken342135* tok, TY210607 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_342265)(tlexer342139* 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_342265(l, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*l).Bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_342383)(tlexer342139* l, ttoken342135* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).Col = 0;
	(*tok).Kind = ((NU8) 1);
	(*tok).Ival = getindentaux_342265(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*) &TMP2494));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).Symbol), LOC1);
}

N_NIMCALL(void, getadornment_342220)(tlexer342139* l, ttoken342135* 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_342410)(tlexer342139* l, ttoken342135* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).Symbol), copyString(((NimStringDesc*) &TMP2112)));
	(*tok).Ival = 0;
	c = (*l).Buf[(*l).Bufpos];
	switch (((NU8)(c))) {
	case 97 ... 122:
	case 65 ... 90:
	case 128 ... 255:
	case 48 ... 57:
	{
		getthing_342161(l, tok, TMP2496);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_342161(l, tok, TMP2497);
		(*tok).Kind = ((NU8) 2);
		{
			if (!(((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(13)) || ((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_342410(l, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_342383(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_342220(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_342465)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq342137** tokens) {
	NI result;
	tlexer342139 l;
	NI length;
	result = 0;
	memset((void*)(&l), 0, sizeof(l));
	l.Sup.m_type = (&NTI342139);
	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) = (ttokenseq342137*) setLengthSeq(&((*tokens))->Sup, sizeof(ttoken342135), length);
			rawgettok_342410((&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_343517)(trstparser342659* p, trstnode341011* n) {
	NI result;
	NimStringDesc* key;
	result = 0;
	key = addnodes_342067(n);
	{
		NI i_343536;
		NI HEX3Atmp_343551;
		NI res_343554;
		i_343536 = 0;
		HEX3Atmp_343551 = 0;
		HEX3Atmp_343551 = ((*(*p).S).Subs->Sup.len-1);
		res_343554 = 0;
		{
			while (1) {
				if (!(res_343554 <= HEX3Atmp_343551)) goto LA3;
				i_343536 = res_343554;
				{
					if (!eqStrings(key, (*(*p).S).Subs->data[i_343536].Key)) goto LA6;
					result = i_343536;
					goto BeforeRet;
				}
				LA6: ;
				res_343554 += 1;
			} LA3: ;
		}
	}
	{
		NI i_343549;
		NI HEX3Atmp_343557;
		NI res_343560;
		i_343549 = 0;
		HEX3Atmp_343557 = 0;
		HEX3Atmp_343557 = ((*(*p).S).Subs->Sup.len-1);
		res_343560 = 0;
		{
			while (1) {
				if (!(res_343560 <= HEX3Atmp_343557)) goto LA10;
				i_343549 = res_343560;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).S).Subs->data[i_343549].Key);
					if (!(LOC13 == 0)) goto LA14;
					result = i_343549;
					goto BeforeRet;
				}
				LA14: ;
				res_343560 += 1;
			} LA10: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_342972)(trstparser342659* 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(trstnode341011*, findref_343722)(trstparser342659* p, NimStringDesc* key) {
	trstnode341011* result;
	result = 0;
	{
		NI i_343740;
		NI HEX3Atmp_343742;
		NI res_343745;
		i_343740 = 0;
		HEX3Atmp_343742 = 0;
		HEX3Atmp_343742 = ((*(*p).S).Refs->Sup.len-1);
		res_343745 = 0;
		{
			while (1) {
				if (!(res_343745 <= HEX3Atmp_343742)) goto LA3;
				i_343740 = res_343745;
				{
					if (!eqStrings(key, (*(*p).S).Refs->data[i_343740].Key)) goto LA6;
					result = (*(*p).S).Refs->data[i_343740].Value;
					goto BeforeRet;
				}
				LA6: ;
				res_343745 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell44935* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48646(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell44935* 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(trstnode341011*, resolvesubs_350086)(trstparser342659* p, trstnode341011* n) {
	trstnode341011* result;
	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_343517(p, n);
		{
			if (!(0 <= x)) goto LA8;
			result = (*(*p).S).Subs->data[x].Value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_342067(n);
			e = getenv_119442(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_341151(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_342972((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		trstnode341011* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_342061(n);
		y = findref_343722(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_341105(((NU8) 38));
			(*n).Kind = ((NU8) 0);
			add_341183(result, n);
			add_341183(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).Hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_350142;
			NI HEX3Atmp_350144;
			NI LOC26;
			NI res_350147;
			i_350142 = 0;
			HEX3Atmp_350144 = 0;
			LOC26 = 0;
			LOC26 = len_341084(n);
			HEX3Atmp_350144 = (NI32)(LOC26 - 1);
			res_350147 = 0;
			{
				while (1) {
					if (!(res_350147 <= HEX3Atmp_350144)) goto LA28;
					i_350142 = res_350147;
					asgnRefNoCycle((void**) (&(*n).Sons->data[i_350142]), resolvesubs_350086(p, (*n).Sons->data[i_350142]));
					res_350147 += 1;
				} LA28: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(NIM_BOOL, match_343995)(trstparser342659* 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*) &TMP2498));
				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, TMP2499);
					}
					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_346832)(trstparser342659* 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_346885)(trstparser342659* 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_343201(p);
		LOC5 = ((*p).Tok->data[(NI32)((*p).Idx - 1)].Ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_346873)(trstparser342659* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_346832(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*) &TMP2508));
	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_342996)(trstparser342659* 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_346905)(trstparser342659* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_346832(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*) &TMP2504)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_346931)(trstparser342659* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2513));
	if (LOC3) goto LA4;
	LOC3 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2514));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2515));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2516));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_346941)(trstparser342659* p) {
	NU8 result;
	result = 0;
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_343995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2500));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_343995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2501));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_343995(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2502));
			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_346832(p);
			LOC20 = 0;
			LOC20 = match_343995(p, LOC19, ((NimStringDesc*) &TMP2503));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2504))) 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_346885(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2505));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2506));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2507));
			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*) &TMP2508));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_346873(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*) &TMP2509));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_346885(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2510));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_346885(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2511));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2512));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_342996(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_346905(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_346931(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_346832(p);
			LOC73 = 0;
			LOC73 = match_343995(p, LOC72, ((NimStringDesc*) &TMP2503));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2517));
			if (LOC77) goto LA78;
			LOC77 = match_343995(p, (*p).Idx, ((NimStringDesc*) &TMP2518));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_346905(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(trstnode341011*, parseliteralblock_346707)(trstparser342659* p) {
	trstnode341011* result;
	trstnode341011* n;
	result = 0;
	result = newrstnode_341105(((NU8) 24));
	n = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2112));
	{
		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*) &TMP2494));
						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_341183(result, n);
	return result;
}

N_NIMCALL(trstnode341011*, parsebulletlist_348234)(trstparser342659* p) {
	trstnode341011* 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_341105(((NU8) 5));
		pushind_343211(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		{
			while (1) {
				trstnode341011* item;
				item = newrstnode_341105(((NU8) 6));
				parsesection_345719(p, item);
				add_341183(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_343240(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode341011*, parselineblock_346960)(trstparser342659* p) {
	trstnode341011* 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_341105(((NU8) 26));
		pushind_343211(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		{
			while (1) {
				trstnode341011* item;
				item = newrstnode_341105(((NU8) 27));
				parsesection_345719(p, item);
				add_341183(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*) &TMP2508));
					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_343240(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_345329)(trstparser342659* 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*) &TMP2504))) 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*) &TMP2504))) 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*) &TMP2112));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2112));
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, find_345596)(TY345584 a_345601, NimStringDesc* item_345603) {
	NI result;
	result = 0;
	{
		NimStringDesc* i_345647;
		NI i_345663;
		i_345647 = 0;
		i_345663 = 0;
		{
			if (!(((NI) (i_345663)) <= 12)) goto LA4;
			{
				while (1) {
					i_345647 = a_345601[(i_345663)- 0];
					{
						if (!eqStrings(i_345647, item_345603)) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
					result += 1;
					{
						if (!(12 <= ((NI) (i_345663)))) goto LA14;
						goto LA6;
					}
					LA14: ;
					i_345663 += 1;
				}
			} LA6: ;
		}
		LA4: ;
	}
	result = -1;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(trstnode341011*, newleaf_343762)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = newrstnode_341151(((NU8) 64), (*p).Tok->data[(*p).Idx].Symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_343938)(trstparser342659* 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 = ((TMP2531[((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*) &TMP2532))) 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_343884)(trstparser342659* 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 = ((TMP2534[((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*) &TMP2535)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 1)].Symbol, ((NimStringDesc*) &TMP2532));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_344749)(trstparser342659* p, trstnode341011* father) {
	{
		trstnode341011* LOC5;
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2536))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2532));
		add_341183(father, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2532))) goto LA7;
		(*p).Idx += 1;
		{
			trstnode341011* LOC13;
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_343762(p);
			add_341183(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA16;
			(*p).Idx += 1;
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		trstnode341011* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_343762(p);
		add_341183(father, LOC19);
		(*p).Idx += 1;
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_342983)(trstparser342659* 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_345001)(trstparser342659* p, trstnode341011* 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_343884((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).Idx += 1;
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_344749(p, father);
				}
				goto LA4;
				LA10: ;
				{
					trstnode341011* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_343762(p);
					add_341183(father, LOC13);
					(*p).Idx += 1;
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				trstnode341011* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_343762(p);
				add_341183(father, LOC15);
				(*p).Idx += 1;
			}
			break;
			case ((NU8) 1):
			{
				trstnode341011* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2537));
				add_341183(father, LOC17);
				(*p).Idx += 1;
				{
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA20;
					rstmessage_342983((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				trstnode341011* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2537));
				add_341183(father, LOC23);
				(*p).Idx += 1;
			}
			break;
			default:
			{
				rstmessage_342983((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(trstnode341011*, parsemarkdowncodeblock_345104)(trstparser342659* p) {
	trstnode341011* result;
	trstnode341011* args;
	trstnode341011* n;
	trstnode341011* lb;
	result = 0;
	args = newrstnode_341105(((NU8) 41));
	{
		trstnode341011* LOC5;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_343762(p);
		add_341183(args, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2112));
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 0):
			{
				rstmessage_342972((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2539));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2539))) 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_341105(((NU8) 24));
	add_341183(lb, n);
	result = newrstnode_341105(((NU8) 47));
	add_341183(result, args);
	add_341183(result, NIM_NIL);
	add_341183(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_344178)(trstnode341011* n, trstnode341011* a, trstnode341011* b) {
	NI sep;
	NI incr;
	sep = -1;
	{
		NI i_344195;
		NI HEX3Atmp_344225;
		NI LOC2;
		NI res_344228;
		i_344195 = 0;
		HEX3Atmp_344225 = 0;
		LOC2 = 0;
		LOC2 = len_341084(n);
		HEX3Atmp_344225 = (NI32)(LOC2 - 2);
		res_344228 = HEX3Atmp_344225;
		{
			while (1) {
				if (!(0 <= res_344228)) goto LA4;
				i_344195 = res_344228;
				{
					if (!eqStrings((*(*n).Sons->data[i_344195]).Text, ((NimStringDesc*) &TMP2543))) goto LA7;
					sep = i_344195;
					goto LA1;
				}
				LA7: ;
				res_344228 -= 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_344210;
		NI HEX3Atmp_344230;
		NI res_344233;
		i_344210 = 0;
		HEX3Atmp_344230 = 0;
		HEX3Atmp_344230 = (NI32)(sep - incr);
		res_344233 = 0;
		{
			while (1) {
				if (!(res_344233 <= HEX3Atmp_344230)) goto LA18;
				i_344210 = res_344233;
				add_341183(a, (*n).Sons->data[i_344210]);
				res_344233 += 1;
			} LA18: ;
		}
	}
	{
		NI i_344223;
		NI HEX3Atmp_344236;
		NI HEX3Atmp_344237;
		NI LOC20;
		NI res_344240;
		i_344223 = 0;
		HEX3Atmp_344236 = 0;
		HEX3Atmp_344237 = 0;
		HEX3Atmp_344236 = (NI32)(sep + 1);
		LOC20 = 0;
		LOC20 = len_341084(n);
		HEX3Atmp_344237 = (NI32)(LOC20 - 2);
		res_344240 = HEX3Atmp_344236;
		{
			while (1) {
				if (!(res_344240 <= HEX3Atmp_344237)) goto LA22;
				i_344223 = res_344240;
				add_341183(b, (*n).Sons->data[i_344223]);
				res_344240 += 1;
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_343654)(trstparser342659* p, NimStringDesc* key, trstnode341011* value) {
	NI length;
	NimStringDesc* LOC14;
	length = (*(*p).S).Refs->Sup.len;
	{
		NI i_343684;
		NI HEX3Atmp_343702;
		NI res_343705;
		i_343684 = 0;
		HEX3Atmp_343702 = 0;
		HEX3Atmp_343702 = (NI32)(length - 1);
		res_343705 = 0;
		{
			while (1) {
				if (!(res_343705 <= HEX3Atmp_343702)) goto LA3;
				i_343684 = res_343705;
				{
					if (!eqStrings(key, (*(*p).S).Refs->data[i_343684].Key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_342067((*(*p).S).Refs->data[i_343684].Value);
						LOC11 = 0;
						LOC11 = addnodes_342067(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_342972((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).S).Refs->data[i_343684].Value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_343705 += 1;
			} LA3: ;
		}
	}
	(*(*p).S).Refs = (TY342669*) setLengthSeq(&((*(*p).S).Refs)->Sup, sizeof(tsubstitution342653), (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(trstnode341011*, parsepostfix_344275)(trstparser342659* p, trstnode341011* n) {
	trstnode341011* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_343884((&(*p)), ((NimStringDesc*) &TMP2541));
		if (!LOC3) goto LA4;
		(*p).Idx += 1;
		{
			NIM_BOOL LOC8;
			trstnode341011* a;
			trstnode341011* b;
			LOC8 = 0;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 2)].Symbol, ((NimStringDesc*) &TMP2540));
			if (!(LOC8)) goto LA9;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 3)].Symbol, ((NimStringDesc*) &TMP2542));
			LA9: ;
			if (!LOC8) goto LA10;
			a = newrstnode_341105(((NU8) 0));
			b = newrstnode_341105(((NU8) 0));
			fixupembeddedref_344178(n, a, b);
			{
				NI LOC14;
				LOC14 = 0;
				LOC14 = len_341084(a);
				if (!(LOC14 == 0)) goto LA15;
				result = newrstnode_341105(((NU8) 37));
				add_341183(result, b);
			}
			goto LA12;
			LA15: ;
			{
				NimStringDesc* LOC18;
				result = newrstnode_341105(((NU8) 38));
				add_341183(result, a);
				add_341183(result, b);
				LOC18 = 0;
				LOC18 = rstnodetorefname_342061(a);
				setref_343654(p, LOC18, b);
			}
			LA12: ;
		}
		goto LA6;
		LA10: ;
		{
			if (!((*n).Kind == ((NU8) 60))) goto LA20;
			(*n).Kind = ((NU8) 39);
		}
		goto LA6;
		LA20: ;
		{
			result = newrstnode_341105(((NU8) 39));
			add_341183(result, n);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = match_343995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2510));
		if (!LOC24) goto LA25;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2544))) goto LA29;
			(*n).Kind = ((NU8) 56);
		}
		goto LA27;
		LA29: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2545))) goto LA32;
			(*n).Kind = ((NU8) 61);
		}
		goto LA27;
		LA32: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2546))) goto LA35;
			(*n).Kind = ((NU8) 58);
		}
		goto LA27;
		LA35: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2547))) 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*) &TMP2548));
			if (LOC41) goto LA42;
			LOC41 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2549));
			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*) &TMP2550));
			if (LOC46) goto LA47;
			LOC46 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2551));
			LA47: ;
			if (!LOC46) goto LA48;
			(*n).Kind = ((NU8) 55);
		}
		goto LA27;
		LA48: ;
		{
			trstnode341011* LOC51;
			result = newrstnode_341105(((NU8) 53));
			(*n).Kind = ((NU8) 0);
			add_341183(result, n);
			LOC51 = 0;
			LOC51 = newrstnode_341151(((NU8) 64), (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol);
			add_341183(result, LOC51);
		}
		LA27: ;
		(*p).Idx += 3;
	}
	goto LA1;
	LA25: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_344322)(trstparser342659* 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(trstnode341011*, parsesmiley_344380)(trstparser342659* p) {
	trstnode341011* 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_344441;
		NimStringDesc* val_344442;
		NI i_344448;
		key_344441 = 0;
		val_344442 = 0;
		i_344448 = 0;
		{
			if (!(((NI) (i_344448)) <= 33)) goto LA8;
			{
				while (1) {
					NI m;
					key_344441 = smilies_342092[(i_344448)- 0].Field0;
					val_344442 = smilies_342092[(i_344448)- 0].Field1;
					m = matchverbatim_344322((&(*p)), (*p).Idx, key_344441);
					{
						NimStringDesc* LOC16;
						if (!(0 < m)) goto LA14;
						(*p).Idx = m;
						result = newrstnode_341105(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).Text; (*result).Text = copyStringRC1(val_344442);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(33 <= ((NI) (i_344448)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_344448 += 1;
				}
			} LA10: ;
		}
		LA8: ;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, find_344631)(NimStringDesc** a_344636, NI a_344636Len0, NimStringDesc* item_344638) {
	NI result;
	result = 0;
	{
		NimStringDesc* i_344651;
		NI i_344667;
		i_344651 = 0;
		i_344667 = 0;
		{
			while (1) {
				if (!(i_344667 < a_344636Len0)) goto LA3;
				i_344651 = a_344636[i_344667];
				{
					if (!eqStrings(i_344651, item_344638)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += 1;
				i_344667 += 1;
			} LA3: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_344619)(NimStringDesc** a_344625, NI a_344625Len0, NimStringDesc* item_344628) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = find_344631(a_344625, a_344625Len0, item_344628);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isurl_344601)(trstparser342659* 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*) &TMP2610));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).Tok->data[(NI32)(i + 2)].Symbol, ((NimStringDesc*) &TMP2611));
	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_344619(TMP2612, 5, (*p).Tok->data[i].Symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_344691)(trstparser342659* p, trstnode341011* father) {
	{
		NIM_BOOL LOC3;
		trstnode341011* n;
		LOC3 = 0;
		LOC3 = isurl_344601((&(*p)), (*p).Idx);
		if (!LOC3) goto LA4;
		n = newrstnode_341105(((NU8) 37));
		{
			while (1) {
				trstnode341011* 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_343762(p);
				add_341183(n, LOC15);
				(*p).Idx += 1;
			}
		} LA6: ;
		add_341183(father, n);
	}
	goto LA1;
	LA4: ;
	{
		trstnode341011* n;
		n = newleaf_343762(p);
		(*p).Idx += 1;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2541))) goto LA19;
			n = parsepostfix_344275(p, n);
		}
		LA19: ;
		add_341183(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_345182)(trstparser342659* p, trstnode341011* father) {
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			trstnode341011* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2533));
			if (!LOC4) goto LA5;
			n = newrstnode_341105(((NU8) 59));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2533), NIM_TRUE);
			add_341183(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			trstnode341011* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2538));
			if (!LOC8) goto LA9;
			n = newrstnode_341105(((NU8) 58));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2538), NIM_TRUE);
			add_341183(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			trstnode341011* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2506));
			if (!LOC12) goto LA13;
			n = newrstnode_341105(((NU8) 57));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2506), NIM_TRUE);
			add_341183(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			trstnode341011* 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*) &TMP2539));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).Idx += 1;
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_345104(p);
			add_341183(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			trstnode341011* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2535));
			if (!LOC22) goto LA23;
			n = newrstnode_341105(((NU8) 61));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2535), NIM_FALSE);
			add_341183(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			trstnode341011* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2540));
			if (!LOC26) goto LA27;
			n = newrstnode_341105(((NU8) 60));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2540), NIM_TRUE);
			n = parsepostfix_344275(p, n);
			add_341183(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			trstnode341011* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_343938((&(*p)), ((NimStringDesc*) &TMP2508));
			if (!LOC30) goto LA31;
			n = newrstnode_341105(((NU8) 62));
			parseuntil_345001(p, n, ((NimStringDesc*) &TMP2508), NIM_FALSE);
			add_341183(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				trstnode341011* n;
				if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_344380(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_341183(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_344749(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			trstnode341011* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_344380(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_341183(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_344691(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		trstnode341011* LOC60;
		{
			trstnode341011* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_344380(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_341183(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_343762(p);
		add_341183(father, LOC60);
		(*p).Idx += 1;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
}

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

N_NIMCALL(trstnode341011*, parsefield_345727)(trstparser342659* p) {
	trstnode341011* result;
	NI col;
	trstnode341011* fieldname;
	trstnode341011* fieldbody;
	result = 0;
	result = newrstnode_341105(((NU8) 14));
	col = (*p).Tok->data[(*p).Idx].Col;
	fieldname = newrstnode_341105(((NU8) 15));
	parseuntil_345001(p, fieldname, ((NimStringDesc*) &TMP2610), NIM_FALSE);
	fieldbody = newrstnode_341105(((NU8) 16));
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1)))) goto LA3;
		parseline_345683(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_343211(p, indent);
			parsesection_345719(p, fieldbody);
			popind_343240(p);
		}
		LA11: ;
	}
	LA7: ;
	add_341183(result, fieldname);
	add_341183(result, fieldbody);
	return result;
}

N_NIMCALL(trstnode341011*, parsefields_345761)(trstparser342659* p) {
	trstnode341011* 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*) &TMP2610));
	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*) &TMP2610));
		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_341105(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).Idx += 1;
		}
		LA18: ;
		{
			while (1) {
				trstnode341011* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_345727(p);
				add_341183(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*) &TMP2610));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).Idx += 1;
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(trstnode341011*, parsedirective_349023)(trstparser342659* p, NU8 flags) {
	trstnode341011* result;
	trstnode341011* args;
	trstnode341011* options;
	result = 0;
	result = newrstnode_341105(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_341105(((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):
					{
						trstnode341011* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_343762(p);
						add_341183(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: ;
			}
			{
				trstnode341011* LOC23;
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_343762(p);
				add_341183(args, LOC23);
				(*p).Idx += 1;
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_345683(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_341183(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*) &TMP2610));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_345761(p);
		}
		LA36: ;
	}
	LA28: ;
	add_341183(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_349168)(trstparser342659* 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_343201(p);
	LOC1 = (LOC3 < (*p).Tok->data[(*p).Idx].Ival);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(trstnode341011*, parsedirective_349188)(trstparser342659* p, NU8 flags, tsectionparser349012 contentparser) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349023(p, flags);
	{
		NIM_BOOL LOC3;
		trstnode341011* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_349168((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_343211(p, (*p).Tok->data[(*p).Idx].Ival);
		content = contentparser(p);
		popind_343240(p);
		add_341183(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_341183(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode341011*, dirinclude_349221)(trstparser342659* p) {
	trstnode341011* result;
	trstnode341011* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_349188(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_342067((*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_342972((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			trstnode341011* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2545));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_341105(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_12842(path);
			LOC13 = 0;
			LOC13 = newrstnode_341151(((NU8) 64), LOC12);
			add_341183(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			trstparser342659 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI342659);
			initparser_343289((&q), (*p).S);
			q.Filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_12842(path);
			LOC16 = 0;
			LOC16 = gettokens_342465(LOC15, NIM_FALSE, (&q.Tok));
			q.Col += LOC16;
			result = parsedoc_347678((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(trstnode341011*, dirimage_349807)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 7, NIM_NIL);
	(*result).Kind = ((NU8) 45);
	return result;
}

N_NIMCALL(trstnode341011*, dirfigure_349819)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 7, parsesectionwrapper_348925);
	(*result).Kind = ((NU8) 46);
	return result;
}

N_NIMCALL(trstnode341011*, dirtitle_349831)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 43);
	return result;
}

N_NIMCALL(trstnode341011*, dircontainer_349408)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 1, parsesectionwrapper_348925);
	(*result).Kind = ((NU8) 50);
	return result;
}

N_NIMCALL(trstnode341011*, dircontents_349843)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 44);
	return result;
}

N_NIMCALL(trstnode341011*, parsedirbody_349209)(trstparser342659* p, tsectionparser349012 contentparser) {
	trstnode341011* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_349168((&(*p)));
		if (!LOC3) goto LA4;
		pushind_343211(p, (*p).Tok->data[(*p).Idx].Ival);
		result = contentparser(p);
		popind_343240(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_349868)(trstparser342659* p, trstnode341011** result, NU8 kind, tsectionparser349012 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_342073((*result), ((NimStringDesc*) &TMP2617));
	{
		NimStringDesc* path;
		if (!(0 < filename->Sup.len)) goto LA3;
		path = (*(*p).S).Findfile(filename);
		{
			if (!(path->Sup.len == 0)) goto LA7;
			rstmessage_342972((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			trstnode341011* LOC10;
			f = readfile_12842(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_341105(kind));
			LOC10 = 0;
			LOC10 = newrstnode_341151(((NU8) 64), f);
			add_341183((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		trstnode341011* LOC12;
		(*(*result)).Kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_349209(p, contentparser);
		add_341183((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(trstnode341011*, dirraw_349886)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349023(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*) &TMP2620));
			if (!(LOC7 == 0)) goto LA8;
			dirrawaux_349868(p, &result, ((NU8) 48), parseliteralblock_346707);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).Sons->data[0]).Sons->data[0]).Text, ((NimStringDesc*) &TMP2621));
			if (!(LOC11 == 0)) goto LA12;
			dirrawaux_349868(p, &result, ((NU8) 49), parseliteralblock_346707);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_342972((&(*p)), ((NU8) 5), (*(*(*result).Sons->data[0]).Sons->data[0]).Text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_349868(p, &result, ((NU8) 42), parsesectionwrapper_348925);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode341011*, dircodeblock_349253)(trstparser342659* p, NIM_BOOL nimrodextension) {
	trstnode341011* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_349188(p, 3, parseliteralblock_346707);
	LOC1 = 0;
	LOC1 = getfieldvalue_342073(result, ((NimStringDesc*) &TMP2617));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		NimStringDesc* path;
		trstnode341011* n;
		NimStringDesc* LOC10;
		trstnode341011* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).S).Findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_342972((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_341105(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_12842(path);
		LOC11 = 0;
		LOC11 = newrstnode_341151(((NU8) 64), LOC10);
		add_341183(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).Sons->data[2]), n);
	}
	LA4: ;
	{
		trstnode341011* extranode;
		trstnode341011* LOC20;
		trstnode341011* LOC21;
		trstnode341011* LOC22;
		trstnode341011* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).Sons->data[1] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).Sons->data[1]), newrstnode_341105(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_341105(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_341105(((NU8) 15));
		add_341183(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_341105(((NU8) 16));
		add_341183(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2622));
		add_341183((*extranode).Sons->data[0], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2623));
		add_341183((*extranode).Sons->data[1], LOC23);
		add_341183((*result).Sons->data[1], extranode);
	}
	LA14: ;
	(*result).Kind = ((NU8) 47);
	return result;
}

N_NIMCALL(trstnode341011*, dirindex_349855)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsedirective_349188(p, 0, parsesectionwrapper_348925);
	(*result).Kind = ((NU8) 51);
	return result;
}

N_NIMCALL(trstnode341011*, getreferencename_343773)(trstparser342659* p, NimStringDesc* endstr) {
	trstnode341011* result;
	trstnode341011* res;
	result = 0;
	res = newrstnode_341105(((NU8) 0));
	{
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				trstnode341011* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_343762(p);
				add_341183(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: ;
				{
					trstnode341011* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_343762(p);
					add_341183(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_342972((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).Idx += 1;
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(trstnode341011*, untileol_343817)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = newrstnode_341105(((NU8) 0));
	{
		while (1) {
			trstnode341011* LOC3;
			if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_343762(p);
			add_341183(result, LOC3);
			(*p).Idx += 1;
		} LA2: ;
	}
	return result;
}

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

N_NIMCALL(void, setsub_343586)(trstparser342659* p, NimStringDesc* key, trstnode341011* value) {
	NI length;
	NimStringDesc* LOC8;
	length = (*(*p).S).Subs->Sup.len;
	{
		NI i_343616;
		NI HEX3Atmp_343634;
		NI res_343637;
		i_343616 = 0;
		HEX3Atmp_343634 = 0;
		HEX3Atmp_343634 = (NI32)(length - 1);
		res_343637 = 0;
		{
			while (1) {
				if (!(res_343637 <= HEX3Atmp_343634)) goto LA3;
				i_343616 = res_343637;
				{
					if (!eqStrings(key, (*(*p).S).Subs->data[i_343616].Key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).S).Subs->data[i_343616].Value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_343637 += 1;
			} LA3: ;
		}
	}
	(*(*p).S).Subs = (TY342669*) setLengthSeq(&((*(*p).S).Subs)->Sup, sizeof(tsubstitution342653), (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(trstnode341011*, parsecomment_345470)(trstparser342659* p) {
	trstnode341011* 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(trstnode341011*, parsedotdot_346700)(trstparser342659* p) {
	trstnode341011* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).Tok->data[(*p).Idx].Col;
	(*p).Idx += 1;
	d = getdirective_345329(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_343211(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_345591(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_349221(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_349807(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_349819(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_349831(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_349408(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_349843(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).S).Options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_349886(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_342972((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_349253(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_349253(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_349855(p);
		}
		break;
		default:
		{
			rstmessage_342972((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_343240(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		trstnode341011* a;
		trstnode341011* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_343995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2624));
		if (!LOC23) goto LA24;
		(*p).Idx += 2;
		a = getreferencename_343773(p, ((NimStringDesc*) &TMP2610));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA28;
			(*p).Idx += 1;
		}
		LA28: ;
		b = untileol_343817(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_342061(a);
		setref_343654(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		trstnode341011* a;
		trstnode341011* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_343995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2625));
		if (!LOC32) goto LA33;
		(*p).Idx += 2;
		a = getreferencename_343773(p, ((NimStringDesc*) &TMP2508));
		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*) &TMP2626));
			if (!(LOC41 == 0)) goto LA42;
			(*p).Idx += 1;
			expect_343861(p, ((NimStringDesc*) &TMP2504));
			b = untileol_343817(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2526));
			if (!(LOC45 == 0)) goto LA46;
			(*p).Idx += 1;
			b = dirimage_349807(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_342972((&(*p)), ((NU8) 5), (*p).Tok->data[(*p).Idx].Symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_342067(a);
		setsub_343586(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		trstnode341011* a;
		trstnode341011* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_343995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2627));
		if (!LOC51) goto LA52;
		(*p).Idx += 2;
		a = getreferencename_343773(p, ((NimStringDesc*) &TMP2628));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA56;
			(*p).Idx += 1;
		}
		LA56: ;
		b = untileol_343817(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_342061(a);
		setref_343654(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_345470(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode341011*, parseenumlist_348524)(trstparser342659* p) {
	trstnode341011* result;
	NI w;
	result = 0;
	result = NIM_NIL;
	w = 0;
	{
		while (1) {
			if (!(w <= 2)) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = match_343995((&(*p)), (*p).Idx, wildcards_348529[(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_341105(((NU8) 7));
		(*p).Idx += (NI32)(wildpos_348534[(w)- 0] + 3);
		j = tokenafternewline_346832((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).Tok->data[j].Col == (*p).Tok->data[(*p).Idx].Col);
			if (LOC14) goto LA15;
			LOC14 = match_343995((&(*p)), j, wildcards_348529[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_343211(p, (*p).Tok->data[(*p).Idx].Col);
			{
				while (1) {
					trstnode341011* item;
					item = newrstnode_341105(((NU8) 8));
					parsesection_345719(p, item);
					add_341183(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_343995((&(*p)), (NI32)((*p).Idx + 1), wildcards_348529[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).Idx += (NI32)(wildpos_348534[(w)- 0] + 4);
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_343240(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).Idx -= (NI32)(wildpos_348534[(w)- 0] + 3);
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(trstnode341011*, parsedefinitionlist_348427)(trstparser342659* p) {
	trstnode341011* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_346832((&(*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_343201((&(*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*) &TMP2504)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_341105(((NU8) 9));
		{
			while (1) {
				trstnode341011* a;
				j = (*p).Idx;
				a = newrstnode_341105(((NU8) 11));
				parseline_345683(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					trstnode341011* b;
					trstnode341011* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_343201((&(*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*) &TMP2504)));
					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_343211(p, (*p).Tok->data[(*p).Idx].Ival);
					b = newrstnode_341105(((NU8) 12));
					parsesection_345719(p, b);
					c = newrstnode_341105(((NU8) 10));
					add_341183(c, a);
					add_341183(c, b);
					add_341183(result, c);
					popind_343240(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_346832((&(*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*) &TMP2504)));
						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_341084(result);
			if (!(LOC49 == 0)) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(trstnode341011*, parsetransition_348072)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = newrstnode_341105(((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_345701)(trstparser342659* p, trstnode341011* 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_345182(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NI, getlevel_346806)(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(trstnode341011*, parseheadline_347104)(trstparser342659* p) {
	trstnode341011* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_341105(((NU8) 1));
	parseuntilnewline_345701(p, result);
	c = (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0];
	(*p).Idx += 2;
	(*result).Level = getlevel_346806((*(*p).S).Underlinetolevel, (&(*(*p).S).Ulevel), c);
	return result;
}

N_NIMCALL(trstnode341011*, parseoverline_348137)(trstparser342659* p) {
	trstnode341011* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).Tok->data[(*p).Idx].Symbol->data[0];
	(*p).Idx += 2;
	result = newrstnode_341105(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_345701(p, result);
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA5;
				(*p).Idx += 1;
				{
					NI LOC9;
					trstnode341011* LOC12;
					LOC9 = 0;
					LOC9 = currind_343201((&(*p)));
					if (!(LOC9 < (*p).Tok->data[(NI32)((*p).Idx - 1)].Ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2537));
					add_341183(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).Level = getlevel_346806((*(*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_347427)(trstparser342659* 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_347437)(trstparser342659* p, TY342680** cols) {
	NI l;
	l = 0;
	{
		while (1) {
			l += 1;
			(*cols) = (TY342680*) setLengthSeq(&((*cols))->Sup, sizeof(NI), l);
			(*cols)->data[(NI32)(l - 1)] = tokend_347427((&(*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(trstnode341011*, parsesimpletable_347685)(trstparser342659* p) {
	trstnode341011* result;
	TY342680* cols;
	TY118808* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	trstparser342659 q;
	trstnode341011* a;
	trstnode341011* 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 = (&NTI342659);
	a = 0;
	b = 0;
	result = newrstnode_341105(((NU8) 29));
	cols = (TY342680*) newSeq((&NTI342680), 0);
	row = (TY118808*) newSeq((&NTI118808), 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_346832((&(*p)));
				{
					if (!((3 &(1<<(((*p).Tok->data[last].Kind)&7)))!=0)) goto LA9;
					(*p).Idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_347437(p, (&cols));
				row = (TY118808*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), cols->Sup.len);
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_347818;
						NI HEX3Atmp_347987;
						NI LOC16;
						NI res_347990;
						j_347818 = 0;
						HEX3Atmp_347987 = 0;
						LOC16 = 0;
						LOC16 = len_341084(a);
						HEX3Atmp_347987 = (NI32)(LOC16 - 1);
						res_347990 = 0;
						{
							while (1) {
								if (!(res_347990 <= HEX3Atmp_347987)) goto LA18;
								j_347818 = res_347990;
								(*(*a).Sons->data[j_347818]).Kind = ((NU8) 32);
								res_347990 += 1;
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_347840;
				NI HEX3Atmp_347993;
				NI res_347996;
				j_347840 = 0;
				HEX3Atmp_347993 = 0;
				HEX3Atmp_347993 = (row->Sup.len-1);
				res_347996 = 0;
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_347996 <= HEX3Atmp_347993)) goto LA25;
						j_347840 = res_347996;
						LOC26 = 0;
						LOC26 = row->data[j_347840]; row->data[j_347840] = copyStringRC1(((NimStringDesc*) &TMP2112));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_347996 += 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_347427((&(*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_347427((&(*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_347947;
						NI HEX3Atmp_348001;
						NI res_348004;
						j_347947 = 0;
						HEX3Atmp_348001 = 0;
						HEX3Atmp_348001 = (row->Sup.len-1);
						res_348004 = 1;
						{
							while (1) {
								if (!(res_348004 <= HEX3Atmp_348001)) goto LA56;
								j_347947 = res_348004;
								row->data[j_347947] = addChar(row->data[j_347947], 10);
								res_348004 += 1;
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_341105(((NU8) 31));
			{
				NI j_347960;
				NI HEX3Atmp_348007;
				NI res_348010;
				j_347960 = 0;
				HEX3Atmp_348007 = 0;
				HEX3Atmp_348007 = (row->Sup.len-1);
				res_348010 = 0;
				{
					while (1) {
						NI LOC60;
						trstnode341011* LOC61;
						if (!(res_348010 <= HEX3Atmp_348007)) goto LA59;
						j_347960 = res_348010;
						initparser_343289((&q), (*p).S);
						q.Col = cols->data[j_347960];
						q.Line = (NI32)(line - 1);
						q.Filename = copyString((*p).Filename);
						LOC60 = 0;
						LOC60 = gettokens_342465(row->data[j_347960], NIM_FALSE, (&q.Tok));
						q.Col += LOC60;
						b = newrstnode_341105(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_347678((&q));
						add_341183(b, LOC61);
						add_341183(a, b);
						res_348010 += 1;
					} LA59: ;
				}
			}
			add_341183(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(trstnode341011*, parseoptionlist_348306)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = newrstnode_341105(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				trstnode341011* a;
				trstnode341011* b;
				trstnode341011* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_346931((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_341105(((NU8) 19));
				b = newrstnode_341105(((NU8) 23));
				c = newrstnode_341105(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_343995((&(*p)), (*p).Idx, ((NimStringDesc*) &TMP2516));
					if (!LOC10) goto LA11;
					(*p).Idx += 1;
				}
				LA11: ;
				{
					while (1) {
						trstnode341011* 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_343762(p);
						add_341183(a, LOC21);
						(*p).Idx += 1;
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_346832((&(*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_343201((&(*p)));
					LOC24 = (LOC28 < (*p).Tok->data[(NI32)(j - 1)].Ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_343211(p, (*p).Tok->data[(NI32)(j - 1)].Ival);
					parsesection_345719(p, b);
					popind_343240(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_345683(p, b);
				}
				LA22: ;
				{
					if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA34;
					(*p).Idx += 1;
				}
				LA34: ;
				add_341183(c, a);
				add_341183(c, b);
				add_341183(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_347031)(trstparser342659* p, trstnode341011* 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_343201((&(*p)));
					if (!((*p).Tok->data[(*p).Idx].Ival == LOC9)) goto LA10;
					(*p).Idx += 1;
					LOC12 = 0;
					LOC12 = whichsection_346941((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						trstnode341011* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2537));
						add_341183(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						trstnode341011* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_346960(p);
						addifnotnil_341211(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;
					trstnode341011* LOC29;
					trstnode341011* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2504));
					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_343201((&(*p)));
					LOC22 = (LOC26 < (*p).Tok->data[(NI32)((*p).Idx + 1)].Ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_341151(((NU8) 64), ((NimStringDesc*) &TMP2610));
					add_341183(result, LOC29);
					(*p).Idx += 1;
					LOC30 = 0;
					LOC30 = parseliteralblock_346707(p);
					add_341183(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_345182(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_345182(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

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

N_NIMCALL(void, parsesection_345719)(trstparser342659* p, trstnode341011* result) {
	{
		while (1) {
			NIM_BOOL leave;
			trstnode341011* 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_343201((&(*p)));
						if (!(LOC7 == (*p).Tok->data[(*p).Idx].Ival)) goto LA8;
						(*p).Idx += 1;
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						trstnode341011* a;
						LOC11 = 0;
						LOC11 = currind_343201((&(*p)));
						if (!(LOC11 < (*p).Tok->data[(*p).Idx].Ival)) goto LA12;
						pushind_343211(p, (*p).Tok->data[(*p).Idx].Ival);
						a = newrstnode_341105(((NU8) 28));
						parsesection_345719(p, a);
						add_341183(result, a);
						popind_343240(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_346941((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).Idx += 1;
				a = parseliteralblock_346707(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_348234(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_346960(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_346700(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_348524(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_342996((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_348427(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(0 < (*p).Idx)) goto LA32;
					(*p).Idx -= 1;
				}
				LA32: ;
				a = parsefields_345761(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_348072(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_347104(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_348137(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_347685(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_348306(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_341105(((NU8) 4));
				parseparagraph_347031(p, a);
			}
			LA44: ;
			addifnotnil_341211(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_348620(result, 0);
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_348620(result, 1);
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).Sons->data[0]).Kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(trstnode341011*, parsesectionwrapper_348925)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = newrstnode_341105(((NU8) 0));
	parsesection_345719(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).Kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_341084(result);
			LOC3 = (LOC5 == 1);
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).Sons->data[0];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(trstnode341011*, parsedoc_347678)(trstparser342659* p) {
	trstnode341011* result;
	result = 0;
	result = parsesectionwrapper_348925(p);
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA3;
		rstmessage_342996((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode341011*, rstparse_350164)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, tfindfilehandler342023 findfile, tmsghandler342021 msghandler) {
	trstnode341011* result;
	trstparser342659 p;
	tsharedstate342655* LOC1;
	NI LOC2;
	trstnode341011* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI342659);
	LOC1 = 0;
	LOC1 = newsharedstate_342890(options, findfile, msghandler);
	initparser_343289((&p), LOC1);
	p.Filename = copyString(filename);
	p.Line = line;
	LOC2 = 0;
	LOC2 = gettokens_342465(text, ((options &(1<<((((NU8) 0))&7)))!=0), (&p.Tok));
	p.Col = (NI32)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_347678((&p));
	result = resolvesubs_350086((&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* TMP2454[8];
static TNimNode* TMP2455[5];
static TNimNode* TMP2456[7];
NI TMP2458;
static char* NIM_CONST TMP2457[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2460[9];
static TNimNode* TMP2461[4];
NI TMP2463;
static char* NIM_CONST TMP2462[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2464[2];
static TNimNode* TMP2476[10];
NI TMP2478;
static char* NIM_CONST TMP2477[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2490[3];
NI TMP2492;
static char* NIM_CONST TMP2491[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2495[6];
static TNimNode TMP884[65];
NTI342659.size = sizeof(trstparser342659);
NTI342659.kind = 17;
NTI342659.base = (&NTI3211);
TMP2454[0] = &TMP884[1];
TMP884[1].kind = 1;
TMP884[1].offset = offsetof(trstparser342659, Idx);
TMP884[1].typ = (&NTI108);
TMP884[1].name = "idx";
TMP2454[1] = &TMP884[2];
NTI342135.size = sizeof(ttoken342135);
NTI342135.kind = 18;
NTI342135.base = 0;
NTI342135.flags = 2;
TMP2455[0] = &TMP884[4];
NTI342133.size = sizeof(NU8);
NTI342133.kind = 14;
NTI342133.base = 0;
NTI342133.flags = 3;
for (TMP2458 = 0; TMP2458 < 7; TMP2458++) {
TMP884[TMP2458+5].kind = 1;
TMP884[TMP2458+5].offset = TMP2458;
TMP884[TMP2458+5].name = TMP2457[TMP2458];
TMP2456[TMP2458] = &TMP884[TMP2458+5];
}
TMP884[12].len = 7; TMP884[12].kind = 2; TMP884[12].sons = &TMP2456[0];
NTI342133.node = &TMP884[12];
TMP884[4].kind = 1;
TMP884[4].offset = offsetof(ttoken342135, Kind);
TMP884[4].typ = (&NTI342133);
TMP884[4].name = "kind";
TMP2455[1] = &TMP884[13];
TMP884[13].kind = 1;
TMP884[13].offset = offsetof(ttoken342135, Ival);
TMP884[13].typ = (&NTI108);
TMP884[13].name = "ival";
TMP2455[2] = &TMP884[14];
TMP884[14].kind = 1;
TMP884[14].offset = offsetof(ttoken342135, Symbol);
TMP884[14].typ = (&NTI149);
TMP884[14].name = "symbol";
TMP2455[3] = &TMP884[15];
TMP884[15].kind = 1;
TMP884[15].offset = offsetof(ttoken342135, Line);
TMP884[15].typ = (&NTI108);
TMP884[15].name = "line";
TMP2455[4] = &TMP884[16];
TMP884[16].kind = 1;
TMP884[16].offset = offsetof(ttoken342135, Col);
TMP884[16].typ = (&NTI108);
TMP884[16].name = "col";
TMP884[3].len = 5; TMP884[3].kind = 2; TMP884[3].sons = &TMP2455[0];
NTI342135.node = &TMP884[3];
NTI342137.size = sizeof(ttokenseq342137*);
NTI342137.kind = 24;
NTI342137.base = (&NTI342135);
NTI342137.flags = 2;
NTI342137.marker = TMP2459;
TMP884[2].kind = 1;
TMP884[2].offset = offsetof(trstparser342659, Tok);
TMP884[2].typ = (&NTI342137);
TMP884[2].name = "tok";
TMP2454[2] = &TMP884[17];
NTI342655.size = sizeof(tsharedstate342655);
NTI342655.kind = 18;
NTI342655.base = 0;
NTI342655.flags = 2;
TMP2460[0] = &TMP884[19];
NTI342013.size = sizeof(NU8);
NTI342013.kind = 14;
NTI342013.base = 0;
NTI342013.flags = 3;
for (TMP2463 = 0; TMP2463 < 4; TMP2463++) {
TMP884[TMP2463+20].kind = 1;
TMP884[TMP2463+20].offset = TMP2463;
TMP884[TMP2463+20].name = TMP2462[TMP2463];
TMP2461[TMP2463] = &TMP884[TMP2463+20];
}
TMP884[24].len = 4; TMP884[24].kind = 2; TMP884[24].sons = &TMP2461[0];
NTI342013.node = &TMP884[24];
NTI342015.size = sizeof(NU8);
NTI342015.kind = 19;
NTI342015.base = (&NTI342013);
NTI342015.flags = 3;
TMP884[25].len = 0; TMP884[25].kind = 0;
NTI342015.node = &TMP884[25];
TMP884[19].kind = 1;
TMP884[19].offset = offsetof(tsharedstate342655, Options);
TMP884[19].typ = (&NTI342015);
TMP884[19].name = "options";
TMP2460[1] = &TMP884[26];
TMP884[26].kind = 1;
TMP884[26].offset = offsetof(tsharedstate342655, Ulevel);
TMP884[26].typ = (&NTI108);
TMP884[26].name = "uLevel";
TMP2460[2] = &TMP884[27];
TMP884[27].kind = 1;
TMP884[27].offset = offsetof(tsharedstate342655, Olevel);
TMP884[27].typ = (&NTI108);
TMP884[27].name = "oLevel";
TMP2460[3] = &TMP884[28];
NTI342653.size = sizeof(tsubstitution342653);
NTI342653.kind = 18;
NTI342653.base = 0;
NTI342653.flags = 2;
TMP2464[0] = &TMP884[30];
TMP884[30].kind = 1;
TMP884[30].offset = offsetof(tsubstitution342653, Key);
TMP884[30].typ = (&NTI149);
TMP884[30].name = "key";
TMP2464[1] = &TMP884[31];
TMP884[31].kind = 1;
TMP884[31].offset = offsetof(tsubstitution342653, Value);
TMP884[31].typ = (&NTI341007);
TMP884[31].name = "value";
TMP884[29].len = 2; TMP884[29].kind = 2; TMP884[29].sons = &TMP2464[0];
NTI342653.node = &TMP884[29];
NTI342669.size = sizeof(TY342669*);
NTI342669.kind = 24;
NTI342669.base = (&NTI342653);
NTI342669.flags = 2;
NTI342669.marker = TMP2471;
TMP884[28].kind = 1;
TMP884[28].offset = offsetof(tsharedstate342655, Subs);
TMP884[28].typ = (&NTI342669);
TMP884[28].name = "subs";
TMP2460[4] = &TMP884[32];
TMP884[32].kind = 1;
TMP884[32].offset = offsetof(tsharedstate342655, Refs);
TMP884[32].typ = (&NTI342669);
TMP884[32].name = "refs";
TMP2460[5] = &TMP884[33];
TMP884[33].kind = 1;
TMP884[33].offset = offsetof(tsharedstate342655, Underlinetolevel);
TMP884[33].typ = (&NTI96742);
TMP884[33].name = "underlineToLevel";
TMP2460[6] = &TMP884[34];
TMP884[34].kind = 1;
TMP884[34].offset = offsetof(tsharedstate342655, Overlinetolevel);
TMP884[34].typ = (&NTI96742);
TMP884[34].name = "overlineToLevel";
TMP2460[7] = &TMP884[35];
NTI342021.size = sizeof(tmsghandler342021);
NTI342021.kind = 25;
NTI342021.base = 0;
NTI342021.flags = 3;
TMP884[35].kind = 1;
TMP884[35].offset = offsetof(tsharedstate342655, Msghandler);
TMP884[35].typ = (&NTI342021);
TMP884[35].name = "msgHandler";
TMP2460[8] = &TMP884[36];
NTI342023.size = sizeof(tfindfilehandler342023);
NTI342023.kind = 25;
NTI342023.base = 0;
NTI342023.flags = 3;
TMP884[36].kind = 1;
TMP884[36].offset = offsetof(tsharedstate342655, Findfile);
TMP884[36].typ = (&NTI342023);
TMP884[36].name = "findFile";
TMP884[18].len = 9; TMP884[18].kind = 2; TMP884[18].sons = &TMP2460[0];
NTI342655.node = &TMP884[18];
NTI342657.size = sizeof(tsharedstate342655*);
NTI342657.kind = 22;
NTI342657.base = (&NTI342655);
NTI342657.flags = 2;
NTI342657.marker = TMP2472;
TMP884[17].kind = 1;
TMP884[17].offset = offsetof(trstparser342659, S);
TMP884[17].typ = (&NTI342657);
TMP884[17].name = "s";
TMP2454[3] = &TMP884[37];
NTI342680.size = sizeof(TY342680*);
NTI342680.kind = 24;
NTI342680.base = (&NTI108);
NTI342680.flags = 2;
NTI342680.marker = TMP2473;
TMP884[37].kind = 1;
TMP884[37].offset = offsetof(trstparser342659, Indentstack);
TMP884[37].typ = (&NTI342680);
TMP884[37].name = "indentStack";
TMP2454[4] = &TMP884[38];
TMP884[38].kind = 1;
TMP884[38].offset = offsetof(trstparser342659, Filename);
TMP884[38].typ = (&NTI149);
TMP884[38].name = "filename";
TMP2454[5] = &TMP884[39];
TMP884[39].kind = 1;
TMP884[39].offset = offsetof(trstparser342659, Line);
TMP884[39].typ = (&NTI108);
TMP884[39].name = "line";
TMP2454[6] = &TMP884[40];
TMP884[40].kind = 1;
TMP884[40].offset = offsetof(trstparser342659, Col);
TMP884[40].typ = (&NTI108);
TMP884[40].name = "col";
TMP2454[7] = &TMP884[41];
TMP884[41].kind = 1;
TMP884[41].offset = offsetof(trstparser342659, Hastoc);
TMP884[41].typ = (&NTI138);
TMP884[41].name = "hasToc";
TMP884[0].len = 8; TMP884[0].kind = 2; TMP884[0].sons = &TMP2454[0];
NTI342659.node = &TMP884[0];
NTI342019.size = sizeof(NU8);
NTI342019.kind = 14;
NTI342019.base = 0;
NTI342019.flags = 3;
for (TMP2478 = 0; TMP2478 < 10; TMP2478++) {
TMP884[TMP2478+42].kind = 1;
TMP884[TMP2478+42].offset = TMP2478;
TMP884[TMP2478+42].name = TMP2477[TMP2478];
TMP2476[TMP2478] = &TMP884[TMP2478+42];
}
TMP884[52].len = 10; TMP884[52].kind = 2; TMP884[52].sons = &TMP2476[0];
NTI342019.node = &TMP884[52];
NTI342017.size = sizeof(NU8);
NTI342017.kind = 14;
NTI342017.base = 0;
NTI342017.flags = 3;
for (TMP2492 = 0; TMP2492 < 3; TMP2492++) {
TMP884[TMP2492+53].kind = 1;
TMP884[TMP2492+53].offset = TMP2492;
TMP884[TMP2492+53].name = TMP2491[TMP2492];
TMP2490[TMP2492] = &TMP884[TMP2492+53];
}
TMP884[56].len = 3; TMP884[56].kind = 2; TMP884[56].sons = &TMP2490[0];
NTI342017.node = &TMP884[56];
NTI342661.size = sizeof(eparseerror342661);
NTI342661.kind = 17;
NTI342661.base = (&NTI3249);
TMP884[57].len = 0; TMP884[57].kind = 2;
NTI342661.node = &TMP884[57];
NTI342840.size = sizeof(eparseerror342661*);
NTI342840.kind = 22;
NTI342840.base = (&NTI342661);
NTI342840.marker = TMP2493;
NTI342139.size = sizeof(tlexer342139);
NTI342139.kind = 17;
NTI342139.base = (&NTI3211);
NTI342139.flags = 1;
TMP2495[0] = &TMP884[59];
TMP884[59].kind = 1;
TMP884[59].offset = offsetof(tlexer342139, Buf);
TMP884[59].typ = (&NTI151);
TMP884[59].name = "buf";
TMP2495[1] = &TMP884[60];
TMP884[60].kind = 1;
TMP884[60].offset = offsetof(tlexer342139, Bufpos);
TMP884[60].typ = (&NTI108);
TMP884[60].name = "bufpos";
TMP2495[2] = &TMP884[61];
TMP884[61].kind = 1;
TMP884[61].offset = offsetof(tlexer342139, Line);
TMP884[61].typ = (&NTI108);
TMP884[61].name = "line";
TMP2495[3] = &TMP884[62];
TMP884[62].kind = 1;
TMP884[62].offset = offsetof(tlexer342139, Col);
TMP884[62].typ = (&NTI108);
TMP884[62].name = "col";
TMP2495[4] = &TMP884[63];
TMP884[63].kind = 1;
TMP884[63].offset = offsetof(tlexer342139, Baseindent);
TMP884[63].typ = (&NTI108);
TMP884[63].name = "baseIndent";
TMP2495[5] = &TMP884[64];
TMP884[64].kind = 1;
TMP884[64].offset = offsetof(tlexer342139, Skippounds);
TMP884[64].typ = (&NTI138);
TMP884[64].name = "skipPounds";
TMP884[58].len = 6; TMP884[58].kind = 2; TMP884[58].sons = &TMP2495[0];
NTI342139.node = &TMP884[58];
}

