/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/docutils_rst.o compiler/nimcache/docutils_rst.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct trstnode297009 trstnode297009;
typedef struct trstnodeseq297007 trstnodeseq297007;
typedef struct trstparser298677 trstparser298677;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttokenseq298116 ttokenseq298116;
typedef struct ttoken298114 ttoken298114;
typedef struct tsharedstate298673 tsharedstate298673;
typedef struct TY298698 TY298698;
typedef struct TY298687 TY298687;
typedef struct tsubstitution298671 tsubstitution298671;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct eparseerror298679 eparseerror298679;
typedef struct einvalidvalue2453 einvalidvalue2453;
typedef struct esynch2429 esynch2429;
typedef struct E_Base E_Base;
typedef struct tlexer298118 tlexer298118;
typedef struct tkeyvaluepair121806 tkeyvaluepair121806;
typedef struct TY110805 TY110805;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  trstnode297009  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq297007* Sons;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler298018) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler298016) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  ttoken298114  {
NU8 Kind;
NI Ival;
NimStringDesc* Symbol;
NI Line;
NI Col;
};
struct  trstparser298677  {
  TNimObject Sup;
NI Idx;
ttokenseq298116* Tok;
tsharedstate298673* S;
TY298698* 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  tsubstitution298671  {
NimStringDesc* Key;
trstnode297009* Value;
};
typedef NI tskiptable90032[256];
struct  tsharedstate298673  {
NU8 Options;
NI Ulevel;
NI Olevel;
TY298687* Subs;
TY298687* Refs;
tskiptable90032 Underlinetolevel;
tskiptable90032 Overlinetolevel;
tmsghandler298016 Msghandler;
tfindfilehandler298018 Findfile;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
typedef NimStringDesc* TY298045[9];
typedef NimStringDesc* TY298821[5];
struct  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  esynch2429  {
  E_Base Sup;
};
struct  einvalidvalue2453  {
  esynch2429 Sup;
};
struct  eparseerror298679  {
  einvalidvalue2453 Sup;
};
typedef NimStringDesc* TY165002[1];
struct  tlexer298118  {
  TNimObject Sup;
NCSTRING Buf;
NI Bufpos;
NI Line;
NI Col;
NI Baseindent;
NIM_BOOL Skippounds;
};
typedef NU8 TY90161[32];
typedef NimStringDesc* TY301215[12];
typedef N_NIMCALL_PTR(trstnode297009*, tsectionparser303608) (trstparser298677* p);
struct tkeyvaluepair121806 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef tkeyvaluepair121806 TY298074[34];
typedef NimStringDesc* TY303290[3];
typedef NI TY303295[3];
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct trstnodeseq297007 {
  TGenericSeq Sup;
  trstnode297009* data[SEQ_DECL_SIZE];
};
struct ttokenseq298116 {
  TGenericSeq Sup;
  ttoken298114 data[SEQ_DECL_SIZE];
};
struct TY298698 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY298687 {
  TGenericSeq Sup;
  tsubstitution298671 data[SEQ_DECL_SIZE];
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_299163)(trstnode297009* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_297080)(trstnode297009* n);
N_NIMCALL(void, addnodesaux_299122)(trstnode297009* 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_298055)(trstnode297009* n);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2323)(void* p, NI op);
N_NIMCALL(void, TMP2335)(void* p, NI op);
N_NIMCALL(void, TMP2336)(void* p, NI op);
N_NIMCALL(void, TMP2337)(void* p, NI op);
N_NIMCALL(void, initparser_299077)(trstparser298677* p, tsharedstate298673* sharedstate);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_74604, TNimType* mt);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(tsharedstate298673*, newsharedstate_298878)(NU8 options, tfindfilehandler298018 findfile, tmsghandler298016 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_298803)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_298705)(NU8 k);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_75880, 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, TMP2356)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(E_Base* e, NCSTRING ename);
static N_INLINE(void, writeln_138205)(FILE* f_138209, NimStringDesc** x_138213, NI x_138213Len0);
N_NIMCALL(void, write_10463)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_298872)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_298463)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq298116** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_298404)(tlexer298118* l, ttoken298114* tok);
N_NIMCALL(void, getthing_298138)(tlexer298118* l, ttoken298114* tok, TY90161 s);
N_NIMCALL(void, getindent_298377)(tlexer298118* l, ttoken298114* tok);
N_NIMCALL(NI, getindentaux_298237)(tlexer298118* l, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NI count, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_298194)(tlexer298118* l, ttoken298114* tok);
N_NIMCALL(trstnode297009*, resolvesubs_304486)(trstparser298677* p, trstnode297009* n);
N_NIMCALL(NI, findsub_299255)(trstparser298677* p, trstnode297009* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_111426)(NimStringDesc* key);
N_NIMCALL(trstnode297009*, newrstnode_297139)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_298956)(trstparser298677* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(trstnode297009*, findref_299408)(trstparser298677* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_298051)(trstnode297009* n);
N_NIMCALL(trstnode297009*, newrstnode_297097)(NU8 kind);
N_NIMCALL(void, add_297163)(trstnode297009* father, trstnode297009* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(trstnode297009*, parsedoc_302480)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsesectionwrapper_303521)(trstparser298677* p);
N_NIMCALL(void, parsesection_301312)(trstparser298677* p, trstnode297009* result);
N_NIMCALL(NI, currind_299001)(trstparser298677* p);
N_NIMCALL(void, pushind_299007)(trstparser298677* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_299032)(trstparser298677* p);
N_NIMCALL(NU8, whichsection_301704)(trstparser298677* p);
N_NIMCALL(NIM_BOOL, match_299647)(trstparser298677* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_89836)(NimStringDesc* s, TY90161 theset);
N_NIMCALL(NI, tokenafternewline_301613)(trstparser298677* p);
N_NIMCALL(NIM_BOOL, prednl_301660)(trstparser298677* p);
N_NIMCALL(NIM_BOOL, islineblock_301652)(trstparser298677* p);
N_NIMCALL(void, rstmessage_298972)(trstparser298677* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_301676)(trstparser298677* p);
N_NIMCALL(NIM_BOOL, isoptionlist_301698)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parseliteralblock_301488)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsebulletlist_303002)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parselineblock_301719)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsedotdot_301483)(trstparser298677* p);
N_NIMCALL(NimStringDesc*, getdirective_300953)(trstparser298677* p);
N_NIMCALL(NU8, getdirkind_301220)(NimStringDesc* s);
static N_INLINE(NI, find_301225)(TY301215 a_301230, NimStringDesc* item_301232);
N_NIMCALL(trstnode297009*, dirinclude_303799)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsedirective_303774)(trstparser298677* p, NU8 flags, tsectionparser303608 contentparser);
N_NIMCALL(trstnode297009*, parsedirective_303617)(trstparser298677* p, NU8 flags);
N_NIMCALL(trstnode297009*, newleaf_299434)(trstparser298677* p);
N_NIMCALL(void, parseline_301296)(trstparser298677* p, trstnode297009* father);
N_NIMCALL(void, parseinline_300802)(trstparser298677* p, trstnode297009* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_299594)(trstparser298677* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_300601)(trstparser298677* p, trstnode297009* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_299544)(trstparser298677* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_300333)(trstparser298677* p, trstnode297009* father);
N_NIMCALL(void, rstmessage_298963)(trstparser298677* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(trstnode297009*, parsemarkdowncodeblock_300718)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsepostfix_299897)(trstparser298677* p, trstnode297009* n);
N_NIMCALL(void, fixupembeddedref_299834)(trstnode297009* n, trstnode297009* a, trstnode297009* b);
N_NIMCALL(void, setref_299354)(trstparser298677* p, NimStringDesc* key, trstnode297009* value);
N_NIMCALL(trstnode297009*, parsesmiley_300004)(trstparser298677* p);
N_NIMCALL(NI, matchverbatim_299948)(trstparser298677* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_300277)(trstparser298677* p, trstnode297009* father);
N_NIMCALL(NIM_BOOL, isurl_300201)(trstparser298677* p, NI i);
static N_INLINE(NIM_BOOL, contains_300219)(NimStringDesc** a_300225, NI a_300225Len0, NimStringDesc* item_300228);
static N_INLINE(NI, find_300231)(NimStringDesc** a_300236, NI a_300236Len0, NimStringDesc* item_300238);
N_NIMCALL(trstnode297009*, parsefields_301348)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsefield_301318)(trstparser298677* p);
N_NIMCALL(NIM_BOOL, indfollows_303758)(trstparser298677* p);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing);
N_NIMCALL(NimStringDesc*, getfieldvalue_298059)(trstnode297009* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_10440)(NimStringDesc* filename);
N_NIMCALL(trstnode297009*, dirimage_304203)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dirfigure_304211)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dirtitle_304219)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dircontainer_303838)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dircontents_304227)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dirraw_304258)(trstparser298677* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_304244)(trstparser298677* p, trstnode297009** result, NU8 kind, tsectionparser303608 contentparser);
N_NIMCALL(trstnode297009*, parsedirbody_303791)(trstparser298677* p, tsectionparser303608 contentparser);
N_NIMCALL(trstnode297009*, dircodeblock_303827)(trstparser298677* p);
N_NIMCALL(trstnode297009*, dirindex_304235)(trstparser298677* p);
N_NIMCALL(trstnode297009*, getreferencename_299441)(trstparser298677* p, NimStringDesc* endstr);
N_NIMCALL(trstnode297009*, untileol_299483)(trstparser298677* p);
N_NIMCALL(void, expect_299521)(trstparser298677* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_299300)(trstparser298677* p, NimStringDesc* key, trstnode297009* value);
N_NIMCALL(trstnode297009*, parsecomment_301108)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parseenumlist_303284)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsedefinitionlist_303193)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsetransition_302826)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parseheadline_301863)(trstparser298677* p);
N_NIMCALL(void, parseuntilnewline_301304)(trstparser298677* p, trstnode297009* father);
N_NIMCALL(NI, getlevel_301587)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(trstnode297009*, parseoverline_302899)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parsesimpletable_302485)(trstparser298677* p);
N_NIMCALL(void, getcolumns_302231)(trstparser298677* p, TY298698** cols);
N_NIMCALL(NI, tokend_302225)(trstparser298677* p);
N_NIMCALL(trstnode297009*, parseoptionlist_303072)(trstparser298677* p);
N_NIMCALL(void, parseparagraph_301788)(trstparser298677* p, trstnode297009* result);
N_NIMCALL(void, addifnotnil_297187)(trstnode297009* father, trstnode297009* son);
N_NIMCALL(NU8, sonkind_303380)(trstnode297009* father, NI i);
STRING_LITERAL(TMP1989, "", 0);
STRING_LITERAL(TMP2070, "\001\001", 2);
NIM_CONST struct {
  TGenericSeq Sup;
  NI data[1];
} CNSTSEQ2340 = {{1, 1}, {0}};
NIM_CONST TY298698* TMP2338 = ((TY298698*)&CNSTSEQ2340);
STRING_LITERAL(TMP2343, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2344, "\'$1\' expected", 13);
STRING_LITERAL(TMP2345, "grid table is not implemented", 29);
STRING_LITERAL(TMP2346, "new section expected", 20);
STRING_LITERAL(TMP2347, "general parse error", 19);
STRING_LITERAL(TMP2348, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2349, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2350, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2351, "language \'$1\' not supported", 27);
NIM_CONST TY298045 messages_298044 = {((NimStringDesc*) &TMP2343),
((NimStringDesc*) &TMP2344),
((NimStringDesc*) &TMP2345),
((NimStringDesc*) &TMP2346),
((NimStringDesc*) &TMP2347),
((NimStringDesc*) &TMP2348),
((NimStringDesc*) &TMP2349),
((NimStringDesc*) &TMP2350),
((NimStringDesc*) &TMP2351)}
;
STRING_LITERAL(TMP2352, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2357, "\012", 1);
static NIM_CONST TY90161 TMP2359 = {
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 TY90161 TMP2360 = {
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(TMP2361, "#", 1);
static NIM_CONST TY90161 TMP2362 = {
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(TMP2363, "ii", 2);
STRING_LITERAL(TMP2364, " a", 2);
STRING_LITERAL(TMP2365, "i", 1);
STRING_LITERAL(TMP2366, "ai", 2);
STRING_LITERAL(TMP2367, "::", 2);
STRING_LITERAL(TMP2368, "+", 1);
STRING_LITERAL(TMP2369, "*", 1);
STRING_LITERAL(TMP2370, "-", 1);
STRING_LITERAL(TMP2371, "|", 1);
STRING_LITERAL(TMP2372, "..", 2);
STRING_LITERAL(TMP2373, ":w:", 3);
STRING_LITERAL(TMP2374, "(e) ", 4);
STRING_LITERAL(TMP2375, "+a+", 3);
STRING_LITERAL(TMP2376, "-w", 2);
STRING_LITERAL(TMP2377, "--w", 3);
STRING_LITERAL(TMP2378, "/w", 2);
STRING_LITERAL(TMP2379, "//w", 3);
STRING_LITERAL(TMP2380, "e) ", 3);
STRING_LITERAL(TMP2381, "e. ", 3);
STRING_LITERAL(TMP2382, "author", 6);
STRING_LITERAL(TMP2383, "authors", 7);
STRING_LITERAL(TMP2384, "code-block", 10);
STRING_LITERAL(TMP2385, "container", 9);
STRING_LITERAL(TMP2386, "contents", 8);
STRING_LITERAL(TMP2387, "figure", 6);
STRING_LITERAL(TMP2388, "image", 5);
STRING_LITERAL(TMP2389, "include", 7);
STRING_LITERAL(TMP2390, "index", 5);
STRING_LITERAL(TMP2391, "raw", 3);
STRING_LITERAL(TMP2392, "title", 5);
NIM_CONST TY301215 dirids_301214 = {((NimStringDesc*) &TMP1989),
((NimStringDesc*) &TMP2382),
((NimStringDesc*) &TMP2383),
((NimStringDesc*) &TMP2384),
((NimStringDesc*) &TMP2385),
((NimStringDesc*) &TMP2386),
((NimStringDesc*) &TMP2387),
((NimStringDesc*) &TMP2388),
((NimStringDesc*) &TMP2389),
((NimStringDesc*) &TMP2390),
((NimStringDesc*) &TMP2391),
((NimStringDesc*) &TMP2392)}
;
static NIM_CONST TY90161 TMP2393 = {
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(TMP2394, "\\", 1);
STRING_LITERAL(TMP2395, "***", 3);
static NIM_CONST TY90161 TMP2396 = {
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(TMP2397, "``", 2);
STRING_LITERAL(TMP2398, "\\\\", 2);
STRING_LITERAL(TMP2399, " ", 1);
STRING_LITERAL(TMP2400, "**", 2);
STRING_LITERAL(TMP2401, "```", 3);
STRING_LITERAL(TMP2402, "`", 1);
STRING_LITERAL(TMP2403, "_", 1);
STRING_LITERAL(TMP2404, ">", 1);
STRING_LITERAL(TMP2405, "<", 1);
STRING_LITERAL(TMP2406, "idx", 3);
STRING_LITERAL(TMP2407, "literal", 7);
STRING_LITERAL(TMP2408, "strong", 6);
STRING_LITERAL(TMP2409, "emphasis", 8);
STRING_LITERAL(TMP2410, "sub", 3);
STRING_LITERAL(TMP2411, "subscript", 9);
STRING_LITERAL(TMP2412, "sup", 3);
STRING_LITERAL(TMP2413, "supscript", 9);
STRING_LITERAL(TMP2414, ":D", 2);
STRING_LITERAL(TMP2415, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2416, ":-D", 3);
STRING_LITERAL(TMP2417, ":)", 2);
STRING_LITERAL(TMP2418, "icon_e_smile", 12);
STRING_LITERAL(TMP2419, ":-)", 3);
STRING_LITERAL(TMP2420, ";)", 2);
STRING_LITERAL(TMP2421, "icon_e_wink", 11);
STRING_LITERAL(TMP2422, ";-)", 3);
STRING_LITERAL(TMP2423, ":(", 2);
STRING_LITERAL(TMP2424, "icon_e_sad", 10);
STRING_LITERAL(TMP2425, ":-(", 3);
STRING_LITERAL(TMP2426, ":o", 2);
STRING_LITERAL(TMP2427, "icon_e_surprised", 16);
STRING_LITERAL(TMP2428, ":-o", 3);
STRING_LITERAL(TMP2429, ":shock:", 7);
STRING_LITERAL(TMP2430, "icon_eek", 8);
STRING_LITERAL(TMP2431, ":?", 2);
STRING_LITERAL(TMP2432, "icon_e_confused", 15);
STRING_LITERAL(TMP2433, ":-?", 3);
STRING_LITERAL(TMP2434, ":-/", 3);
STRING_LITERAL(TMP2435, "8-)", 3);
STRING_LITERAL(TMP2436, "icon_cool", 9);
STRING_LITERAL(TMP2437, ":lol:", 5);
STRING_LITERAL(TMP2438, "icon_lol", 8);
STRING_LITERAL(TMP2439, ":x", 2);
STRING_LITERAL(TMP2440, "icon_mad", 8);
STRING_LITERAL(TMP2441, ":-x", 3);
STRING_LITERAL(TMP2442, ":P", 2);
STRING_LITERAL(TMP2443, "icon_razz", 9);
STRING_LITERAL(TMP2444, ":-P", 3);
STRING_LITERAL(TMP2445, ":oops:", 6);
STRING_LITERAL(TMP2446, "icon_redface", 12);
STRING_LITERAL(TMP2447, ":cry:", 5);
STRING_LITERAL(TMP2448, "icon_cry", 8);
STRING_LITERAL(TMP2449, ":evil:", 6);
STRING_LITERAL(TMP2450, "icon_evil", 9);
STRING_LITERAL(TMP2451, ":twisted:", 9);
STRING_LITERAL(TMP2452, "icon_twisted", 12);
STRING_LITERAL(TMP2453, ":roll:", 6);
STRING_LITERAL(TMP2454, "icon_rolleyes", 13);
STRING_LITERAL(TMP2455, ":!:", 3);
STRING_LITERAL(TMP2456, "icon_exclaim", 12);
STRING_LITERAL(TMP2457, ":?:", 3);
STRING_LITERAL(TMP2458, "icon_question", 13);
STRING_LITERAL(TMP2459, ":idea:", 6);
STRING_LITERAL(TMP2460, "icon_idea", 9);
STRING_LITERAL(TMP2461, ":arrow:", 7);
STRING_LITERAL(TMP2462, "icon_arrow", 10);
STRING_LITERAL(TMP2463, ":|", 2);
STRING_LITERAL(TMP2464, "icon_neutral", 12);
STRING_LITERAL(TMP2465, ":-|", 3);
STRING_LITERAL(TMP2466, ":mrgreen:", 9);
STRING_LITERAL(TMP2467, "icon_mrgreen", 12);
STRING_LITERAL(TMP2468, ":geek:", 6);
STRING_LITERAL(TMP2469, "icon_e_geek", 11);
STRING_LITERAL(TMP2470, ":ugeek:", 7);
STRING_LITERAL(TMP2471, "icon_e_ugeek", 12);
NIM_CONST TY298074 smilies_298073 = {{((NimStringDesc*) &TMP2414),
((NimStringDesc*) &TMP2415)}
,
{((NimStringDesc*) &TMP2416),
((NimStringDesc*) &TMP2415)}
,
{((NimStringDesc*) &TMP2417),
((NimStringDesc*) &TMP2418)}
,
{((NimStringDesc*) &TMP2419),
((NimStringDesc*) &TMP2418)}
,
{((NimStringDesc*) &TMP2420),
((NimStringDesc*) &TMP2421)}
,
{((NimStringDesc*) &TMP2422),
((NimStringDesc*) &TMP2421)}
,
{((NimStringDesc*) &TMP2423),
((NimStringDesc*) &TMP2424)}
,
{((NimStringDesc*) &TMP2425),
((NimStringDesc*) &TMP2424)}
,
{((NimStringDesc*) &TMP2426),
((NimStringDesc*) &TMP2427)}
,
{((NimStringDesc*) &TMP2428),
((NimStringDesc*) &TMP2427)}
,
{((NimStringDesc*) &TMP2429),
((NimStringDesc*) &TMP2430)}
,
{((NimStringDesc*) &TMP2431),
((NimStringDesc*) &TMP2432)}
,
{((NimStringDesc*) &TMP2433),
((NimStringDesc*) &TMP2432)}
,
{((NimStringDesc*) &TMP2434),
((NimStringDesc*) &TMP2432)}
,
{((NimStringDesc*) &TMP2435),
((NimStringDesc*) &TMP2436)}
,
{((NimStringDesc*) &TMP2437),
((NimStringDesc*) &TMP2438)}
,
{((NimStringDesc*) &TMP2439),
((NimStringDesc*) &TMP2440)}
,
{((NimStringDesc*) &TMP2441),
((NimStringDesc*) &TMP2440)}
,
{((NimStringDesc*) &TMP2442),
((NimStringDesc*) &TMP2443)}
,
{((NimStringDesc*) &TMP2444),
((NimStringDesc*) &TMP2443)}
,
{((NimStringDesc*) &TMP2445),
((NimStringDesc*) &TMP2446)}
,
{((NimStringDesc*) &TMP2447),
((NimStringDesc*) &TMP2448)}
,
{((NimStringDesc*) &TMP2449),
((NimStringDesc*) &TMP2450)}
,
{((NimStringDesc*) &TMP2451),
((NimStringDesc*) &TMP2452)}
,
{((NimStringDesc*) &TMP2453),
((NimStringDesc*) &TMP2454)}
,
{((NimStringDesc*) &TMP2455),
((NimStringDesc*) &TMP2456)}
,
{((NimStringDesc*) &TMP2457),
((NimStringDesc*) &TMP2458)}
,
{((NimStringDesc*) &TMP2459),
((NimStringDesc*) &TMP2460)}
,
{((NimStringDesc*) &TMP2461),
((NimStringDesc*) &TMP2462)}
,
{((NimStringDesc*) &TMP2463),
((NimStringDesc*) &TMP2464)}
,
{((NimStringDesc*) &TMP2465),
((NimStringDesc*) &TMP2464)}
,
{((NimStringDesc*) &TMP2466),
((NimStringDesc*) &TMP2467)}
,
{((NimStringDesc*) &TMP2468),
((NimStringDesc*) &TMP2469)}
,
{((NimStringDesc*) &TMP2470),
((NimStringDesc*) &TMP2471)}
}
;
STRING_LITERAL(TMP2472, ":", 1);
STRING_LITERAL(TMP2473, "//", 2);
STRING_LITERAL(TMP2475, "http", 4);
STRING_LITERAL(TMP2476, "https", 5);
STRING_LITERAL(TMP2477, "ftp", 3);
STRING_LITERAL(TMP2478, "telnet", 6);
STRING_LITERAL(TMP2479, "file", 4);
NIM_CONST TY298821 TMP2474 = {((NimStringDesc*) &TMP2475),
((NimStringDesc*) &TMP2476),
((NimStringDesc*) &TMP2477),
((NimStringDesc*) &TMP2478),
((NimStringDesc*) &TMP2479)}
;
STRING_LITERAL(TMP2482, "html", 4);
STRING_LITERAL(TMP2483, "latex", 5);
STRING_LITERAL(TMP2484, " _", 2);
STRING_LITERAL(TMP2485, " |", 2);
STRING_LITERAL(TMP2486, "replace", 7);
STRING_LITERAL(TMP2487, " [", 2);
STRING_LITERAL(TMP2488, "]", 1);
NIM_CONST TY303290 wildcards_303289 = {((NimStringDesc*) &TMP2374),
((NimStringDesc*) &TMP2380),
((NimStringDesc*) &TMP2381)}
;
NIM_CONST TY303295 wildpos_303294 = {1,
0,
0}
;
extern TNimType NTI2409; /* TObject */
TNimType NTI298677; /* TRstParser */
extern TNimType NTI106; /* int */
TNimType NTI298114; /* TToken */
TNimType NTI298112; /* TTokType */
extern TNimType NTI143; /* string */
TNimType NTI298116; /* TTokenSeq */
TNimType NTI298673; /* TSharedState */
TNimType NTI298008; /* TRstParseOption */
TNimType NTI298010; /* TRstParseOptions */
TNimType NTI298671; /* TSubstitution */
extern TNimType NTI297005; /* PRstNode */
TNimType NTI298687; /* seq[TSubstitution] */
extern TNimType NTI90032; /* TSkipTable */
TNimType NTI298016; /* TMsgHandler */
TNimType NTI298018; /* TFindFileHandler */
TNimType NTI298675; /* PSharedState */
TNimType NTI298698; /* seq[int] */
extern TNimType NTI134; /* bool */
extern tgcheap43016 gch_43044;
TNimType NTI298014; /* TMsgKind */
TNimType NTI298012; /* TMsgClass */
extern TNimType NTI2453; /* EInvalidValue */
TNimType NTI298679; /* EParseError */
TNimType NTI298836; /* ref EParseError */
TNimType NTI298118; /* TLexer */
extern TNimType NTI145; /* cstring */
extern TNimType NTI110805; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_299163)(trstnode297009* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		NI i_299191;
		NI HEX3Atmp_299234;
		NI res_299236;
		if (!((*n).Kind == ((NU8) 64))) goto LA3;
		i_299191 = 0;
		HEX3Atmp_299234 = 0;
		HEX3Atmp_299234 = (NI32)((*n).Text->Sup.len - 1);
		res_299236 = 0;
		while (1) {
			if (!(res_299236 <= HEX3Atmp_299234)) goto LA5;
			i_299191 = res_299236;
			switch (((NU8)((*n).Text->data[i_299191]))) {
			case 48 ... 57:
			{
				{
					if (!(*b)) goto LA9;
					(*r) = addChar((*r), 45);
					(*b) = NIM_FALSE;
				}
				LA9: ;
				{
					if (!((*r)->Sup.len == 0)) goto LA13;
					(*r) = addChar((*r), 90);
				}
				LA13: ;
				(*r) = addChar((*r), (*n).Text->data[i_299191]);
			}
			break;
			case 97 ... 122:
			{
				{
					if (!(*b)) goto LA18;
					(*r) = addChar((*r), 45);
					(*b) = NIM_FALSE;
				}
				LA18: ;
				(*r) = addChar((*r), (*n).Text->data[i_299191]);
			}
			break;
			case 65 ... 90:
			{
				{
					if (!(*b)) goto LA23;
					(*r) = addChar((*r), 45);
					(*b) = NIM_FALSE;
				}
				LA23: ;
				(*r) = addChar((*r), ((NIM_CHAR) (((NI) ((NI32)(((NI) ((NI32)(((NI) (((NU8)((*n).Text->data[i_299191])))) - 65))) + 97))))));
			}
			break;
			default:
			{
				{
					if (!(0 < (*r)->Sup.len)) goto LA28;
					(*b) = NIM_TRUE;
				}
				LA28: ;
			}
			break;
			}
			res_299236 += 1;
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NI i_299233;
		NI HEX3Atmp_299238;
		NI LOC31;
		NI res_299240;
		i_299233 = 0;
		HEX3Atmp_299238 = 0;
		LOC31 = 0;
		LOC31 = len_297080(n);
		HEX3Atmp_299238 = (NI32)(LOC31 - 1);
		res_299240 = 0;
		while (1) {
			if (!(res_299240 <= HEX3Atmp_299238)) goto LA32;
			i_299233 = res_299240;
			rstnodetorefnameaux_299163((*n).Sons->data[i_299233], r, b);
			res_299240 += 1;
		} LA32: ;
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_298051)(trstnode297009* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1989));
	b = NIM_FALSE;
	rstnodetorefnameaux_299163(n, &result, &b);
	return result;
}

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

N_NIMCALL(void, addnodesaux_299122)(trstnode297009* 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_299148;
		NI HEX3Atmp_299149;
		NI LOC6;
		NI res_299151;
		i_299148 = 0;
		HEX3Atmp_299149 = 0;
		LOC6 = 0;
		LOC6 = len_297080(n);
		HEX3Atmp_299149 = (NI32)(LOC6 - 1);
		res_299151 = 0;
		while (1) {
			if (!(res_299151 <= HEX3Atmp_299149)) goto LA7;
			i_299148 = res_299151;
			addnodesaux_299122((*n).Sons->data[i_299148], result);
			res_299151 += 1;
		} LA7: ;
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_298055)(trstnode297009* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1989));
	addnodesaux_299122(n, &result);
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_298059)(trstnode297009* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
	NI i_301451;
	NI HEX3Atmp_301453;
	NI LOC9;
	NI res_301455;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1989));
	{
		if (!((*n).Sons->data[1] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(((*(*n).Sons->data[1]).Kind == ((NU8) 13)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	i_301451 = 0;
	HEX3Atmp_301453 = 0;
	LOC9 = 0;
	LOC9 = len_297080((*n).Sons->data[1]);
	HEX3Atmp_301453 = (NI32)(LOC9 - 1);
	res_301455 = 0;
	while (1) {
		trstnode297009* f;
		if (!(res_301455 <= HEX3Atmp_301453)) goto LA10;
		i_301451 = res_301455;
		f = (*(*n).Sons->data[1]).Sons->data[i_301451];
		{
			NimStringDesc* LOC13;
			NI LOC14;
			LOC13 = 0;
			LOC13 = addnodes_298055((*f).Sons->data[0]);
			LOC14 = 0;
			LOC14 = nsuCmpIgnoreStyle(LOC13, fieldname);
			if (!(LOC14 == 0)) goto LA15;
			result = addnodes_298055((*f).Sons->data[1]);
			{
				if (!((result) && (result)->Sup.len == 0)) goto LA19;
				result = copyString(((NimStringDesc*) &TMP2070));
			}
			LA19: ;
			goto BeforeRet;
		}
		LA15: ;
		res_301455 += 1;
	} LA10: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_298064)(trstnode297009* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).Sons->data[0] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP1989));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_298055((*n).Sons->data[0]);
	}
	LA1: ;
	return result;
}
N_NIMCALL(void, TMP2323)(void* p, NI op) {
	ttokenseq298116* a;
	NI LOC1;
	a = (ttokenseq298116*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Symbol, op);
	}
}
N_NIMCALL(void, TMP2335)(void* p, NI op) {
	TY298687* a;
	NI LOC1;
	a = (TY298687*)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, TMP2336)(void* p, NI op) {
	tsharedstate298673* a;
	NI LOC1;
	NI LOC2;
	a = (tsharedstate298673*)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, TMP2337)(void* p, NI op) {
	TY298698* a;
	NI LOC1;
	a = (TY298698*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_299077)(trstparser298677* p, tsharedstate298673* sharedstate) {
	genericSeqAssign(&(*p).Indentstack, TMP2338, (&NTI298698));
	unsureAsgnRef((void**) &(*p).Tok, (ttokenseq298116*) newSeq((&NTI298116), 0));
	(*p).Idx = 0;
	unsureAsgnRef((void**) &(*p).Filename, copyString(((NimStringDesc*) &TMP1989)));
	(*p).Hastoc = NIM_FALSE;
	(*p).Col = 0;
	(*p).Line = 1;
	unsureAsgnRef((void**) &(*p).S, sharedstate);
}

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

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

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

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

static N_INLINE(void, writeln_138205)(FILE* f_138209, NimStringDesc** x_138213, NI x_138213Len0) {
	NimStringDesc* i_138226;
	NI i_138232;
	i_138226 = 0;
	i_138232 = 0;
	while (1) {
		if (!(i_138232 < x_138213Len0)) goto LA1;
		i_138226 = x_138213[i_138232];
		write_10463(f_138209, i_138226);
		i_138232 += 1;
	} LA1: ;
	write_10463(f_138209, ((NimStringDesc*) &TMP2357));
}

N_NIMCALL(void, defaultmsghandler_298803)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY298821 LOC1;
	mc = whichmsgclass_298705(msgkind);
	a = nsuFormatSingleElem(messages_298044[(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, (&NTI298012)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2352), LOC1, 5);
	{
		eparseerror298679* e_298835;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_298835 = 0;
		e_298835 = (eparseerror298679*) newObj((&NTI298836), sizeof(eparseerror298679));
		(*e_298835).Sup.Sup.Sup.Sup.m_type = (&NTI298679);
		LOC6 = 0;
		LOC6 = (*e_298835).Sup.Sup.Sup.message; (*e_298835).Sup.Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((E_Base*)e_298835, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY165002 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeln_138205(stdout, LOC8, 1);
	}
	LA2: ;
}

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

N_NIMCALL(tsharedstate298673*, newsharedstate_298878)(NU8 options, tfindfilehandler298018 findfile, tmsghandler298016 msghandler) {
	tsharedstate298673* result;
	result = 0;
	result = (tsharedstate298673*) newObj((&NTI298675), sizeof(tsharedstate298673));
	if ((*result).Subs) nimGCunrefNoCycle((*result).Subs);
	(*result).Subs = (TY298687*) newSeqRC1((&NTI298687), 0);
	if ((*result).Refs) nimGCunrefNoCycle((*result).Refs);
	(*result).Refs = (TY298687*) newSeqRC1((&NTI298687), 0);
	(*result).Options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).Msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).Msghandler = defaultmsghandler_298803;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).Findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).Findfile = defaultfindfile_298872;
	}
	LA6: ;
	return result;
}

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

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

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

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

