/* Generated by Nim Compiler v0.11.2 */
/*   (c) 2015 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 Trstnode297011 Trstnode297011;
typedef struct Trstnodeseq297009 Trstnodeseq297009;
typedef struct Trstparser298574 Trstparser298574;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttokenseq298137 Ttokenseq298137;
typedef struct Tsharedstate298570 Tsharedstate298570;
typedef struct TY298595 TY298595;
typedef struct Ttoken298135 Ttoken298135;
typedef struct TY298584 TY298584;
typedef struct Tsubstitution298568 Tsubstitution298568;
typedef struct Tcell46346 Tcell46346;
typedef struct Tcellseq46362 Tcellseq46362;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellset46358 Tcellset46358;
typedef struct Tpagedesc46354 Tpagedesc46354;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Eparseerror298576 Eparseerror298576;
typedef struct Valueerror3449 Valueerror3449;
typedef struct Exception Exception;
typedef struct Tlexer298139 Tlexer298139;
typedef struct Keyvaluepair134008 Keyvaluepair134008;
typedef struct TY122008 TY122008;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Trstnode297011  {
NU8 kind;
NimStringDesc* text;
NI level;
Trstnodeseq297009* sons;
};
typedef N_NIMCALL_PTR(NimStringDesc*, Tfindfilehandler298023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, Tmsghandler298021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Trstparser298574  {
  TNimObject Sup;
NI idx;
Ttokenseq298137* tok;
Tsharedstate298570* s;
TY298595* 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  Ttoken298135  {
NU8 kind;
NI ival;
NimStringDesc* symbol;
NI line;
NI col;
};
typedef NI Skiptable98721[256];
struct  Tsharedstate298570  {
NU8 options;
NI ulevel;
NI olevel;
TY298584* subs;
TY298584* refs;
Skiptable98721 underlinetolevel;
Skiptable98721 overlinetolevel;
Tmsghandler298021 msghandler;
Tfindfilehandler298023 findfile;
};
struct  Tsubstitution298568  {
NimStringDesc* key;
Trstnode297011* value;
};
struct  Tcell46346  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46362  {
NI len;
NI cap;
Tcell46346** d;
};
struct  Tcellset46358  {
NI counter;
NI max;
Tpagedesc46354* head;
Tpagedesc46354** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46362 zct;
Tcellseq46362 decstack;
Tcellset46358 cycleroots;
Tcellseq46362 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
typedef NimStringDesc* TY298053[10];
typedef NimStringDesc* TY298816[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror3449  {
  Exception Sup;
};
struct  Eparseerror298576  {
  Valueerror3449 Sup;
};
typedef NimStringDesc* TY165566[1];
struct  Tlexer298139  {
  TNimObject Sup;
NCSTRING buf;
NI bufpos;
NI line;
NI col;
NI baseindent;
NIM_BOOL skippounds;
};
typedef NU8 TY179407[32];
typedef NimStringDesc* TY301087[13];
typedef N_NIMCALL_PTR(Trstnode297011*, Tsectionparser304212) (Trstparser298574* p);
struct Keyvaluepair134008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef Keyvaluepair134008 TY298093[34];
typedef NimStringDesc* TY303828[3];
typedef NI TY303833[3];
typedef NI TY27420[16];
struct  Tpagedesc46354  {
Tpagedesc46354* next;
NI key;
TY27420 bits;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
typedef Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct Ttokenseq298137 {
  TGenericSeq Sup;
  Ttoken298135 data[SEQ_DECL_SIZE];
};
struct TY298584 {
  TGenericSeq Sup;
  Tsubstitution298568 data[SEQ_DECL_SIZE];
};
struct TY298595 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY122008 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct Trstnodeseq297009 {
  TGenericSeq Sup;
  Trstnode297011* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_299169)(Trstnode297011* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_297084)(Trstnode297011* n);
N_NIMCALL(void, addnodesaux_299108)(Trstnode297011* 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_298067)(Trstnode297011* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2445)(void* p, NI op);
N_NIMCALL(void, TMP2457)(void* p, NI op);
N_NIMCALL(void, TMP2458)(void* p, NI op);
N_NIMCALL(void, TMP2459)(void* p, NI op);
N_NIMCALL(void, initparser_299068)(Trstparser298574* p, Tsharedstate298570* sharedstate);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_81404, TNimType* mt);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Tsharedstate298570*, newsharedstate_298876)(NU8 options, Tfindfilehandler298023 findfile, Tmsghandler298021 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Tcell46346*, usrtocell_49846)(void* usr);
static N_INLINE(void, rtladdzct_51404)(Tcell46346* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46362* s, Tcell46346* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_298807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_298604)(NU8 k);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_82729, 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, TMP2479)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeln_156205)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_13457)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_298866)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_298416)(NimStringDesc* buffer, NIM_BOOL skippounds, Ttokenseq298137** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_298369)(Tlexer298139* L, Ttoken298135* tok);
N_NIMCALL(void, getthing_298161)(Tlexer298139* L, Ttoken298135* tok, TY179407 s);
N_NIMCALL(void, getindent_298344)(Tlexer298139* L, Ttoken298135* tok);
N_NIMCALL(NI, getindentaux_298250)(Tlexer298139* L, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_298211)(Tlexer298139* L, Ttoken298135* tok);
N_NIMCALL(Trstnode297011*, resolvesubs_305250)(Trstparser298574* p, Trstnode297011* n);
N_NIMCALL(NI, findsub_299292)(Trstparser298574* p, Trstnode297011* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_122644)(NimStringDesc* key);
N_NIMCALL(Trstnode297011*, newrstnode_297136)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_298942)(Trstparser298574* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(Trstnode297011*, findref_299487)(Trstparser298574* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_298061)(Trstnode297011* n);
N_NIMCALL(Trstnode297011*, newrstnode_297102)(NU8 kind);
N_NIMCALL(void, add_297165)(Trstnode297011* father, Trstnode297011* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Trstnode297011*, parsedoc_303069)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsesectionwrapper_304109)(Trstparser298574* p);
N_NIMCALL(void, parsesection_301213)(Trstparser298574* p, Trstnode297011* result);
N_NIMCALL(NI, currind_299001)(Trstparser298574* p);
N_NIMCALL(void, pushind_299011)(Trstparser298574* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_299032)(Trstparser298574* p);
N_NIMCALL(NU8, whichsection_302302)(Trstparser298574* p);
N_NIMCALL(NIM_BOOL, match_299727)(Trstparser298574* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_98459)(NimStringDesc* s, TY179407 theset);
N_NIMCALL(NI, tokenafternewline_302205)(Trstparser298574* p);
N_NIMCALL(NIM_BOOL, prednl_302251)(Trstparser298574* p);
N_NIMCALL(NIM_BOOL, islineblock_302240)(Trstparser298574* p);
N_NIMCALL(void, rstmessage_298966)(Trstparser298574* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_302270)(Trstparser298574* p);
N_NIMCALL(NIM_BOOL, isoptionlist_302292)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parseliteralblock_302099)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsebulletlist_303565)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parselineblock_302321)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsedotdot_302092)(Trstparser298574* p);
N_NIMCALL(NimStringDesc*, getdirective_300866)(Trstparser298574* p);
N_NIMCALL(NU8, getdirkind_301094)(NimStringDesc* s);
static N_INLINE(NI, find_301099)(TY301087 a, NimStringDesc* item);
N_NIMCALL(Trstnode297011*, dirinclude_304399)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsedirective_304366)(Trstparser298574* p, NU8 flags, Tsectionparser304212 contentparser);
N_NIMCALL(Trstnode297011*, parsedirective_304223)(Trstparser298574* p, NU8 flags);
N_NIMCALL(Trstnode297011*, newleaf_299529)(Trstparser298574* p);
N_NIMCALL(void, parseline_301177)(Trstparser298574* p, Trstnode297011* father);
N_NIMCALL(void, parseinline_300752)(Trstparser298574* p, Trstnode297011* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_299680)(Trstparser298574* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_300601)(Trstparser298574* p, Trstnode297011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_299636)(Trstparser298574* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_300330)(Trstparser298574* p, Trstnode297011* father);
N_NIMCALL(void, rstmessage_298953)(Trstparser298574* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(Trstnode297011*, parsemarkdowncodeblock_300686)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsepostfix_299992)(Trstparser298574* p, Trstnode297011* n);
N_NIMCALL(void, fixupembeddedref_299889)(Trstnode297011* n, Trstnode297011* a, Trstnode297011* b);
N_NIMCALL(void, setref_299426)(Trstparser298574* p, NimStringDesc* key, Trstnode297011* value);
N_NIMCALL(Trstnode297011*, parsesmiley_300079)(Trstparser298574* p);
N_NIMCALL(NI, matchverbatim_300033)(Trstparser298574* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_300281)(Trstparser298574* p, Trstnode297011* father);
N_NIMCALL(NIM_BOOL, isurl_300201)(Trstparser298574* p, NI i);
static N_INLINE(NIM_BOOL, contains_300219)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
static N_INLINE(NI, find_300229)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
N_NIMCALL(Trstnode297011*, parsefields_301254)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsefield_301221)(Trstparser298574* p);
N_NIMCALL(NIM_BOOL, indfollows_304347)(Trstparser298574* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_298073)(Trstnode297011* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_13434)(NimStringDesc* filename);
N_NIMCALL(Trstnode297011*, dirimage_305007)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, dirfigure_305019)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, dirtitle_305031)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, dircontainer_304608)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, dircontents_305043)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, dirraw_305085)(Trstparser298574* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_305068)(Trstparser298574* p, Trstnode297011** result, NU8 kind, Tsectionparser304212 contentparser);
N_NIMCALL(Trstnode297011*, parsedirbody_304387)(Trstparser298574* p, Tsectionparser304212 contentparser);
N_NIMCALL(Trstnode297011*, dircodeblock_304428)(Trstparser298574* p, NIM_BOOL nimrodextension);
N_NIMCALL(Trstnode297011*, dirindex_305055)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, getreferencename_299540)(Trstparser298574* p, NimStringDesc* endstr);
N_NIMCALL(Trstnode297011*, untileol_299578)(Trstparser298574* p);
N_NIMCALL(void, expect_299616)(Trstparser298574* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_299365)(Trstparser298574* p, NimStringDesc* key, Trstnode297011* value);
N_NIMCALL(Trstnode297011*, parsecomment_300986)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parseenumlist_303822)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsedefinitionlist_303734)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsetransition_303425)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parseheadline_302449)(Trstparser298574* p);
N_NIMCALL(void, parseuntilnewline_301195)(Trstparser298574* p, Trstnode297011* father);
N_NIMCALL(NI, getlevel_302182)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(Trstnode297011*, parseoverline_303481)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parsesimpletable_303076)(Trstparser298574* p);
N_NIMCALL(void, getcolumns_302834)(Trstparser298574* p, TY298595** cols);
N_NIMCALL(NI, tokend_302824)(Trstparser298574* p);
N_NIMCALL(Trstnode297011*, parseoptionlist_303631)(Trstparser298574* p);
N_NIMCALL(void, parseparagraph_302386)(Trstparser298574* p, Trstnode297011* result);
N_NIMCALL(void, addifnotnil_297185)(Trstnode297011* father, Trstnode297011* son);
N_NIMCALL(NU8, sonkind_303906)(Trstnode297011* father, NI i);
STRING_LITERAL(TMP2096, "", 0);
STRING_LITERAL(TMP2185, "\001\001", 2);
NIM_CONST struct {
  TGenericSeq Sup;
  NI data[1];
} CNSTSEQ2462 = {{1, 1}, {((NI) 0)}};
NIM_CONST TY298595* TMP2460 = ((TY298595*)&CNSTSEQ2462);
STRING_LITERAL(TMP2465, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2466, "\'$1\' expected", 13);
STRING_LITERAL(TMP2467, "grid table is not implemented", 29);
STRING_LITERAL(TMP2468, "new section expected", 20);
STRING_LITERAL(TMP2469, "general parse error", 19);
STRING_LITERAL(TMP2470, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2471, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2472, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2473, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2474, "field \'$1\' not supported", 24);
NIM_CONST TY298053 messages_298052 = {((NimStringDesc*) &TMP2465),
((NimStringDesc*) &TMP2466),
((NimStringDesc*) &TMP2467),
((NimStringDesc*) &TMP2468),
((NimStringDesc*) &TMP2469),
((NimStringDesc*) &TMP2470),
((NimStringDesc*) &TMP2471),
((NimStringDesc*) &TMP2472),
((NimStringDesc*) &TMP2473),
((NimStringDesc*) &TMP2474)}
;
STRING_LITERAL(TMP2475, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2480, "\012", 1);
static NIM_CONST TY179407 TMP2482 = {
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 TY179407 TMP2483 = {
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(TMP2484, "#", 1);
static NIM_CONST TY179407 TMP2485 = {
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(TMP2486, "ii", 2);
STRING_LITERAL(TMP2487, " a", 2);
STRING_LITERAL(TMP2488, "i", 1);
STRING_LITERAL(TMP2489, "ai", 2);
STRING_LITERAL(TMP2490, "::", 2);
STRING_LITERAL(TMP2491, "+", 1);
STRING_LITERAL(TMP2492, "*", 1);
STRING_LITERAL(TMP2493, "-", 1);
STRING_LITERAL(TMP2494, "|", 1);
STRING_LITERAL(TMP2495, "..", 2);
STRING_LITERAL(TMP2496, ":w:", 3);
STRING_LITERAL(TMP2497, "(e) ", 4);
STRING_LITERAL(TMP2498, "+a+", 3);
STRING_LITERAL(TMP2499, "-w", 2);
STRING_LITERAL(TMP2500, "--w", 3);
STRING_LITERAL(TMP2501, "/w", 2);
STRING_LITERAL(TMP2502, "//w", 3);
STRING_LITERAL(TMP2503, "e) ", 3);
STRING_LITERAL(TMP2504, "e. ", 3);
STRING_LITERAL(TMP2505, "author", 6);
STRING_LITERAL(TMP2506, "authors", 7);
STRING_LITERAL(TMP2507, "code", 4);
STRING_LITERAL(TMP2508, "code-block", 10);
STRING_LITERAL(TMP2509, "container", 9);
STRING_LITERAL(TMP2510, "contents", 8);
STRING_LITERAL(TMP2511, "figure", 6);
STRING_LITERAL(TMP2512, "image", 5);
STRING_LITERAL(TMP2513, "include", 7);
STRING_LITERAL(TMP2514, "index", 5);
STRING_LITERAL(TMP2515, "raw", 3);
STRING_LITERAL(TMP2516, "title", 5);
NIM_CONST TY301087 Dirids_301086 = {((NimStringDesc*) &TMP2096),
((NimStringDesc*) &TMP2505),
((NimStringDesc*) &TMP2506),
((NimStringDesc*) &TMP2507),
((NimStringDesc*) &TMP2508),
((NimStringDesc*) &TMP2509),
((NimStringDesc*) &TMP2510),
((NimStringDesc*) &TMP2511),
((NimStringDesc*) &TMP2512),
((NimStringDesc*) &TMP2513),
((NimStringDesc*) &TMP2514),
((NimStringDesc*) &TMP2515),
((NimStringDesc*) &TMP2516)}
;
static NIM_CONST TY179407 TMP2517 = {
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(TMP2518, "\\", 1);
STRING_LITERAL(TMP2519, "***", 3);
static NIM_CONST TY179407 TMP2520 = {
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(TMP2521, "``", 2);
STRING_LITERAL(TMP2522, "\\\\", 2);
STRING_LITERAL(TMP2523, " ", 1);
STRING_LITERAL(TMP2524, "**", 2);
STRING_LITERAL(TMP2525, "```", 3);
STRING_LITERAL(TMP2526, "`", 1);
STRING_LITERAL(TMP2527, "_", 1);
STRING_LITERAL(TMP2528, "__", 2);
STRING_LITERAL(TMP2529, ">", 1);
STRING_LITERAL(TMP2530, "<", 1);
STRING_LITERAL(TMP2531, "idx", 3);
STRING_LITERAL(TMP2532, "literal", 7);
STRING_LITERAL(TMP2533, "strong", 6);
STRING_LITERAL(TMP2534, "emphasis", 8);
STRING_LITERAL(TMP2535, "sub", 3);
STRING_LITERAL(TMP2536, "subscript", 9);
STRING_LITERAL(TMP2537, "sup", 3);
STRING_LITERAL(TMP2538, "supscript", 9);
STRING_LITERAL(TMP2539, ":D", 2);
STRING_LITERAL(TMP2540, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2541, ":-D", 3);
STRING_LITERAL(TMP2542, ":)", 2);
STRING_LITERAL(TMP2543, "icon_e_smile", 12);
STRING_LITERAL(TMP2544, ":-)", 3);
STRING_LITERAL(TMP2545, ";)", 2);
STRING_LITERAL(TMP2546, "icon_e_wink", 11);
STRING_LITERAL(TMP2547, ";-)", 3);
STRING_LITERAL(TMP2548, ":(", 2);
STRING_LITERAL(TMP2549, "icon_e_sad", 10);
STRING_LITERAL(TMP2550, ":-(", 3);
STRING_LITERAL(TMP2551, ":o", 2);
STRING_LITERAL(TMP2552, "icon_e_surprised", 16);
STRING_LITERAL(TMP2553, ":-o", 3);
STRING_LITERAL(TMP2554, ":shock:", 7);
STRING_LITERAL(TMP2555, "icon_eek", 8);
STRING_LITERAL(TMP2556, ":?", 2);
STRING_LITERAL(TMP2557, "icon_e_confused", 15);
STRING_LITERAL(TMP2558, ":-?", 3);
STRING_LITERAL(TMP2559, ":-/", 3);
STRING_LITERAL(TMP2560, "8-)", 3);
STRING_LITERAL(TMP2561, "icon_cool", 9);
STRING_LITERAL(TMP2562, ":lol:", 5);
STRING_LITERAL(TMP2563, "icon_lol", 8);
STRING_LITERAL(TMP2564, ":x", 2);
STRING_LITERAL(TMP2565, "icon_mad", 8);
STRING_LITERAL(TMP2566, ":-x", 3);
STRING_LITERAL(TMP2567, ":P", 2);
STRING_LITERAL(TMP2568, "icon_razz", 9);
STRING_LITERAL(TMP2569, ":-P", 3);
STRING_LITERAL(TMP2570, ":oops:", 6);
STRING_LITERAL(TMP2571, "icon_redface", 12);
STRING_LITERAL(TMP2572, ":cry:", 5);
STRING_LITERAL(TMP2573, "icon_cry", 8);
STRING_LITERAL(TMP2574, ":evil:", 6);
STRING_LITERAL(TMP2575, "icon_evil", 9);
STRING_LITERAL(TMP2576, ":twisted:", 9);
STRING_LITERAL(TMP2577, "icon_twisted", 12);
STRING_LITERAL(TMP2578, ":roll:", 6);
STRING_LITERAL(TMP2579, "icon_rolleyes", 13);
STRING_LITERAL(TMP2580, ":!:", 3);
STRING_LITERAL(TMP2581, "icon_exclaim", 12);
STRING_LITERAL(TMP2582, ":?:", 3);
STRING_LITERAL(TMP2583, "icon_question", 13);
STRING_LITERAL(TMP2584, ":idea:", 6);
STRING_LITERAL(TMP2585, "icon_idea", 9);
STRING_LITERAL(TMP2586, ":arrow:", 7);
STRING_LITERAL(TMP2587, "icon_arrow", 10);
STRING_LITERAL(TMP2588, ":|", 2);
STRING_LITERAL(TMP2589, "icon_neutral", 12);
STRING_LITERAL(TMP2590, ":-|", 3);
STRING_LITERAL(TMP2591, ":mrgreen:", 9);
STRING_LITERAL(TMP2592, "icon_mrgreen", 12);
STRING_LITERAL(TMP2593, ":geek:", 6);
STRING_LITERAL(TMP2594, "icon_e_geek", 11);
STRING_LITERAL(TMP2595, ":ugeek:", 7);
STRING_LITERAL(TMP2596, "icon_e_ugeek", 12);
NIM_CONST TY298093 Smilies_298092 = {{((NimStringDesc*) &TMP2539),
((NimStringDesc*) &TMP2540)}
,
{((NimStringDesc*) &TMP2541),
((NimStringDesc*) &TMP2540)}
,
{((NimStringDesc*) &TMP2542),
((NimStringDesc*) &TMP2543)}
,
{((NimStringDesc*) &TMP2544),
((NimStringDesc*) &TMP2543)}
,
{((NimStringDesc*) &TMP2545),
((NimStringDesc*) &TMP2546)}
,
{((NimStringDesc*) &TMP2547),
((NimStringDesc*) &TMP2546)}
,
{((NimStringDesc*) &TMP2548),
((NimStringDesc*) &TMP2549)}
,
{((NimStringDesc*) &TMP2550),
((NimStringDesc*) &TMP2549)}
,
{((NimStringDesc*) &TMP2551),
((NimStringDesc*) &TMP2552)}
,
{((NimStringDesc*) &TMP2553),
((NimStringDesc*) &TMP2552)}
,
{((NimStringDesc*) &TMP2554),
((NimStringDesc*) &TMP2555)}
,
{((NimStringDesc*) &TMP2556),
((NimStringDesc*) &TMP2557)}
,
{((NimStringDesc*) &TMP2558),
((NimStringDesc*) &TMP2557)}
,
{((NimStringDesc*) &TMP2559),
((NimStringDesc*) &TMP2557)}
,
{((NimStringDesc*) &TMP2560),
((NimStringDesc*) &TMP2561)}
,
{((NimStringDesc*) &TMP2562),
((NimStringDesc*) &TMP2563)}
,
{((NimStringDesc*) &TMP2564),
((NimStringDesc*) &TMP2565)}
,
{((NimStringDesc*) &TMP2566),
((NimStringDesc*) &TMP2565)}
,
{((NimStringDesc*) &TMP2567),
((NimStringDesc*) &TMP2568)}
,
{((NimStringDesc*) &TMP2569),
((NimStringDesc*) &TMP2568)}
,
{((NimStringDesc*) &TMP2570),
((NimStringDesc*) &TMP2571)}
,
{((NimStringDesc*) &TMP2572),
((NimStringDesc*) &TMP2573)}
,
{((NimStringDesc*) &TMP2574),
((NimStringDesc*) &TMP2575)}
,
{((NimStringDesc*) &TMP2576),
((NimStringDesc*) &TMP2577)}
,
{((NimStringDesc*) &TMP2578),
((NimStringDesc*) &TMP2579)}
,
{((NimStringDesc*) &TMP2580),
((NimStringDesc*) &TMP2581)}
,
{((NimStringDesc*) &TMP2582),
((NimStringDesc*) &TMP2583)}
,
{((NimStringDesc*) &TMP2584),
((NimStringDesc*) &TMP2585)}
,
{((NimStringDesc*) &TMP2586),
((NimStringDesc*) &TMP2587)}
,
{((NimStringDesc*) &TMP2588),
((NimStringDesc*) &TMP2589)}
,
{((NimStringDesc*) &TMP2590),
((NimStringDesc*) &TMP2589)}
,
{((NimStringDesc*) &TMP2591),
((NimStringDesc*) &TMP2592)}
,
{((NimStringDesc*) &TMP2593),
((NimStringDesc*) &TMP2594)}
,
{((NimStringDesc*) &TMP2595),
((NimStringDesc*) &TMP2596)}
}
;
STRING_LITERAL(TMP2597, ":", 1);
STRING_LITERAL(TMP2598, "//", 2);
STRING_LITERAL(TMP2600, "http", 4);
STRING_LITERAL(TMP2601, "https", 5);
STRING_LITERAL(TMP2602, "ftp", 3);
STRING_LITERAL(TMP2603, "telnet", 6);
STRING_LITERAL(TMP2604, "file", 4);
NIM_CONST TY298816 TMP2599 = {((NimStringDesc*) &TMP2600),
((NimStringDesc*) &TMP2601),
((NimStringDesc*) &TMP2602),
((NimStringDesc*) &TMP2603),
((NimStringDesc*) &TMP2604)}
;
STRING_LITERAL(TMP2608, "html", 4);
STRING_LITERAL(TMP2609, "latex", 5);
STRING_LITERAL(TMP2610, "default-language", 16);
STRING_LITERAL(TMP2611, "Nimrod", 6);
STRING_LITERAL(TMP2612, " _", 2);
STRING_LITERAL(TMP2613, " |", 2);
STRING_LITERAL(TMP2614, "replace", 7);
STRING_LITERAL(TMP2615, " [", 2);
STRING_LITERAL(TMP2616, "]", 1);
NIM_CONST TY303828 wildcards_303827 = {((NimStringDesc*) &TMP2497),
((NimStringDesc*) &TMP2503),
((NimStringDesc*) &TMP2504)}
;
NIM_CONST TY303833 wildpos_303832 = {((NI) 1),
((NI) 0),
((NI) 0)}
;
extern TNimType NTI3411; /* RootObj */
TNimType NTI298574; /* TRstParser */
extern TNimType NTI108; /* int */
TNimType NTI298135; /* TToken */
TNimType NTI298133; /* TTokType */
extern TNimType NTI149; /* string */
TNimType NTI298137; /* TTokenSeq */
TNimType NTI298570; /* TSharedState */
TNimType NTI298013; /* TRstParseOption */
TNimType NTI298015; /* TRstParseOptions */
TNimType NTI298568; /* TSubstitution */
extern TNimType NTI297007; /* PRstNode */
TNimType NTI298584; /* seq[TSubstitution] */
extern TNimType NTI98721; /* SkipTable */
TNimType NTI298021; /* TMsgHandler */
TNimType NTI298023; /* TFindFileHandler */
TNimType NTI298572; /* PSharedState */
TNimType NTI298595; /* seq[int] */
extern TNimType NTI138; /* bool */
extern Tgcheap48216 gch_48244;
TNimType NTI298019; /* TMsgKind */
TNimType NTI298017; /* TMsgClass */
extern TNimType NTI3449; /* ValueError */
TNimType NTI298576; /* EParseError */
TNimType NTI298838; /* ref EParseError */
TNimType NTI298139; /* TLexer */
extern TNimType NTI151; /* cstring */
extern TNimType NTI122008; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_299169)(Trstnode297011* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).kind == ((NU8) 64))) goto LA3;
		{
			NI i_299197;
			NI HEX3Atmp_299240;
			NI res_299243;
			i_299197 = 0;
			HEX3Atmp_299240 = 0;
			HEX3Atmp_299240 = (NI)(((*n).text ? (*n).text->Sup.len : 0) - ((NI) 1));
			res_299243 = ((NI) 0);
			{
				while (1) {
					if (!(res_299243 <= HEX3Atmp_299240)) goto LA7;
					i_299197 = res_299243;
					switch (((NU8)((*n).text->data[i_299197]))) {
					case 48 ... 57:
					{
						{
							if (!(*b)) goto LA11;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA11: ;
						{
							if (!(((*r) ? (*r)->Sup.len : 0) == ((NI) 0))) goto LA15;
							(*r) = addChar((*r), 90);
						}
						LA15: ;
						(*r) = addChar((*r), (*n).text->data[i_299197]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).text->data[i_299197]);
					}
					break;
					case 65 ... 90:
					{
						{
							if (!(*b)) goto LA25;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA25: ;
						(*r) = addChar((*r), ((NIM_CHAR) (((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)((*n).text->data[i_299197])))) - ((NI) 65)))) + ((NI) 97)))))));
					}
					break;
					default:
					{
						{
							if (!(((NI) 0) < ((*r) ? (*r)->Sup.len : 0))) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_299243 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_299238;
			NI HEX3Atmp_299248;
			NI LOC34;
			NI res_299251;
			i_299238 = 0;
			HEX3Atmp_299248 = 0;
			LOC34 = 0;
			LOC34 = len_297084(n);
			HEX3Atmp_299248 = (NI)(LOC34 - ((NI) 1));
			res_299251 = ((NI) 0);
			{
				while (1) {
					if (!(res_299251 <= HEX3Atmp_299248)) goto LA36;
					i_299238 = res_299251;
					rstnodetorefnameaux_299169((*n).sons->data[i_299238], r, b);
					res_299251 += ((NI) 1);
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_298061)(Trstnode297011* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2096));
	b = NIM_FALSE;
	rstnodetorefnameaux_299169(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)), (NI)((*src).Sup.len + ((NI) 1)));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(void, addnodesaux_299108)(Trstnode297011* 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_299134;
			NI HEX3Atmp_299136;
			NI LOC7;
			NI res_299139;
			i_299134 = 0;
			HEX3Atmp_299136 = 0;
			LOC7 = 0;
			LOC7 = len_297084(n);
			HEX3Atmp_299136 = (NI)(LOC7 - ((NI) 1));
			res_299139 = ((NI) 0);
			{
				while (1) {
					if (!(res_299139 <= HEX3Atmp_299136)) goto LA9;
					i_299134 = res_299139;
					addnodesaux_299108((*n).sons->data[i_299134], result);
					res_299139 += ((NI) 1);
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_298067)(Trstnode297011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2096));
	addnodesaux_299108(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_298073)(Trstnode297011* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
{	result = 0;
	result = copyString(((NimStringDesc*) &TMP2096));
	{
		if (!((*n).sons->data[((NI) 1)] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(((*(*n).sons->data[((NI) 1)]).kind == ((NU8) 13)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	{
		NI i_302045;
		NI HEX3Atmp_302048;
		NI LOC10;
		NI res_302051;
		i_302045 = 0;
		HEX3Atmp_302048 = 0;
		LOC10 = 0;
		LOC10 = len_297084((*n).sons->data[((NI) 1)]);
		HEX3Atmp_302048 = (NI)(LOC10 - ((NI) 1));
		res_302051 = ((NI) 0);
		{
			while (1) {
				Trstnode297011* f;
				if (!(res_302051 <= HEX3Atmp_302048)) goto LA12;
				i_302045 = res_302051;
				f = (*(*n).sons->data[((NI) 1)]).sons->data[i_302045];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_298067((*f).sons->data[((NI) 0)]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == ((NI) 0))) goto LA17;
					result = addnodes_298067((*f).sons->data[((NI) 1)]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2185));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_302051 += ((NI) 1);
			} LA12: ;
		}
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_298080)(Trstnode297011* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).sons->data[((NI) 0)] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2096));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_298067((*n).sons->data[((NI) 0)]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_301310)(Trstnode297011* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_298067((*n).sons->data[((NI) 1)]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	return result;
}
N_NIMCALL(void, TMP2445)(void* p, NI op) {
	Ttokenseq298137* a;
	NI LOC1;
	a = (Ttokenseq298137*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].symbol, op);
	}
}
N_NIMCALL(void, TMP2457)(void* p, NI op) {
	TY298584* a;
	NI LOC1;
	a = (TY298584*)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, TMP2458)(void* p, NI op) {
	Tsharedstate298570* a;
	NI LOC1;
	NI LOC2;
	a = (Tsharedstate298570*)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, TMP2459)(void* p, NI op) {
	TY298595* a;
	NI LOC1;
	a = (TY298595*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_299068)(Trstparser298574* p, Tsharedstate298570* sharedstate) {
	genericSeqAssign((&(*p).indentstack), TMP2460, (&NTI298595));
	unsureAsgnRef((void**) (&(*p).tok), (Ttokenseq298137*) newSeq((&NTI298137), 0));
	(*p).idx = ((NI) 0);
	unsureAsgnRef((void**) (&(*p).filename), copyString(((NimStringDesc*) &TMP2096)));
	(*p).hastoc = NIM_FALSE;
	(*p).col = ((NI) 0);
	(*p).line = ((NI) 1);
	unsureAsgnRef((void**) (&(*p).s), sharedstate);
}

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

static N_INLINE(void, rtladdzct_51404)(Tcell46346* c) {
	addzct_49817((&gch_48244.zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Tcell46346* c;
	c = usrtocell_49846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	LA3: ;
}

N_NIMCALL(NU8, whichmsgclass_298604)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI298019))->data[((NI) 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, TMP2479)(void* p, NI op) {
	Eparseerror298576* a;
	a = (Eparseerror298576*)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_156205)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_156221;
		NI i_156229;
		i_156221 = 0;
		i_156229 = ((NI) 0);
		{
			while (1) {
				if (!(i_156229 < xLen0)) goto LA3;
				i_156221 = x[i_156229];
				write_13457(f, i_156221);
				i_156229 += ((NI) 1);
			} LA3: ;
		}
	}
	write_13457(f, ((NimStringDesc*) &TMP2480));
}

N_NIMCALL(void, defaultmsghandler_298807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY298816 LOC1;
	mc = whichmsgclass_298604(msgkind);
	a = nsuFormatSingleElem(messages_298052[(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, (&NTI298017)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2475), LOC1, 5);
	{
		Eparseerror298576* e_298837;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_298837 = 0;
		e_298837 = (Eparseerror298576*) newObj((&NTI298838), sizeof(Eparseerror298576));
		(*e_298837).Sup.Sup.Sup.m_type = (&NTI298576);
		LOC6 = 0;
		LOC6 = (*e_298837).Sup.Sup.message; (*e_298837).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_298837, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY165566 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeln_156205(stdout, LOC8, 1);
	}
	LA2: ;
}

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

N_NIMCALL(Tsharedstate298570*, newsharedstate_298876)(NU8 options, Tfindfilehandler298023 findfile, Tmsghandler298021 msghandler) {
	Tsharedstate298570* result;
	result = 0;
	result = (Tsharedstate298570*) newObj((&NTI298572), sizeof(Tsharedstate298570));
	if ((*result).subs) nimGCunrefNoCycle((*result).subs);
	(*result).subs = (TY298584*) newSeqRC1((&NTI298584), 0);
	if ((*result).refs) nimGCunrefNoCycle((*result).refs);
	(*result).refs = (TY298584*) newSeqRC1((&NTI298584), 0);
	(*result).options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).msghandler = defaultmsghandler_298807;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).findfile = defaultfindfile_298866;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_298161)(Tlexer298139* L, Ttoken298135* tok, TY179407 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 += ((NI) 1);
			{
				if (!!(((s[((NU8)((*L).buf[pos]))/8] &(1<<(((NU8)((*L).buf[pos]))%8)))!=0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*L).col += (NI)(pos - (*L).bufpos);
	(*L).bufpos = pos;
}

N_NIMCALL(NI, getindentaux_298250)(Tlexer298139* 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[(NI)(pos + ((NI) 1))]) == (NU8)(10))) goto LA7;
			pos += ((NI) 2);
		}
		goto LA5;
		LA7: ;
		{
			pos += ((NI) 1);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(10))) goto LA11;
		pos += ((NI) 1);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	{
		if (!(*L).skippounds) goto LA15;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA19;
			pos += ((NI) 1);
		}
		LA19: ;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA23;
			pos += ((NI) 1);
		}
		LA23: ;
	}
	LA15: ;
	{
		while (1) {
			switch (((NU8)(buf[pos]))) {
			case 32:
			case 11:
			case 12:
			{
				pos += ((NI) 1);
				result += ((NI) 1);
			}
			break;
			case 9:
			{
				pos += ((NI) 1);
				result = (NI)((NI)(result - ((NI) ((NI)(result % ((NI) 8))))) + ((NI) 8));
			}
			break;
			default:
			{
				goto LA25;
			}
			break;
			}
		}
	} LA25: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(0))) goto LA32;
		result = ((NI) 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_298250(L, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*L).bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_298344)(Tlexer298139* L, Ttoken298135* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).col = ((NI) 0);
	(*tok).kind = ((NU8) 1);
	(*tok).ival = getindentaux_298250(L, (*L).bufpos);
	(*L).line += ((NI) 1);
	(*tok).line = (*L).line;
	(*L).col = (*tok).ival;
	(*tok).ival = (((NI)((*tok).ival - (*L).baseindent) >= ((NI) 0)) ? (NI)((*tok).ival - (*L).baseindent) : ((NI) 0));
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nsuRepeatChar(32, ((NI) ((*tok).ival)));
	LOC1 = rawNewString(LOC2->Sup.len + 1);
