⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compiler.c

📁 笔者自创的9个汇编终结符实现普通+,-,*,/,I/O的实用编译器(产生80486目标码)
💻 C
📖 第 1 页 / 共 2 页
字号:

void first(){
char fat=1,usr,head,loc,cnt,eps;
	while(fat)
		for(fat=0,usr=3;usr!=item_grp_cnt;usr++)//用户
			if(DOT==item_grp[usr].dot_nt_t[1].flg){//X->.Y

				head=item_grp[usr].dot_nt_t[0].loc;

				if(item_grp[usr].dot_nt_t_cnt>2 &&\
					NT==item_grp[usr].dot_nt_t[2].flg){//X->非空Y
					cp_1st(head,item_grp[usr].dot_nt_t[2].loc);
					if(ate)
						fat=1;
				}

				for(cnt=2;;){//从Y
					if(cnt==item_grp[usr].dot_nt_t_cnt)break;

					loc=item_grp[usr].dot_nt_t[cnt].loc;

					if(T==item_grp[usr].dot_nt_t[cnt].flg)break;

					for(eps=0;eps!=nt_grp[loc].first_cnt;eps++)
						if(1==nt_grp[loc].first[eps])
							goto _eps;

					break;//全实

_eps:				cnt++;
				}

				if(cnt==item_grp[usr].dot_nt_t_cnt){//X->```@
					add(nt_grp[head].first,&nt_grp[head].first_cnt,1);//加eps
					if(ate)
						fat=1;
				}else
					if(T==item_grp[usr].dot_nt_t[cnt].flg){//X->Y1Yi,a,(Y->@)
						add(nt_grp[head].first,&nt_grp[head].first_cnt,loc);
						if(ate)
							fat=1;
					}else{//X->Y1Yi,Z,(Y->@)
						cp_1st(head,loc);
						if(ate)
							fat=1;
				}
			}
}

void cp_fol(nt,before)char nt,before;{
	paw=nt_grp[nt].follow_cnt;
	for(sh1.u=0;sh1.u!=(size_t)nt_grp[before].follow_cnt;sh1.u++)
		add(nt_grp[nt].follow,&nt_grp[nt].follow_cnt,nt_grp[before].follow[sh1.u]);
	ate=nt_grp[nt].follow_cnt>paw;
}

void follow(){
char fat=1,ext,nt,after,cnt,eps;
	while(fat)
		for(fat=0,ext=0;ext!=item_grp_cnt;ext++)//拓广
			if(DOT==item_grp[ext].dot_nt_t[1].flg)//X->.Y
				for(cnt=2;cnt!=item_grp[ext].dot_nt_t_cnt;cnt++)//从Y
					if(NT==item_grp[ext].dot_nt_t[cnt].flg){//针对
						nt=item_grp[ext].dot_nt_t[cnt].loc;

						if(cnt!=item_grp[ext].dot_nt_t_cnt-1){//X->```Y```
							after=item_grp[ext].dot_nt_t[cnt+1].loc;

							if(T==item_grp[ext].dot_nt_t[cnt+1].flg){//X->```Ya```
								add(nt_grp[nt].follow,&nt_grp[nt].follow_cnt,after);
								if(ate)
									fat=1;
							}else{//X->```YZ```
								for(eps=0;eps!=nt_grp[after].first_cnt;eps++)//first到follow
									if(1!=nt_grp[after].first[eps]){//非eps
										add(nt_grp[nt].follow,&nt_grp[nt].follow_cnt,nt_grp[after].first[eps]);
										if(ate)
											fat=1;
									}

								if(cnt==item_grp[ext].dot_nt_t_cnt-2)//X->```YZ,(Z->@)
									for(eps=0;eps!=nt_grp[after].first_cnt;eps++)
										if(1==nt_grp[after].first[eps]){//虚
											cp_fol(nt,item_grp[ext].dot_nt_t[0].loc);
											if(ate)
												fat=1;
											break;//单
										}
							}
						}else{//X->```Y
							cp_fol(nt,item_grp[ext].dot_nt_t[0].loc);
							if(ate)
								fat=1;
						}
					}
}