N_NIMCALL(void, rawgettok_298404)(tlexer298118* l, ttoken298114* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) &(*tok).Symbol, copyString(((NimStringDesc*) &TMP1989)));
	(*tok).Ival = 0;
	c = (*l).Buf[(*l).Bufpos];
	switch (((NU8)(c))) {
	case 97 ... 122:
	case 65 ... 90:
	case 128 ... 255:
	case 48 ... 57:
	{
		getthing_298138(l, tok, TMP2359);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_298138(l, tok, TMP2360);
		(*tok).Kind = ((NU8) 2);
		{
			if (!(((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(13)) || ((NU8)((*l).Buf[(*l).Bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_298404(l, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_298377(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_298194(l, tok);
		{
			if (!((*tok).Symbol->Sup.len <= 3)) goto LA11;
			(*tok).Kind = ((NU8) 5);
		}
		LA11: ;
	}
	break;
	default:
	{
		(*tok).Line = (*l).Line;
		(*tok).Col = (*l).Col;
		{
			if (!((NU8)(c) == (NU8)(0))) goto LA16;
			(*tok).Kind = ((NU8) 0);
		}
		goto LA14;
		LA16: ;
		{
			(*tok).Kind = ((NU8) 6);
			(*tok).Symbol = addChar((*tok).Symbol, c);
			(*l).Bufpos += 1;
			(*l).Col += 1;
		}
		LA14: ;
	}
	break;
	}
	(*tok).Col = (((NI32)((*tok).Col - (*l).Baseindent) >= 0) ? (NI32)((*tok).Col - (*l).Baseindent) : 0);
}

N_NIMCALL(NI, gettokens_298463)(NimStringDesc* buffer, NIM_BOOL skippounds, ttokenseq298116** tokens) {
	NI result;
	tlexer298118 l;
	NI length;
	result = 0;
	memset((void*)&l, 0, sizeof(l));
	l.Sup.m_type = (&NTI298118);
	length = (*tokens)->Sup.len;
	l.Buf = buffer->data;
	l.Line = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = ((NU8)(l.Buf[0]) == (NU8)(239));
		if (!(LOC4)) goto LA5;
		LOC4 = ((NU8)(l.Buf[1]) == (NU8)(187));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = ((NU8)(l.Buf[2]) == (NU8)(191));
		LA6: ;
		if (!LOC3) goto LA7;
		l.Bufpos += 3;
	}
	LA7: ;
	l.Skippounds = skippounds;
	{
		if (!skippounds) goto LA11;
		{
			if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(35))) goto LA15;
			l.Bufpos += 1;
			result += 1;
		}
		LA15: ;
		{
			if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(35))) goto LA19;
			l.Bufpos += 1;
			result += 1;
		}
		LA19: ;
		l.Baseindent = 0;
		while (1) {
			if (!((NU8)(l.Buf[l.Bufpos]) == (NU8)(32))) goto LA21;
			l.Bufpos += 1;
			l.Baseindent += 1;
			result += 1;
		} LA21: ;
	}
	LA11: ;
	while (1) {
		length += 1;
		(*tokens) = (ttokenseq298116*) setLengthSeq(&((*tokens))->Sup, sizeof(ttoken298114), length);
		rawgettok_298404(&l, &(*tokens)->data[(NI32)(length - 1)]);
		{
			if (!((*tokens)->data[(NI32)(length - 1)].Kind == ((NU8) 0))) goto LA25;
			goto LA22;
		}
		LA25: ;
	} LA22: ;
	{
		if (!((*tokens)->data[0].Kind == ((NU8) 2))) goto LA29;
		(*tokens)->data[0].Ival = (*tokens)->data[0].Symbol->Sup.len;
		(*tokens)->data[0].Kind = ((NU8) 1);
	}
	LA29: ;
	return result;
}

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

N_NIMCALL(NI, findsub_299255)(trstparser298677* p, trstnode297009* n) {
	NI result;
	NimStringDesc* key;
	NI i_299274;
	NI HEX3Atmp_299288;
	NI res_299290;
	NI i_299287;
	NI HEX3Atmp_299292;
	NI res_299294;
	result = 0;
	key = addnodes_298055(n);
	i_299274 = 0;
	HEX3Atmp_299288 = 0;
	HEX3Atmp_299288 = ((*(*p).S).Subs->Sup.len-1);
	res_299290 = 0;
	while (1) {
		if (!(res_299290 <= HEX3Atmp_299288)) goto LA1;
		i_299274 = res_299290;
		{
			if (!eqStrings(key, (*(*p).S).Subs->data[i_299274].Key)) goto LA4;
			result = i_299274;
			goto BeforeRet;
		}
		LA4: ;
		res_299290 += 1;
	} LA1: ;
	i_299287 = 0;
	HEX3Atmp_299292 = 0;
	HEX3Atmp_299292 = ((*(*p).S).Subs->Sup.len-1);
	res_299294 = 0;
	while (1) {
		if (!(res_299294 <= HEX3Atmp_299292)) goto LA6;
		i_299287 = res_299294;
		{
			NI LOC9;
			LOC9 = 0;
			LOC9 = nsuCmpIgnoreStyle(key, (*(*p).S).Subs->data[i_299287].Key);
			if (!(LOC9 == 0)) goto LA10;
			result = i_299287;
			goto BeforeRet;
		}
		LA10: ;
		res_299294 += 1;
	} LA6: ;
	result = -1;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(trstnode297009*, findref_299408)(trstparser298677* p, NimStringDesc* key) {
	trstnode297009* result;
	NI i_299426;
	NI HEX3Atmp_299427;
	NI res_299429;
	result = 0;
	i_299426 = 0;
	HEX3Atmp_299427 = 0;
	HEX3Atmp_299427 = ((*(*p).S).Refs->Sup.len-1);
	res_299429 = 0;
	while (1) {
		if (!(res_299429 <= HEX3Atmp_299427)) goto LA1;
		i_299426 = res_299429;
		{
			if (!eqStrings(key, (*(*p).S).Refs->data[i_299426].Key)) goto LA4;
			result = (*(*p).S).Refs->data[i_299426].Value;
			goto BeforeRet;
		}
		LA4: ;
		res_299429 += 1;
	} LA1: ;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(trstnode297009*, resolvesubs_304486)(trstparser298677* p, trstnode297009* n) {
	trstnode297009* result;
	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_299255(p, n);
		{
			if (!(0 <= x)) goto LA8;
			result = (*(*p).S).Subs->data[x].Value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_298055(n);
			e = getenv_111426(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_297139(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_298956(&(*p), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		trstnode297009* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_298051(n);
		y = findref_299408(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_297097(((NU8) 38));
			(*n).Kind = ((NU8) 0);
			add_297163(result, n);
			add_297163(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).Hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		NI i_304542;
		NI HEX3Atmp_304543;
		NI LOC25;
		NI res_304545;
		i_304542 = 0;
		HEX3Atmp_304543 = 0;
		LOC25 = 0;
		LOC25 = len_297080(n);
		HEX3Atmp_304543 = (NI32)(LOC25 - 1);
		res_304545 = 0;
		while (1) {
			if (!(res_304545 <= HEX3Atmp_304543)) goto LA26;
			i_304542 = res_304545;
			asgnRefNoCycle((void**) &(*n).Sons->data[i_304542], resolvesubs_304486(p, (*n).Sons->data[i_304542]));
			res_304545 += 1;
		} LA26: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(NIM_BOOL, match_299647)(trstparser298677* p, NI start, NimStringDesc* expr) {
	NIM_BOOL result;
	NI i;
	NI j;
	NI last;
	result = 0;
	i = 0;
	j = start;
	last = (NI32)(expr->Sup.len - 1);
	while (1) {
		if (!(i <= last)) goto LA1;
		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 LOC11;
			LOC11 = 0;
			LOC11 = ((*p).Tok->data[j].Kind == ((NU8) 3));
			if (LOC11) goto LA12;
			LOC11 = eqStrings((*p).Tok->data[j].Symbol, ((NimStringDesc*) &TMP2361));
			LA12: ;
			result = LOC11;
			{
				if (!result) goto LA15;
				switch (((NU8)((*p).Tok->data[j].Symbol->data[0]))) {
				case 97 ... 122:
				case 65 ... 90:
				{
					result = ((*p).Tok->data[j].Symbol->Sup.len == 1);
				}
				break;
				case 48 ... 57:
				{
					result = allcharsinset_89836((*p).Tok->data[j].Symbol, TMP2362);
				}
				break;
				default:
				{
				}
				break;
				}
			}
			LA15: ;
		}
		break;
		default:
		{
			NIM_CHAR c;
			NI length;
			NIM_BOOL LOC24;
			NIM_BOOL LOC25;
			c = expr->data[i];
			length = 0;
			while (1) {
				NIM_BOOL LOC22;
				LOC22 = 0;
				LOC22 = (i <= last);
				if (!(LOC22)) goto LA23;
				LOC22 = ((NU8)(expr->data[i]) == (NU8)(c));
				LA23: ;
				if (!LOC22) goto LA21;
				i += 1;
				length += 1;
			} LA21: ;
			i -= 1;
			LOC24 = 0;
			LOC25 = 0;
			LOC25 = ((48 &(1<<(((*p).Tok->data[j].Kind)&7)))!=0);
			if (!(LOC25)) goto LA26;
			LOC25 = ((*p).Tok->data[j].Symbol->Sup.len == length);
			LA26: ;
			LOC24 = LOC25;
			if (!(LOC24)) goto LA27;
			LOC24 = ((NU8)((*p).Tok->data[j].Symbol->data[0]) == (NU8)(c));
			LA27: ;
			result = LOC24;
		}
		break;
		}
		{
			if (!!(result)) goto LA30;
			goto BeforeRet;
		}
		LA30: ;
		j += 1;
		i += 1;
	} LA1: ;
	result = NIM_TRUE;
	BeforeRet: ;
	return result;
}

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

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

N_NIMCALL(NIM_BOOL, islineblock_301652)(trstparser298677* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_301613(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*) &TMP2371));
	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_298972)(trstparser298677* p, NU8 msgkind) {
	(*(*p).S).Msghandler((*p).Filename, (NI32)((*p).Line + (*p).Tok->data[(*p).Idx].Line), (NI32)((*p).Col + (*p).Tok->data[(*p).Idx].Col), msgkind, (*p).Tok->data[(*p).Idx].Symbol);
}

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

N_NIMCALL(NIM_BOOL, isoptionlist_301698)(trstparser298677* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2376));
	if (LOC3) goto LA4;
	LOC3 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2377));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2378));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2379));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_301704)(trstparser298677* p) {
	NU8 result;
	result = 0;
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_299647(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2363));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_299647(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2364));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_299647(p, (NI32)((*p).Idx + 1), ((NimStringDesc*) &TMP2365));
			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_301613(p);
			LOC20 = 0;
			LOC20 = match_299647(p, LOC19, ((NimStringDesc*) &TMP2366));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2367))) 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_301660(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2368));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2369));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2370));
			LA33: ;
			LOC28 = LOC30;
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA34;
			LOC27 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2));
			LA34: ;
			if (!LOC27) goto LA35;
			result = ((NU8) 5);
		}
		goto LA17;
		LA35: ;
		{
			NIM_BOOL LOC38;
			LOC38 = 0;
			LOC38 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2371));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_301652(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*) &TMP2372));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_301660(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2373));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_301660(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2374));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2375));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_298972(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_301676(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_301698(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_301613(p);
			LOC73 = 0;
			LOC73 = match_299647(p, LOC72, ((NimStringDesc*) &TMP2366));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2380));
			if (LOC77) goto LA78;
			LOC77 = match_299647(p, (*p).Idx, ((NimStringDesc*) &TMP2381));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_301676(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(trstnode297009*, parseliteralblock_301488)(trstparser298677* p) {
	trstnode297009* result;
	trstnode297009* n;
	result = 0;
	result = newrstnode_297097(((NU8) 24));
	n = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP1989));
	{
		NI indent;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA3;
		indent = (*p).Tok->data[(*p).Idx].Ival;
		(*p).Idx += 1;
		while (1) {
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 0):
			{
				goto LA5;
			}
			break;
			case ((NU8) 1):
			{
				{
					if (!((*p).Tok->data[(*p).Idx].Ival < indent)) goto LA10;
					goto LA5;
				}
				goto LA8;
				LA10: ;
				{
					NimStringDesc* LOC13;
					(*n).Text = resizeString((*n).Text, 1);
appendString((*n).Text, ((NimStringDesc*) &TMP2357));
					LOC13 = 0;
					LOC13 = nsuRepeatChar((NI32)((*p).Tok->data[(*p).Idx].Ival - indent), 32);
					(*n).Text = resizeString((*n).Text, LOC13->Sup.len + 0);
appendString((*n).Text, LOC13);
					(*p).Idx += 1;
				}
				LA8: ;
			}
			break;
			default:
			{
				(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
				(*p).Idx += 1;
			}
			break;
			}
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		while (1) {
			if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA16;
			(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
			(*p).Idx += 1;
		} LA16: ;
	}
	LA1: ;
	add_297163(result, n);
	return result;
}

N_NIMCALL(trstnode297009*, parsebulletlist_303002)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = NIM_NIL;
	{
		NimStringDesc* bullet;
		NI col;
		if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2))) goto LA3;
		bullet = copyString((*p).Tok->data[(*p).Idx].Symbol);
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_297097(((NU8) 5));
		pushind_299007(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		while (1) {
			trstnode297009* item;
			item = newrstnode_297097(((NU8) 6));
			parsesection_301312(p, item);
			add_297163(result, item);
			{
				NIM_BOOL LOC8;
				NIM_BOOL LOC9;
				NIM_BOOL LOC10;
				LOC8 = 0;
				LOC9 = 0;
				LOC10 = 0;
				LOC10 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
				if (!(LOC10)) goto LA11;
				LOC10 = ((*p).Tok->data[(*p).Idx].Ival == col);
				LA11: ;
				LOC9 = LOC10;
				if (!(LOC9)) goto LA12;
				LOC9 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, bullet);
				LA12: ;
				LOC8 = LOC9;
				if (!(LOC8)) goto LA13;
				LOC8 = ((*p).Tok->data[(NI32)((*p).Idx + 2)].Kind == ((NU8) 2));
				LA13: ;
				if (!LOC8) goto LA14;
				(*p).Idx += 3;
			}
			goto LA6;
			LA14: ;
			{
				goto LA5;
			}
			LA6: ;
		} LA5: ;
		popind_299032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode297009*, parselineblock_301719)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = NIM_NIL;
	{
		NI col;
		if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 2))) goto LA3;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_297097(((NU8) 26));
		pushind_299007(p, (*p).Tok->data[(NI32)((*p).Idx + 2)].Col);
		(*p).Idx += 2;
		while (1) {
			trstnode297009* item;
			item = newrstnode_297097(((NU8) 27));
			parsesection_301312(p, item);
			add_297163(result, item);
			{
				NIM_BOOL LOC8;
				NIM_BOOL LOC9;
				NIM_BOOL LOC10;
				LOC8 = 0;
				LOC9 = 0;
				LOC10 = 0;
				LOC10 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
				if (!(LOC10)) goto LA11;
				LOC10 = ((*p).Tok->data[(*p).Idx].Ival == col);
				LA11: ;
				LOC9 = LOC10;
				if (!(LOC9)) goto LA12;
				LOC9 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2371));
				LA12: ;
				LOC8 = LOC9;
				if (!(LOC8)) goto LA13;
				LOC8 = ((*p).Tok->data[(NI32)((*p).Idx + 2)].Kind == ((NU8) 2));
				LA13: ;
				if (!LOC8) goto LA14;
				(*p).Idx += 3;
			}
			goto LA6;
			LA14: ;
			{
				goto LA5;
			}
			LA6: ;
		} LA5: ;
		popind_299032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_300953)(trstparser298677* p) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI j;
		LOC3 = 0;
		LOC3 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 3));
		LA4: ;
		if (!LOC3) goto LA5;
		j = (*p).Idx;
		(*p).Idx += 1;
		result = copyString((*p).Tok->data[(*p).Idx].Symbol);
		(*p).Idx += 1;
		while (1) {
			if (!((120 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0)) goto LA7;
			{
				if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2367))) goto LA10;
				goto LA7;
			}
			LA10: ;
			result = resizeString(result, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString(result, (*p).Tok->data[(*p).Idx].Symbol);
			(*p).Idx += 1;
		} LA7: ;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA14;
			(*p).Idx += 1;
		}
		LA14: ;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2367))) goto LA18;
			(*p).Idx += 1;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA22;
				(*p).Idx += 1;
			}
			LA22: ;
		}
		goto LA16;
		LA18: ;
		{
			(*p).Idx = j;
			result = copyString(((NimStringDesc*) &TMP1989));
		}
		LA16: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP1989));
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, find_301225)(TY301215 a_301230, NimStringDesc* item_301232) {
	NI result;
	NimStringDesc* i_301272;
	NI i_301290;
	result = 0;
	i_301272 = 0;
	i_301290 = 0;
	{
		if (!(((NI) (i_301290)) <= 11)) goto LA3;
		while (1) {
			i_301272 = a_301230[(i_301290)- 0];
			{
				if (!eqStrings(i_301272, item_301232)) goto LA8;
				goto BeforeRet;
			}
			LA8: ;
			result += 1;
			{
				if (!(11 <= ((NI) (i_301290)))) goto LA12;
				goto LA5;
			}
			LA12: ;
			i_301290 += 1;
		} LA5: ;
	}
	LA3: ;
	result = -1;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(trstnode297009*, newleaf_299434)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = newrstnode_297139(((NU8) 64), (*p).Tok->data[(*p).Idx].Symbol);
	return result;
}

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

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