appendString(LOC1, ((NimStringDesc*) &TMP2480));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).symbol), LOC1);
}

N_NIMCALL(void, getadornment_298211)(Tlexer298139* L, Ttoken298135* 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 += ((NI) 1);
			{
				if (!!(((NU8)((*L).buf[pos]) == (NU8)(c)))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*L).col += (NI)(pos - (*L).bufpos);
	(*L).bufpos = pos;
}

N_NIMCALL(void, rawgettok_298369)(Tlexer298139* L, Ttoken298135* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).symbol), copyString(((NimStringDesc*) &TMP2096)));
	(*tok).ival = ((NI) 0);
	c = (*L).buf[(*L).bufpos];
	switch (((NU8)(c))) {
	case 97 ... 122:
	case 65 ... 90:
	case 128 ... 255:
	case 48 ... 57:
	{
		getthing_298161(L, tok, TMP2482);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_298161(L, tok, TMP2483);
		(*tok).kind = ((NU8) 2);
		{
			if (!(((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(13)) || ((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_298369(L, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_298344(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_298211(L, tok);
		{
			if (!(((*tok).symbol ? (*tok).symbol->Sup.len : 0) <= ((NI) 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 += ((NI) 1);
			(*L).col += ((NI) 1);
		}
		LA14: ;
	}
	break;
	}
	(*tok).col = (((NI)((*tok).col - (*L).baseindent) >= ((NI) 0)) ? (NI)((*tok).col - (*L).baseindent) : ((NI) 0));
}

N_NIMCALL(NI, gettokens_298416)(NimStringDesc* buffer, NIM_BOOL skippounds, Ttokenseq298137** tokens) {
	NI result;
	Tlexer298139 L;
	NI length;
	result = 0;
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.m_type = (&NTI298139);
	length = ((*tokens) ? (*tokens)->Sup.len : 0);
	L.buf = buffer->data;
	L.line = ((NI) 0);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = ((NU8)(L.buf[((NI) 0)]) == (NU8)(239));
		if (!(LOC4)) goto LA5;
		LOC4 = ((NU8)(L.buf[((NI) 1)]) == (NU8)(187));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = ((NU8)(L.buf[((NI) 2)]) == (NU8)(191));
		LA6: ;
		if (!LOC3) goto LA7;
		L.bufpos += ((NI) 3);
	}
	LA7: ;
	L.skippounds = skippounds;
	{
		if (!skippounds) goto LA11;
		{
			if (!((NU8)(L.buf[L.bufpos]) == (NU8)(35))) goto LA15;
			L.bufpos += ((NI) 1);
			result += ((NI) 1);
		}
		LA15: ;
		{
			if (!((NU8)(L.buf[L.bufpos]) == (NU8)(35))) goto LA19;
			L.bufpos += ((NI) 1);
			result += ((NI) 1);
		}
		LA19: ;
		L.baseindent = ((NI) 0);
		{
			while (1) {
				if (!((NU8)(L.buf[L.bufpos]) == (NU8)(32))) goto LA22;
				L.bufpos += ((NI) 1);
				L.baseindent += ((NI) 1);
				result += ((NI) 1);
			} LA22: ;
		}
	}
	LA11: ;
	{
		while (1) {
			length += ((NI) 1);
			(*tokens) = (Ttokenseq298137*) setLengthSeq(&((*tokens))->Sup, sizeof(Ttoken298135), ((NI) (length)));
			rawgettok_298369((&L), (&(*tokens)->data[(NI)(length - ((NI) 1))]));
			{
				if (!((*tokens)->data[(NI)(length - ((NI) 1))].kind == ((NU8) 0))) goto LA27;
				goto LA23;
			}
			LA27: ;
		}
	} LA23: ;
	{
		if (!((*tokens)->data[((NI) 0)].kind == ((NU8) 2))) goto LA31;
		(*tokens)->data[((NI) 0)].ival = ((*tokens)->data[((NI) 0)].symbol ? (*tokens)->data[((NI) 0)].symbol->Sup.len : 0);
		(*tokens)->data[((NI) 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)), (*a).Sup.len);
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, findsub_299292)(Trstparser298574* p, Trstnode297011* n) {
	NI result;
	NimStringDesc* key;
{	result = 0;
	key = addnodes_298067(n);
	{
		NI i_299311;
		NI HEX3Atmp_299326;
		NI res_299329;
		i_299311 = 0;
		HEX3Atmp_299326 = 0;
		HEX3Atmp_299326 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_299329 = ((NI) 0);
		{
			while (1) {
				if (!(res_299329 <= HEX3Atmp_299326)) goto LA3;
				i_299311 = res_299329;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_299311].key)) goto LA6;
					result = i_299311;
					goto BeforeRet;
				}
				LA6: ;
				res_299329 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NI i_299324;
		NI HEX3Atmp_299334;
		NI res_299337;
		i_299324 = 0;
		HEX3Atmp_299334 = 0;
		HEX3Atmp_299334 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_299337 = ((NI) 0);
		{
			while (1) {
				if (!(res_299337 <= HEX3Atmp_299334)) goto LA10;
				i_299324 = res_299337;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).s).subs->data[i_299324].key);
					if (!(LOC13 == ((NI) 0))) goto LA14;
					result = i_299324;
					goto BeforeRet;
				}
				LA14: ;
				res_299337 += ((NI) 1);
			} LA10: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_298942)(Trstparser298574* p, NU8 msgkind, NimStringDesc* arg) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + (*p).tok->data[(*p).idx].line), (NI)((*p).col + (*p).tok->data[(*p).idx].col), msgkind, arg);
}

N_NIMCALL(Trstnode297011*, findref_299487)(Trstparser298574* p, NimStringDesc* key) {
	Trstnode297011* result;
{	result = 0;
	{
		NI i_299505;
		NI HEX3Atmp_299507;
		NI res_299510;
		i_299505 = 0;
		HEX3Atmp_299507 = 0;
		HEX3Atmp_299507 = ((*(*p).s).refs ? ((*(*p).s).refs->Sup.len-1) : -1);
		res_299510 = ((NI) 0);
		{
			while (1) {
				if (!(res_299510 <= HEX3Atmp_299507)) goto LA3;
				i_299505 = res_299510;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_299505].key)) goto LA6;
					result = (*(*p).s).refs->data[i_299505].value;
					goto BeforeRet;
				}
				LA6: ;
				res_299510 += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet: ;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Tcell46346* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_49846(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46346* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_49846((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_51404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(Trstnode297011*, resolvesubs_305250)(Trstparser298574* p, Trstnode297011* n) {
	Trstnode297011* result;
{	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_299292(p, n);
		{
			if (!(((NI) 0) <= x)) goto LA8;
			result = (*(*p).s).subs->data[x].value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_298067(n);
			e = getenv_122644(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_297136(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_298942((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		Trstnode297011* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_298061(n);
		y = findref_299487(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_297102(((NU8) 38));
			(*n).kind = ((NU8) 0);
			add_297165(result, n);
			add_297165(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_305296;
			NI HEX3Atmp_305298;
			NI LOC26;
			NI res_305301;
			i_305296 = 0;
			HEX3Atmp_305298 = 0;
			LOC26 = 0;
			LOC26 = len_297084(n);
			HEX3Atmp_305298 = (NI)(LOC26 - ((NI) 1));
			res_305301 = ((NI) 0);
			{
				while (1) {
					if (!(res_305301 <= HEX3Atmp_305298)) goto LA28;
					i_305296 = res_305301;
					asgnRefNoCycle((void**) (&(*n).sons->data[i_305296]), resolvesubs_305250(p, (*n).sons->data[i_305296]));
					res_305301 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, currind_299001)(Trstparser298574* p) {
	NI result;
	result = 0;
	result = (*p).indentstack->data[((*p).indentstack ? ((*p).indentstack->Sup.len-1) : -1)];
	return result;
}

N_NIMCALL(void, pushind_299011)(Trstparser298574* p, NI ind) {
	(*p).indentstack = (TY298595*) incrSeq(&((*p).indentstack)->Sup, sizeof(NI));
	(*p).indentstack->data[(*p).indentstack->Sup.len-1] = ind;
}

N_NIMCALL(void, popind_299032)(Trstparser298574* p) {
	{
		if (!(((NI) 1) < ((*p).indentstack ? (*p).indentstack->Sup.len : 0))) goto LA3;
		(*p).indentstack = (TY298595*) setLengthSeq(&((*p).indentstack)->Sup, sizeof(NI), ((NI) ((NI)(((*p).indentstack ? (*p).indentstack->Sup.len : 0) - ((NI) 1)))));
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, match_299727)(Trstparser298574* p, NI start, NimStringDesc* expr) {
	NIM_BOOL result;
	NI i;
	NI j;
	NI last;
{	result = 0;
	i = ((NI) 0);
	j = start;
	last = (NI)((expr ? expr->Sup.len : 0) - ((NI) 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*) &TMP2484));
				LA13: ;
				result = LOC12;
				{
					if (!result) goto LA16;
					switch (((NU8)((*p).tok->data[j].symbol->data[((NI) 0)]))) {
					case 97 ... 122:
					case 65 ... 90:
					{
						result = (((*p).tok->data[j].symbol ? (*p).tok->data[j].symbol->Sup.len : 0) == ((NI) 1));
					}
					break;
					case 48 ... 57:
					{
						result = allcharsinset_98459((*p).tok->data[j].symbol, TMP2485);
					}
					break;
					default:
					{
					}
					break;
					}
				}
				LA16: ;
			}
			break;
			default:
			{
				NIM_CHAR c;
				NI length;
				NIM_BOOL LOC26;
				NIM_BOOL LOC27;
				c = expr->data[i];
				length = ((NI) 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 += ((NI) 1);
						length += ((NI) 1);
					} LA23: ;
				}
				i -= ((NI) 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 ? (*p).tok->data[j].symbol->Sup.len : 0) == length);
				LA28: ;
				LOC26 = LOC27;
				if (!(LOC26)) goto LA29;
				LOC26 = ((NU8)((*p).tok->data[j].symbol->data[((NI) 0)]) == (NU8)(c));
				LA29: ;
				result = LOC26;
			}
			break;
			}
			{
				if (!!(result)) goto LA32;
				goto BeforeRet;
			}
			LA32: ;
			j += ((NI) 1);
			i += ((NI) 1);
		} LA2: ;
	}
	result = NIM_TRUE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, tokenafternewline_302205)(Trstparser298574* 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 += ((NI) 1);
				goto LA1;
			}
			break;
			default:
			{
				result += ((NI) 1);
			}
			break;
			}
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, prednl_302251)(Trstparser298574* p) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	{
		NIM_BOOL LOC5;
		NI LOC7;
		if (!(((NI) 0) < (*p).idx)) goto LA3;
		LOC5 = 0;
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind == ((NU8) 1));
		if (!(LOC5)) goto LA6;
		LOC7 = 0;
		LOC7 = currind_299001(p);
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_302240)(Trstparser298574* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_302205(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*) &TMP2494));
	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_298966)(Trstparser298574* p, NU8 msgkind) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + (*p).tok->data[(*p).idx].line), (NI)((*p).col + (*p).tok->data[(*p).idx].col), msgkind, (*p).tok->data[(*p).idx].symbol);
}

N_NIMCALL(NIM_BOOL, isdeflist_302270)(Trstparser298574* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_302205(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[(NI)(j - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2490)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_302292)(Trstparser298574* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2499));
	if (LOC3) goto LA4;
	LOC3 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2500));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2501));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2502));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_302302)(Trstparser298574* p) {
	NU8 result;
	result = 0;
	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_299727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2486));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_299727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2487));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_299727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2488));
			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_302205(p);
			LOC20 = 0;
			LOC20 = match_299727(p, LOC19, ((NimStringDesc*) &TMP2489));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2490))) 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_302251(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2491));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2492));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2493));
			LA33: ;
			LOC28 = LOC30;
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA34;
			LOC27 = ((*p).tok->data[(NI)((*p).idx + ((NI) 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*) &TMP2494));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_302240(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*) &TMP2495));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_302251(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2496));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_302251(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2497));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2498));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_298966(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_302270(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_302292(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_302205(p);
			LOC73 = 0;
			LOC73 = match_299727(p, LOC72, ((NimStringDesc*) &TMP2489));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2503));
			if (LOC77) goto LA78;
			LOC77 = match_299727(p, (*p).idx, ((NimStringDesc*) &TMP2504));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_302270(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(Trstnode297011*, parseliteralblock_302099)(Trstparser298574* p) {
	Trstnode297011* result;
	Trstnode297011* n;
	result = 0;
	result = newrstnode_297102(((NU8) 24));
	n = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2096));
	{
		NI indent;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA3;
		indent = (*p).tok->data[(*p).idx].ival;
		(*p).idx += ((NI) 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*) &TMP2480));
						LOC14 = 0;
						LOC14 = nsuRepeatChar(32, ((NI) ((NI)((*p).tok->data[(*p).idx].ival - indent))));
						(*n).text = resizeString((*n).text, LOC14->Sup.len + 0);
