Exemple #1
0
N_NIMCALL(void, doelif_186253)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL res;
	{
		if (!((condstack_186188 ? (condstack_186188->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1880));
	}
	LA3: ;
	res = evalppif_186147(L, tok);
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = condstack_186188->data[(condstack_186188 ? (condstack_186188->Sup.len-1) : -1)];
		if (LOC7) goto LA8;
		LOC7 = !(res);
		LA8: ;
		if (!LOC7) goto LA9;
		jumptodirective_186222(L, tok, ((NU8) 1));
	}
	goto LA5;
	LA9: ;
	{
		condstack_186188->data[(condstack_186188 ? (condstack_186188->Sup.len-1) : -1)] = NIM_TRUE;
	}
	LA5: ;
}
N_NIMCALL(void, doelse_186230)(Tlexer181185* L, Ttoken181181* tok) {
	nimfr("doElse", "nimconf.nim")
	nimln(71, "nimconf.nim");
	{
		if (!((condstack_186186 ? (condstack_186186->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2481));
	}
	LA3: ;
	nimln(72, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(73, "nimconf.nim");
	{
		if (!((*tok).toktype == ((NU8) 107))) goto LA7;
		ppgettok_186009(L, tok);
	}
	LA7: ;
	nimln(74, "nimconf.nim");
	{
		if ((NU)((condstack_186186 ? (condstack_186186->Sup.len-1) : -1)) >= (NU)(condstack_186186->Sup.len)) raiseIndexError();
		if (!condstack_186186->data[(condstack_186186 ? (condstack_186186->Sup.len-1) : -1)]) goto LA11;
		jumptodirective_186220(L, tok, ((NU8) 0));
	}
	LA11: ;
	popFrame();
}
N_NIMCALL(void, doelif_186251)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL res;
	nimfr("doElif", "nimconf.nim")
	nimln(77, "nimconf.nim");
	{
		if (!((condstack_186186 ? (condstack_186186->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2481));
	}
	LA3: ;
	nimln(78, "nimconf.nim");
	res = evalppif_186147(L, tok);
	nimln(79, "nimconf.nim");
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		if ((NU)((condstack_186186 ? (condstack_186186->Sup.len-1) : -1)) >= (NU)(condstack_186186->Sup.len)) raiseIndexError();
		LOC7 = condstack_186186->data[(condstack_186186 ? (condstack_186186->Sup.len-1) : -1)];
		if (LOC7) goto LA8;
		LOC7 = !(res);
		LA8: ;
		if (!LOC7) goto LA9;
		jumptodirective_186220(L, tok, ((NU8) 1));
	}
	goto LA5;
	LA9: ;
	{
		nimln(80, "nimconf.nim");
		if ((NU)((condstack_186186 ? (condstack_186186->Sup.len-1) : -1)) >= (NU)(condstack_186186->Sup.len)) raiseIndexError();
		condstack_186186->data[(condstack_186186 ? (condstack_186186->Sup.len-1) : -1)] = NIM_TRUE;
	}
	LA5: ;
	popFrame();
}
Exemple #4
0
N_NIMCALL(void, readconfigfile_186522)(NimStringDesc* filename) {
	Tlexer181185 L;
	Ttoken181181 tok;
	Tllstream178204* stream;
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.Sup.m_type = (&NTI181185);
	memset((void*)(&tok), 0, sizeof(tok));
	stream = 0;
	stream = llstreamopen_178256(filename, ((NU8) 0));
	{
		if (!!((stream == NIM_NIL))) goto LA3;
		inittoken_181369((&tok));
		openlexer_181412((&L), filename, stream);
		tok.toktype = ((NU8) 1);
		conftok_186379((&L), (&tok));
		{
			while (1) {
				if (!!((tok.toktype == ((NU8) 1)))) goto LA6;
				parseassignment_186441((&L), (&tok));
			} LA6: ;
		}
		{
			if (!(((NI) 0) < (condstack_186188 ? condstack_186188->Sup.len : 0))) goto LA9;
			lexmessage_181483((&L), ((NU16) 23), ((NimStringDesc*) &TMP1881));
		}
		LA9: ;
		closelexer_181424((&L));
		{
			if (!(((NI) 1) <= gverbosity_154137)) goto LA13;
			rawmessage_164970(((NU16) 272), filename);
		}
		LA13: ;
	}
	LA3: ;
}
Exemple #5
0
N_NIMCALL(void, doend_186193)(Tlexer181185* L, Ttoken181181* tok) {
	{
		if (!((condstack_186188 ? (condstack_186188->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1880));
	}
	LA3: ;
	ppgettok_186009(L, tok);
	condstack_186188 = (TY186169*) setLengthSeq(&(condstack_186188)->Sup, sizeof(NIM_BOOL), ((NI) ((condstack_186188 ? (condstack_186188->Sup.len-1) : -1))));
}
Exemple #6
0
N_NIMCALL(void, checksymbol_186410)(Tlexer181185* L, Ttoken181181* tok) {
	{
		NimStringDesc* LOC5;
		if (!!(((*tok).toktype >= ((NU8) 2) && (*tok).toktype <= ((NU8) 72) || (*tok).toktype >= ((NU8) 87) && (*tok).toktype <= ((NU8) 89)))) goto LA3;
		LOC5 = 0;
		LOC5 = toktostr_181323(tok);
		lexmessage_181483(L, ((NU16) 19), LOC5);
	}
	LA3: ;
}
N_NIMCALL(void, doend_186191)(Tlexer181185* L, Ttoken181181* tok) {
	nimfr("doEnd", "nimconf.nim")
	nimln(61, "nimconf.nim");
	{
		if (!((condstack_186186 ? (condstack_186186->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2481));
	}
	LA3: ;
	nimln(62, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(63, "nimconf.nim");
	condstack_186186 = (TY186169*) setLengthSeq(&(condstack_186186)->Sup, sizeof(NIM_BOOL), ((NI)chckRange((condstack_186186 ? (condstack_186186->Sup.len-1) : -1), ((NI) 0), ((NI) IL64(9223372036854775807)))));
	popFrame();
}
N_NIMCALL(void, checksymbol_186408)(Tlexer181185* L, Ttoken181181* tok) {
	nimfr("checkSymbol", "nimconf.nim")
	nimln(155, "nimconf.nim");
	{
		NimStringDesc* LOC5;
		if (!!(((*tok).toktype >= ((NU8) 2) && (*tok).toktype <= ((NU8) 72) || (*tok).toktype >= ((NU8) 87) && (*tok).toktype <= ((NU8) 89)))) goto LA3;
		nimln(156, "nimconf.nim");
		LOC5 = 0;
		LOC5 = toktostr_181323(tok);
		lexmessage_181483(L, ((NU16) 19), LOC5);
	}
	LA3: ;
	popFrame();
}
N_NIMCALL(NIM_BOOL, parseatom_186048)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL result;
	nimfr("parseAtom", "nimconf.nim")
	result = 0;
	nimln(26, "nimconf.nim");
	{
		if (!((*tok).toktype == ((NU8) 93))) goto LA3;
		nimln(27, "nimconf.nim");
		ppgettok_186009(L, tok);
		nimln(28, "nimconf.nim");
		result = parseexpr_186039(L, tok);
		nimln(29, "nimconf.nim");
		{
			if (!((*tok).toktype == ((NU8) 94))) goto LA7;
			ppgettok_186009(L, tok);
		}
		goto LA5;
		LA7: ;
		{
			nimln(30, "nimconf.nim");
			lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2478));
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC13;
		nimln(31, "nimconf.nim");
		if (!((*(*tok).ident).Sup.id == ((NI) 45))) goto LA11;
		nimln(32, "nimconf.nim");
		ppgettok_186009(L, tok);
		nimln(33, "nimconf.nim");
		LOC13 = 0;
		LOC13 = parseatom_186048(L, tok);
		result = !(LOC13);
	}
	goto LA1;
	LA11: ;
	{
		nimln(35, "nimconf.nim");
		result = isdefined_168167((*tok).ident);
		nimln(36, "nimconf.nim");
		ppgettok_186009(L, tok);
	}
	LA1: ;
	popFrame();
	return result;
}
Exemple #10
0
N_NIMCALL(void, readconfigfile_186520)(NimStringDesc* filename) {
	Tlexer181185 L;
	Ttoken181181 tok;
	Tllstream178204* stream;
	nimfr("readConfigFile", "nimconf.nim")
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.Sup.m_type = (&NTI181185);
	memset((void*)(&tok), 0, sizeof(tok));
	stream = 0;
	nimln(205, "nimconf.nim");
	stream = llstreamopen_178256(filename, ((NU8) 0));
	nimln(206, "nimconf.nim");
	{
		if (!!((stream == NIM_NIL))) goto LA3;
		nimln(207, "nimconf.nim");
		inittoken_181369((&tok));
		nimln(208, "nimconf.nim");
		openlexer_181412((&L), filename, stream);
		nimln(209, "nimconf.nim");
		tok.toktype = ((NU8) 1);
		nimln(210, "nimconf.nim");
		conftok_186377((&L), (&tok));
		{
			nimln(211, "nimconf.nim");
			while (1) {
				if (!!((tok.toktype == ((NU8) 1)))) goto LA6;
				parseassignment_186439((&L), (&tok));
			} LA6: ;
		}
		nimln(212, "nimconf.nim");
		{
			if (!(((NI) 0) < (condstack_186186 ? condstack_186186->Sup.len : 0))) goto LA9;
			lexmessage_181483((&L), ((NU16) 23), ((NimStringDesc*) &TMP2485));
		}
		LA9: ;
		nimln(213, "nimconf.nim");
		closelexer_181424((&L));
		nimln(214, "nimconf.nim");
		{
			if (!(((NI) 1) <= gverbosity_154137)) goto LA13;
			rawmessage_164960(((NU16) 272), filename);
		}
		LA13: ;
	}
	LA3: ;
	popFrame();
}
Exemple #11
0
N_NIMCALL(NIM_BOOL, evalppif_186147)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL result;
	result = 0;
	ppgettok_186009(L, tok);
	result = parseexpr_186039(L, tok);
	{
		if (!((*tok).toktype == ((NU8) 107))) goto LA3;
		ppgettok_186009(L, tok);
	}
	goto LA1;
	LA3: ;
	{
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1879));
	}
	LA1: ;
	return result;
}
Exemple #12
0
N_NIMCALL(void, doelse_186232)(Tlexer181185* L, Ttoken181181* tok) {
	{
		if (!((condstack_186188 ? (condstack_186188->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1880));
	}
	LA3: ;
	ppgettok_186009(L, tok);
	{
		if (!((*tok).toktype == ((NU8) 107))) goto LA7;
		ppgettok_186009(L, tok);
	}
	LA7: ;
	{
		if (!condstack_186188->data[(condstack_186188 ? (condstack_186188->Sup.len-1) : -1)]) goto LA11;
		jumptodirective_186222(L, tok, ((NU8) 0));
	}
	LA11: ;
}
Exemple #13
0
N_NIMCALL(NIM_BOOL, evalppif_186147)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL result;
	nimfr("evalppIf", "nimconf.nim")
	result = 0;
	nimln(53, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(54, "nimconf.nim");
	result = parseexpr_186039(L, tok);
	nimln(55, "nimconf.nim");
	{
		if (!((*tok).toktype == ((NU8) 107))) goto LA3;
		ppgettok_186009(L, tok);
	}
	goto LA1;
	LA3: ;
	{
		nimln(56, "nimconf.nim");
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2479));
	}
	LA1: ;
	popFrame();
	return result;
}
Exemple #14
0
N_NIMCALL(NIM_BOOL, parseatom_186048)(Tlexer181185* L, Ttoken181181* tok) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*tok).toktype == ((NU8) 93))) goto LA3;
		ppgettok_186009(L, tok);
		result = parseexpr_186039(L, tok);
		{
			if (!((*tok).toktype == ((NU8) 94))) goto LA7;
			ppgettok_186009(L, tok);
		}
		goto LA5;
		LA7: ;
		{
			lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1878));
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC13;
		if (!((*(*tok).ident).Sup.id == ((NI) 45))) goto LA11;
		ppgettok_186009(L, tok);
		LOC13 = 0;
		LOC13 = parseatom_186048(L, tok);
		result = !(LOC13);
	}
	goto LA1;
	LA11: ;
	{
		result = isdefined_168167((*tok).ident);
		ppgettok_186009(L, tok);
	}
	LA1: ;
	return result;
}
Exemple #15
0
N_NIMCALL(void, parseassignment_186441)(Tlexer181185* L, Ttoken181181* tok) {
	Tlineinfo163338 info;
	NimStringDesc* s;
	NimStringDesc* val;
	NIM_BOOL percent;
	Tident167021* LOC22;
	{
		NIM_BOOL LOC3;
		Tident167021* LOC4;
		Tident167021* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = getident_167463(((NimStringDesc*) &TMP1886));
		LOC3 = ((*(*tok).ident).Sup.id == (*LOC4).Sup.id);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = getident_167463(((NimStringDesc*) &TMP1887));
		LOC3 = ((*(*tok).ident).Sup.id == (*LOC6).Sup.id);
		LA5: ;
		if (!LOC3) goto LA7;
		conftok_186379(L, tok);
	}
	LA7: ;
	info = getlineinfo_181218((&(*L)), (&(*tok)));
	checksymbol_186410((&(*L)), (&(*tok)));
	s = toktostr_181323((&(*tok)));
	conftok_186379(L, tok);
	val = copyString(((NimStringDesc*) &TMP1888));
	{
		while (1) {
			NimStringDesc* LOC11;
			if (!((*tok).toktype == ((NU8) 110))) goto LA10;
			s = addChar(s, 46);
			conftok_186379(L, tok);
			checksymbol_186410((&(*L)), (&(*tok)));
			LOC11 = 0;
			LOC11 = toktostr_181323((&(*tok)));
			s = resizeString(s, LOC11->Sup.len + 0);
appendString(s, LOC11);
			conftok_186379(L, tok);
		} LA10: ;
	}
	{
		NimStringDesc* LOC16;
		if (!((*tok).toktype == ((NU8) 95))) goto LA14;
		conftok_186379(L, tok);
		checksymbol_186410((&(*L)), (&(*tok)));
		LOC16 = 0;
		LOC16 = toktostr_181323((&(*tok)));
		val = resizeString(val, LOC16->Sup.len + 0);
appendString(val, LOC16);
		conftok_186379(L, tok);
		{
			if (!((*tok).toktype == ((NU8) 96))) goto LA19;
			conftok_186379(L, tok);
		}
		goto LA17;
		LA19: ;
		{
			lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1889));
		}
		LA17: ;
		val = addChar(val, 93);
	}
	LA14: ;
	LOC22 = 0;
	LOC22 = getident_167463(((NimStringDesc*) &TMP1890));
	percent = ((*(*tok).ident).Sup.id == (*LOC22).Sup.id);
	{
		NIM_BOOL LOC25;
		NimStringDesc* LOC33;
		LOC25 = 0;
		LOC25 = ((*tok).toktype == ((NU8) 107) || (*tok).toktype == ((NU8) 109));
		if (LOC25) goto LA26;
		LOC25 = percent;
		LA26: ;
		if (!LOC25) goto LA27;
		{
			if (!(((NI) 0) < (val ? val->Sup.len : 0))) goto LA31;
			val = addChar(val, 58);
		}
		LA31: ;
		conftok_186379(L, tok);
		checksymbol_186410((&(*L)), (&(*tok)));
		LOC33 = 0;
		LOC33 = toktostr_181323((&(*tok)));
		val = resizeString(val, LOC33->Sup.len + 0);
appendString(val, LOC33);
		conftok_186379(L, tok);
		{
			while (1) {
				NIM_BOOL LOC36;
				Tident167021* LOC38;
				NimStringDesc* LOC39;
				LOC36 = 0;
				LOC36 = !(((*tok).ident == NIM_NIL));
				if (!(LOC36)) goto LA37;
				LOC38 = 0;
				LOC38 = getident_167463(((NimStringDesc*) &TMP1891));
				LOC36 = ((*(*tok).ident).Sup.id == (*LOC38).Sup.id);
				LA37: ;
				if (!LOC36) goto LA35;
				conftok_186379(L, tok);
				checksymbol_186410((&(*L)), (&(*tok)));
				LOC39 = 0;
				LOC39 = toktostr_181323((&(*tok)));
				val = resizeString(val, LOC39->Sup.len + 0);
appendString(val, LOC39);
				conftok_186379(L, tok);
			} LA35: ;
		}
	}
	LA27: ;
	{
		NimStringDesc* LOC44;
		if (!percent) goto LA42;
		LOC44 = 0;
		LOC44 = nstFormat(val, gconfigvars_154231, 3);
		processswitch_176040(s, LOC44, ((NU8) 2), info);
	}
	goto LA40;
	LA42: ;
	{
		processswitch_176040(s, val, ((NU8) 2), info);
	}
	LA40: ;
}
Exemple #16
0
N_NIMCALL(void, parsedirective_186344)(Tlexer181185* L, Ttoken181181* tok) {
	NU16 LOC1;
	ppgettok_186009(L, tok);
	LOC1 = 0;
	LOC1 = whichkeyword_172386((*tok).ident);
	switch (LOC1) {
	case ((NU16) 31):
	{
		NIM_BOOL res;
		condstack_186188 = (TY186169*) setLengthSeq(&(condstack_186188)->Sup, sizeof(NIM_BOOL), ((NI) ((NI)((condstack_186188 ? condstack_186188->Sup.len : 0) + ((NI) 1)))));
		res = evalppif_186147(L, tok);
		condstack_186188->data[(condstack_186188 ? (condstack_186188->Sup.len-1) : -1)] = res;
		{
			if (!!(res)) goto LA5;
			jumptodirective_186222(L, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU16) 20):
	{
		doelif_186253(L, tok);
	}
	break;
	case ((NU16) 21):
	{
		doelse_186232(L, tok);
	}
	break;
	case ((NU16) 22):
	{
		doend_186193(L, tok);
	}
	break;
	case ((NU16) 180):
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		ppgettok_186009(L, tok);
		LOC11 = 0;
		LOC11 = toktostr_181323((&(*tok)));
		LOC12 = 0;
		LOC12 = nstFormat(LOC11, gconfigvars_154231, 5);
		msgwriteln_164538(LOC12);
		ppgettok_186009(L, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC14;
		LOC14 = 0;
		LOC14 = nsuNormalize((*(*tok).ident).s);
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1883))) goto LA15;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1884))) goto LA16;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1885))) goto LA17;
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC21;
			ppgettok_186009(L, tok);
			key = toktostr_181323((&(*tok)));
			ppgettok_186009(L, tok);
			LOC21 = 0;
			LOC21 = toktostr_181323((&(*tok)));
			putenv_122669(key, LOC21);
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			ppgettok_186009(L, tok);
			key = toktostr_181323((&(*tok)));
			ppgettok_186009(L, tok);
			LOC23 = 0;
			LOC24 = 0;
			LOC24 = toktostr_181323((&(*tok)));
			LOC25 = 0;
			LOC25 = getenv_122644(key);
			LOC23 = rawNewString(LOC24->Sup.len + LOC25->Sup.len + 0);