N_NIMCALL(void, parsebackslash_300333)(trstparser298677* p, trstnode297009* father) {
	{
		trstnode297009* LOC5;
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2398))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2394));
		add_297163(father, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2394))) goto LA7;
		(*p).Idx += 1;
		{
			trstnode297009* LOC13;
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_299434(p);
			add_297163(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA16;
			(*p).Idx += 1;
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		trstnode297009* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_299434(p);
		add_297163(father, LOC19);
		(*p).Idx += 1;
	}
	LA1: ;
}

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

N_NIMCALL(void, parseuntil_300601)(trstparser298677* p, trstnode297009* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash) {
	NI line;
	NI col;
	line = (*p).Tok->data[(*p).Idx].Line;
	col = (*p).Tok->data[(*p).Idx].Col;
	(*p).Idx += 1;
	while (1) {
		switch ((*p).Tok->data[(*p).Idx].Kind) {
		case ((NU8) 5):
		{
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = isinlinemarkupend_299544(&(*p), postfix);
				if (!LOC5) goto LA6;
				(*p).Idx += 1;
				goto LA1;
			}
			goto LA3;
			LA6: ;
			{
				if (!interpretbackslash) goto LA9;
				parsebackslash_300333(p, father);
			}
			goto LA3;
			LA9: ;
			{
				trstnode297009* LOC12;
				LOC12 = 0;
				LOC12 = newleaf_299434(p);
				add_297163(father, LOC12);
				(*p).Idx += 1;
			}
			LA3: ;
		}
		break;
		case ((NU8) 4):
		case ((NU8) 3):
		case ((NU8) 6):
		{
			trstnode297009* LOC14;
			LOC14 = 0;
			LOC14 = newleaf_299434(p);
			add_297163(father, LOC14);
			(*p).Idx += 1;
		}
		break;
		case ((NU8) 1):
		{
			trstnode297009* LOC16;
			LOC16 = 0;
			LOC16 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2399));
			add_297163(father, LOC16);
			(*p).Idx += 1;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA19;
				rstmessage_298963(&(*p), ((NU8) 1), postfix, line, col);
				goto LA1;
			}
			LA19: ;
		}
		break;
		case ((NU8) 2):
		{
			trstnode297009* LOC22;
			LOC22 = 0;
			LOC22 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2399));
			add_297163(father, LOC22);
			(*p).Idx += 1;
		}
		break;
		default:
		{
			rstmessage_298963(&(*p), ((NU8) 1), postfix, line, col);
		}
		break;
		}
	} LA1: ;
}

N_NIMCALL(trstnode297009*, parsemarkdowncodeblock_300718)(trstparser298677* p) {
	trstnode297009* result;
	trstnode297009* args;
	trstnode297009* n;
	trstnode297009* lb;
	result = 0;
	args = newrstnode_297097(((NU8) 41));
	{
		trstnode297009* LOC5;
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_299434(p);
		add_297163(args, LOC5);
		(*p).Idx += 1;
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP1989));
	while (1) {
		switch ((*p).Tok->data[(*p).Idx].Kind) {
		case ((NU8) 0):
		{
			rstmessage_298956(&(*p), ((NU8) 1), ((NimStringDesc*) &TMP2401));
			goto LA7;
		}
		break;
		case ((NU8) 5):
		{
			{
				if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2401))) goto LA12;
				(*p).Idx += 1;
				goto LA7;
			}
			goto LA10;
			LA12: ;
			{
				(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
				(*p).Idx += 1;
			}
			LA10: ;
		}
		break;
		default:
		{
			(*n).Text = resizeString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString((*n).Text, (*p).Tok->data[(*p).Idx].Symbol);
			(*p).Idx += 1;
		}
		break;
		}
	} LA7: ;
	lb = newrstnode_297097(((NU8) 24));
	add_297163(lb, n);
	result = newrstnode_297097(((NU8) 47));
	add_297163(result, args);
	add_297163(result, NIM_NIL);
	add_297163(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_299834)(trstnode297009* n, trstnode297009* a, trstnode297009* b) {
	NI sep;
	NI i_299851;
	NI HEX3Atmp_299880;
	NI LOC1;
	NI res_299882;
	NI incr;
	NI i_299866;
	NI HEX3Atmp_299883;
	NI res_299885;
	NI i_299879;
	NI HEX3Atmp_299887;
	NI HEX3Atmp_299888;
	NI LOC15;
	NI res_299890;
	sep = -1;
	i_299851 = 0;
	HEX3Atmp_299880 = 0;
	LOC1 = 0;
	LOC1 = len_297080(n);
	HEX3Atmp_299880 = (NI32)(LOC1 - 2);
	res_299882 = HEX3Atmp_299880;
	while (1) {
		if (!(0 <= res_299882)) goto LA2;
		i_299851 = res_299882;
		{
			if (!eqStrings((*(*n).Sons->data[i_299851]).Text, ((NimStringDesc*) &TMP2405))) goto LA5;
			sep = i_299851;
			goto LA2;
		}
		LA5: ;
		res_299882 -= 1;
	} LA2: ;
	{
		NIM_BOOL LOC9;
		LOC9 = 0;
		LOC9 = (0 < sep);
		if (!(LOC9)) goto LA10;
		LOC9 = ((NU8)((*(*n).Sons->data[(NI32)(sep - 1)]).Text->data[0]) == (NU8)(32));
		LA10: ;
		if (!LOC9) goto LA11;
		incr = 2;
	}
	goto LA7;
	LA11: ;
	{
		incr = 1;
	}
	LA7: ;
	i_299866 = 0;
	HEX3Atmp_299883 = 0;
	HEX3Atmp_299883 = (NI32)(sep - incr);
	res_299885 = 0;
	while (1) {
		if (!(res_299885 <= HEX3Atmp_299883)) goto LA14;
		i_299866 = res_299885;
		add_297163(a, (*n).Sons->data[i_299866]);
		res_299885 += 1;
	} LA14: ;
	i_299879 = 0;
	HEX3Atmp_299887 = 0;
	HEX3Atmp_299888 = 0;
	HEX3Atmp_299887 = (NI32)(sep + 1);
	LOC15 = 0;
	LOC15 = len_297080(n);
	HEX3Atmp_299888 = (NI32)(LOC15 - 2);
	res_299890 = HEX3Atmp_299887;
	while (1) {
		if (!(res_299890 <= HEX3Atmp_299888)) goto LA16;
		i_299879 = res_299890;
		add_297163(b, (*n).Sons->data[i_299879]);
		res_299890 += 1;
	} LA16: ;
}

N_NIMCALL(void, setref_299354)(trstparser298677* p, NimStringDesc* key, trstnode297009* value) {
	NI length;
	NI i_299384;
	NI HEX3Atmp_299401;
	NI res_299403;
	NimStringDesc* LOC12;
	length = (*(*p).S).Refs->Sup.len;
	i_299384 = 0;
	HEX3Atmp_299401 = 0;
	HEX3Atmp_299401 = (NI32)(length - 1);
	res_299403 = 0;
	while (1) {
		if (!(res_299403 <= HEX3Atmp_299401)) goto LA1;
		i_299384 = res_299403;
		{
			if (!eqStrings(key, (*(*p).S).Refs->data[i_299384].Key)) goto LA4;
			{
				NimStringDesc* LOC8;
				NimStringDesc* LOC9;
				LOC8 = 0;
				LOC8 = addnodes_298055((*(*p).S).Refs->data[i_299384].Value);
				LOC9 = 0;
				LOC9 = addnodes_298055(value);
				if (!!(eqStrings(LOC8, LOC9))) goto LA10;
				rstmessage_298956(&(*p), ((NU8) 6), key);
			}
			LA10: ;
			asgnRefNoCycle((void**) &(*(*p).S).Refs->data[i_299384].Value, value);
			goto BeforeRet;
		}
		LA4: ;
		res_299403 += 1;
	} LA1: ;
	(*(*p).S).Refs = (TY298687*) setLengthSeq(&((*(*p).S).Refs)->Sup, sizeof(tsubstitution298671), (NI32)(length + 1));
	LOC12 = 0;
	LOC12 = (*(*p).S).Refs->data[length].Key; (*(*p).S).Refs->data[length].Key = copyStringRC1(key);
	if (LOC12) nimGCunrefNoCycle(LOC12);
	asgnRefNoCycle((void**) &(*(*p).S).Refs->data[length].Value, value);
	BeforeRet: ;
}

N_NIMCALL(trstnode297009*, parsepostfix_299897)(trstparser298677* p, trstnode297009* n) {
	trstnode297009* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_299544(&(*p), ((NimStringDesc*) &TMP2403));
		if (!LOC3) goto LA4;
		(*p).Idx += 1;
		{
			NIM_BOOL LOC8;
			trstnode297009* a;
			trstnode297009* b;
			LOC8 = 0;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 2)].Symbol, ((NimStringDesc*) &TMP2402));
			if (!(LOC8)) goto LA9;
			LOC8 = eqStrings((*p).Tok->data[(NI32)((*p).Idx - 3)].Symbol, ((NimStringDesc*) &TMP2404));
			LA9: ;
			if (!LOC8) goto LA10;
			a = newrstnode_297097(((NU8) 0));
			b = newrstnode_297097(((NU8) 0));
			fixupembeddedref_299834(n, a, b);
			{
				NI LOC14;
				LOC14 = 0;
				LOC14 = len_297080(a);
				if (!(LOC14 == 0)) goto LA15;
				result = newrstnode_297097(((NU8) 37));
				add_297163(result, b);
			}
			goto LA12;
			LA15: ;
			{
				NimStringDesc* LOC18;
				result = newrstnode_297097(((NU8) 38));
				add_297163(result, a);
				add_297163(result, b);
				LOC18 = 0;
				LOC18 = rstnodetorefname_298051(a);
				setref_299354(p, LOC18, b);
			}
			LA12: ;
		}
		goto LA6;
		LA10: ;
		{
			if (!((*n).Kind == ((NU8) 60))) goto LA20;
			(*n).Kind = ((NU8) 39);
		}
		goto LA6;
		LA20: ;
		{
			result = newrstnode_297097(((NU8) 39));
			add_297163(result, n);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = match_299647(&(*p), (*p).Idx, ((NimStringDesc*) &TMP2373));
		if (!LOC24) goto LA25;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2406))) goto LA29;
			(*n).Kind = ((NU8) 56);
		}
		goto LA27;
		LA29: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2407))) goto LA32;
			(*n).Kind = ((NU8) 61);
		}
		goto LA27;
		LA32: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2408))) goto LA35;
			(*n).Kind = ((NU8) 58);
		}
		goto LA27;
		LA35: ;
		{
			if (!eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2409))) goto LA38;
			(*n).Kind = ((NU8) 57);
		}
		goto LA27;
		LA38: ;
		{
			NIM_BOOL LOC41;
			LOC41 = 0;
			LOC41 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2410));
			if (LOC41) goto LA42;
			LOC41 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2411));
			LA42: ;
			if (!LOC41) goto LA43;
			(*n).Kind = ((NU8) 54);
		}
		goto LA27;
		LA43: ;
		{
			NIM_BOOL LOC46;
			LOC46 = 0;
			LOC46 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2412));
			if (LOC46) goto LA47;
			LOC46 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2413));
			LA47: ;
			if (!LOC46) goto LA48;
			(*n).Kind = ((NU8) 55);
		}
		goto LA27;
		LA48: ;
		{
			trstnode297009* LOC51;
			result = newrstnode_297097(((NU8) 53));
			(*n).Kind = ((NU8) 0);
			add_297163(result, n);
			LOC51 = 0;
			LOC51 = newrstnode_297139(((NU8) 64), (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol);
			add_297163(result, LOC51);
		}
		LA27: ;
		(*p).Idx += 3;
	}
	goto LA1;
	LA25: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_299948)(trstparser298677* p, NI start, NimStringDesc* expr) {
	NI result;
	NI j;
	result = 0;
	result = start;
	j = 0;
	while (1) {
		NIM_BOOL LOC2;
		NIM_BOOL LOC3;
		LOC2 = 0;
		LOC3 = 0;
		LOC3 = (j < expr->Sup.len);
		if (!(LOC3)) goto LA4;
		LOC3 = (result < (*p).Tok->Sup.len);
		LA4: ;
		LOC2 = LOC3;
		if (!(LOC2)) goto LA5;
		LOC2 = nsuContinuesWith(expr, (*p).Tok->data[result].Symbol, j);
		LA5: ;
		if (!LOC2) goto LA1;
		j += (*p).Tok->data[result].Symbol->Sup.len;
		result += 1;
	} LA1: ;
	{
		if (!(j < expr->Sup.len)) goto LA8;
		result = 0;
	}
	LA8: ;
	return result;
}

N_NIMCALL(trstnode297009*, parsesmiley_300004)(trstparser298677* p) {
	trstnode297009* result;
	NimStringDesc* key_300061;
	NimStringDesc* val_300062;
	NI i_300066;
	result = 0;
	{
		if (!!((((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(58)) || ((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(59)) || ((NU8)((*p).Tok->data[(*p).Idx].Symbol->data[0])) == ((NU8)(56))))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	key_300061 = 0;
	val_300062 = 0;
	i_300066 = 0;
	{
		if (!(((NI) (i_300066)) <= 33)) goto LA7;
		while (1) {
			NI m;
			key_300061 = smilies_298073[(i_300066)- 0].Field0;
			val_300062 = smilies_298073[(i_300066)- 0].Field1;
			m = matchverbatim_299948(&(*p), (*p).Idx, key_300061);
			{
				NimStringDesc* LOC14;
				if (!(0 < m)) goto LA12;
				(*p).Idx = m;
				result = newrstnode_297097(((NU8) 63));
				LOC14 = 0;
				LOC14 = (*result).Text; (*result).Text = copyStringRC1(val_300062);
				if (LOC14) nimGCunrefNoCycle(LOC14);
				goto BeforeRet;
			}
			LA12: ;
			{
				if (!(33 <= ((NI) (i_300066)))) goto LA17;
				goto LA9;
			}
			LA17: ;
			i_300066 += 1;
		} LA9: ;
	}
	LA7: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, find_300231)(NimStringDesc** a_300236, NI a_300236Len0, NimStringDesc* item_300238) {
	NI result;
	NimStringDesc* i_300251;
	NI i_300269;
	result = 0;
	i_300251 = 0;
	i_300269 = 0;
	while (1) {
		if (!(i_300269 < a_300236Len0)) goto LA1;
		i_300251 = a_300236[i_300269];
		{
			if (!eqStrings(i_300251, item_300238)) goto LA4;
			goto BeforeRet;
		}
		LA4: ;
		result += 1;
		i_300269 += 1;
	} LA1: ;
	result = -1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_300219)(NimStringDesc** a_300225, NI a_300225Len0, NimStringDesc* item_300228) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = find_300231(a_300225, a_300225Len0, item_300228);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isurl_300201)(trstparser298677* p, NI i) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = eqStrings((*p).Tok->data[(NI32)(i + 1)].Symbol, ((NimStringDesc*) &TMP2472));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).Tok->data[(NI32)(i + 2)].Symbol, ((NimStringDesc*) &TMP2473));
	LA4: ;
	LOC2 = LOC3;
	if (!(LOC2)) goto LA5;
	LOC2 = ((*p).Tok->data[(NI32)(i + 3)].Kind == ((NU8) 3));
	LA5: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA6;
	LOC1 = contains_300219(TMP2474, 5, (*p).Tok->data[i].Symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_300277)(trstparser298677* p, trstnode297009* father) {
	{
		NIM_BOOL LOC3;
		trstnode297009* n;
		LOC3 = 0;
		LOC3 = isurl_300201(&(*p), (*p).Idx);
		if (!LOC3) goto LA4;
		n = newrstnode_297097(((NU8) 37));
		while (1) {
			trstnode297009* LOC14;
			switch ((*p).Tok->data[(*p).Idx].Kind) {
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!!(((120 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0))) goto LA11;
					goto LA6;
				}
				LA11: ;
			}
			break;
			default:
			{
				goto LA6;
			}
			break;
			}
			LOC14 = 0;
			LOC14 = newleaf_299434(p);
			add_297163(n, LOC14);
			(*p).Idx += 1;
		} LA6: ;
		add_297163(father, n);
	}
	goto LA1;
	LA4: ;
	{
		trstnode297009* n;
		n = newleaf_299434(p);
		(*p).Idx += 1;
		{
			if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2403))) goto LA18;
			n = parsepostfix_299897(p, n);
		}
		LA18: ;
		add_297163(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_300802)(trstparser298677* p, trstnode297009* father) {
	switch ((*p).Tok->data[(*p).Idx].Kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			trstnode297009* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2395));
			if (!LOC4) goto LA5;
			n = newrstnode_297097(((NU8) 59));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2395), NIM_TRUE);
			add_297163(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			trstnode297009* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2400));
			if (!LOC8) goto LA9;
			n = newrstnode_297097(((NU8) 58));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2400), NIM_TRUE);
			add_297163(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			trstnode297009* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2369));
			if (!LOC12) goto LA13;
			n = newrstnode_297097(((NU8) 57));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2369), NIM_TRUE);
			add_297163(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			trstnode297009* 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*) &TMP2401));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).Idx += 1;
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_300718(p);
			add_297163(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			trstnode297009* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2397));
			if (!LOC22) goto LA23;
			n = newrstnode_297097(((NU8) 61));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2397), NIM_FALSE);
			add_297163(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			trstnode297009* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2402));
			if (!LOC26) goto LA27;
			n = newrstnode_297097(((NU8) 60));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2402), NIM_TRUE);
			n = parsepostfix_299897(p, n);
			add_297163(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			trstnode297009* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_299594(&(*p), ((NimStringDesc*) &TMP2371));
			if (!LOC30) goto LA31;
			n = newrstnode_297097(((NU8) 62));
			parseuntil_300601(p, n, ((NimStringDesc*) &TMP2371), NIM_FALSE);
			add_297163(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				trstnode297009* n;
				if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_300004(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_297163(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_300333(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			trstnode297009* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_300004(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_297163(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_300277(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		trstnode297009* LOC60;
		{
			trstnode297009* n;
			if (!(((*(*p).S).Options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_300004(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_297163(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_299434(p);
		add_297163(father, LOC60);
		(*p).Idx += 1;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
}

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

N_NIMCALL(trstnode297009*, parsefield_301318)(trstparser298677* p) {
	trstnode297009* result;
	NI col;
	trstnode297009* fieldname;
	trstnode297009* fieldbody;
	result = 0;
	result = newrstnode_297097(((NU8) 14));
	col = (*p).Tok->data[(*p).Idx].Col;
	fieldname = newrstnode_297097(((NU8) 15));
	parseuntil_300601(p, fieldname, ((NimStringDesc*) &TMP2472), NIM_FALSE);
	fieldbody = newrstnode_297097(((NU8) 16));
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1)))) goto LA3;
		parseline_301296(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_299007(p, indent);
			parsesection_301312(p, fieldbody);
			popind_299032(p);
		}
		LA11: ;
	}
	LA7: ;
	add_297163(result, fieldname);
	add_297163(result, fieldbody);
	return result;
}

N_NIMCALL(trstnode297009*, parsefields_301348)(trstparser298677* p) {
	trstnode297009* result;
	NIM_BOOL atstart;
	NIM_BOOL LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = ((*p).Idx == 0);
	if (!(LOC1)) goto LA2;
	LOC1 = eqStrings((*p).Tok->data[0].Symbol, ((NimStringDesc*) &TMP2472));
	LA2: ;
	atstart = LOC1;
	{
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI col;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
		if (!(LOC6)) goto LA7;
		LOC6 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2472));
		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_297097(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).Idx += 1;
		}
		LA18: ;
		while (1) {
			trstnode297009* LOC21;
			LOC21 = 0;
			LOC21 = parsefield_301318(p);
			add_297163(result, LOC21);
			{
				NIM_BOOL LOC24;
				NIM_BOOL LOC25;
				LOC24 = 0;
				LOC25 = 0;
				LOC25 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
				if (!(LOC25)) goto LA26;
				LOC25 = ((*p).Tok->data[(*p).Idx].Ival == col);
				LA26: ;
				LOC24 = LOC25;
				if (!(LOC24)) goto LA27;
				LOC24 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2472));
				LA27: ;
				if (!LOC24) goto LA28;
				(*p).Idx += 1;
			}
			goto LA22;
			LA28: ;
			{
				goto LA20;
			}
			LA22: ;
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(trstnode297009*, parsedirective_303617)(trstparser298677* p, NU8 flags) {
	trstnode297009* result;
	trstnode297009* args;
	trstnode297009* options;
	result = 0;
	result = newrstnode_297097(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_297097(((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):
				{
					trstnode297009* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_299434(p);
					add_297163(args, LOC11);
					(*p).Idx += 1;
				}
				break;
				default:
				{
					goto LA9;
				}
				break;
				}
			} LA9: ;
		}
		goto LA5;
		LA7: ;
		{
			if (!((flags &(1<<((((NU8) 3))&7)))!=0)) goto LA14;
			while (1) {
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA16;
				(*p).Idx += 1;
			} LA16: ;
			{
				trstnode297009* LOC21;
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 3))) goto LA19;
				LOC21 = 0;
				LOC21 = newleaf_299434(p);
				add_297163(args, LOC21);
				(*p).Idx += 1;
			}
			goto LA17;
			LA19: ;
			{
				args = NIM_NIL;
			}
			LA17: ;
		}
		goto LA5;
		LA14: ;
		{
			parseline_301296(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_297163(result, args);
	{
		if (!((flags &(1<<((((NU8) 1))&7)))!=0)) goto LA26;
		{
			NIM_BOOL LOC30;
			NIM_BOOL LOC31;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
			if (!(LOC31)) goto LA32;
			LOC31 = (3 <= (*p).Tok->data[(*p).Idx].Ival);
			LA32: ;
			LOC30 = LOC31;
			if (!(LOC30)) goto LA33;
			LOC30 = eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2472));
			LA33: ;
			if (!LOC30) goto LA34;
			options = parsefields_301348(p);
		}
		LA34: ;
	}
	LA26: ;
	add_297163(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_303758)(trstparser298677* 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(trstnode297009*, parsedirective_303774)(trstparser298677* p, NU8 flags, tsectionparser303608 contentparser) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303617(p, flags);
	{
		NIM_BOOL LOC3;
		trstnode297009* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_303758(&(*p));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_299007(p, (*p).Tok->data[(*p).Idx].Ival);
		content = contentparser(p);
		popind_299032(p);
		add_297163(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_297163(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode297009*, dirinclude_303799)(trstparser298677* p) {
	trstnode297009* result;
	trstnode297009* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_303774(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_298055((*n).Sons->data[0]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	path = (*(*p).S).Findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_298956(&(*p), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			trstnode297009* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2407));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_297097(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_10440(path);
			LOC13 = 0;
			LOC13 = newrstnode_297139(((NU8) 64), LOC12);
			add_297163(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			trstparser298677 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)&q, 0, sizeof(q));
			q.Sup.m_type = (&NTI298677);
			initparser_299077(&q, (*p).S);
			q.Filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_10440(path);
			LOC16 = 0;
			LOC16 = gettokens_298463(LOC15, NIM_FALSE, &q.Tok);
			q.Col += LOC16;
			result = parsedoc_302480(&q);
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(trstnode297009*, dirimage_304203)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 7, NIM_NIL);
	(*result).Kind = ((NU8) 45);
	return result;
}

N_NIMCALL(trstnode297009*, dirfigure_304211)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 7, parsesectionwrapper_303521);
	(*result).Kind = ((NU8) 46);
	return result;
}

N_NIMCALL(trstnode297009*, dirtitle_304219)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 43);
	return result;
}

N_NIMCALL(trstnode297009*, dircontainer_303838)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 1, parsesectionwrapper_303521);
	(*result).Kind = ((NU8) 50);
	return result;
}

N_NIMCALL(trstnode297009*, dircontents_304227)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 1, NIM_NIL);
	(*result).Kind = ((NU8) 44);
	return result;
}