appendString((*n).text, LOC14);
						(*p).idx += ((NI) 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 += ((NI) 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 += ((NI) 1);
			} LA18: ;
		}
	}
	LA1: ;
	add_297165(result, n);
	return result;
}

N_NIMCALL(Trstnode297011*, parsebulletlist_303565)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = NIM_NIL;
	{
		NimStringDesc* bullet;
		NI col;
		if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 2))) goto LA3;
		bullet = copyString((*p).tok->data[(*p).idx].symbol);
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_297102(((NU8) 5));
		pushind_299011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Trstnode297011* item;
				item = newrstnode_297102(((NU8) 6));
				parsesection_301213(p, item);
				add_297165(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[(NI)((*p).idx + ((NI) 1))].symbol, bullet);
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).tok->data[(NI)((*p).idx + ((NI) 2))].kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).idx += ((NI) 3);
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_299032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parselineblock_302321)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = NIM_NIL;
	{
		NI col;
		if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 2))) goto LA3;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_297102(((NU8) 26));
		pushind_299011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Trstnode297011* item;
				item = newrstnode_297102(((NU8) 27));
				parsesection_301213(p, item);
				add_297165(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[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2494));
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).tok->data[(NI)((*p).idx + ((NI) 2))].kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).idx += ((NI) 3);
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_299032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_300866)(Trstparser298574* 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[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 3));
		LA4: ;
		if (!LOC3) goto LA5;
		j = (*p).idx;
		(*p).idx += ((NI) 1);
		result = copyString((*p).tok->data[(*p).idx].symbol);
		(*p).idx += ((NI) 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*) &TMP2490))) 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 += ((NI) 1);
			} LA8: ;
		} LA7: ;
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA15;
			(*p).idx += ((NI) 1);
		}
		LA15: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2490))) goto LA19;
			(*p).idx += ((NI) 1);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA23;
				(*p).idx += ((NI) 1);
			}
			LA23: ;
		}
		goto LA17;
		LA19: ;
		{
			(*p).idx = j;
			result = copyString(((NimStringDesc*) &TMP2096));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2096));
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, find_301099)(TY301087 a, NimStringDesc* item) {
	NI result;
{	result = 0;
	{
		NimStringDesc* i_301144;
		NI i_301157;
		i_301144 = 0;
		i_301157 = ((NI) 0);
		{
			if (!(((NI) (i_301157)) <= ((NI) 12))) goto LA4;
			{
				while (1) {
					i_301144 = a[(i_301157)- 0];
					{
						if (!eqStrings(i_301144, item)) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
					result += ((NI) 1);
					{
						if (!(((NI) 12) <= ((NI) (i_301157)))) goto LA14;
						goto LA6;
					}
					LA14: ;
					i_301157 += ((NI) 1);
				}
			} LA6: ;
		}
		LA4: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Trstnode297011*, newleaf_299529)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = newrstnode_297136(((NU8) 64), (*p).tok->data[(*p).idx].symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_299680)(Trstparser298574* 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 == ((NI) 0));
	if (LOC6) goto LA7;
	LOC6 = ((6 &(1<<(((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind)&7)))!=0);
	LA7: ;
	LOC5 = LOC6;
	if (LOC5) goto LA8;
	LOC5 = ((TMP2517[((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)]))/8] &(1<<(((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)]))%8)))!=0);
	LA8: ;
	result = LOC5;
	{
		if (!!(result)) goto LA11;
		goto BeforeRet;
	}
	LA11: ;
	result = !(((7 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0));
	{
		if (!!(result)) goto LA15;
		goto BeforeRet;
	}
	LA15: ;
	{
		if (!(((NI) 0) < (*p).idx)) goto LA19;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2518))) goto LA23;
			result = NIM_FALSE;
		}
		goto LA21;
		LA23: ;
		{
			NIM_CHAR c;
			c = (*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 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[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]) == (NU8)(d)));
			}
			LA34: ;
		}
		LA21: ;
	}
	LA19: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupend_299636)(Trstparser298574* 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[(NI)((*p).idx - ((NI) 1))].kind)&7)))!=0));
	{
		if (!!(result)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	LOC9 = 0;
	LOC9 = ((7 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0);
	if (LOC9) goto LA10;
	LOC9 = ((TMP2520[((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]))/8] &(1<<(((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]))%8)))!=0);
	LA10: ;
	result = LOC9;
	{
		if (!!(result)) goto LA13;
		goto BeforeRet;
	}
	LA13: ;
	{
		if (!(((NI) 0) < (*p).idx)) goto LA17;
		{
			NIM_BOOL LOC21;
			LOC21 = 0;
			LOC21 = !(eqStrings(markup, ((NimStringDesc*) &TMP2521)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2518));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_300330)(Trstparser298574* p, Trstnode297011* father) {
	{
		Trstnode297011* LOC5;
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2522))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2518));
		add_297165(father, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2518))) goto LA7;
		(*p).idx += ((NI) 1);
		{
			Trstnode297011* LOC13;
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_299529(p);
			add_297165(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA16;
			(*p).idx += ((NI) 1);
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		Trstnode297011* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_299529(p);
		add_297165(father, LOC19);
		(*p).idx += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_298953)(Trstparser298574* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + line), (NI)((*p).col + col), msgkind, arg);
}

N_NIMCALL(void, parseuntil_300601)(Trstparser298574* p, Trstnode297011* 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 += ((NI) 1);
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 5):
			{
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = isinlinemarkupend_299636((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_300330(p, father);
				}
				goto LA4;
				LA10: ;
				{
					Trstnode297011* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_299529(p);
					add_297165(father, LOC13);
					(*p).idx += ((NI) 1);
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				Trstnode297011* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_299529(p);
				add_297165(father, LOC15);
				(*p).idx += ((NI) 1);
			}
			break;
			case ((NU8) 1):
			{
				Trstnode297011* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2523));
				add_297165(father, LOC17);
				(*p).idx += ((NI) 1);
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA20;
					rstmessage_298953((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				Trstnode297011* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2523));
				add_297165(father, LOC23);
				(*p).idx += ((NI) 1);
			}
			break;
			default:
			{
				rstmessage_298953((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Trstnode297011*, parsemarkdowncodeblock_300686)(Trstparser298574* p) {
	Trstnode297011* result;
	Trstnode297011* args;
	Trstnode297011* n;
	Trstnode297011* lb;
	result = 0;
	args = newrstnode_297102(((NU8) 41));
	{
		Trstnode297011* LOC5;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_299529(p);
		add_297165(args, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2096));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 0):
			{
				rstmessage_298942((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2525));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2525))) goto LA13;
					(*p).idx += ((NI) 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 += ((NI) 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 += ((NI) 1);
			}
			break;
			}
		}
	} LA7: ;
	lb = newrstnode_297102(((NU8) 24));
	add_297165(lb, n);
	result = newrstnode_297102(((NU8) 47));
	add_297165(result, args);
	add_297165(result, NIM_NIL);
	add_297165(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_299889)(Trstnode297011* n, Trstnode297011* a, Trstnode297011* b) {
	NI sep;
	NI incr;
	sep = ((NI) -1);
	{
		NI i_299906;
		NI HEX3Atmp_299935;
		NI LOC2;
		NI res_299938;
		i_299906 = 0;
		HEX3Atmp_299935 = 0;
		LOC2 = 0;
		LOC2 = len_297084(n);
		HEX3Atmp_299935 = (NI)(LOC2 - ((NI) 2));
		res_299938 = HEX3Atmp_299935;
		{
			while (1) {
				if (!(((NI) 0) <= res_299938)) goto LA4;
				i_299906 = res_299938;
				{
					if (!eqStrings((*(*n).sons->data[i_299906]).text, ((NimStringDesc*) &TMP2530))) goto LA7;
					sep = i_299906;
					goto LA1;
				}
				LA7: ;
				res_299938 -= ((NI) 1);
			} LA4: ;
		}
	} LA1: ;
	{
		NIM_BOOL LOC11;
		LOC11 = 0;
		LOC11 = (((NI) 0) < sep);
		if (!(LOC11)) goto LA12;
		LOC11 = ((NU8)((*(*n).sons->data[(NI)(sep - ((NI) 1))]).text->data[((NI) 0)]) == (NU8)(32));
		LA12: ;
		if (!LOC11) goto LA13;
		incr = ((NI) 2);
	}
	goto LA9;
	LA13: ;
	{
		incr = ((NI) 1);
	}
	LA9: ;
	{
		NI i_299920;
		NI HEX3Atmp_299943;
		NI res_299946;
		i_299920 = 0;
		HEX3Atmp_299943 = 0;
		HEX3Atmp_299943 = (NI)(sep - incr);
		res_299946 = ((NI) 0);
		{
			while (1) {
				if (!(res_299946 <= HEX3Atmp_299943)) goto LA18;
				i_299920 = res_299946;
				add_297165(a, (*n).sons->data[i_299920]);
				res_299946 += ((NI) 1);
			} LA18: ;
		}
	}
	{
		NI i_299933;
		NI HEX3Atmp_299951;
		NI HEX3Atmp_299952;
		NI LOC20;
		NI res_299955;
		i_299933 = 0;
		HEX3Atmp_299951 = 0;
		HEX3Atmp_299952 = 0;
		HEX3Atmp_299951 = (NI)(sep + ((NI) 1));
		LOC20 = 0;
		LOC20 = len_297084(n);
		HEX3Atmp_299952 = (NI)(LOC20 - ((NI) 2));
		res_299955 = HEX3Atmp_299951;
		{
			while (1) {
				if (!(res_299955 <= HEX3Atmp_299952)) goto LA22;
				i_299933 = res_299955;
				add_297165(b, (*n).sons->data[i_299933]);
				res_299955 += ((NI) 1);
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_299426)(Trstparser298574* p, NimStringDesc* key, Trstnode297011* value) {
	NI length;
	NimStringDesc* LOC14;
{	length = ((*(*p).s).refs ? (*(*p).s).refs->Sup.len : 0);
	{
		NI i_299453;
		NI HEX3Atmp_299465;
		NI res_299468;
		i_299453 = 0;
		HEX3Atmp_299465 = 0;
		HEX3Atmp_299465 = (NI)(length - ((NI) 1));
		res_299468 = ((NI) 0);
		{
			while (1) {
				if (!(res_299468 <= HEX3Atmp_299465)) goto LA3;
				i_299453 = res_299468;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_299453].key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_298067((*(*p).s).refs->data[i_299453].value);
						LOC11 = 0;
						LOC11 = addnodes_298067(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_298942((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).s).refs->data[i_299453].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_299468 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).refs = (TY298584*) setLengthSeq(&((*(*p).s).refs)->Sup, sizeof(Tsubstitution298568), ((NI) ((NI)(length + ((NI) 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(Trstnode297011*, parsepostfix_299992)(Trstparser298574* p, Trstnode297011* n) {
	Trstnode297011* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_299636((&(*p)), ((NimStringDesc*) &TMP2527));
		if (LOC3) goto LA4;
		LOC3 = isinlinemarkupend_299636((&(*p)), ((NimStringDesc*) &TMP2528));
		LA4: ;
		if (!LOC3) goto LA5;
		(*p).idx += ((NI) 1);
		{
			NIM_BOOL LOC9;
			Trstnode297011* a;
			Trstnode297011* b;
			LOC9 = 0;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2526));
			if (!(LOC9)) goto LA10;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 3))].symbol, ((NimStringDesc*) &TMP2529));
			LA10: ;
			if (!LOC9) goto LA11;
			a = newrstnode_297102(((NU8) 0));
			b = newrstnode_297102(((NU8) 0));
			fixupembeddedref_299889(n, a, b);
			{
				NI LOC15;
				LOC15 = 0;
				LOC15 = len_297084(a);
				if (!(LOC15 == ((NI) 0))) goto LA16;
				result = newrstnode_297102(((NU8) 37));
				add_297165(result, b);
			}
			goto LA13;
			LA16: ;
			{
				NimStringDesc* LOC19;
				result = newrstnode_297102(((NU8) 38));
				add_297165(result, a);
				add_297165(result, b);
				LOC19 = 0;
				LOC19 = rstnodetorefname_298061(a);
				setref_299426(p, LOC19, b);
			}
			LA13: ;
		}
		goto LA7;
		LA11: ;
		{
			if (!((*n).kind == ((NU8) 60))) goto LA21;
			(*n).kind = ((NU8) 39);
		}
		goto LA7;
		LA21: ;
		{
			result = newrstnode_297102(((NU8) 39));
			add_297165(result, n);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC25;
		LOC25 = 0;
		LOC25 = match_299727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2496));
		if (!LOC25) goto LA26;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2531))) goto LA30;
			(*n).kind = ((NU8) 56);
		}
		goto LA28;
		LA30: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2532))) goto LA33;
			(*n).kind = ((NU8) 61);
		}
		goto LA28;
		LA33: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2533))) goto LA36;
			(*n).kind = ((NU8) 58);
		}
		goto LA28;
		LA36: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2534))) goto LA39;
			(*n).kind = ((NU8) 57);
		}
		goto LA28;
		LA39: ;
		{
			NIM_BOOL LOC42;
			LOC42 = 0;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2535));
			if (LOC42) goto LA43;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2536));
			LA43: ;
			if (!LOC42) goto LA44;
			(*n).kind = ((NU8) 54);
		}
		goto LA28;
		LA44: ;
		{
			NIM_BOOL LOC47;
			LOC47 = 0;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2537));
			if (LOC47) goto LA48;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2538));
			LA48: ;
			if (!LOC47) goto LA49;
			(*n).kind = ((NU8) 55);
		}
		goto LA28;
		LA49: ;
		{
			Trstnode297011* LOC52;
			result = newrstnode_297102(((NU8) 53));
			(*n).kind = ((NU8) 0);
			add_297165(result, n);
			LOC52 = 0;
			LOC52 = newrstnode_297136(((NU8) 64), (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol);
			add_297165(result, LOC52);
		}
		LA28: ;
		(*p).idx += ((NI) 3);
	}
	goto LA1;
	LA26: ;
	LA1: ;
	return result;
}

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