void g4(o,a0,a1,a)char o,a0,a1,a;{
	g4_af[g4_af_cnt].op=o;
	g4_af[g4_af_cnt].a0=a0;
	g4_af[g4_af_cnt].a1=a1;
	g4_af[g4_af_cnt].aim=a;
	g4_af[g4_af_cnt++]._if=-1;//usr
}

void hi(){
char loc=-1,loc1,rank;
	for(rem=0,printf("\nStack\tSentence_Ctl");;){
l:		printf("\n<%d>\t",sh1.u++);
		for(ate=0;ate<=dew;ate++)
			if(ate & 1){
				loc1=stk[ate].loc;
				printf("%s",T==stk[ate].flg?t_grp[loc1]:nt_grp[loc1].atom);
			}else//状态
				printf("{%d}",stk[ate].loc);

		if(-1==loc){
			stk[0].flg=eat(0);
			if(-1!=ate){
				for(loc=2;loc!=t_grp_cnt;loc++)//用户
					if(!strcmp(t_grp[loc],atom))
						break;
			}else
				loc=0;//#
			printf("\nAte\t%s",loc?atom:"#");
		}

		rank=stk[dew].loc;ate=-1;
		for(sh0.u=0;sh0.u!=(size_t)U.item_set_grp[rank].reduce_cnt;sh0.u++){
			loc1=U.item_set_grp[rank].reduce[sh0.u].loc;//针对
			if(memchr(nt_grp[loc1].follow,loc,nt_grp[loc1].follow_cnt))
				if(-1==ate){
					ate=sh0.u;
					item_grp_cnt=U.item_set_grp[rank].reduce[ate].flg;//项目号
				}else//产生式
					printf("\nREDUCES_?\t{%d}\t[%d]?[%d]\n",rank,\
					item_grp_cnt,U.item_set_grp[rank].reduce[sh0.u].flg);
		}

		for(sh0.u=0;sh0.u!=(size_t)U.item_set_grp[rank].shift_cnt;sh0.u++)//先移入
			if(U.item_set_grp[rank].shift[sh0.u].loc==loc){
				if(-1!=ate)
					printf("\nSHIFT_REDUCE_?\t{%d}\t[%d]\n",rank,\
					U.item_set_grp[rank].reduce[ate].flg);

				stk[++dew].flg=T;
				stk[dew].loc=loc;
				stk[++dew].loc=U.item_set_grp[rank].shift[sh0.u].flg;

				if(!strcmp(atom,"iD")||!strcmp(atom,"_iD")||!strcmp(atom,"dEC"))
					stk[dew].flg=stk[0].flg;//位,位,值

				if(loc)
					loc=-1;//再读
				goto l;
			}

		putchar('\t');//句柄
		if(-1==ate)//依FOLLOW集
			break;

		dew-=2*item_grp[item_grp_cnt].dot_nt_t_cnt-4;//退栈
		for(paw=0,putchar('\n');paw!=item_grp[item_grp_cnt].dot_nt_t_cnt-1;paw++){//前DOT
			loc1=item_grp[item_grp_cnt].dot_nt_t[paw].loc;

			if(NT==item_grp[item_grp_cnt].dot_nt_t[paw].flg){
				printf("%s\t",op.u[0].p=(char*)&nt_grp[loc1].atom);//柄

				if(!paw){
					sh0.u=loc1;

					if(!strcmp(op.u[0].p,"ADD"))//ADD iD = iD + dEC
						g4(loc1,stk[dew+3*2].flg,stk[dew+5*2].flg,stk[dew+1*2].flg);
					else
					if(!strcmp(op.u[0].p,"IF"))//填JG的aim
						g4_af[if_grp[--if_grp_cnt]].aim=g4_af_cnt;
					else
					if(!strcmp(op.u[0].p,"JG")){//JG iD > iD
						if_grp[if_grp_cnt++]=g4_af_cnt;
						g4(loc1,stk[dew+1*2].flg,stk[dew+3*2].flg,-1);
					}
					else
					if(!strcmp(op.u[0].p,"GO"))//GO go _id,填to_grp位
						g4(loc1,-1,-1,stk[dew+2*2].flg);
					else
					if(!strcmp(op.u[0].p,"GET")||!strcmp(op.u[0].p,"PUT"))//GET + iD,PUT > iD
						g4(loc1,-1,-1,stk[dew+2*2].flg);
					else
					if(!strcmp(op.u[0].p,"GOAL")){//GOAL _id
						to_grp[stk[dew+1*2].flg].val=g4_af_cnt;//定义
						g4(loc1,-1,-1,stk[dew+1*2].flg);//标明
					}
					else
					if(!strcmp(op.u[0].p,"REM"))
						rem=0;
				}
			}else
				printf("%s\t",t_grp[loc1]);//柄
		}

		rank=stk[dew].loc;
		for(ate=0;ate!=U.item_set_grp[rank].out_cnt;ate++)
			if(NT==U.item_set_grp[rank].out[ate].by.flg &&\
				sh0.u==(size_t)U.item_set_grp[rank].out[ate].by.loc){
				stk[++dew].flg=NT;
				stk[dew].loc=sh0.u;
				stk[++dew].loc=U.item_set_grp[rank].out[ate].to;
				goto l;
			}

		if(sh1.u>1)return;//齐
		break;
	}
	printf("?\t%s",t_grp[loc]);//错
}