N_NIMCALL(trstnode297009*, parsedirbody_303791)(trstparser298677* p, tsectionparser303608 contentparser) {
	trstnode297009* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_303758(&(*p));
		if (!LOC3) goto LA4;
		pushind_299007(p, (*p).Tok->data[(*p).Idx].Ival);
		result = contentparser(p);
		popind_299032(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_304244)(trstparser298677* p, trstnode297009** result, NU8 kind, tsectionparser303608 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_298059((*result), ((NimStringDesc*) &TMP2479));
	{
		NimStringDesc* path;
		if (!(0 < filename->Sup.len)) goto LA3;
		path = (*(*p).S).Findfile(filename);
		{
			if (!(path->Sup.len == 0)) goto LA7;
			rstmessage_298956(&(*p), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			trstnode297009* LOC10;
			f = readfile_10440(path);
			unsureAsgnRef((void**) &(*result), newrstnode_297097(kind));
			LOC10 = 0;
			LOC10 = newrstnode_297139(((NU8) 64), f);
			add_297163((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		trstnode297009* LOC12;
		(*(*result)).Kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_303791(p, contentparser);
		add_297163((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(trstnode297009*, dirraw_304258)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303617(p, 11);
	{
		if (!!(((*result).Sons->data[0] == NIM_NIL))) goto LA3;
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = nsuCmpIgnoreCase((*(*(*result).Sons->data[0]).Sons->data[0]).Text, ((NimStringDesc*) &TMP2482));
			if (!(LOC7 == 0)) goto LA8;
			dirrawaux_304244(p, &result, ((NU8) 48), parseliteralblock_301488);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).Sons->data[0]).Sons->data[0]).Text, ((NimStringDesc*) &TMP2483));
			if (!(LOC11 == 0)) goto LA12;
			dirrawaux_304244(p, &result, ((NU8) 49), parseliteralblock_301488);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_298956(&(*p), ((NU8) 5), (*(*(*result).Sons->data[0]).Sons->data[0]).Text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_304244(p, &result, ((NU8) 42), parsesectionwrapper_303521);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode297009*, dircodeblock_303827)(trstparser298677* p) {
	trstnode297009* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_303774(p, 3, parseliteralblock_301488);
	LOC1 = 0;
	LOC1 = getfieldvalue_298059(result, ((NimStringDesc*) &TMP2479));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		NimStringDesc* path;
		trstnode297009* n;
		NimStringDesc* LOC10;
		trstnode297009* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).S).Findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_298956(&(*p), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_297097(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_10440(path);
		LOC11 = 0;
		LOC11 = newrstnode_297139(((NU8) 64), LOC10);
		add_297163(n, LOC11);
		asgnRefNoCycle((void**) &(*result).Sons->data[2], n);
	}
	LA4: ;
	(*result).Kind = ((NU8) 47);
	return result;
}

N_NIMCALL(trstnode297009*, dirindex_304235)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsedirective_303774(p, 0, parsesectionwrapper_303521);
	(*result).Kind = ((NU8) 51);
	return result;
}

N_NIMCALL(trstnode297009*, getreferencename_299441)(trstparser298677* p, NimStringDesc* endstr) {
	trstnode297009* result;
	trstnode297009* res;
	result = 0;
	res = newrstnode_297097(((NU8) 0));
	while (1) {
		switch ((*p).Tok->data[(*p).Idx].Kind) {
		case ((NU8) 3):
		case ((NU8) 6):
		case ((NU8) 2):
		{
			trstnode297009* LOC3;
			LOC3 = 0;
			LOC3 = newleaf_299434(p);
			add_297163(res, LOC3);
		}
		break;
		case ((NU8) 5):
		{
			{
				if (!eqStrings((*p).Tok->data[(*p).Idx].Symbol, endstr)) goto LA7;
				(*p).Idx += 1;
				goto LA1;
			}
			goto LA5;
			LA7: ;
			{
				trstnode297009* LOC10;
				LOC10 = 0;
				LOC10 = newleaf_299434(p);
				add_297163(res, LOC10);
			}
			LA5: ;
		}
		break;
		default:
		{
			rstmessage_298956(&(*p), ((NU8) 1), endstr);
			goto LA1;
		}
		break;
		}
		(*p).Idx += 1;
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(trstnode297009*, untileol_299483)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = newrstnode_297097(((NU8) 0));
	while (1) {
		trstnode297009* LOC2;
		if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA1;
		LOC2 = 0;
		LOC2 = newleaf_299434(p);
		add_297163(result, LOC2);
		(*p).Idx += 1;
	} LA1: ;
	return result;
}

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

N_NIMCALL(void, setsub_299300)(trstparser298677* p, NimStringDesc* key, trstnode297009* value) {
	NI length;
	NI i_299330;
	NI HEX3Atmp_299347;
	NI res_299349;
	NimStringDesc* LOC6;
	length = (*(*p).S).Subs->Sup.len;
	i_299330 = 0;
	HEX3Atmp_299347 = 0;
	HEX3Atmp_299347 = (NI32)(length - 1);
	res_299349 = 0;
	while (1) {
		if (!(res_299349 <= HEX3Atmp_299347)) goto LA1;
		i_299330 = res_299349;
		{
			if (!eqStrings(key, (*(*p).S).Subs->data[i_299330].Key)) goto LA4;
			asgnRefNoCycle((void**) &(*(*p).S).Subs->data[i_299330].Value, value);
			goto BeforeRet;
		}
		LA4: ;
		res_299349 += 1;
	} LA1: ;
	(*(*p).S).Subs = (TY298687*) setLengthSeq(&((*(*p).S).Subs)->Sup, sizeof(tsubstitution298671), (NI32)(length + 1));
	LOC6 = 0;
	LOC6 = (*(*p).S).Subs->data[length].Key; (*(*p).S).Subs->data[length].Key = copyStringRC1(key);
	if (LOC6) nimGCunrefNoCycle(LOC6);
	asgnRefNoCycle((void**) &(*(*p).S).Subs->data[length].Value, value);
	BeforeRet: ;
}

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

N_NIMCALL(trstnode297009*, parsedotdot_301483)(trstparser298677* p) {
	trstnode297009* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).Tok->data[(*p).Idx].Col;
	(*p).Idx += 1;
	d = getdirective_300953(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_299007(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_301220(d);
		switch (LOC5) {
		case ((NU8) 8):
		{
			result = dirinclude_303799(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirimage_304203(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dirfigure_304211(p);
		}
		break;
		case ((NU8) 11):
		{
			result = dirtitle_304219(p);
		}
		break;
		case ((NU8) 4):
		{
			result = dircontainer_303838(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontents_304227(p);
		}
		break;
		case ((NU8) 10):
		{
			{
				if (!(((*(*p).S).Options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_304258(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_298956(&(*p), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_303827(p);
		}
		break;
		case ((NU8) 9):
		{
			result = dirindex_304235(p);
		}
		break;
		default:
		{
			rstmessage_298956(&(*p), ((NU8) 5), d);
		}
		break;
		}
		popind_299032(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC22;
		trstnode297009* a;
		trstnode297009* b;
		NimStringDesc* LOC29;
		LOC22 = 0;
		LOC22 = match_299647(&(*p), (*p).Idx, ((NimStringDesc*) &TMP2484));
		if (!LOC22) goto LA23;
		(*p).Idx += 2;
		a = getreferencename_299441(p, ((NimStringDesc*) &TMP2472));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA27;
			(*p).Idx += 1;
		}
		LA27: ;
		b = untileol_299483(p);
		LOC29 = 0;
		LOC29 = rstnodetorefname_298051(a);
		setref_299354(p, LOC29, b);
	}
	goto LA1;
	LA23: ;
	{
		NIM_BOOL LOC31;
		trstnode297009* a;
		trstnode297009* b;
		NimStringDesc* LOC48;
		LOC31 = 0;
		LOC31 = match_299647(&(*p), (*p).Idx, ((NimStringDesc*) &TMP2485));
		if (!LOC31) goto LA32;
		(*p).Idx += 2;
		a = getreferencename_299441(p, ((NimStringDesc*) &TMP2371));
		b = 0;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA36;
			(*p).Idx += 1;
		}
		LA36: ;
		{
			NI LOC40;
			LOC40 = 0;
			LOC40 = nsuCmpIgnoreStyle((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2486));
			if (!(LOC40 == 0)) goto LA41;
			(*p).Idx += 1;
			expect_299521(p, ((NimStringDesc*) &TMP2367));
			b = untileol_299483(p);
		}
		goto LA38;
		LA41: ;
		{
			NI LOC44;
			LOC44 = 0;
			LOC44 = nsuCmpIgnoreStyle((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2388));
			if (!(LOC44 == 0)) goto LA45;
			(*p).Idx += 1;
			b = dirimage_304203(p);
		}
		goto LA38;
		LA45: ;
		{
			rstmessage_298956(&(*p), ((NU8) 5), (*p).Tok->data[(*p).Idx].Symbol);
		}
		LA38: ;
		LOC48 = 0;
		LOC48 = addnodes_298055(a);
		setsub_299300(p, LOC48, b);
	}
	goto LA1;
	LA32: ;
	{
		NIM_BOOL LOC50;
		trstnode297009* a;
		trstnode297009* b;
		NimStringDesc* LOC57;
		LOC50 = 0;
		LOC50 = match_299647(&(*p), (*p).Idx, ((NimStringDesc*) &TMP2487));
		if (!LOC50) goto LA51;
		(*p).Idx += 2;
		a = getreferencename_299441(p, ((NimStringDesc*) &TMP2488));
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA55;
			(*p).Idx += 1;
		}
		LA55: ;
		b = untileol_299483(p);
		LOC57 = 0;
		LOC57 = rstnodetorefname_298051(a);
		setref_299354(p, LOC57, b);
	}
	goto LA1;
	LA51: ;
	{
		result = parsecomment_301108(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(trstnode297009*, parseenumlist_303284)(trstparser298677* p) {
	trstnode297009* result;
	NI w;
	result = 0;
	result = NIM_NIL;
	w = 0;
	while (1) {
		if (!(w <= 2)) goto LA1;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_299647(&(*p), (*p).Idx, wildcards_303289[(w)- 0]);
			if (!LOC4) goto LA5;
			goto LA1;
		}
		LA5: ;
		w += 1;
	} LA1: ;
	{
		NI col;
		NI j;
		if (!(w <= 2)) goto LA9;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_297097(((NU8) 7));
		(*p).Idx += (NI32)(wildpos_303294[(w)- 0] + 3);
		j = tokenafternewline_301613(&(*p));
		{
			NIM_BOOL LOC13;
			LOC13 = 0;
			LOC13 = ((*p).Tok->data[j].Col == (*p).Tok->data[(*p).Idx].Col);
			if (LOC13) goto LA14;
			LOC13 = match_299647(&(*p), j, wildcards_303289[(w)- 0]);
			LA14: ;
			if (!LOC13) goto LA15;
			pushind_299007(p, (*p).Tok->data[(*p).Idx].Col);
			while (1) {
				trstnode297009* item;
				item = newrstnode_297097(((NU8) 8));
				parsesection_301312(p, item);
				add_297163(result, item);
				{
					NIM_BOOL LOC20;
					NIM_BOOL LOC21;
					LOC20 = 0;
					LOC21 = 0;
					LOC21 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
					if (!(LOC21)) goto LA22;
					LOC21 = ((*p).Tok->data[(*p).Idx].Ival == col);
					LA22: ;
					LOC20 = LOC21;
					if (!(LOC20)) goto LA23;
					LOC20 = match_299647(&(*p), (NI32)((*p).Idx + 1), wildcards_303289[(w)- 0]);
					LA23: ;
					if (!LOC20) goto LA24;
					(*p).Idx += (NI32)(wildpos_303294[(w)- 0] + 4);
				}
				goto LA18;
				LA24: ;
				{
					goto LA17;
				}
				LA18: ;
			} LA17: ;
			popind_299032(p);
		}
		goto LA11;
		LA15: ;
		{
			(*p).Idx -= (NI32)(wildpos_303294[(w)- 0] + 3);
			result = NIM_NIL;
		}
		LA11: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(trstnode297009*, parsedefinitionlist_303193)(trstparser298677* p) {
	trstnode297009* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_301613(&(*p));
	j = (NI32)(LOC1 - 1);
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI LOC9;
		NI col;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = (1 <= j);
		if (!(LOC6)) goto LA7;
		LOC6 = ((*p).Tok->data[j].Kind == ((NU8) 1));
		LA7: ;
		LOC5 = LOC6;
		if (!(LOC5)) goto LA8;
		LOC9 = 0;
		LOC9 = currind_299001(&(*p));
		LOC5 = (LOC9 < (*p).Tok->data[j].Ival);
		LA8: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA10;
		LOC4 = !(eqStrings((*p).Tok->data[(NI32)(j - 1)].Symbol, ((NimStringDesc*) &TMP2367)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).Tok->data[(*p).Idx].Col;
		result = newrstnode_297097(((NU8) 9));
		while (1) {
			trstnode297009* a;
			j = (*p).Idx;
			a = newrstnode_297097(((NU8) 11));
			parseline_301296(p, a);
			{
				NIM_BOOL LOC16;
				NIM_BOOL LOC17;
				NIM_BOOL LOC18;
				NI LOC20;
				trstnode297009* b;
				trstnode297009* c;
				LOC16 = 0;
				LOC17 = 0;
				LOC18 = 0;
				LOC18 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
				if (!(LOC18)) goto LA19;
				LOC20 = 0;
				LOC20 = currind_299001(&(*p));
				LOC18 = (LOC20 < (*p).Tok->data[(*p).Idx].Ival);
				LA19: ;
				LOC17 = LOC18;
				if (!(LOC17)) goto LA21;
				LOC17 = !(eqStrings((*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol, ((NimStringDesc*) &TMP2367)));
				LA21: ;
				LOC16 = LOC17;
				if (!(LOC16)) goto LA22;
				LOC16 = !(((3 &(1<<(((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind)&7)))!=0));
				LA22: ;
				if (!LOC16) goto LA23;
				pushind_299007(p, (*p).Tok->data[(*p).Idx].Ival);
				b = newrstnode_297097(((NU8) 12));
				parsesection_301312(p, b);
				c = newrstnode_297097(((NU8) 10));
				add_297163(c, a);
				add_297163(c, b);
				add_297163(result, c);
				popind_299032(p);
			}
			goto LA14;
			LA23: ;
			{
				(*p).Idx = j;
				goto LA13;
			}
			LA14: ;
			{
				NIM_BOOL LOC28;
				NI LOC32;
				LOC28 = 0;
				LOC28 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1));
				if (!(LOC28)) goto LA29;
				LOC28 = ((*p).Tok->data[(*p).Idx].Ival == col);
				LA29: ;
				if (!LOC28) goto LA30;
				(*p).Idx += 1;
				LOC32 = 0;
				LOC32 = tokenafternewline_301613(&(*p));
				j = (NI32)(LOC32 - 1);
				{
					NIM_BOOL LOC35;
					NIM_BOOL LOC36;
					NIM_BOOL LOC37;
					NIM_BOOL LOC38;
					LOC35 = 0;
					LOC36 = 0;
					LOC37 = 0;
					LOC38 = 0;
					LOC38 = (1 <= j);
					if (!(LOC38)) goto LA39;
					LOC38 = ((*p).Tok->data[j].Kind == ((NU8) 1));
					LA39: ;
					LOC37 = LOC38;
					if (!(LOC37)) goto LA40;
					LOC37 = (col < (*p).Tok->data[j].Ival);
					LA40: ;
					LOC36 = LOC37;
					if (!(LOC36)) goto LA41;
					LOC36 = !(eqStrings((*p).Tok->data[(NI32)(j - 1)].Symbol, ((NimStringDesc*) &TMP2367)));
					LA41: ;
					LOC35 = LOC36;
					if (!(LOC35)) goto LA42;
					LOC35 = !(((*p).Tok->data[(NI32)(j + 1)].Kind == ((NU8) 1)));
					LA42: ;
					if (!LOC35) goto LA43;
				}
				goto LA33;
				LA43: ;
				{
					goto LA13;
				}
				LA33: ;
			}
			LA30: ;
		} LA13: ;
		{
			NI LOC48;
			LOC48 = 0;
			LOC48 = len_297080(result);
			if (!(LOC48 == 0)) goto LA49;
			result = NIM_NIL;
		}
		LA49: ;
	}
	LA11: ;
	return result;
}

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

N_NIMCALL(void, parseuntilnewline_301304)(trstparser298677* p, trstnode297009* 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_300802(p, father);
		}
		break;
		case ((NU8) 0):
		case ((NU8) 1):
		{
			goto LA1;
		}
		break;
		}
	} LA1: ;
}

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

N_NIMCALL(trstnode297009*, parseheadline_301863)(trstparser298677* p) {
	trstnode297009* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_297097(((NU8) 1));
	parseuntilnewline_301304(p, result);
	c = (*p).Tok->data[(NI32)((*p).Idx + 1)].Symbol->data[0];
	(*p).Idx += 2;
	(*result).Level = getlevel_301587((*(*p).S).Underlinetolevel, &(*(*p).S).Ulevel, c);
	return result;
}

N_NIMCALL(trstnode297009*, parseoverline_302899)(trstparser298677* p) {
	trstnode297009* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).Tok->data[(*p).Idx].Symbol->data[0];
	(*p).Idx += 2;
	result = newrstnode_297097(((NU8) 2));
	while (1) {
		parseuntilnewline_301304(p, result);
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA4;
			(*p).Idx += 1;
			{
				NI LOC8;
				trstnode297009* LOC11;
				LOC8 = 0;
				LOC8 = currind_299001(&(*p));
				if (!(LOC8 < (*p).Tok->data[(NI32)((*p).Idx - 1)].Ival)) goto LA9;
				LOC11 = 0;
				LOC11 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2399));
				add_297163(result, LOC11);
			}
			goto LA6;
			LA9: ;
			{
				goto LA1;
			}
			LA6: ;
		}
		goto LA2;
		LA4: ;
		{
			goto LA1;
		}
		LA2: ;
	} LA1: ;
	(*result).Level = getlevel_301587((*(*p).S).Overlinetolevel, &(*(*p).S).Olevel, c);
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4))) goto LA16;
		(*p).Idx += 1;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA20;
			(*p).Idx += 1;
		}
		LA20: ;
	}
	LA16: ;
	return result;
}

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

N_NIMCALL(void, getcolumns_302231)(trstparser298677* p, TY298698** cols) {
	NI l;
	l = 0;
	while (1) {
		l += 1;
		(*cols) = (TY298698*) setLengthSeq(&((*cols))->Sup, sizeof(NI), l);
		(*cols)->data[(NI32)(l - 1)] = tokend_302225(&(*p));
		(*p).Idx += 1;
		{
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2)))) goto LA4;
			goto LA1;
		}
		LA4: ;
		(*p).Idx += 1;
		{
			if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4)))) goto LA8;
			goto LA1;
		}
		LA8: ;
	} LA1: ;
	{
		if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA12;
		(*p).Idx += 1;
	}
	LA12: ;
	(*cols)->data[(NI32)(l - 1)] = 32000;
}