N_NIMCALL(Trstnode297011*, parsesmiley_300079)(Trstparser298574* p) {
	Trstnode297011* result;
{	result = 0;
	{
		if (!!((((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(58)) || ((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(59)) || ((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(56))))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NimStringDesc* key_300131;
		NimStringDesc* val_300132;
		NI i_300137;
		key_300131 = 0;
		val_300132 = 0;
		i_300137 = ((NI) 0);
		{
			if (!(((NI) (i_300137)) <= ((NI) 33))) goto LA8;
			{
				while (1) {
					NI m;
					key_300131 = Smilies_298092[(i_300137)- 0].Field0;
					val_300132 = Smilies_298092[(i_300137)- 0].Field1;
					m = matchverbatim_300033((&(*p)), (*p).idx, key_300131);
					{
						NimStringDesc* LOC16;
						if (!(((NI) 0) < m)) goto LA14;
						(*p).idx = m;
						result = newrstnode_297102(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).text; (*result).text = copyStringRC1(val_300132);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(((NI) 33) <= ((NI) (i_300137)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_300137 += ((NI) 1);
				}
			} LA10: ;
		}
		LA8: ;
	}
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, find_300229)(NimStringDesc** a, NI aLen0, NimStringDesc* item) {
	NI result;
{	result = 0;
	{
		NimStringDesc* i_300246;
		NI i_300259;
		i_300246 = 0;
		i_300259 = ((NI) 0);
		{
			while (1) {
				if (!(i_300259 < aLen0)) goto LA3;
				i_300246 = a[i_300259];
				{
					if (!eqStrings(i_300246, item)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += ((NI) 1);
				i_300259 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_300219)(NimStringDesc** a, NI aLen0, NimStringDesc* item) {
	NIM_BOOL result;
	NI LOC1;
{	result = 0;
	LOC1 = 0;
	LOC1 = find_300229(a, aLen0, item);
	result = (((NI) 0) <= LOC1);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isurl_300201)(Trstparser298574* 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[(NI)(i + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2597));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).tok->data[(NI)(i + ((NI) 2))].symbol, ((NimStringDesc*) &TMP2598));
	LA4: ;
	LOC2 = LOC3;
	if (!(LOC2)) goto LA5;
	LOC2 = ((*p).tok->data[(NI)(i + ((NI) 3))].kind == ((NU8) 3));
	LA5: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA6;
	LOC1 = contains_300219(TMP2599, 5, (*p).tok->data[i].symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_300281)(Trstparser298574* p, Trstnode297011* father) {
	{
		NIM_BOOL LOC3;
		Trstnode297011* n;
		LOC3 = 0;
		LOC3 = isurl_300201((&(*p)), (*p).idx);
		if (!LOC3) goto LA4;
		n = newrstnode_297102(((NU8) 37));
		{
			while (1) {
				Trstnode297011* 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[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0))) goto LA12;
						goto LA6;
					}
					LA12: ;
				}
				break;
				default:
				{
					goto LA6;
				}
				break;
				}
				LOC15 = 0;
				LOC15 = newleaf_299529(p);
				add_297165(n, LOC15);
				(*p).idx += ((NI) 1);
			}
		} LA6: ;
		add_297165(father, n);
	}
	goto LA1;
	LA4: ;
	{
		Trstnode297011* n;
		n = newleaf_299529(p);
		(*p).idx += ((NI) 1);
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2527))) goto LA19;
			n = parsepostfix_299992(p, n);
		}
		LA19: ;
		add_297165(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_300752)(Trstparser298574* p, Trstnode297011* father) {
{	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			Trstnode297011* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2519));
			if (!LOC4) goto LA5;
			n = newrstnode_297102(((NU8) 59));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2519), NIM_TRUE);
			add_297165(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			Trstnode297011* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2524));
			if (!LOC8) goto LA9;
			n = newrstnode_297102(((NU8) 58));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2524), NIM_TRUE);
			add_297165(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			Trstnode297011* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2492));
			if (!LOC12) goto LA13;
			n = newrstnode_297102(((NU8) 57));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2492), NIM_TRUE);
			add_297165(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			Trstnode297011* 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*) &TMP2525));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).idx += ((NI) 1);
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_300686(p);
			add_297165(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			Trstnode297011* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2521));
			if (!LOC22) goto LA23;
			n = newrstnode_297102(((NU8) 61));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2521), NIM_FALSE);
			add_297165(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			Trstnode297011* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2526));
			if (!LOC26) goto LA27;
			n = newrstnode_297102(((NU8) 60));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2526), NIM_TRUE);
			n = parsepostfix_299992(p, n);
			add_297165(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			Trstnode297011* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_299680((&(*p)), ((NimStringDesc*) &TMP2494));
			if (!LOC30) goto LA31;
			n = newrstnode_297102(((NU8) 62));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2494), NIM_FALSE);
			add_297165(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				Trstnode297011* n;
				if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_300079(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_297165(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_300330(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			Trstnode297011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_300079(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_297165(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_300281(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		Trstnode297011* LOC60;
		{
			Trstnode297011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_300079(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_297165(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_299529(p);
		add_297165(father, LOC60);
		(*p).idx += ((NI) 1);
	}
	break;
	default:
	{
	}
	break;
	}
	}BeforeRet: ;
}

N_NIMCALL(void, parseline_301177)(Trstparser298574* p, Trstnode297011* father) {
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 5):
			{
				parseinline_300752(p, father);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Trstnode297011*, parsefield_301221)(Trstparser298574* p) {
	Trstnode297011* result;
	NI col;
	Trstnode297011* fieldname;
	Trstnode297011* fieldbody;
	result = 0;
	result = newrstnode_297102(((NU8) 14));
	col = (*p).tok->data[(*p).idx].col;
	fieldname = newrstnode_297102(((NU8) 15));
	parseuntil_300601(p, fieldname, ((NimStringDesc*) &TMP2597), NIM_FALSE);
	fieldbody = newrstnode_297102(((NU8) 16));
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 1)))) goto LA3;
		parseline_301177(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_299011(p, indent);
			parsesection_301213(p, fieldbody);
			popind_299032(p);
		}
		LA11: ;
	}
	LA7: ;
	add_297165(result, fieldname);
	add_297165(result, fieldbody);
	return result;
}

N_NIMCALL(Trstnode297011*, parsefields_301254)(Trstparser298574* p) {
	Trstnode297011* result;
	NIM_BOOL atstart;
	NIM_BOOL LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = ((*p).idx == ((NI) 0));
	if (!(LOC1)) goto LA2;
	LOC1 = eqStrings((*p).tok->data[((NI) 0)].symbol, ((NimStringDesc*) &TMP2597));
	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[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2597));
		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_297102(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).idx += ((NI) 1);
		}
		LA18: ;
		{
			while (1) {
				Trstnode297011* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_301221(p);
				add_297165(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[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2597));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).idx += ((NI) 1);
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parsedirective_304223)(Trstparser298574* p, NU8 flags) {
	Trstnode297011* result;
	Trstnode297011* args;
	Trstnode297011* options;
	result = 0;
	result = newrstnode_297102(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_297102(((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):
					{
						Trstnode297011* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_299529(p);
						add_297165(args, LOC12);
						(*p).idx += ((NI) 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 += ((NI) 1);
				} LA18: ;
			}
			{
				Trstnode297011* LOC23;
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_299529(p);
				add_297165(args, LOC23);
				(*p).idx += ((NI) 1);
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_301177(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_297165(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 = (((NI) 3) <= (*p).tok->data[(*p).idx].ival);
			LA34: ;
			LOC32 = LOC33;
			if (!(LOC32)) goto LA35;
			LOC32 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2597));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_301254(p);
		}
		LA36: ;
	}
	LA28: ;
	add_297165(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_304347)(Trstparser298574* 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_299001(p);
	LOC1 = (LOC3 < (*p).tok->data[(*p).idx].ival);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(Trstnode297011*, parsedirective_304366)(Trstparser298574* p, NU8 flags, Tsectionparser304212 contentparser) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304223(p, flags);
	{
		NIM_BOOL LOC3;
		Trstnode297011* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_304347((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_299011(p, (*p).tok->data[(*p).idx].ival);
		content = contentparser(p);
		popind_299032(p);
		add_297165(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_297165(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Trstnode297011*, dirinclude_304399)(Trstparser298574* p) {
	Trstnode297011* result;
	Trstnode297011* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_304366(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_298067((*n).sons->data[((NI) 0)]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	path = (*(*p).s).findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_298942((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			Trstnode297011* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_298073(n, ((NimStringDesc*) &TMP2532));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_297102(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_13434(path);
			LOC13 = 0;
			LOC13 = newrstnode_297136(((NU8) 64), LOC12);
			add_297165(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			Trstparser298574 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI298574);
			initparser_299068((&q), (*p).s);
			q.filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_13434(path);
			LOC16 = 0;
			LOC16 = gettokens_298416(LOC15, NIM_FALSE, (&q.tok));
			q.col += LOC16;
			result = parsedoc_303069((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(Trstnode297011*, dirimage_305007)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 7, NIM_NIL);
	(*result).kind = ((NU8) 45);
	return result;
}

N_NIMCALL(Trstnode297011*, dirfigure_305019)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 7, parsesectionwrapper_304109);
	(*result).kind = ((NU8) 46);
	return result;
}

N_NIMCALL(Trstnode297011*, dirtitle_305031)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 43);
	return result;
}

N_NIMCALL(Trstnode297011*, dircontainer_304608)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 1, parsesectionwrapper_304109);
	(*result).kind = ((NU8) 50);
	return result;
}

N_NIMCALL(Trstnode297011*, dircontents_305043)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 44);
	return result;
}

N_NIMCALL(Trstnode297011*, parsedirbody_304387)(Trstparser298574* p, Tsectionparser304212 contentparser) {
	Trstnode297011* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_304347((&(*p)));
		if (!LOC3) goto LA4;
		pushind_299011(p, (*p).tok->data[(*p).idx].ival);
		result = contentparser(p);
		popind_299032(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_305068)(Trstparser298574* p, Trstnode297011** result, NU8 kind, Tsectionparser304212 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_298073((*result), ((NimStringDesc*) &TMP2604));
	{
		NimStringDesc* path;
		if (!(((NI) 0) < (filename ? filename->Sup.len : 0))) goto LA3;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path ? path->Sup.len : 0) == ((NI) 0))) goto LA7;
			rstmessage_298942((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			Trstnode297011* LOC10;
			f = readfile_13434(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_297102(kind));
			LOC10 = 0;
			LOC10 = newrstnode_297136(((NU8) 64), f);
			add_297165((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		Trstnode297011* LOC12;
		(*(*result)).kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_304387(p, contentparser);
		add_297165((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(Trstnode297011*, dirraw_305085)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304223(p, 11);
	{
		if (!!(((*result).sons->data[((NI) 0)] == NIM_NIL))) goto LA3;
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2608));
			if (!(LOC7 == ((NI) 0))) goto LA8;
			dirrawaux_305068(p, &result, ((NU8) 48), parseliteralblock_302099);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2609));
			if (!(LOC11 == ((NI) 0))) goto LA12;
			dirrawaux_305068(p, &result, ((NU8) 49), parseliteralblock_302099);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_298942((&(*p)), ((NU8) 5), (*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_305068(p, &result, ((NU8) 42), parsesectionwrapper_304109);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Trstnode297011*, dircodeblock_304428)(Trstparser298574* p, NIM_BOOL nimrodextension) {
	Trstnode297011* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_304366(p, 3, parseliteralblock_302099);
	LOC1 = 0;
	LOC1 = getfieldvalue_298073(result, ((NimStringDesc*) &TMP2604));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		NimStringDesc* path;
		Trstnode297011* n;
		NimStringDesc* LOC10;
		Trstnode297011* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_298942((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_297102(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_13434(path);
		LOC11 = 0;
		LOC11 = newrstnode_297136(((NU8) 64), LOC10);
		add_297165(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 2)]), n);
	}
	LA4: ;
	{
		Trstnode297011* extranode;
		Trstnode297011* LOC20;
		Trstnode297011* LOC21;
		Trstnode297011* LOC22;
		Trstnode297011* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).sons->data[((NI) 1)] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 1)]), newrstnode_297102(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_297102(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_297102(((NU8) 15));
		add_297165(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_297102(((NU8) 16));
		add_297165(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2610));
		add_297165((*extranode).sons->data[((NI) 0)], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2611));
		add_297165((*extranode).sons->data[((NI) 1)], LOC23);
		add_297165((*result).sons->data[((NI) 1)], extranode);
	}
	LA14: ;
	(*result).kind = ((NU8) 47);
	return result;
}

N_NIMCALL(Trstnode297011*, dirindex_305055)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsedirective_304366(p, 0, parsesectionwrapper_304109);
	(*result).kind = ((NU8) 51);
	return result;
}

N_NIMCALL(Trstnode297011*, getreferencename_299540)(Trstparser298574* p, NimStringDesc* endstr) {
	Trstnode297011* result;
	Trstnode297011* res;
	result = 0;
	res = newrstnode_297102(((NU8) 0));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				Trstnode297011* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_299529(p);
				add_297165(res, LOC4);
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, endstr)) goto LA8;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA6;
				LA8: ;
				{
					Trstnode297011* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_299529(p);
					add_297165(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_298942((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).idx += ((NI) 1);
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(Trstnode297011*, untileol_299578)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = newrstnode_297102(((NU8) 0));
	{
		while (1) {
			Trstnode297011* LOC3;
			if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_299529(p);
			add_297165(result, LOC3);
			(*p).idx += ((NI) 1);
		} LA2: ;
	}
	return result;
}

N_NIMCALL(void, expect_299616)(Trstparser298574* p, NimStringDesc* tok) {
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, tok)) goto LA3;
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		rstmessage_298942((&(*p)), ((NU8) 1), tok);
	}
	LA1: ;
}

N_NIMCALL(void, setsub_299365)(Trstparser298574* p, NimStringDesc* key, Trstnode297011* value) {
	NI length;
	NimStringDesc* LOC8;
{	length = ((*(*p).s).subs ? (*(*p).s).subs->Sup.len : 0);
	{
		NI i_299392;
		NI HEX3Atmp_299404;
		NI res_299407;
		i_299392 = 0;
		HEX3Atmp_299404 = 0;
		HEX3Atmp_299404 = (NI)(length - ((NI) 1));
		res_299407 = ((NI) 0);
		{
			while (1) {
				if (!(res_299407 <= HEX3Atmp_299404)) goto LA3;
				i_299392 = res_299407;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_299392].key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).s).subs->data[i_299392].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_299407 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).subs = (TY298584*) setLengthSeq(&((*(*p).s).subs)->Sup, sizeof(Tsubstitution298568), ((NI) ((NI)(length + ((NI) 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(Trstnode297011*, parsecomment_300986)(Trstparser298574* p) {
	Trstnode297011* 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[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1));
			LA5: ;
			if (!LOC4) goto LA6;
			(*p).idx += ((NI) 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 += ((NI) 1);
				}
			} LA9: ;
		}
		LA2: ;
	}
	break;
	default:
	{
		{
			while (1) {
				if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA20;
				(*p).idx += ((NI) 1);
			} LA20: ;
		}
	}
	break;
	}
	result = NIM_NIL;
	return result;
}

N_NIMCALL(Trstnode297011*, parsedotdot_302092)(Trstparser298574* p) {
	Trstnode297011* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).tok->data[(*p).idx].col;
	(*p).idx += ((NI) 1);
	d = getdirective_300866(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_299011(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_301094(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_304399(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_305007(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_305019(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_305031(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_304608(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_305043(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).s).options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_305085(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_298942((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_304428(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_304428(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_305055(p);
		}
		break;
		default:
		{
			rstmessage_298942((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_299032(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		Trstnode297011* a;
		Trstnode297011* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_299727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2612));
		if (!LOC23) goto LA24;
		(*p).idx += ((NI) 2);
		a = getreferencename_299540(p, ((NimStringDesc*) &TMP2597));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA28;
			(*p).idx += ((NI) 1);
		}
		LA28: ;
		b = untileol_299578(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_298061(a);
		setref_299426(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		Trstnode297011* a;
		Trstnode297011* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_299727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2613));
		if (!LOC32) goto LA33;
		(*p).idx += ((NI) 2);
		a = getreferencename_299540(p, ((NimStringDesc*) &TMP2494));
		b = 0;
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA37;
			(*p).idx += ((NI) 1);
		}
		LA37: ;
		{
			NI LOC41;
			LOC41 = 0;
			LOC41 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2614));
			if (!(LOC41 == ((NI) 0))) goto LA42;
			(*p).idx += ((NI) 1);
			expect_299616(p, ((NimStringDesc*) &TMP2490));
			b = untileol_299578(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2512));
			if (!(LOC45 == ((NI) 0))) goto LA46;
			(*p).idx += ((NI) 1);
			b = dirimage_305007(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_298942((&(*p)), ((NU8) 5), (*p).tok->data[(*p).idx].symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_298067(a);
		setsub_299365(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		Trstnode297011* a;
		Trstnode297011* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_299727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2615));
		if (!LOC51) goto LA52;
		(*p).idx += ((NI) 2);
		a = getreferencename_299540(p, ((NimStringDesc*) &TMP2616));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA56;
			(*p).idx += ((NI) 1);
		}
		LA56: ;
		b = untileol_299578(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_298061(a);
		setref_299426(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_300986(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parseenumlist_303822)(Trstparser298574* p) {
	Trstnode297011* result;
	NI w;
	result = 0;
	result = NIM_NIL;
	w = ((NI) 0);
	{
		while (1) {
			if (!(w <= ((NI) 2))) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = match_299727((&(*p)), (*p).idx, wildcards_303827[(w)- 0]);
				if (!LOC5) goto LA6;
				goto LA1;
			}
			LA6: ;
			w += ((NI) 1);
		} LA2: ;
	} LA1: ;
	{
		NI col;
		NI j;
		if (!(w <= ((NI) 2))) goto LA10;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_297102(((NU8) 7));
		(*p).idx += (NI)(wildpos_303832[(w)- 0] + ((NI) 3));
		j = tokenafternewline_302205((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).tok->data[j].col == (*p).tok->data[(*p).idx].col);
			if (LOC14) goto LA15;
			LOC14 = match_299727((&(*p)), j, wildcards_303827[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_299011(p, (*p).tok->data[(*p).idx].col);
			{
				while (1) {
					Trstnode297011* item;
					item = newrstnode_297102(((NU8) 8));
					parsesection_301213(p, item);
					add_297165(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_299727((&(*p)), (NI)((*p).idx + ((NI) 1)), wildcards_303827[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).idx += (NI)(wildpos_303832[(w)- 0] + ((NI) 4));
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_299032(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).idx -= (NI)(wildpos_303832[(w)- 0] + ((NI) 3));
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parsedefinitionlist_303734)(Trstparser298574* p) {
	Trstnode297011* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_302205((&(*p)));
	j = (NI)(LOC1 - ((NI) 1));
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI LOC9;
		NI col;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = (((NI) 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_299001((&(*p)));
		LOC5 = (LOC9 < (*p).tok->data[j].ival);
		LA8: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA10;
		LOC4 = !(eqStrings((*p).tok->data[(NI)(j - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2490)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_297102(((NU8) 9));
		{
			while (1) {
				Trstnode297011* a;
				j = (*p).idx;
				a = newrstnode_297102(((NU8) 11));
				parseline_301177(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					Trstnode297011* b;
					Trstnode297011* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_299001((&(*p)));
					LOC19 = (LOC21 < (*p).tok->data[(*p).idx].ival);
					LA20: ;
					LOC18 = LOC19;
					if (!(LOC18)) goto LA22;
					LOC18 = !(eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2490)));
					LA22: ;
					LOC17 = LOC18;
					if (!(LOC17)) goto LA23;
					LOC17 = !(((3 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0));
					LA23: ;
					if (!LOC17) goto LA24;
					pushind_299011(p, (*p).tok->data[(*p).idx].ival);
					b = newrstnode_297102(((NU8) 12));
					parsesection_301213(p, b);
					c = newrstnode_297102(((NU8) 10));
					add_297165(c, a);
					add_297165(c, b);
					add_297165(result, c);
					popind_299032(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 += ((NI) 1);
					LOC33 = 0;
					LOC33 = tokenafternewline_302205((&(*p)));
					j = (NI)(LOC33 - ((NI) 1));
					{
						NIM_BOOL LOC36;
						NIM_BOOL LOC37;
						NIM_BOOL LOC38;
						NIM_BOOL LOC39;
						LOC36 = 0;
						LOC37 = 0;
						LOC38 = 0;
						LOC39 = 0;
						LOC39 = (((NI) 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[(NI)(j - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2490)));
						LA42: ;
						LOC36 = LOC37;
						if (!(LOC36)) goto LA43;
						LOC36 = !(((*p).tok->data[(NI)(j + ((NI) 1))].kind == ((NU8) 1)));
						LA43: ;
						if (!LOC36) goto LA44;
					}
					goto LA34;
					LA44: ;
					{
						goto LA13;
					}
					LA34: ;
				}
				LA31: ;
			}
		} LA13: ;
		{
			NI LOC49;
			LOC49 = 0;
			LOC49 = len_297084(result);
			if (!(LOC49 == ((NI) 0))) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parsetransition_303425)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = newrstnode_297102(((NU8) 3));
	(*p).idx += ((NI) 1);
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA3;
		(*p).idx += ((NI) 1);
	}
	LA3: ;
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA7;
		(*p).idx += ((NI) 1);
	}
	LA7: ;
	return result;
}

N_NIMCALL(void, parseuntilnewline_301195)(Trstparser298574* p, Trstnode297011* 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_300752(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

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

N_NIMCALL(Trstnode297011*, parseheadline_302449)(Trstparser298574* p) {
	Trstnode297011* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_297102(((NU8) 1));
	parseuntilnewline_301195(p, result);
	c = (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	(*result).level = getlevel_302182((*(*p).s).underlinetolevel, (&(*(*p).s).ulevel), c);
	return result;
}

N_NIMCALL(Trstnode297011*, parseoverline_303481)(Trstparser298574* p) {
	Trstnode297011* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	result = newrstnode_297102(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_301195(p, result);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA5;
				(*p).idx += ((NI) 1);
				{
					NI LOC9;
					Trstnode297011* LOC12;
					LOC9 = 0;
					LOC9 = currind_299001((&(*p)));
					if (!(LOC9 < (*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2523));
					add_297165(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).level = getlevel_302182((*(*p).s).overlinetolevel, (&(*(*p).s).olevel), c);
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 4))) goto LA17;
		(*p).idx += ((NI) 1);
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA21;
			(*p).idx += ((NI) 1);
		}
		LA21: ;
	}
	LA17: ;
	return result;
}

N_NIMCALL(NI, tokend_302824)(Trstparser298574* p) {
	NI result;
	result = 0;
	result = (NI)((NI)((*p).tok->data[(*p).idx].col + ((*p).tok->data[(*p).idx].symbol ? (*p).tok->data[(*p).idx].symbol->Sup.len : 0)) - ((NI) 1));
	return result;
}

N_NIMCALL(void, getcolumns_302834)(Trstparser298574* p, TY298595** cols) {
	NI L;
	L = ((NI) 0);
	{
		while (1) {
			L += ((NI) 1);
			(*cols) = (TY298595*) setLengthSeq(&((*cols))->Sup, sizeof(NI), ((NI) (L)));
			(*cols)->data[(NI)(L - ((NI) 1))] = tokend_302824((&(*p)));
			(*p).idx += ((NI) 1);
			{
				if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			(*p).idx += ((NI) 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 += ((NI) 1);
	}
	LA13: ;
	(*cols)->data[(NI)(L - ((NI) 1))] = ((NI) 32000);
}

N_NIMCALL(Trstnode297011*, parsesimpletable_303076)(Trstparser298574* p) {
	Trstnode297011* result;
	TY298595* cols;
	TY122008* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	Trstparser298574 q;
	Trstnode297011* a;
	Trstnode297011* 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 = (&NTI298574);
	a = 0;
	b = 0;
	result = newrstnode_297102(((NU8) 29));
	cols = (TY298595*) newSeq((&NTI298595), 0);
	row = (TY122008*) newSeq((&NTI122008), 0);
	a = NIM_NIL;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	{
		while (1) {
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 4))) goto LA5;
				last = tokenafternewline_302205((&(*p)));
				{
					if (!((3 &(1<<(((*p).tok->data[last].kind)&7)))!=0)) goto LA9;
					(*p).idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_302834(p, (&cols));
				row = (TY122008*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), ((NI) ((cols ? cols->Sup.len : 0))));
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_303184;
						NI HEX3Atmp_303332;
						NI LOC16;
						NI res_303335;
						j_303184 = 0;
						HEX3Atmp_303332 = 0;
						LOC16 = 0;
						LOC16 = len_297084(a);
						HEX3Atmp_303332 = (NI)(LOC16 - ((NI) 1));
						res_303335 = ((NI) 0);
						{
							while (1) {
								if (!(res_303335 <= HEX3Atmp_303332)) goto LA18;
								j_303184 = res_303335;
								(*(*a).sons->data[j_303184]).kind = ((NU8) 32);
								res_303335 += ((NI) 1);
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_303206;
				NI HEX3Atmp_303340;
				NI res_303343;
				j_303206 = 0;
				HEX3Atmp_303340 = 0;
				HEX3Atmp_303340 = (row ? (row->Sup.len-1) : -1);
				res_303343 = ((NI) 0);
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_303343 <= HEX3Atmp_303340)) goto LA25;
						j_303206 = res_303343;
						LOC26 = 0;
						LOC26 = row->data[j_303206]; row->data[j_303206] = copyStringRC1(((NimStringDesc*) &TMP2096));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_303343 += ((NI) 1);
					} LA25: ;
				}
			}
			line = (*p).tok->data[(*p).idx].line;
			{
				while (1) {
					i = ((NI) 0);
					{
						while (1) {
							if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA30;
							{
								NI LOC33;
								LOC33 = 0;
								LOC33 = tokend_302824((&(*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 += ((NI) 1);
							}
							goto LA31;
							LA34: ;
							{
								{
									if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA39;
									(*p).idx += ((NI) 1);
								}
								LA39: ;
								i += ((NI) 1);
							}
							LA31: ;
						} LA30: ;
					}
					{
						if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA43;
						(*p).idx += ((NI) 1);
					}
					LA43: ;
					{
						NI LOC47;
						LOC47 = 0;
						LOC47 = tokend_302824((&(*p)));
						if (!(LOC47 <= cols->data[((NI) 0)])) goto LA48;
						goto LA27;
					}
					LA48: ;
					{
						if (!((17 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0)) goto LA52;
						goto LA27;
					}
					LA52: ;
					{
						NI j_303295;
						NI HEX3Atmp_303350;
						NI res_303353;
						j_303295 = 0;
						HEX3Atmp_303350 = 0;
						HEX3Atmp_303350 = (row ? (row->Sup.len-1) : -1);
						res_303353 = ((NI) 1);
						{
							while (1) {
								if (!(res_303353 <= HEX3Atmp_303350)) goto LA56;
								j_303295 = res_303353;
								row->data[j_303295] = addChar(row->data[j_303295], 10);
								res_303353 += ((NI) 1);
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_297102(((NU8) 31));
			{
				NI j_303308;
				NI HEX3Atmp_303358;
				NI res_303361;
				j_303308 = 0;
				HEX3Atmp_303358 = 0;
				HEX3Atmp_303358 = (row ? (row->Sup.len-1) : -1);
				res_303361 = ((NI) 0);
				{
					while (1) {
						NI LOC60;
						Trstnode297011* LOC61;
						if (!(res_303361 <= HEX3Atmp_303358)) goto LA59;
						j_303308 = res_303361;
						initparser_299068((&q), (*p).s);
						q.col = cols->data[j_303308];
						q.line = (NI)(line - ((NI) 1));
						q.filename = copyString((*p).filename);
						LOC60 = 0;
						LOC60 = gettokens_298416(row->data[j_303308], NIM_FALSE, (&q.tok));
						q.col += LOC60;
						b = newrstnode_297102(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_303069((&q));
						add_297165(b, LOC61);
						add_297165(a, b);
						res_303361 += ((NI) 1);
					} LA59: ;
				}
			}
			add_297165(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(Trstnode297011*, parseoptionlist_303631)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = newrstnode_297102(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				Trstnode297011* a;
				Trstnode297011* b;
				Trstnode297011* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_302292((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_297102(((NU8) 19));
				b = newrstnode_297102(((NU8) 23));
				c = newrstnode_297102(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_299727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2502));
					if (!LOC10) goto LA11;
					(*p).idx += ((NI) 1);
				}
				LA11: ;
				{
					while (1) {
						Trstnode297011* 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 = (((NI) 1) < ((*p).tok->data[(*p).idx].symbol ? (*p).tok->data[(*p).idx].symbol->Sup.len : 0));
							LA18: ;
							if (!LOC17) goto LA19;
							(*p).idx += ((NI) 1);
							goto LA13;
						}
						LA19: ;
						LOC21 = 0;
						LOC21 = newleaf_299529(p);
						add_297165(a, LOC21);
						(*p).idx += ((NI) 1);
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_302205((&(*p)));
				{
					NIM_BOOL LOC24;
					NIM_BOOL LOC25;
					NI LOC28;
					LOC24 = 0;
					LOC25 = 0;
					LOC25 = (((NI) 0) < j);
					if (!(LOC25)) goto LA26;
					LOC25 = ((*p).tok->data[(NI)(j - ((NI) 1))].kind == ((NU8) 1));
					LA26: ;
					LOC24 = LOC25;
					if (!(LOC24)) goto LA27;
					LOC28 = 0;
					LOC28 = currind_299001((&(*p)));
					LOC24 = (LOC28 < (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_299011(p, (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					parsesection_301213(p, b);
					popind_299032(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_301177(p, b);
				}
				LA22: ;
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA34;
					(*p).idx += ((NI) 1);
				}
				LA34: ;
				add_297165(c, a);
				add_297165(c, b);
				add_297165(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_302386)(Trstparser298574* p, Trstnode297011* result) {
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 1):
			{
				{
					if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1))) goto LA6;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					NI LOC9;
					NU8 LOC12;
					LOC9 = 0;
					LOC9 = currind_299001((&(*p)));
					if (!((*p).tok->data[(*p).idx].ival == LOC9)) goto LA10;
					(*p).idx += ((NI) 1);
					LOC12 = 0;
					LOC12 = whichsection_302302((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						Trstnode297011* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2523));
						add_297165(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						Trstnode297011* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_302321(p);
						addifnotnil_297185(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;
					Trstnode297011* LOC29;
					Trstnode297011* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2490));
					if (!(LOC23)) goto LA24;
					LOC23 = ((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1));
					LA24: ;
					LOC22 = LOC23;
					if (!(LOC22)) goto LA25;
					LOC26 = 0;
					LOC26 = currind_299001((&(*p)));
					LOC22 = (LOC26 < (*p).tok->data[(NI)((*p).idx + ((NI) 1))].ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_297136(((NU8) 64), ((NimStringDesc*) &TMP2597));
					add_297165(result, LOC29);
					(*p).idx += ((NI) 1);
					LOC30 = 0;
					LOC30 = parseliteralblock_302099(p);
					add_297165(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_300752(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_300752(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NU8, sonkind_303906)(Trstnode297011* father, NI i) {
	NU8 result;
	result = 0;
	result = ((NU8) 64);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_297084(father);
		if (!(i < LOC3)) goto LA4;
		result = (*(*father).sons->data[i]).kind;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, parsesection_301213)(Trstparser298574* p, Trstnode297011* result) {
	{
		while (1) {
			NIM_BOOL leave;
			Trstnode297011* 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_299001((&(*p)));
						if (!(LOC7 == (*p).tok->data[(*p).idx].ival)) goto LA8;
						(*p).idx += ((NI) 1);
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						Trstnode297011* a;
						LOC11 = 0;
						LOC11 = currind_299001((&(*p)));
						if (!(LOC11 < (*p).tok->data[(*p).idx].ival)) goto LA12;
						pushind_299011(p, (*p).tok->data[(*p).idx].ival);
						a = newrstnode_297102(((NU8) 28));
						parsesection_301213(p, a);
						add_297165(result, a);
						popind_299032(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_302302((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).idx += ((NI) 1);
				a = parseliteralblock_302099(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_303565(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_302321(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_302092(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_303822(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_298966((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_303734(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(((NI) 0) < (*p).idx)) goto LA32;
					(*p).idx -= ((NI) 1);
				}
				LA32: ;
				a = parsefields_301254(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_303425(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_302449(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_303481(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_303076(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_303631(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_297102(((NU8) 4));
				parseparagraph_302386(p, a);
			}
			LA44: ;
			addifnotnil_297185(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_303906(result, ((NI) 0));
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_303906(result, ((NI) 1));
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).sons->data[((NI) 0)]).kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(Trstnode297011*, parsesectionwrapper_304109)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = newrstnode_297102(((NU8) 0));
	parsesection_301213(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_297084(result);
			LOC3 = (LOC5 == ((NI) 1));
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).sons->data[((NI) 0)];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Trstnode297011*, parsedoc_303069)(Trstparser298574* p) {
	Trstnode297011* result;
	result = 0;
	result = parsesectionwrapper_304109(p);
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA3;
		rstmessage_298966((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(Trstnode297011*, rstparse_305320)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, Tfindfilehandler298023 findfile, Tmsghandler298021 msghandler) {
	Trstnode297011* result;
	Trstparser298574 p;
	Tsharedstate298570* LOC1;
	NI LOC2;
	Trstnode297011* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI298574);
	LOC1 = 0;
	LOC1 = newsharedstate_298876(options, findfile, msghandler);
	initparser_299068((&p), LOC1);
	p.filename = copyString(filename);
	p.line = line;
	LOC2 = 0;
	LOC2 = gettokens_298416(text, ((options &(1<<((((NU8) 0))&7)))!=0), (&p.tok));
	p.col = (NI)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_303069((&p));
	result = resolvesubs_305250((&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* TMP2440[8];
static TNimNode* TMP2441[5];
static TNimNode* TMP2442[7];
NI TMP2444;
static char* NIM_CONST TMP2443[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2446[9];
static TNimNode* TMP2447[4];
NI TMP2449;
static char* NIM_CONST TMP2448[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2450[2];
static TNimNode* TMP2462[10];
NI TMP2464;
static char* NIM_CONST TMP2463[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2476[3];
NI TMP2478;
static char* NIM_CONST TMP2477[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2481[6];
static TNimNode TMP890[65];
NTI298574.size = sizeof(Trstparser298574);
NTI298574.kind = 17;
NTI298574.base = (&NTI3411);
TMP2440[0] = &TMP890[1];
TMP890[1].kind = 1;
TMP890[1].offset = offsetof(Trstparser298574, idx);
TMP890[1].typ = (&NTI108);
TMP890[1].name = "idx";
TMP2440[1] = &TMP890[2];
NTI298135.size = sizeof(Ttoken298135);
NTI298135.kind = 18;
NTI298135.base = 0;
NTI298135.flags = 2;
TMP2441[0] = &TMP890[4];
NTI298133.size = sizeof(NU8);
NTI298133.kind = 14;
NTI298133.base = 0;
NTI298133.flags = 3;
for (TMP2444 = 0; TMP2444 < 7; TMP2444++) {
TMP890[TMP2444+5].kind = 1;
TMP890[TMP2444+5].offset = TMP2444;
TMP890[TMP2444+5].name = TMP2443[TMP2444];
TMP2442[TMP2444] = &TMP890[TMP2444+5];
}
TMP890[12].len = 7; TMP890[12].kind = 2; TMP890[12].sons = &TMP2442[0];
NTI298133.node = &TMP890[12];
TMP890[4].kind = 1;
TMP890[4].offset = offsetof(Ttoken298135, kind);
TMP890[4].typ = (&NTI298133);
TMP890[4].name = "kind";
TMP2441[1] = &TMP890[13];
TMP890[13].kind = 1;
TMP890[13].offset = offsetof(Ttoken298135, ival);
TMP890[13].typ = (&NTI108);
TMP890[13].name = "ival";
TMP2441[2] = &TMP890[14];
TMP890[14].kind = 1;
TMP890[14].offset = offsetof(Ttoken298135, symbol);
TMP890[14].typ = (&NTI149);
TMP890[14].name = "symbol";
TMP2441[3] = &TMP890[15];
TMP890[15].kind = 1;
TMP890[15].offset = offsetof(Ttoken298135, line);
TMP890[15].typ = (&NTI108);
TMP890[15].name = "line";
TMP2441[4] = &TMP890[16];
TMP890[16].kind = 1;
TMP890[16].offset = offsetof(Ttoken298135, col);
TMP890[16].typ = (&NTI108);
TMP890[16].name = "col";
TMP890[3].len = 5; TMP890[3].kind = 2; TMP890[3].sons = &TMP2441[0];
NTI298135.node = &TMP890[3];
NTI298137.size = sizeof(Ttokenseq298137*);
NTI298137.kind = 24;
NTI298137.base = (&NTI298135);
NTI298137.flags = 2;
NTI298137.marker = TMP2445;
TMP890[2].kind = 1;
TMP890[2].offset = offsetof(Trstparser298574, tok);
TMP890[2].typ = (&NTI298137);
TMP890[2].name = "tok";
TMP2440[2] = &TMP890[17];
NTI298570.size = sizeof(Tsharedstate298570);
NTI298570.kind = 18;
NTI298570.base = 0;
NTI298570.flags = 2;
TMP2446[0] = &TMP890[19];
NTI298013.size = sizeof(NU8);
NTI298013.kind = 14;
NTI298013.base = 0;
NTI298013.flags = 3;
for (TMP2449 = 0; TMP2449 < 4; TMP2449++) {
TMP890[TMP2449+20].kind = 1;
TMP890[TMP2449+20].offset = TMP2449;
TMP890[TMP2449+20].name = TMP2448[TMP2449];
TMP2447[TMP2449] = &TMP890[TMP2449+20];
}
TMP890[24].len = 4; TMP890[24].kind = 2; TMP890[24].sons = &TMP2447[0];
NTI298013.node = &TMP890[24];
NTI298015.size = sizeof(NU8);
NTI298015.kind = 19;
NTI298015.base = (&NTI298013);
NTI298015.flags = 3;
TMP890[25].len = 0; TMP890[25].kind = 0;
NTI298015.node = &TMP890[25];
TMP890[19].kind = 1;
TMP890[19].offset = offsetof(Tsharedstate298570, options);
TMP890[19].typ = (&NTI298015);
TMP890[19].name = "options";
TMP2446[1] = &TMP890[26];
TMP890[26].kind = 1;
TMP890[26].offset = offsetof(Tsharedstate298570, ulevel);
TMP890[26].typ = (&NTI108);
TMP890[26].name = "uLevel";
TMP2446[2] = &TMP890[27];
TMP890[27].kind = 1;
TMP890[27].offset = offsetof(Tsharedstate298570, olevel);
TMP890[27].typ = (&NTI108);
TMP890[27].name = "oLevel";
TMP2446[3] = &TMP890[28];
NTI298568.size = sizeof(Tsubstitution298568);
NTI298568.kind = 18;
NTI298568.base = 0;
NTI298568.flags = 2;
TMP2450[0] = &TMP890[30];
TMP890[30].kind = 1;
TMP890[30].offset = offsetof(Tsubstitution298568, key);
TMP890[30].typ = (&NTI149);
TMP890[30].name = "key";
TMP2450[1] = &TMP890[31];
TMP890[31].kind = 1;
TMP890[31].offset = offsetof(Tsubstitution298568, value);
TMP890[31].typ = (&NTI297007);
TMP890[31].name = "value";
TMP890[29].len = 2; TMP890[29].kind = 2; TMP890[29].sons = &TMP2450[0];
NTI298568.node = &TMP890[29];
NTI298584.size = sizeof(TY298584*);
NTI298584.kind = 24;
NTI298584.base = (&NTI298568);
NTI298584.flags = 2;
NTI298584.marker = TMP2457;
TMP890[28].kind = 1;
TMP890[28].offset = offsetof(Tsharedstate298570, subs);
TMP890[28].typ = (&NTI298584);
TMP890[28].name = "subs";
TMP2446[4] = &TMP890[32];
TMP890[32].kind = 1;
TMP890[32].offset = offsetof(Tsharedstate298570, refs);
TMP890[32].typ = (&NTI298584);
TMP890[32].name = "refs";
TMP2446[5] = &TMP890[33];
TMP890[33].kind = 1;
TMP890[33].offset = offsetof(Tsharedstate298570, underlinetolevel);
TMP890[33].typ = (&NTI98721);
TMP890[33].name = "underlineToLevel";
TMP2446[6] = &TMP890[34];
TMP890[34].kind = 1;
TMP890[34].offset = offsetof(Tsharedstate298570, overlinetolevel);
TMP890[34].typ = (&NTI98721);
TMP890[34].name = "overlineToLevel";
TMP2446[7] = &TMP890[35];
NTI298021.size = sizeof(Tmsghandler298021);
NTI298021.kind = 25;
NTI298021.base = 0;
NTI298021.flags = 3;
TMP890[35].kind = 1;
TMP890[35].offset = offsetof(Tsharedstate298570, msghandler);
TMP890[35].typ = (&NTI298021);
TMP890[35].name = "msgHandler";
TMP2446[8] = &TMP890[36];
NTI298023.size = sizeof(Tfindfilehandler298023);
NTI298023.kind = 25;
NTI298023.base = 0;
NTI298023.flags = 3;
TMP890[36].kind = 1;
TMP890[36].offset = offsetof(Tsharedstate298570, findfile);
TMP890[36].typ = (&NTI298023);
TMP890[36].name = "findFile";
TMP890[18].len = 9; TMP890[18].kind = 2; TMP890[18].sons = &TMP2446[0];
NTI298570.node = &TMP890[18];
NTI298572.size = sizeof(Tsharedstate298570*);
NTI298572.kind = 22;
NTI298572.base = (&NTI298570);
NTI298572.flags = 2;
NTI298572.marker = TMP2458;
TMP890[17].kind = 1;
TMP890[17].offset = offsetof(Trstparser298574, s);
TMP890[17].typ = (&NTI298572);
TMP890[17].name = "s";
TMP2440[3] = &TMP890[37];
NTI298595.size = sizeof(TY298595*);
NTI298595.kind = 24;
NTI298595.base = (&NTI108);
NTI298595.flags = 2;
NTI298595.marker = TMP2459;
TMP890[37].kind = 1;
TMP890[37].offset = offsetof(Trstparser298574, indentstack);
TMP890[37].typ = (&NTI298595);
TMP890[37].name = "indentStack";
TMP2440[4] = &TMP890[38];
TMP890[38].kind = 1;
TMP890[38].offset = offsetof(Trstparser298574, filename);
TMP890[38].typ = (&NTI149);
TMP890[38].name = "filename";
TMP2440[5] = &TMP890[39];
TMP890[39].kind = 1;
TMP890[39].offset = offsetof(Trstparser298574, line);
TMP890[39].typ = (&NTI108);
TMP890[39].name = "line";
TMP2440[6] = &TMP890[40];
TMP890[40].kind = 1;
TMP890[40].offset = offsetof(Trstparser298574, col);
TMP890[40].typ = (&NTI108);
TMP890[40].name = "col";
TMP2440[7] = &TMP890[41];
TMP890[41].kind = 1;
TMP890[41].offset = offsetof(Trstparser298574, hastoc);
TMP890[41].typ = (&NTI138);
TMP890[41].name = "hasToc";
TMP890[0].len = 8; TMP890[0].kind = 2; TMP890[0].sons = &TMP2440[0];
NTI298574.node = &TMP890[0];
NTI298019.size = sizeof(NU8);
NTI298019.kind = 14;
NTI298019.base = 0;
NTI298019.flags = 3;
for (TMP2464 = 0; TMP2464 < 10; TMP2464++) {
TMP890[TMP2464+42].kind = 1;
TMP890[TMP2464+42].offset = TMP2464;
TMP890[TMP2464+42].name = TMP2463[TMP2464];
TMP2462[TMP2464] = &TMP890[TMP2464+42];
}
TMP890[52].len = 10; TMP890[52].kind = 2; TMP890[52].sons = &TMP2462[0];
NTI298019.node = &TMP890[52];
NTI298017.size = sizeof(NU8);
NTI298017.kind = 14;
NTI298017.base = 0;
NTI298017.flags = 3;
for (TMP2478 = 0; TMP2478 < 3; TMP2478++) {
TMP890[TMP2478+53].kind = 1;
TMP890[TMP2478+53].offset = TMP2478;
TMP890[TMP2478+53].name = TMP2477[TMP2478];
TMP2476[TMP2478] = &TMP890[TMP2478+53];
}
TMP890[56].len = 3; TMP890[56].kind = 2; TMP890[56].sons = &TMP2476[0];
NTI298017.node = &TMP890[56];
NTI298576.size = sizeof(Eparseerror298576);
NTI298576.kind = 17;
NTI298576.base = (&NTI3449);
TMP890[57].len = 0; TMP890[57].kind = 2;
NTI298576.node = &TMP890[57];
NTI298838.size = sizeof(Eparseerror298576*);
NTI298838.kind = 22;
NTI298838.base = (&NTI298576);
NTI298838.marker = TMP2479;
NTI298139.size = sizeof(Tlexer298139);
NTI298139.kind = 17;
NTI298139.base = (&NTI3411);
NTI298139.flags = 1;
TMP2481[0] = &TMP890[59];
TMP890[59].kind = 1;
TMP890[59].offset = offsetof(Tlexer298139, buf);
TMP890[59].typ = (&NTI151);
TMP890[59].name = "buf";
TMP2481[1] = &TMP890[60];
TMP890[60].kind = 1;
TMP890[60].offset = offsetof(Tlexer298139, bufpos);
TMP890[60].typ = (&NTI108);
TMP890[60].name = "bufpos";
TMP2481[2] = &TMP890[61];
TMP890[61].kind = 1;
TMP890[61].offset = offsetof(Tlexer298139, line);
TMP890[61].typ = (&NTI108);
TMP890[61].name = "line";
TMP2481[3] = &TMP890[62];
TMP890[62].kind = 1;
TMP890[62].offset = offsetof(Tlexer298139, col);
TMP890[62].typ = (&NTI108);
TMP890[62].name = "col";
TMP2481[4] = &TMP890[63];
TMP890[63].kind = 1;
TMP890[63].offset = offsetof(Tlexer298139, baseindent);
TMP890[63].typ = (&NTI108);
TMP890[63].name = "baseIndent";
TMP2481[5] = &TMP890[64];
TMP890[64].kind = 1;
TMP890[64].offset = offsetof(Tlexer298139, skippounds);
TMP890[64].typ = (&NTI138);
TMP890[64].name = "skipPounds";
TMP890[58].len = 6; TMP890[58].kind = 2; TMP890[58].sons = &TMP2481[0];
NTI298139.node = &TMP890[58];
}