appendString(LOC23, LOC24);
appendString(LOC23, LOC25);
			putenv_122669(key, LOC23);
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA17: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NimStringDesc* LOC29;
			ppgettok_186009(L, tok);
			key = toktostr_181323((&(*tok)));
			ppgettok_186009(L, tok);
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = getenv_122644(key);
			LOC29 = 0;
			LOC29 = toktostr_181323((&(*tok)));
			LOC27 = rawNewString(LOC28->Sup.len + LOC29->Sup.len + 0);
appendString(LOC27, LOC28);
appendString(LOC27, LOC29);
			putenv_122669(key, LOC27);
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA18: ;
		{
			NimStringDesc* LOC31;
			LOC31 = 0;
			LOC31 = toktostr_181323((&(*tok)));
			lexmessage_181483((&(*L)), ((NU16) 30), LOC31);
		}
		LA19: ;
	}
	break;
	}
}
Exemple #17
0
N_NIMCALL(void, jumptodirective_186222)(Tlexer181185* L, Ttoken181181* tok, NU8 dest) {
	NI nestedifs;
	nestedifs = ((NI) 0);
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				NU16 LOC9;
				LOC5 = 0;
				LOC5 = !(((*tok).ident == NIM_NIL));
				if (!(LOC5)) goto LA6;
				LOC5 = eqStrings((*(*tok).ident).s, ((NimStringDesc*) &TMP1877));
				LA6: ;
				if (!LOC5) goto LA7;
				ppgettok_186009(L, tok);
				LOC9 = 0;
				LOC9 = whichkeyword_172386((*tok).ident);
				switch (LOC9) {
				case ((NU16) 31):
				{
					nestedifs += ((NI) 1);
				}
				break;
				case ((NU16) 21):
				{
					{
						NIM_BOOL LOC14;
						LOC14 = 0;
						LOC14 = (dest == ((NU8) 1));
						if (!(LOC14)) goto LA15;
						LOC14 = (nestedifs == ((NI) 0));
						LA15: ;
						if (!LOC14) goto LA16;
						doelse_186232(L, tok);
						goto LA1;
					}
					LA16: ;
				}
				break;
				case ((NU16) 20):
				{
					{
						NIM_BOOL LOC21;
						LOC21 = 0;
						LOC21 = (dest == ((NU8) 1));
						if (!(LOC21)) goto LA22;
						LOC21 = (nestedifs == ((NI) 0));
						LA22: ;
						if (!LOC21) goto LA23;
						doelif_186253(L, tok);
						goto LA1;
					}
					LA23: ;
				}
				break;
				case ((NU16) 22):
				{
					{
						if (!(nestedifs == ((NI) 0))) goto LA28;
						doend_186193(L, tok);
						goto LA1;
					}
					LA28: ;
					{
						if (!(((NI) 0) < nestedifs)) goto LA32;
						nestedifs -= ((NI) 1);
					}
					LA32: ;
				}
				break;
				default:
				{
				}
				break;
				}
				ppgettok_186009(L, tok);
			}
			goto LA3;
			LA7: ;
			{
				if (!((*tok).toktype == ((NU8) 1))) goto LA36;
				lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1881));
			}
			goto LA3;
			LA36: ;
			{
				ppgettok_186009(L, tok);
			}
			LA3: ;
		}
	} LA1: ;
}
Exemple #18
0
N_NIMCALL(void, parseassignment_186439)(Tlexer181185* L, Ttoken181181* tok) {
	Tlineinfo163338 info;
	NimStringDesc* s;
	NimStringDesc* val;
	NIM_BOOL percent;
	Tident167021* LOC22;
	nimfr("parseAssignment", "nimconf.nim")
	nimln(159, "nimconf.nim");
	{
		NIM_BOOL LOC3;
		Tident167021* LOC4;
		Tident167021* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = getident_167463(((NimStringDesc*) &TMP2490));
		LOC3 = ((*(*tok).ident).Sup.id == (*LOC4).Sup.id);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = getident_167463(((NimStringDesc*) &TMP2491));
		LOC3 = ((*(*tok).ident).Sup.id == (*LOC6).Sup.id);
		LA5: ;
		if (!LOC3) goto LA7;
		nimln(160, "nimconf.nim");
		conftok_186377(L, tok);
	}
	LA7: ;
	nimln(161, "nimconf.nim");
	info = getlineinfo_181218((&(*L)), (&(*tok)));
	nimln(162, "nimconf.nim");
	checksymbol_186408((&(*L)), (&(*tok)));
	nimln(163, "nimconf.nim");
	s = toktostr_181323((&(*tok)));
	nimln(164, "nimconf.nim");
	conftok_186377(L, tok);
	nimln(165, "nimconf.nim");
	val = copyString(((NimStringDesc*) &TMP2492));
	{
		nimln(166, "nimconf.nim");
		while (1) {
			NimStringDesc* LOC11;
			if (!((*tok).toktype == ((NU8) 110))) goto LA10;
			nimln(167, "nimconf.nim");
			s = addChar(s, 46);
			nimln(168, "nimconf.nim");
			conftok_186377(L, tok);
			nimln(169, "nimconf.nim");
			checksymbol_186408((&(*L)), (&(*tok)));
			nimln(170, "nimconf.nim");
			LOC11 = 0;
			LOC11 = toktostr_181323((&(*tok)));
			s = resizeString(s, LOC11->Sup.len + 0);
appendString(s, LOC11);
			nimln(171, "nimconf.nim");
			conftok_186377(L, tok);
		} LA10: ;
	}
	nimln(172, "nimconf.nim");
	{
		NimStringDesc* LOC16;
		if (!((*tok).toktype == ((NU8) 95))) goto LA14;
		nimln(175, "nimconf.nim");
		conftok_186377(L, tok);
		nimln(176, "nimconf.nim");
		checksymbol_186408((&(*L)), (&(*tok)));
		nimln(177, "nimconf.nim");
		LOC16 = 0;
		LOC16 = toktostr_181323((&(*tok)));
		val = resizeString(val, LOC16->Sup.len + 0);
appendString(val, LOC16);
		nimln(178, "nimconf.nim");
		conftok_186377(L, tok);
		nimln(179, "nimconf.nim");
		{
			if (!((*tok).toktype == ((NU8) 96))) goto LA19;
			conftok_186377(L, tok);
		}
		goto LA17;
		LA19: ;
		{
			nimln(180, "nimconf.nim");
			lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2493));
		}
		LA17: ;
		nimln(181, "nimconf.nim");
		val = addChar(val, 93);
	}
	LA14: ;
	nimln(182, "nimconf.nim");
	LOC22 = 0;
	LOC22 = getident_167463(((NimStringDesc*) &TMP2494));
	percent = ((*(*tok).ident).Sup.id == (*LOC22).Sup.id);
	nimln(183, "nimconf.nim");
	{
		NIM_BOOL LOC25;
		NimStringDesc* LOC33;
		LOC25 = 0;
		LOC25 = ((*tok).toktype == ((NU8) 107) || (*tok).toktype == ((NU8) 109));
		if (LOC25) goto LA26;
		LOC25 = percent;
		LA26: ;
		if (!LOC25) goto LA27;
		nimln(184, "nimconf.nim");
		{
			if (!(((NI) 0) < (val ? val->Sup.len : 0))) goto LA31;
			val = addChar(val, 58);
		}
		LA31: ;
		nimln(185, "nimconf.nim");
		conftok_186377(L, tok);
		nimln(186, "nimconf.nim");
		checksymbol_186408((&(*L)), (&(*tok)));
		nimln(187, "nimconf.nim");
		LOC33 = 0;
		LOC33 = toktostr_181323((&(*tok)));
		val = resizeString(val, LOC33->Sup.len + 0);
appendString(val, LOC33);
		nimln(188, "nimconf.nim");
		conftok_186377(L, tok);
		{
			nimln(189, "nimconf.nim");
			while (1) {
				NIM_BOOL LOC36;
				Tident167021* LOC38;
				NimStringDesc* LOC39;
				LOC36 = 0;
				LOC36 = !(((*tok).ident == NIM_NIL));
				if (!(LOC36)) goto LA37;
				LOC38 = 0;
				LOC38 = getident_167463(((NimStringDesc*) &TMP2495));
				LOC36 = ((*(*tok).ident).Sup.id == (*LOC38).Sup.id);
				LA37: ;
				if (!LOC36) goto LA35;
				nimln(190, "nimconf.nim");
				conftok_186377(L, tok);
				nimln(191, "nimconf.nim");
				checksymbol_186408((&(*L)), (&(*tok)));
				nimln(192, "nimconf.nim");
				LOC39 = 0;
				LOC39 = toktostr_181323((&(*tok)));
				val = resizeString(val, LOC39->Sup.len + 0);
appendString(val, LOC39);
				nimln(193, "nimconf.nim");
				conftok_186377(L, tok);
			} LA35: ;
		}
	}
	LA27: ;
	nimln(194, "nimconf.nim");
	{
		NimStringDesc* LOC44;
		if (!percent) goto LA42;
		nimln(195, "nimconf.nim");
		LOC44 = 0;
		LOC44 = nstFormat(val, gconfigvars_154231, 3);
		processswitch_176040(s, LOC44, ((NU8) 2), info);
	}
	goto LA40;
	LA42: ;
	{
		nimln(198, "nimconf.nim");
		processswitch_176040(s, val, ((NU8) 2), info);
	}
	LA40: ;
	popFrame();
}
Exemple #19
0
N_NIMCALL(void, parsedirective_186342)(Tlexer181185* L, Ttoken181181* tok) {
	NU16 LOC1;
	nimfr("parseDirective", "nimconf.nim")
	nimln(112, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(113, "nimconf.nim");
	LOC1 = 0;
	LOC1 = whichkeyword_172386((*tok).ident);
	switch (LOC1) {
	case ((NU16) 31):
	{
		NI TMP2486;
		NIM_BOOL res;
		nimln(115, "nimconf.nim");
		TMP2486 = addInt((condstack_186186 ? condstack_186186->Sup.len : 0), ((NI) 1));
		condstack_186186 = (TY186169*) setLengthSeq(&(condstack_186186)->Sup, sizeof(NIM_BOOL), ((NI)chckRange((NI)(TMP2486), ((NI) 0), ((NI) IL64(9223372036854775807)))));
		nimln(116, "nimconf.nim");
		res = evalppif_186147(L, tok);
		nimln(117, "nimconf.nim");
		if ((NU)((condstack_186186 ? (condstack_186186->Sup.len-1) : -1)) >= (NU)(condstack_186186->Sup.len)) raiseIndexError();
		condstack_186186->data[(condstack_186186 ? (condstack_186186->Sup.len-1) : -1)] = res;
		nimln(118, "nimconf.nim");
		{
			if (!!(res)) goto LA5;
			jumptodirective_186220(L, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU16) 20):
	{
		nimln(119, "nimconf.nim");
		doelif_186251(L, tok);
	}
	break;
	case ((NU16) 21):
	{
		nimln(120, "nimconf.nim");
		doelse_186230(L, tok);
	}
	break;
	case ((NU16) 22):
	{
		nimln(121, "nimconf.nim");
		doend_186191(L, tok);
	}
	break;
	case ((NU16) 180):
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		nimln(123, "nimconf.nim");
		ppgettok_186009(L, tok);
		nimln(124, "nimconf.nim");
		LOC11 = 0;
		LOC11 = toktostr_181323((&(*tok)));
		LOC12 = 0;
		LOC12 = nstFormat(LOC11, gconfigvars_154231, 5);
		msgwriteln_164536(LOC12);
		nimln(126, "nimconf.nim");
		ppgettok_186009(L, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC14;
		nimln(128, "nimconf.nim");
		LOC14 = 0;
		LOC14 = nsuNormalize((*(*tok).ident).s);
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2487))) goto LA15;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2488))) goto LA16;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2489))) goto LA17;
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC21;
			nimln(130, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(131, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(132, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(133, "nimconf.nim");
			LOC21 = 0;
			LOC21 = toktostr_181323((&(*tok)));
			putenv_122669(key, LOC21);
			nimln(134, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			nimln(136, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(137, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(138, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(139, "nimconf.nim");
			LOC23 = 0;
			LOC24 = 0;
			LOC24 = toktostr_181323((&(*tok)));
			LOC25 = 0;
			LOC25 = getenv_122644(key);
			LOC23 = rawNewString(LOC24->Sup.len + LOC25->Sup.len + 0);
appendString(LOC23, LOC24);
appendString(LOC23, LOC25);
			putenv_122669(key, LOC23);
			nimln(140, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA17: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NimStringDesc* LOC29;
			nimln(142, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(143, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(144, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(145, "nimconf.nim");
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = getenv_122644(key);
			LOC29 = 0;
			LOC29 = toktostr_181323((&(*tok)));
			LOC27 = rawNewString(LOC28->Sup.len + LOC29->Sup.len + 0);
appendString(LOC27, LOC28);
appendString(LOC27, LOC29);
			putenv_122669(key, LOC27);
			nimln(146, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA18: ;
		{
			NimStringDesc* LOC31;
			nimln(147, "nimconf.nim");
			LOC31 = 0;
			LOC31 = toktostr_181323((&(*tok)));
			lexmessage_181483((&(*L)), ((NU16) 30), LOC31);
		}
		LA19: ;
	}
	break;
	}
	popFrame();
}
Exemple #20
0
N_NIMCALL(void, jumptodirective_186220)(Tlexer181185* L, Ttoken181181* tok, NU8 dest) {
	NI nestedifs;
	nimfr("jumpToDirective", "nimconf.nim")
	nimln(83, "nimconf.nim");
	nestedifs = ((NI) 0);
	{
		nimln(84, "nimconf.nim");
		while (1) {
			nimln(85, "nimconf.nim");
			{
				NIM_BOOL LOC5;
				NU16 LOC9;
				LOC5 = 0;
				LOC5 = !(((*tok).ident == NIM_NIL));
				if (!(LOC5)) goto LA6;
				LOC5 = eqStrings((*(*tok).ident).s, ((NimStringDesc*) &TMP2482));
				LA6: ;
				if (!LOC5) goto LA7;
				nimln(86, "nimconf.nim");
				ppgettok_186009(L, tok);
				nimln(87, "nimconf.nim");
				LOC9 = 0;
				LOC9 = whichkeyword_172386((*tok).ident);
				switch (LOC9) {
				case ((NU16) 31):
				{
					NI TMP2483;
					nimln(89, "nimconf.nim");
					TMP2483 = addInt(nestedifs, ((NI) 1));
					nestedifs = (NI)(TMP2483);
				}
				break;
				case ((NU16) 21):
				{
					nimln(91, "nimconf.nim");
					{
						NIM_BOOL LOC14;
						LOC14 = 0;
						LOC14 = (dest == ((NU8) 1));
						if (!(LOC14)) goto LA15;
						LOC14 = (nestedifs == ((NI) 0));
						LA15: ;
						if (!LOC14) goto LA16;
						nimln(92, "nimconf.nim");
						doelse_186230(L, tok);
						nimln(93, "nimconf.nim");
						goto LA1;
					}
					LA16: ;
				}
				break;
				case ((NU16) 20):
				{
					nimln(95, "nimconf.nim");
					{
						NIM_BOOL LOC21;
						LOC21 = 0;
						LOC21 = (dest == ((NU8) 1));
						if (!(LOC21)) goto LA22;
						LOC21 = (nestedifs == ((NI) 0));
						LA22: ;
						if (!LOC21) goto LA23;
						nimln(96, "nimconf.nim");
						doelif_186251(L, tok);
						nimln(97, "nimconf.nim");
						goto LA1;
					}
					LA23: ;
				}
				break;
				case ((NU16) 22):
				{
					nimln(99, "nimconf.nim");
					{
						if (!(nestedifs == ((NI) 0))) goto LA28;
						nimln(100, "nimconf.nim");
						doend_186191(L, tok);
						nimln(101, "nimconf.nim");
						goto LA1;
					}
					LA28: ;
					nimln(102, "nimconf.nim");
					{
						NI TMP2484;
						if (!(((NI) 0) < nestedifs)) goto LA32;
						TMP2484 = subInt(nestedifs, ((NI) 1));
						nestedifs = (NI)(TMP2484);
					}
					LA32: ;
				}
				break;
				default:
				{
				}
				break;
				}
				nimln(105, "nimconf.nim");
				ppgettok_186009(L, tok);
			}
			goto LA3;
			LA7: ;
			{
				nimln(106, "nimconf.nim");
				if (!((*tok).toktype == ((NU8) 1))) goto LA36;
				nimln(107, "nimconf.nim");
				lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2485));
			}
			goto LA3;
			LA36: ;
			{
				nimln(109, "nimconf.nim");
				ppgettok_186009(L, tok);
			}
			LA3: ;
		}
	} LA1: ;
	popFrame();
}