N_NIMCALL(trstnode297009*, parsesimpletable_302485)(trstparser298677* p) {
	trstnode297009* result;
	TY298698* cols;
	TY110805* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	trstparser298677 q;
	trstnode297009* a;
	trstnode297009* 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 = (&NTI298677);
	a = 0;
	b = 0;
	result = newrstnode_297097(((NU8) 29));
	cols = (TY298698*) newSeq((&NTI298698), 0);
	row = (TY110805*) newSeq((&NTI110805), 0);
	a = NIM_NIL;
	c = (*p).Tok->data[(*p).Idx].Symbol->data[0];
	while (1) {
		NI j_302640;
		NI HEX3Atmp_302805;
		NI res_302807;
		NI j_302776;
		NI HEX3Atmp_302813;
		NI res_302815;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 4))) goto LA4;
			last = tokenafternewline_301613(&(*p));
			{
				if (!((3 &(1<<(((*p).Tok->data[last].Kind)&7)))!=0)) goto LA8;
				(*p).Idx = last;
				goto LA1;
			}
			LA8: ;
			getcolumns_302231(p, &cols);
			row = (TY110805*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), cols->Sup.len);
			{
				NI j_302618;
				NI HEX3Atmp_302801;
				NI LOC14;
				NI res_302803;
				if (!!((a == NIM_NIL))) goto LA12;
				j_302618 = 0;
				HEX3Atmp_302801 = 0;
				LOC14 = 0;
				LOC14 = len_297080(a);
				HEX3Atmp_302801 = (NI32)(LOC14 - 1);
				res_302803 = 0;
				while (1) {
					if (!(res_302803 <= HEX3Atmp_302801)) goto LA15;
					j_302618 = res_302803;
					(*(*a).Sons->data[j_302618]).Kind = ((NU8) 32);
					res_302803 += 1;
				} LA15: ;
			}
			LA12: ;
		}
		LA4: ;
		{
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0))) goto LA18;
			goto LA1;
		}
		LA18: ;
		j_302640 = 0;
		HEX3Atmp_302805 = 0;
		HEX3Atmp_302805 = (row->Sup.len-1);
		res_302807 = 0;
		while (1) {
			NimStringDesc* LOC21;
			if (!(res_302807 <= HEX3Atmp_302805)) goto LA20;
			j_302640 = res_302807;
			LOC21 = 0;
			LOC21 = row->data[j_302640]; row->data[j_302640] = copyStringRC1(((NimStringDesc*) &TMP1989));
			if (LOC21) nimGCunrefNoCycle(LOC21);
			res_302807 += 1;
		} LA20: ;
		line = (*p).Tok->data[(*p).Idx].Line;
		while (1) {
			NI j_302763;
			NI HEX3Atmp_302809;
			NI res_302811;
			i = 0;
			while (1) {
				if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA23;
				{
					NI LOC26;
					LOC26 = 0;
					LOC26 = tokend_302225(&(*p));
					if (!(LOC26 <= cols->data[i])) goto LA27;
					row->data[i] = resizeString(row->data[i], (*p).Tok->data[(*p).Idx].Symbol->Sup.len + 0);
appendString(row->data[i], (*p).Tok->data[(*p).Idx].Symbol);
					(*p).Idx += 1;
				}
				goto LA24;
				LA27: ;
				{
					{
						if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2))) goto LA32;
						(*p).Idx += 1;
					}
					LA32: ;
					i += 1;
				}
				LA24: ;
			} LA23: ;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA36;
				(*p).Idx += 1;
			}
			LA36: ;
			{
				NI LOC40;
				LOC40 = 0;
				LOC40 = tokend_302225(&(*p));
				if (!(LOC40 <= cols->data[0])) goto LA41;
				goto LA22;
			}
			LA41: ;
			{
				if (!((17 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0)) goto LA45;
				goto LA22;
			}
			LA45: ;
			j_302763 = 0;
			HEX3Atmp_302809 = 0;
			HEX3Atmp_302809 = (row->Sup.len-1);
			res_302811 = 1;
			while (1) {
				if (!(res_302811 <= HEX3Atmp_302809)) goto LA47;
				j_302763 = res_302811;
				row->data[j_302763] = addChar(row->data[j_302763], 10);
				res_302811 += 1;
			} LA47: ;
		} LA22: ;
		a = newrstnode_297097(((NU8) 31));
		j_302776 = 0;
		HEX3Atmp_302813 = 0;
		HEX3Atmp_302813 = (row->Sup.len-1);
		res_302815 = 0;
		while (1) {
			NI LOC49;
			trstnode297009* LOC50;
			if (!(res_302815 <= HEX3Atmp_302813)) goto LA48;
			j_302776 = res_302815;
			initparser_299077(&q, (*p).S);
			q.Col = cols->data[j_302776];
			q.Line = (NI32)(line - 1);
			q.Filename = copyString((*p).Filename);
			LOC49 = 0;
			LOC49 = gettokens_298463(row->data[j_302776], NIM_FALSE, &q.Tok);
			q.Col += LOC49;
			b = newrstnode_297097(((NU8) 33));
			LOC50 = 0;
			LOC50 = parsedoc_302480(&q);
			add_297163(b, LOC50);
			add_297163(a, b);
			res_302815 += 1;
		} LA48: ;
		add_297163(result, a);
	} LA1: ;
	return result;
}

N_NIMCALL(trstnode297009*, parseoptionlist_303072)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = newrstnode_297097(((NU8) 17));
	while (1) {
		{
			NIM_BOOL LOC4;
			trstnode297009* a;
			trstnode297009* b;
			trstnode297009* c;
			NI j;
			LOC4 = 0;
			LOC4 = isoptionlist_301698(&(*p));
			if (!LOC4) goto LA5;
			a = newrstnode_297097(((NU8) 19));
			b = newrstnode_297097(((NU8) 23));
			c = newrstnode_297097(((NU8) 18));
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = match_299647(&(*p), (*p).Idx, ((NimStringDesc*) &TMP2379));
				if (!LOC9) goto LA10;
				(*p).Idx += 1;
			}
			LA10: ;
			while (1) {
				trstnode297009* LOC19;
				if (!!(((3 &(1<<(((*p).Tok->data[(*p).Idx].Kind)&7)))!=0))) goto LA12;
				{
					NIM_BOOL LOC15;
					LOC15 = 0;
					LOC15 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 2));
					if (!(LOC15)) goto LA16;
					LOC15 = (1 < (*p).Tok->data[(*p).Idx].Symbol->Sup.len);
					LA16: ;
					if (!LOC15) goto LA17;
					(*p).Idx += 1;
					goto LA12;
				}
				LA17: ;
				LOC19 = 0;
				LOC19 = newleaf_299434(p);
				add_297163(a, LOC19);
				(*p).Idx += 1;
			} LA12: ;
			j = tokenafternewline_301613(&(*p));
			{
				NIM_BOOL LOC22;
				NIM_BOOL LOC23;
				NI LOC26;
				LOC22 = 0;
				LOC23 = 0;
				LOC23 = (0 < j);
				if (!(LOC23)) goto LA24;
				LOC23 = ((*p).Tok->data[(NI32)(j - 1)].Kind == ((NU8) 1));
				LA24: ;
				LOC22 = LOC23;
				if (!(LOC22)) goto LA25;
				LOC26 = 0;
				LOC26 = currind_299001(&(*p));
				LOC22 = (LOC26 < (*p).Tok->data[(NI32)(j - 1)].Ival);
				LA25: ;
				if (!LOC22) goto LA27;
				pushind_299007(p, (*p).Tok->data[(NI32)(j - 1)].Ival);
				parsesection_301312(p, b);
				popind_299032(p);
			}
			goto LA20;
			LA27: ;
			{
				parseline_301296(p, b);
			}
			LA20: ;
			{
				if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA32;
				(*p).Idx += 1;
			}
			LA32: ;
			add_297163(c, a);
			add_297163(c, b);
			add_297163(result, c);
		}
		goto LA2;
		LA5: ;
		{
			goto LA1;
		}
		LA2: ;
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_301788)(trstparser298677* p, trstnode297009* result) {
	while (1) {
		switch ((*p).Tok->data[(*p).Idx].Kind) {
		case ((NU8) 1):
		{
			{
				if (!((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 1))) goto LA5;
				(*p).Idx += 1;
				goto LA1;
			}
			goto LA3;
			LA5: ;
			{
				NI LOC8;
				NU8 LOC11;
				LOC8 = 0;
				LOC8 = currind_299001(&(*p));
				if (!((*p).Tok->data[(*p).Idx].Ival == LOC8)) goto LA9;
				(*p).Idx += 1;
				LOC11 = 0;
				LOC11 = whichsection_301704(&(*p));
				switch (LOC11) {
				case ((NU8) 4):
				case ((NU8) 64):
				case ((NU8) 1):
				case ((NU8) 2):
				case ((NU8) 40):
				{
					trstnode297009* LOC13;
					LOC13 = 0;
					LOC13 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2399));
					add_297163(result, LOC13);
				}
				break;
				case ((NU8) 26):
				{
					trstnode297009* LOC15;
					LOC15 = 0;
					LOC15 = parselineblock_301719(p);
					addifnotnil_297187(result, LOC15);
				}
				break;
				default:
				{
					goto LA1;
				}
				break;
				}
			}
			goto LA3;
			LA9: ;
			{
				goto LA1;
			}
			LA3: ;
		}
		break;
		case ((NU8) 5):
		{
			{
				NIM_BOOL LOC21;
				NIM_BOOL LOC22;
				NI LOC25;
				trstnode297009* LOC28;
				trstnode297009* LOC29;
				LOC21 = 0;
				LOC22 = 0;
				LOC22 = eqStrings((*p).Tok->data[(*p).Idx].Symbol, ((NimStringDesc*) &TMP2367));
				if (!(LOC22)) goto LA23;
				LOC22 = ((*p).Tok->data[(NI32)((*p).Idx + 1)].Kind == ((NU8) 1));
				LA23: ;
				LOC21 = LOC22;
				if (!(LOC21)) goto LA24;
				LOC25 = 0;
				LOC25 = currind_299001(&(*p));
				LOC21 = (LOC25 < (*p).Tok->data[(NI32)((*p).Idx + 1)].Ival);
				LA24: ;
				if (!LOC21) goto LA26;
				LOC28 = 0;
				LOC28 = newrstnode_297139(((NU8) 64), ((NimStringDesc*) &TMP2472));
				add_297163(result, LOC28);
				(*p).Idx += 1;
				LOC29 = 0;
				LOC29 = parseliteralblock_301488(p);
				add_297163(result, LOC29);
				goto LA1;
			}
			goto LA19;
			LA26: ;
			{
				parseinline_300802(p, result);
			}
			LA19: ;
		}
		break;
		case ((NU8) 2):
		case ((NU8) 3):
		case ((NU8) 4):
		case ((NU8) 6):
		{
			parseinline_300802(p, result);
		}
		break;
		default:
		{
			goto LA1;
		}
		break;
		}
	} LA1: ;
}

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

N_NIMCALL(void, parsesection_301312)(trstparser298677* p, trstnode297009* result) {
	while (1) {
		NIM_BOOL leave;
		trstnode297009* a;
		NU8 k;
		leave = NIM_FALSE;
		while (1) {
			if (!((*p).Tok->data[(*p).Idx].Kind == ((NU8) 1))) goto LA2;
			{
				NI LOC5;
				LOC5 = 0;
				LOC5 = currind_299001(&(*p));
				if (!(LOC5 == (*p).Tok->data[(*p).Idx].Ival)) goto LA6;
				(*p).Idx += 1;
			}
			goto LA3;
			LA6: ;
			{
				NI LOC9;
				trstnode297009* a;
				LOC9 = 0;
				LOC9 = currind_299001(&(*p));
				if (!(LOC9 < (*p).Tok->data[(*p).Idx].Ival)) goto LA10;
				pushind_299007(p, (*p).Tok->data[(*p).Idx].Ival);
				a = newrstnode_297097(((NU8) 28));
				parsesection_301312(p, a);
				add_297163(result, a);
				popind_299032(p);
			}
			goto LA3;
			LA10: ;
			{
				leave = NIM_TRUE;
				goto LA2;
			}
			LA3: ;
		} LA2: ;
		{
			NIM_BOOL LOC15;
			LOC15 = 0;
			LOC15 = leave;
			if (LOC15) goto LA16;
			LOC15 = ((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0));
			LA16: ;
			if (!LOC15) goto LA17;
			goto LA1;
		}
		LA17: ;
		a = NIM_NIL;
		k = whichsection_301704(&(*p));
		switch (k) {
		case ((NU8) 24):
		{
			(*p).Idx += 1;
			a = parseliteralblock_301488(p);
		}
		break;
		case ((NU8) 5):
		{
			a = parsebulletlist_303002(p);
		}
		break;
		case ((NU8) 26):
		{
			a = parselineblock_301719(p);
		}
		break;
		case ((NU8) 40):
		{
			a = parsedotdot_301483(p);
		}
		break;
		case ((NU8) 7):
		{
			a = parseenumlist_303284(p);
		}
		break;
		case ((NU8) 64):
		{
			rstmessage_298972(&(*p), ((NU8) 3));
		}
		break;
		case ((NU8) 4):
		{
		}
		break;
		case ((NU8) 9):
		{
			a = parsedefinitionlist_303193(p);
		}
		break;
		case ((NU8) 13):
		{
			{
				if (!(0 < (*p).Idx)) goto LA30;
				(*p).Idx -= 1;
			}
			LA30: ;
			a = parsefields_301348(p);
		}
		break;
		case ((NU8) 3):
		{
			a = parsetransition_302826(p);
		}
		break;
		case ((NU8) 1):
		{
			a = parseheadline_301863(p);
		}
		break;
		case ((NU8) 2):
		{
			a = parseoverline_302899(p);
		}
		break;
		case ((NU8) 29):
		{
			a = parsesimpletable_302485(p);
		}
		break;
		case ((NU8) 17):
		{
			a = parseoptionlist_303072(p);
		}
		break;
		default:
		{
		}
		break;
		}
		{
			NIM_BOOL LOC40;
			LOC40 = 0;
			LOC40 = (a == NIM_NIL);
			if (!(LOC40)) goto LA41;
			LOC40 = !((k == ((NU8) 40)));
			LA41: ;
			if (!LOC40) goto LA42;
			a = newrstnode_297097(((NU8) 4));
			parseparagraph_301788(p, a);
		}
		LA42: ;
		addifnotnil_297187(result, a);
	} LA1: ;
	{
		NIM_BOOL LOC46;
		NU8 LOC47;
		NU8 LOC49;
		LOC46 = 0;
		LOC47 = 0;
		LOC47 = sonkind_303380(result, 0);
		LOC46 = (LOC47 == ((NU8) 4));
		if (!(LOC46)) goto LA48;
		LOC49 = 0;
		LOC49 = sonkind_303380(result, 1);
		LOC46 = !((LOC49 == ((NU8) 4)));
		LA48: ;
		if (!LOC46) goto LA50;
		(*(*result).Sons->data[0]).Kind = ((NU8) 0);
	}
	LA50: ;
}