void tr(){
	if(sh1.p=strstr((char*)U.item_set_grp,op.u[0].p))
		for(sh1.p+=strlen(op.u[0].p);*sh1.p&&!isupper(*sh1.p);sh1.p++)//有
			if('_'==*sh1.p){//约定
				sh1.p++;
				if('_'==*sh1.p){
					sh1.p++;
					if(isdigit(*sh1.p))//__[0..9],间寻id_grp
						fprintf(LP_F,"id_grp[%d]",*(sh0.p+*sh1.p-'0'));
					else//转移
						fprintf(LP_F,"%s",-1==*(sh0.p+4)?to_grp[*(sh0.p+3)].atom:to_grp[*(sh0.p+4)].atom);
				}else
					if(isdigit(*sh1.p))//立即数_[0..9]
						fprintf(LP_F,"%d",*(sh0.p+*sh1.p-'0'));
					else//标号_:,于aim
						fprintf(LP_F,"%s:",to_grp[*(sh0.p+3)].atom);
			}else
				fputc(*sh1.p,LP_F);
}

ULONGLONG GCD(ULONGLONG s,ULONGLONG t){//入:s>t
ULONGLONG o;
	while(1){
		if(!(o=s%t))
			return t;
		s=t;
		t=o;
	}
}

ULONGLONG N_pk_R(ULONGLONG N,ULONGLONG R,ULONGLONG n){//入:N>=R
union{
BYTE B[8];
ULONGLONG U;
}A,G;
ULONGLONG r,*LP_U;
	sh0.u=0;

	if(!n){
		if(N-R<R)//(N/2)<R
			R=N-R;//N-R<N/2
		if(!R)
			return 1;
		if(1==R)
			return N;
	}

	if(LP_U=(ULONGLONG*)malloc((size_t)(R+R-1)*sizeof(ULONGLONG))){//定N/2>=R>1
		for(r=N;r>=N-R+1;r--)
			*(LP_U+N-r)=r;

		for(r=R;r>1;r--)
			if(n)
				*(LP_U+R+R-r)=1;
			else
				*(LP_U+R+R-r)=r;

		while(1){
			for(A.U=1,r=R;r>1;r--){
				for(n=N;n>=N-R+1;n--)
					if((1<*(LP_U+N-n))&&(1<*(LP_U+R+R-r))&&(1<(G.U=GCD(*(LP_U+N-n),*(LP_U+R+R-r))))){//N-R+1>=R+1>R>=2
						A.U=0;
						*(LP_U+N-n)/=G.U;
						*(LP_U+R+R-r)/=G.U;
						goto d;
					}
d:			;
			}
			if(A.U)
				break;//分子定除尽分母,结出组合N*...*(N-R+1)>(N-R+1)^R>/R^R>=2^R>1
		}

		for(n=N;n>=N-R+1;n--)
			if(*(LP_U+N-n)>A.U)//这时,正整数分子连乘得组合,定有*(LP_U+N-n)>1者,否则连乘=1
				A.U=*(LP_U+N-(G.U=n));

		*(LP_U+N-G.U)=1;//分子最大者,汲到基乘

		for(n=N;n>=N-R+1;n--)
			if(1<*(LP_U+N-n))
				for(sh1.s[0]=sh0.s[0],G.U=A.U,r=1;r!=*(LP_U+N-n);r++){//乘法无辨溢出,改累加
					if(A.U+G.U<A.U){
						sh1.s[1]=A.B[7];//高字节结合
						A.U=(A.U&0xffffffffffffff)+(G.U&0xffffffffffffff);//现无溢出
						sh1.s[1]+=G.B[7]+A.B[7];
						A.B[7]=sh1.B[2];
						sh0.u+=sh1.B[3];//64位1~F进
						if(sh0.s[1])
							goto f;
					}else
						A.U+=G.U;

					sh0.u+=sh1.s[0];//拓字结合
					if(sh0.s[1])
						goto f;
				}
f:		free(LP_U);
		return A.U;
	}
	sh0.s[1]=1;
	return 0;
}