N_NIMCALL(trstnode297009*, parsesectionwrapper_303521)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = newrstnode_297097(((NU8) 0));
	parsesection_301312(p, result);
	while (1) {
		NIM_BOOL LOC2;
		NI LOC4;
		LOC2 = 0;
		LOC2 = ((*result).Kind == ((NU8) 0));
		if (!(LOC2)) goto LA3;
		LOC4 = 0;
		LOC4 = len_297080(result);
		LOC2 = (LOC4 == 1);
		LA3: ;
		if (!LOC2) goto LA1;
		result = (*result).Sons->data[0];
	} LA1: ;
	return result;
}

N_NIMCALL(trstnode297009*, parsedoc_302480)(trstparser298677* p) {
	trstnode297009* result;
	result = 0;
	result = parsesectionwrapper_303521(p);
	{
		if (!!(((*p).Tok->data[(*p).Idx].Kind == ((NU8) 0)))) goto LA3;
		rstmessage_298972(&(*p), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(trstnode297009*, rstparse_304550)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, tfindfilehandler298018 findfile, tmsghandler298016 msghandler) {
	trstnode297009* result;
	trstparser298677 p;
	tsharedstate298673* LOC1;
	NI LOC2;
	trstnode297009* LOC3;
	result = 0;
	memset((void*)&p, 0, sizeof(p));
	p.Sup.m_type = (&NTI298677);
	LOC1 = 0;
	LOC1 = newsharedstate_298878(options, findfile, msghandler);
	initparser_299077(&p, LOC1);
	p.Filename = copyString(filename);
	p.Line = line;
	LOC2 = 0;
	LOC2 = gettokens_298463(text, ((options &(1<<((((NU8) 0))&7)))!=0), &p.Tok);
	p.Col = (NI32)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_302480(&p);
	result = resolvesubs_304486(&p, LOC3);
	(*hastoc) = p.Hastoc;
	return result;
}
N_NOINLINE(void, docutilsrstInit)(void) {
}

N_NOINLINE(void, docutilsrstDatInit)(void) {
static TNimNode* TMP2318[8];
static TNimNode* TMP2319[5];
static TNimNode* TMP2320[7];
NI TMP2322;
static char* NIM_CONST TMP2321[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2324[9];
static TNimNode* TMP2325[4];
NI TMP2327;
static char* NIM_CONST TMP2326[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2328[2];
static TNimNode* TMP2340[9];
NI TMP2342;
static char* NIM_CONST TMP2341[9] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage"};
static TNimNode* TMP2353[3];
NI TMP2355;
static char* NIM_CONST TMP2354[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2358[6];
static TNimNode TMP870[64];
NTI298677.size = sizeof(trstparser298677);
NTI298677.kind = 17;
NTI298677.base = (&NTI2409);
TMP2318[0] = &TMP870[1];
TMP870[1].kind = 1;
TMP870[1].offset = offsetof(trstparser298677, Idx);
TMP870[1].typ = (&NTI106);
TMP870[1].name = "idx";
TMP2318[1] = &TMP870[2];
NTI298114.size = sizeof(ttoken298114);
NTI298114.kind = 18;
NTI298114.base = 0;
NTI298114.flags = 2;
TMP2319[0] = &TMP870[4];
NTI298112.size = sizeof(NU8);
NTI298112.kind = 14;
NTI298112.base = 0;
NTI298112.flags = 3;
for (TMP2322 = 0; TMP2322 < 7; TMP2322++) {
TMP870[TMP2322+5].kind = 1;
TMP870[TMP2322+5].offset = TMP2322;
TMP870[TMP2322+5].name = TMP2321[TMP2322];
TMP2320[TMP2322] = &TMP870[TMP2322+5];
}
TMP870[12].len = 7; TMP870[12].kind = 2; TMP870[12].sons = &TMP2320[0];
NTI298112.node = &TMP870[12];
TMP870[4].kind = 1;
TMP870[4].offset = offsetof(ttoken298114, Kind);
TMP870[4].typ = (&NTI298112);
TMP870[4].name = "kind";
TMP2319[1] = &TMP870[13];
TMP870[13].kind = 1;
TMP870[13].offset = offsetof(ttoken298114, Ival);
TMP870[13].typ = (&NTI106);
TMP870[13].name = "ival";
TMP2319[2] = &TMP870[14];
TMP870[14].kind = 1;
TMP870[14].offset = offsetof(ttoken298114, Symbol);
TMP870[14].typ = (&NTI143);
TMP870[14].name = "symbol";
TMP2319[3] = &TMP870[15];
TMP870[15].kind = 1;
TMP870[15].offset = offsetof(ttoken298114, Line);
TMP870[15].typ = (&NTI106);
TMP870[15].name = "line";
TMP2319[4] = &TMP870[16];
TMP870[16].kind = 1;
TMP870[16].offset = offsetof(ttoken298114, Col);
TMP870[16].typ = (&NTI106);
TMP870[16].name = "col";
TMP870[3].len = 5; TMP870[3].kind = 2; TMP870[3].sons = &TMP2319[0];
NTI298114.node = &TMP870[3];
NTI298116.size = sizeof(ttokenseq298116*);
NTI298116.kind = 24;
NTI298116.base = (&NTI298114);
NTI298116.flags = 2;
NTI298116.marker = TMP2323;
TMP870[2].kind = 1;
TMP870[2].offset = offsetof(trstparser298677, Tok);
TMP870[2].typ = (&NTI298116);
TMP870[2].name = "tok";
TMP2318[2] = &TMP870[17];
NTI298673.size = sizeof(tsharedstate298673);
NTI298673.kind = 18;
NTI298673.base = 0;
NTI298673.flags = 2;
TMP2324[0] = &TMP870[19];
NTI298008.size = sizeof(NU8);
NTI298008.kind = 14;
NTI298008.base = 0;
NTI298008.flags = 3;
for (TMP2327 = 0; TMP2327 < 4; TMP2327++) {
TMP870[TMP2327+20].kind = 1;
TMP870[TMP2327+20].offset = TMP2327;
TMP870[TMP2327+20].name = TMP2326[TMP2327];
TMP2325[TMP2327] = &TMP870[TMP2327+20];
}
TMP870[24].len = 4; TMP870[24].kind = 2; TMP870[24].sons = &TMP2325[0];
NTI298008.node = &TMP870[24];
NTI298010.size = sizeof(NU8);
NTI298010.kind = 19;
NTI298010.base = (&NTI298008);
NTI298010.flags = 3;
TMP870[25].len = 0; TMP870[25].kind = 0;
NTI298010.node = &TMP870[25];
TMP870[19].kind = 1;
TMP870[19].offset = offsetof(tsharedstate298673, Options);
TMP870[19].typ = (&NTI298010);
TMP870[19].name = "options";
TMP2324[1] = &TMP870[26];
TMP870[26].kind = 1;
TMP870[26].offset = offsetof(tsharedstate298673, Ulevel);
TMP870[26].typ = (&NTI106);
TMP870[26].name = "uLevel";
TMP2324[2] = &TMP870[27];
TMP870[27].kind = 1;
TMP870[27].offset = offsetof(tsharedstate298673, Olevel);
TMP870[27].typ = (&NTI106);
TMP870[27].name = "oLevel";
TMP2324[3] = &TMP870[28];
NTI298671.size = sizeof(tsubstitution298671);
NTI298671.kind = 18;
NTI298671.base = 0;
NTI298671.flags = 2;
TMP2328[0] = &TMP870[30];
TMP870[30].kind = 1;
TMP870[30].offset = offsetof(tsubstitution298671, Key);
TMP870[30].typ = (&NTI143);
TMP870[30].name = "key";
TMP2328[1] = &TMP870[31];
TMP870[31].kind = 1;
TMP870[31].offset = offsetof(tsubstitution298671, Value);
TMP870[31].typ = (&NTI297005);
TMP870[31].name = "value";
TMP870[29].len = 2; TMP870[29].kind = 2; TMP870[29].sons = &TMP2328[0];
NTI298671.node = &TMP870[29];
NTI298687.size = sizeof(TY298687*);
NTI298687.kind = 24;
NTI298687.base = (&NTI298671);
NTI298687.flags = 2;
NTI298687.marker = TMP2335;
TMP870[28].kind = 1;
TMP870[28].offset = offsetof(tsharedstate298673, Subs);
TMP870[28].typ = (&NTI298687);
TMP870[28].name = "subs";
TMP2324[4] = &TMP870[32];
TMP870[32].kind = 1;
TMP870[32].offset = offsetof(tsharedstate298673, Refs);
TMP870[32].typ = (&NTI298687);
TMP870[32].name = "refs";
TMP2324[5] = &TMP870[33];
TMP870[33].kind = 1;
TMP870[33].offset = offsetof(tsharedstate298673, Underlinetolevel);
TMP870[33].typ = (&NTI90032);
TMP870[33].name = "underlineToLevel";
TMP2324[6] = &TMP870[34];
TMP870[34].kind = 1;
TMP870[34].offset = offsetof(tsharedstate298673, Overlinetolevel);
TMP870[34].typ = (&NTI90032);
TMP870[34].name = "overlineToLevel";
TMP2324[7] = &TMP870[35];
NTI298016.size = sizeof(tmsghandler298016);
NTI298016.kind = 25;
NTI298016.base = 0;
NTI298016.flags = 3;
TMP870[35].kind = 1;
TMP870[35].offset = offsetof(tsharedstate298673, Msghandler);
TMP870[35].typ = (&NTI298016);
TMP870[35].name = "msgHandler";
TMP2324[8] = &TMP870[36];
NTI298018.size = sizeof(tfindfilehandler298018);
NTI298018.kind = 25;
NTI298018.base = 0;
NTI298018.flags = 3;
TMP870[36].kind = 1;
TMP870[36].offset = offsetof(tsharedstate298673, Findfile);
TMP870[36].typ = (&NTI298018);
TMP870[36].name = "findFile";
TMP870[18].len = 9; TMP870[18].kind = 2; TMP870[18].sons = &TMP2324[0];
NTI298673.node = &TMP870[18];
NTI298675.size = sizeof(tsharedstate298673*);
NTI298675.kind = 22;
NTI298675.base = (&NTI298673);
NTI298675.flags = 2;
NTI298675.marker = TMP2336;
TMP870[17].kind = 1;
TMP870[17].offset = offsetof(trstparser298677, S);
TMP870[17].typ = (&NTI298675);
TMP870[17].name = "s";
TMP2318[3] = &TMP870[37];
NTI298698.size = sizeof(TY298698*);
NTI298698.kind = 24;
NTI298698.base = (&NTI106);
NTI298698.flags = 2;
NTI298698.marker = TMP2337;
TMP870[37].kind = 1;
TMP870[37].offset = offsetof(trstparser298677, Indentstack);
TMP870[37].typ = (&NTI298698);
TMP870[37].name = "indentStack";
TMP2318[4] = &TMP870[38];
TMP870[38].kind = 1;
TMP870[38].offset = offsetof(trstparser298677, Filename);
TMP870[38].typ = (&NTI143);
TMP870[38].name = "filename";
TMP2318[5] = &TMP870[39];
TMP870[39].kind = 1;
TMP870[39].offset = offsetof(trstparser298677, Line);
TMP870[39].typ = (&NTI106);
TMP870[39].name = "line";
TMP2318[6] = &TMP870[40];
TMP870[40].kind = 1;
TMP870[40].offset = offsetof(trstparser298677, Col);
TMP870[40].typ = (&NTI106);
TMP870[40].name = "col";
TMP2318[7] = &TMP870[41];
TMP870[41].kind = 1;
TMP870[41].offset = offsetof(trstparser298677, Hastoc);
TMP870[41].typ = (&NTI134);
TMP870[41].name = "hasToc";
TMP870[0].len = 8; TMP870[0].kind = 2; TMP870[0].sons = &TMP2318[0];
NTI298677.node = &TMP870[0];
NTI298014.size = sizeof(NU8);
NTI298014.kind = 14;
NTI298014.base = 0;
NTI298014.flags = 3;
for (TMP2342 = 0; TMP2342 < 9; TMP2342++) {
TMP870[TMP2342+42].kind = 1;
TMP870[TMP2342+42].offset = TMP2342;
TMP870[TMP2342+42].name = TMP2341[TMP2342];
TMP2340[TMP2342] = &TMP870[TMP2342+42];
}
TMP870[51].len = 9; TMP870[51].kind = 2; TMP870[51].sons = &TMP2340[0];
NTI298014.node = &TMP870[51];
NTI298012.size = sizeof(NU8);
NTI298012.kind = 14;
NTI298012.base = 0;
NTI298012.flags = 3;
for (TMP2355 = 0; TMP2355 < 3; TMP2355++) {
TMP870[TMP2355+52].kind = 1;
TMP870[TMP2355+52].offset = TMP2355;
TMP870[TMP2355+52].name = TMP2354[TMP2355];
TMP2353[TMP2355] = &TMP870[TMP2355+52];
}
TMP870[55].len = 3; TMP870[55].kind = 2; TMP870[55].sons = &TMP2353[0];
NTI298012.node = &TMP870[55];
NTI298679.size = sizeof(eparseerror298679);
NTI298679.kind = 17;
NTI298679.base = (&NTI2453);
TMP870[56].len = 0; TMP870[56].kind = 2;
NTI298679.node = &TMP870[56];
NTI298836.size = sizeof(eparseerror298679*);
NTI298836.kind = 22;
NTI298836.base = (&NTI298679);
NTI298836.marker = TMP2356;
NTI298118.size = sizeof(tlexer298118);
NTI298118.kind = 17;
NTI298118.base = (&NTI2409);
NTI298118.flags = 1;
TMP2358[0] = &TMP870[58];
TMP870[58].kind = 1;
TMP870[58].offset = offsetof(tlexer298118, Buf);
TMP870[58].typ = (&NTI145);
TMP870[58].name = "buf";
TMP2358[1] = &TMP870[59];
TMP870[59].kind = 1;
TMP870[59].offset = offsetof(tlexer298118, Bufpos);
TMP870[59].typ = (&NTI106);
TMP870[59].name = "bufpos";
TMP2358[2] = &TMP870[60];
TMP870[60].kind = 1;
TMP870[60].offset = offsetof(tlexer298118, Line);
TMP870[60].typ = (&NTI106);
TMP870[60].name = "line";
TMP2358[3] = &TMP870[61];
TMP870[61].kind = 1;
TMP870[61].offset = offsetof(tlexer298118, Col);
TMP870[61].typ = (&NTI106);
TMP870[61].name = "col";
TMP2358[4] = &TMP870[62];
TMP870[62].kind = 1;
TMP870[62].offset = offsetof(tlexer298118, Baseindent);
TMP870[62].typ = (&NTI106);
TMP870[62].name = "baseIndent";
TMP2358[5] = &TMP870[63];
TMP870[63].kind = 1;
TMP870[63].offset = offsetof(tlexer298118, Skippounds);
TMP870[63].typ = (&NTI134);
TMP870[63].name = "skipPounds";
TMP870[57].len = 6; TMP870[57].kind = 2; TMP870[57].sons = &TMP2358[0];
NTI298118.node = &TMP870[57];
}