BYTE chk_ov(size_t n){
	if(sh0.s[1])return 1;
	printf("%08x,%04x%016I64x\n",n,sh0.s[0],op.U);
	return 0;
}

void main(O4 c,O4 v[]){
	printf("mean0,deviate1_Normal<=%#x_a1->a2[pt_cnt_%d/grp];rule(R_nt=%d)[hi,tr]->a.asm,if 2=ac:HEX (1+1)^n<=ffffffff_coefficient,if 0 lead:Factorial(>1)\n",\
	NOM,Pnp,R_nt);

	if(2==c.u){
		v[0].u=strtoul(v[1].p,NULL,16);
		if('0'==*v[1].p){
			if(1<v[0].u){
				op.U=N_pk_R(v[0].u,v[0].u-1,1);
				chk_ov(v[0].u);
			}
		}else
			for(c.u=0;c.u<=v[0].u/2;getch(),c.u++){
				op.U=N_pk_R(v[0].u,c.u,0);
				if(chk_ov(c.u))break;
			}
		goto e;
	}

	if(3==c.u&&\
		(v[0].u=strtoul(v[1].p,NULL,16))&&\
		(v[0].u<=NOM)&&\
		(LP_F=fopen(v[2].p,"wb"))){

		for(v[1].u=c.u=0;c.u!=v[0].u;c.u++){
			srand((size_t)(time(NULL)+c.u));
			for(U.f[c.u]=paw=ate=0;ate!=Pnp;ate+=2){
o:				op.u[1].u=rand();
				sh0.f=2*((float)op.u[1].u/RAND_MAX)-1;

				v[2].u=rand();
				sh1.f=2*((float)v[2].u/RAND_MAX)-1;

				if((op.u[0].f=sh0.f*sh0.f+sh1.f*sh1.f)>1)
					goto o;

				paw+=((op.u[1].u&15)<4)+((v[2].u&15)<4);

				U.f[c.u]+=(sh0.f+sh1.f)*(op.u[0].f=(float)sqrt(-2*log(op.u[0].f)/op.u[0].f));
				fprintf(LP_F,"%f %f\n",sh0.f*op.u[0].f,sh1.f*op.u[0].f);

				v[1].u+=(fabs(sh0.f*op.u[0].f)>2.58)+(fabs(sh1.f*op.u[0].f)>2.58);
			}

			printf("%#x]mean=%f\n",c.u,U.f[c.u]/Pnp);

			op.d=e8_th;
			for(ate=paw;ate;ate--)//2.63131e+035=32!,8^32=7.92282e+028,3^32=1.85302e+015
				op.d*=8/(float)ate;
			printf("probable(rand[0,%d]&15<4)=1/4;8^%d/(e8*%d!)=%f\n",RAND_MAX,paw,paw,op.d);

			sh1.u=(size_t)N_pk_R(Pnp,paw,0);
//C*(1/4)^paw*(1-1/4)^(Pnp-paw)=C*3^paw/4^Pnp;当(n-r)/[r+1]>1,C(n,r+1)=n!/{[n-(r+1)]!*[r+1]!}
//=C(n,r)*(n-r)/[r+1]>C(n,r),n奇:r<[(n-1)/2];偶:r<=n/2-1<=(n-2)/2<[(n-1)/2],C(32,16)=23d3c246

			op.d=1;
			for(ate=Pnp-paw;ate;ate--)
				op.d*=3;

			op.d*=sh1.u/p4_32;//远离拓字;
			printf("Combine(%d,%d)=%d*3^%d/4^%d=%.24f\n",Pnp,paw,sh1.u,Pnp-paw,Pnp,op.d);//xls+1精度
			getch();
		}
		fclose(LP_F);

		printf("1%%_N(0,1)_abs>2.58;%#x/%#x=%f\n",v[1].u,c.u*Pnp,(float)v[1].u/(c.u*Pnp));

		for(sh0.u=sh1.u=op.u[0].u=0;op.u[0].u!=c.u;op.u[0].u++){
			sh0.f+=U.f[op.u[0].u];
			sh1.f+=U.f[op.u[0].u]*U.f[op.u[0].u];
		}

		sh0.f/=Pnp;
		v[1].f=sh0.f/c.u;
		printf("N(0,1/%d=%f)distribute;%f,%f",Pnp,(float)1/(Pnp),v[1].f,(double)(sh1.f/(Pnp*Pnp)-v[1].f*sh0.f)/c.u);
e:		exit(0);
	}

	if(!(LP_F=fopen("rule","r")))goto e;

	item_grp[0].dot_nt_t[0].flg=NT;
	item_grp[0].dot_nt_t[1].flg=DOT;
	item_grp[0].dot_nt_t[2].flg=NT;
	item_grp[0].dot_nt_t[2].loc=1;//用户
	item_grp[0].dot_nt_t[3].flg=T;
	item_grp[0].dot_nt_t_cnt=4;
	dot(2);dot(3);

	rule();
	fclose(LP_F);

	printf("\nNT_GRP\n");
	for(rem=0;rem!=nt_grp_cnt;rem++)
		printf("%s\t",nt_grp[rem].atom);

	printf("\nT_GRP\n");
	for(rem=0;rem!=t_grp_cnt;rem++)
		printf("%s\t",t_grp[rem]);

	first();
	memmove(nt_grp[0].first,nt_grp[1].first,nt_grp[0].first_cnt=nt_grp[1].first_cnt);//hi
	nt_grp[0].follow_cnt=1;//拓广
	follow();

	U.item_set_grp[0].item_cnt=1;//<S>->.用户首NT

	U.item_set_grp[0].fore[0].t_grp[0]=1;//eps
	U.item_set_grp[0].fore[0].t_grp_cnt=1;
	U.item_set_grp[0].lalr=-1;

	closure();
	item_set_grp_cnt=1;

	for(paw=0;paw<item_set_grp_cnt;paw++){
		stk[1].flg=NT;
		for(stk[1].loc=1;stk[1].loc!=nt_grp_cnt;stk[1].loc++)//用户
			arrow();

		stk[1].flg=T;
		for(stk[1].loc=0;stk[1].loc!=t_grp_cnt;stk[1].loc++)
			arrow();
	}

	printf("\nITEM");
	for(rem=0;rem!=item_grp_cnt;rem++)
		for(printf("\n[%d]\t",rem),ate=0;ate!=item_grp[rem].dot_nt_t_cnt;ate++){
			c.u=item_grp[rem].dot_nt_t[ate].loc;
			if(DOT==item_grp[rem].dot_nt_t[ate].flg)
				putchar('.');
			else
				printf("%s\t",NT==item_grp[rem].dot_nt_t[ate].flg?nt_grp[c.u].atom:t_grp[c.u]);
		}

	printf("\n{ITEM_SET},{LALR},[ITEM],FORE");
	for(rem=0;rem!=item_set_grp_cnt;rem++){
		printf("\n{%d}\t{%d}",rem,U.item_set_grp[rem].lalr);

		for(item_grp_cnt=0;item_grp_cnt!=U.item_set_grp[rem].item_cnt;item_grp_cnt++){
			c.u=U.item_set_grp[rem].item[item_grp_cnt];
			printf("\n[%d]\t",c.u);

			if(DOT==item_grp[c.u].dot_nt_t[item_grp[c.u].dot_nt_t_cnt-1].flg){
				ate=U.item_set_grp[rem].reduce_cnt;
				U.item_set_grp[rem].reduce[ate].flg=c.u;//项目号
				U.item_set_grp[rem].reduce[ate].loc=item_grp[c.u].dot_nt_t[0].loc;//产生式首nt_grp位
				U.item_set_grp[rem].reduce_cnt++;
			}

			for(c.u=0;c.u!=(size_t)U.item_set_grp[rem].fore[item_grp_cnt].t_grp_cnt;c.u++)
				printf("%s\t",t_grp[U.item_set_grp[rem].fore[item_grp_cnt].t_grp[c.u]]);
		}

		for(item_grp_cnt=0;item_grp_cnt!=U.item_set_grp[rem].out_cnt;item_grp_cnt++){
			c.u=U.item_set_grp[rem].out[item_grp_cnt].by.loc;
			paw=U.item_set_grp[rem].out[item_grp_cnt].to;
			if(NT==U.item_set_grp[rem].out[item_grp_cnt].by.flg)
				printf("\n%s=>{%d}\t",nt_grp[c.u].atom,paw);
			else{
				printf("\n%s=>{%d}\t",t_grp[c.u],paw);
				ate=U.item_set_grp[rem].shift_cnt;
				U.item_set_grp[rem].shift[ate].flg=paw;
				U.item_set_grp[rem].shift[ate].loc=c.u;
				U.item_set_grp[rem].shift_cnt++;
			}
		}
	}

	printf("\nFIRST;FOLLOW");
	for(paw=0;paw!=nt_grp_cnt;paw++){
		printf("\n%s\t",nt_grp[paw].atom);
		for(rem=0;rem!=nt_grp[paw].first_cnt;rem++)printf("%s\t",t_grp[nt_grp[paw].first[rem]]);
		putchar(';');
		for(rem=0;rem!=nt_grp[paw].follow_cnt;rem++)printf("%s\t",t_grp[nt_grp[paw].follow[rem]]);
	}

	if(!(LP_F=fopen("hi","r")))goto e;
	hi();
	fclose(LP_F);

	g4_af[0].entry=1;//首式
	for(rem=0;rem!=g4_af_cnt;rem++){
		op.u[0].p=nt_grp[g4_af[rem].op].atom;

		if(!strcmp(op.u[0].p,"JG")){
			c.u=g4_af[rem].aim;
			for(item_grp_cnt=0;item_grp_cnt!=to_grp_cnt;item_grp_cnt++)
				if(to_grp[item_grp_cnt].val==(char)c.u)//已指
					break;

			if(item_grp_cnt==to_grp_cnt){
				sprintf(to_grp[to_grp_cnt].atom,"L%d",to_grp_cnt);//内标
				to_grp[to_grp_cnt++].val=c.u;//现指
			}

			g4_af[rem]._if=item_grp_cnt;//效GO
			g4_af[rem+1].entry=g4_af[c.u].entry=1;//跳下
		}

		if(!strcmp(op.u[0].p,"GO")){//优化
			item_grp_cnt=g4_af[rem].aim;
			while(!strcmp(nt_grp[g4_af[item_grp_cnt].op].atom,"GO"))item_grp_cnt=g4_af[item_grp_cnt].aim;
			g4_af[rem].aim=item_grp_cnt;
			g4_af[to_grp[g4_af[item_grp_cnt].aim].val].entry=1;//跳
		}
	}

	if(LP_F=fopen("tr","r")){
		sh0.u=fread(op.u[0].p=(char*)U.item_set_grp,1,sizeof(U.item_set_grp)-1,LP_F);
		if(fread(&rem,1,1,LP_F)){
			fclose(LP_F);
			goto e;
		}

		fclose(LP_F);
		*(op.u[0].p+sh0.u)=0;//零
		LP_F=fopen("a.asm","w");
		fprintf(LP_F,".model\tsmall\n.code\nid_grp\tdb\t%d\tdup(0)\nL:\n",id_grp_cnt);
	}

	sh0.p=(char*)g4_af;
	printf("\nG4\tOP\tA0\tA1\tAIM\t_IF\tBLK");
	for(rem=0;rem!=g4_af_cnt;rem++){
		for(item_grp_cnt=0;item_grp_cnt!=to_grp_cnt;item_grp_cnt++)
			if('L'==to_grp[item_grp_cnt].atom[0]&&to_grp[item_grp_cnt].val==rem){
				printf("\n%s",to_grp[item_grp_cnt].atom);
				if(LP_F)
					fprintf(LP_F,"\n%s:",to_grp[item_grp_cnt].atom);//内标
			}

		if(g4_af[rem].entry)
			c.u='B';

		op.u[0].p=nt_grp[g4_af[rem].op].atom;
		printf("\n<%d>\t%s\t",rem,op.u[0].p);

		if(!strcmp(op.u[0].p,"ADD")||!strcmp(op.u[0].p,"JG"))
			printf("%s",id_grp[g4_af[rem].a0].atom);

		putchar('\t');

		if(!strcmp(op.u[0].p,"ADD"))
			printf("%d",g4_af[rem].a1);//数
		else
			if(!strcmp(op.u[0].p,"JG"))
				printf("%s",id_grp[g4_af[rem].a1].atom);

		putchar('\t');

		item_grp_cnt=g4_af[rem].aim;
		if(!strcmp(op.u[0].p,"ADD")||!strcmp(op.u[0].p,"GET")||!strcmp(op.u[0].p,"PUT"))
			printf("%s",id_grp[item_grp_cnt].atom);
		else
			if(!strcmp(op.u[0].p,"GOAL"))
				printf("%s",to_grp[item_grp_cnt].atom);
			else{
				if(!strcmp(op.u[0].p,"JG"))
					printf("<%d>",item_grp_cnt);
				else//GO
					printf("<%d>",to_grp[item_grp_cnt].val);
				if(c.u)//入块
					c.u='b';
			}

		if(c.u&&rem!=g4_af_cnt-1&&g4_af[rem+1].entry)
			c.u='b';

		printf("\t%d\t",g4_af[rem]._if);

		if(c.u){//块内
			if(LP_F)
				tr();

			putchar(c.u);
			if('b'==c.u)
				c.u=0;
		}

		sh0.p+=sizeof(struct G4_AF);
	}

	if(LP_F){
		fprintf(LP_F,"mov\tah,76\nint\t33\nend\tL");
		fclose(LP_F);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -