亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? decl.c

?? 本程序集是Allen I. Holub所寫的《Compiler Design in C》一書的附隨軟件
?? C
?? 第 1 頁 / 共 3 頁
字號:
															if (lastst == begin) {
																temp1->type = bt_ifunc;
																break;
															}
														}
														else getsym();
													}
													
												}
												else {
/* (In case a declaration is in parenthesis */
      	                  decl1();
        	                needpunc(closepa,0);
													decl2();
												}
                        break;
                default:
                        decl2();
                        break;
                }
}

void decl2(void)
/*
 * type modifiers that come AFTER the name of the variable
 */
{       TYP     *temp1;
lp:
        switch (lastst) {
								case kw_const:
									head->cflags |= DF_CONST;
									getsym();
									goto lp;
								case kw_volatile:
									head->cflags |= DF_VOL;
									getsym();
									goto lp;
                case openbr:
												decl3();
												decl2();
                        break;
                case openpa:
                        getsym();
	                      temp1 = maketype(bt_func,0);
												head->uflags |= UF_DEFINED;
    	                  temp1->val_flag = 1;
      	                temp1->btp = head;
        	              head = temp1;
												head->uflags |= UF_DEFINED;
												declfuncarg(intflag);
												if (lastst == begin) {
													temp1->type = bt_ifunc;
													break;
												}
                        break;
								case colon:
										getsym();
										head->bits = intexpr(0);
										if (head->type != bt_long && head->type != bt_unsigned
												&& head->type != bt_short && head->type != bt_unsignedshort
												&& head->type != bt_char && head->type != bt_unsignedchar) {
											if (prm_ansi)
												generror(ERR_INTBITFIELDS,0,0);
											else
												generror(ERR_BFTYPE,0,0);
											head->bits = -1;
										}
										else
											if (prm_ansi && head->size != stdintsize) {
												generror(ERR_INTBITFIELDS,0,0);
												head->bits = -1;
											}
										break;
                }
}

void decl3(void)
/*
 * Array index handling
 */
{
  TYP *temp1, *list[40];
	int count = 0,i;
	int mustsize = 0;
	head->uflags |= UF_DEFINED;
	head->uflags &= ~UF_CANASSIGN;
	while(lastst == openbr) {
                        getsym();
                        temp1 = maketype(bt_pointer,0);  
                        temp1->val_flag = 1;
                        if(lastst == closebr) {
														   	if (mustsize)
																	generror(ERR_SIZE,0,0);
    	                           temp1->size = 0;
                                getsym();
                                }
                        else {
                                temp1->size = intexpr(0);
                                needpunc(closebr,skm_declclosebr);
                                }
												list[count++] = temp1;
												mustsize = 1;
	}
	if (head != NULL) {
		list[count-1]->size *= head->size;
		if (tail == NULL)
			tail = head;
	}
	for (i=count-1; i>0; i--) {
		list[i-1]->size *= list[i]->size;
		list[count-1]->uflags |= UF_DEFINED;
	}

	for (i=0; i < count-1; i++)
		list[i]->btp = list[i+1];
	list[count-1]->btp = head;

	head = list[0];
	if (tail == NULL)
		tail = list[count-1];
}
int bitsize(int type)
/*
 * Max bit field depends on the type
 */
{
	switch (type) {
		case bt_char:
		case bt_unsignedchar:
			return 8;
		case bt_short:
		case bt_unsignedshort:
			return 16;
		case bt_long:
		case bt_unsigned:
			return 32;
	}
	return 0;
}
int oksize(void)
/*
 * See if the size field is ok or if we should gen a message
 */
{
	TYP *q = head;
	while (q->type == bt_pointer) {
		if (q->val_flag)
			return 1;
		q = q->btp;
	}
	return head->size != 0;
}
int     basedeclare(TABLE *table,int al,long ilc,int ztype, int flags)
/*
 *  Once a type declarator is found we come here to get the remainder of the
 * declaration and allocate spae
 *
 */
{       SYM     *sp=0, *sp1;
        TYP     *dhead;
        int     nbytes,ufsave;
        nbytes = 0;
        dhead = head;
				ufsave = head->uflags;
        for(;;) {
								sp1 = 0;
                declid[0] = 0;
                decl1();

								/* stupid C standard uses a proper function name
								** as an alias for a pointer to a func when is a member...
								*/
								if (al == sc_member)
								  if (head->type == bt_func) {
										head->type = bt_ptrfunc;
										head->size = 4;
									}
									else if (head->type == bt_ifunc)
										generror(ERR_NOFUNCSTRUCT,0,0);
								
								/* In case they put the extern tag on an ifunc */
								if (head->type == bt_ifunc && al == sc_external)
									al = sc_global;
		
								if (declid[0] == 0) {
									if ((flags & DF_FUNCPARMS)) {
										sprintf(declid,"**ARG%d**",pcount++);
									}
								}
								head->cflags |= flags;
                if( declid[0] != 0) {      /* otherwise just struct tag... */
                    sp = xalloc(sizeof(SYM));
										if (head->type == bt_func || head->type == bt_ifunc)
#ifdef CPLUSPLUS
											if (prm_cplusplus)
												if (!strcmp(declid,"_main")) {
													SYM *sp1;
													head->sname = sp->name = litlate(declid);
													sp1 = search(sp->name,&gsyms);
													if (sp1 && sp1->tp->type == bt_ifunc)
														generror(ERR_NOOVERMAIN,0,0);
												}
												else if (mangleflag && !ispascal)
													head->sname = sp->name = cppmangle(declid,head);
												else
													head->sname = sp->name = litlate(declid);
											else 
#endif
												head->sname = sp->name = litlate(declid);
										else
											sp->name = litlate(declid);
										sp->defalt = 0;
                    sp->storage_class = al;
                    sp->tp = head;
										sp->extflag = FALSE;
										sp->absflag = (al == sc_abs);
										sp->intflag = flags &DF_INT;
										sp->pascaldefn = ispascal;
										sp->init = 0;
										sp->indecltable = 0;
										sp->funcparm = 0;
										sp->inreg = 0;
										sp->staticlabel = FALSE;
										if (al == sc_external && lastst == assign)
											sp->storage_class = sc_global;
										if (sp->intflag && ispascal)
											generror(ERR_PASCAL_NO_INT,0,0);
										if (al == sc_autoreg) {
											if (head->size > 4) {
												sp->storage_class = sc_auto;
												gensymerror(ERR_ILLREGISTER,sp->name);
											}
											head->sname = sp->name;
										}	
										if (al != sc_type && (oksize() || sp->tp->type == bt_func || sp->tp->type == bt_ifunc)) {
											if (al == sc_abs)
												sp->value.i = ilc;
											else
												if (head->type != bt_func && head->type != bt_ifunc)
													if (sp->storage_class == sc_static && table == &lsyms) {
														sp->value.i = nextlabel++;
														sp->staticlabel = TRUE;
													}
													else
														sp->value.i = block_nesting;
												else
												  sp->value.i = 0;
											{
												int align = getalign(al,head);
												int noadj = FALSE;

												if (al != sc_member || (head->bits != -1 && bittype != head->type && head->bits +curbit > bitsize(head->type))) {
													bittype = head->type;
													curbit = 0;
												}
												else
													noadj = head->bits != -1;

												if (al == sc_member) {
														int val;
														if (!noadj) {
															val = (ilc + nbytes) %align;
															if (val)  val = align - val;
															nbytes += val;
														}
														sp->value.i = nbytes + ilc;
														if (!noadj)
	                        		if(ztype == bt_union)
  	                            nbytes = imax(nbytes,sp->tp->size);
    	                    		else if(al != sc_external)
      	                        nbytes += sp->tp->size;
												}
											}
											if (head->bits != -1) {
												if (al != sc_member) {
													generror(ERR_BFILLEGAL,0,0);
													head->bits = -1;
												}
												else if (head->bits > bitsize(head->type)) {
													generror(ERR_BFTOOBIG,0,0);
													head->bits = -1;
												}
												else {
													if (prm_revbits)
														head->startbit = head->size*8-curbit-head->bits;
													else
														head->startbit = curbit;
													curbit+=head->bits;
												}
											}
											if (sp->absflag &&( sp->tp->type == bt_func || sp->tp->type == bt_ifunc))
												gensymerror(ERR_ILLCLASS,lastid);
											if (sp->intflag &&( sp->tp->type != bt_func && sp->tp->type != bt_ifunc))
												gensymerror(ERR_ILLCLASS,lastid);
                      if( sp->tp->type == bt_func  && al != sc_static)
                            sp->storage_class = sc_externalfunc;
											
  										sp1 = search(sp->name,table);
											if (sp->name[0] == '@' && !sp1)
												funcrefinsert(declid,sp->name,head,table);
                     	if (!sp1 || (sp1->tp->type != bt_func && sp1->tp->type != bt_ifunc)) {
												if (!sp1 || al == sc_auto || al == sc_autoreg)
                         	insert(sp,table);                                                                       
												else {
													if (!exactype(sp->tp,sp1->tp))
														gensymerror(ERR_DECLMISMATCH,sp->name);
													if (sp1->tp->size == 0)
														sp1->tp = sp->tp;
													if (sp1->storage_class == sc_external || sp1->storage_class == sc_externalfunc) {
														sp1->storage_class = sp->storage_class;
														sp1->tp = sp->tp;
														sp1->value.i = sp->value.i;
													}
												}
											}
											else 
join:
											if (sp1->tp->type == bt_func && sp->tp->type == bt_ifunc){
												if (sp1->storage_class == sc_external || sp1->storage_class == sc_externalfunc || sp1->storage_class == sc_static)
													if (al == sc_static || sp1->storage_class == sc_static)
														sp->storage_class = sp1->storage_class = sc_static;
													else
														sp->storage_class = sp1->storage_class = sc_global;
											}
                     	if( sp->tp->type == bt_ifunc) { /* function body follows */
														 if (sp1)
															 if (sp1->tp->type == bt_ifunc)
															   gensymerror(ERR_MULTIPLEINIT,sp->name);
															 else
														     sp1->tp->type = bt_ifunc;
                             funcbody(sp);
														 lastdecl = sp1;
                             return nbytes;
                             }
                     	if( (sp->storage_class == sc_global || sp->storage_class == sc_static) &&
                           	sp->tp->type != bt_func && sp->tp->type != bt_ifunc
														&& !(flags & DF_FUNCPARMS)) {
													if (sp->tp->type == bt_ref && lastst != assign)
														gensymerror(ERR_REFMUSTINIT,lastid);
													if (!sp1)
														sp1 = sp;
                          doinit(sp1);
											}
											else 
												if (al == sc_auto || al == sc_autoreg) {
#ifdef CPLUSPLUS
													if (prm_cplusplus &&(flags & DF_FUNCPARMS)) {
														dodefaultinit(sp);
													}
													else{
														if (sp->tp->type == bt_ref && lastst != assign)
															gensymerror(ERR_REFMUSTINIT,lastid);
													}
#endif
												 	doautoinit(sp);
												}
										}
										else if (al != sc_type) {
											gensymerror(ERR_SIZE,declid);
											expskim(skm_declclosepa);
										}
										else if (sp->tp->type == bt_func || sp->tp->type == bt_ifunc) {
														gensymerror(ERR_ILLTYPE,declid);
														expskim(skm_declclosepa);
													}
													else {
														if (sp->tp->size) {
															sp->tp = copytype(sp->tp,0);
															sp->tp->sname = sp->name;
														}
                            insert(sp,table);
													}
                }
								if (!(flags & DF_FUNCPARMS)) {
	                if(lastst == semicolon)
                        break;
									dhead = copytype(dhead,0);
  	              needpunc(comma,0);
								}
								else {
	                if(lastst == comma)
										break;
									if (sp1)
										lastdecl = sp1;
									else
										lastdecl = sp;
                  return(nbytes);
								}
                if(declbegin(lastst) == 0)
                        break;
                head = dhead;
								head->uflags = ufsave;
                }
        getsym();
				if (sp1)
					lastdecl = sp1;
				else
					lastdecl = sp;
        return nbytes;
}
int     declare(TABLE *table,int al,int ztype, int flags)
/*
 * In this wrapper we do an ENTIRE declaration
 */
{
				int old_gf = global_flag,rv;
				if (al != sc_member)
					active_table = table;
				if (al == sc_static)
					global_flag ++;
        decl(table);
				rv = basedeclare(table,al,0,ztype,flags);
				global_flag = old_gf;
				return rv;
}
int     declare2(TABLE *table,int al,int ztype, int flags, long val)
/*
 * In this wrapper we do an ENTIRE declaration
 */
{
				int old_gf = global_flag,rv;
				if (al != sc_member)
					active_table = table;
				if (al == sc_static)
					global_flag ++;
        decl(table);
				rv = basedeclare(table,al,val,ztype,flags);
				global_flag = old_gf;
				return rv;
}

int     declbegin(int st)
/*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清精品久久久久| 69成人精品免费视频| 色综合久久久久久久久| 99久久综合色| 欧美性三三影院| 欧美喷水一区二区| 精品国产乱码久久久久久图片 | 久久久亚洲国产美女国产盗摄| 久久尤物电影视频在线观看| 国产日韩精品一区| 中文字幕一区二区不卡| 一区二区三区高清在线| 日本一区中文字幕| 国产精品白丝jk黑袜喷水| 色哟哟国产精品| 欧美一级久久久| 国产欧美精品一区二区色综合朱莉| 1000部国产精品成人观看| 午夜欧美视频在线观看| 国产成人自拍网| 91蜜桃在线免费视频| 欧美精品一二三区| 久久久久久综合| 亚洲一区在线观看免费| 悠悠色在线精品| 免费成人在线观看| 成人av网站在线观看| 欧美私模裸体表演在线观看| 日韩精品中文字幕在线不卡尤物| 久久美女高清视频| 一区二区欧美国产| 国产麻豆9l精品三级站| 欧洲激情一区二区| 久久久久久久久蜜桃| 亚洲一区二区三区四区五区黄| 狠狠狠色丁香婷婷综合激情| 国产成人免费在线视频| 欧美日韩一区二区三区在线看 | 青娱乐精品视频| 99久久精品免费看国产| 日韩亚洲电影在线| 国产精品国产三级国产普通话三级| 亚洲地区一二三色| 免费xxxx性欧美18vr| 成人少妇影院yyyy| 日韩一区二区三区免费看| 亚洲精品中文在线| 国产九色sp调教91| 日韩一区和二区| 玉足女爽爽91| 不卡一区在线观看| 精品电影一区二区| 三级不卡在线观看| 91成人免费在线视频| 国产欧美综合在线| 久久精品国产99久久6| 国产成人高清视频| 日韩成人一区二区| 91香蕉视频mp4| 亚洲免费在线看| 成人一区二区三区视频在线观看| 欧美成人video| www.成人网.com| 欧美日本不卡视频| 欧美亚洲另类激情小说| 色欧美乱欧美15图片| 免费成人小视频| 中文子幕无线码一区tr| 久久精品国产一区二区| 亚洲一区二区三区影院| 久久久久久久久久看片| 欧美一区二区三区性视频| 亚洲欧美中日韩| 美女www一区二区| 欧美日韩在线免费视频| 亚洲色图另类专区| 99久久综合99久久综合网站| 夜夜精品浪潮av一区二区三区| 欧美亚洲一区二区在线观看| 麻豆精品一区二区av白丝在线| 久久一区二区三区国产精品| 美国欧美日韩国产在线播放| 欧美激情在线免费观看| 欧美日韩免费电影| 成人免费高清在线| 亚洲成在人线免费| 国产精品美女一区二区| 欧美一区二区三区视频在线观看| 成人精品视频网站| 亚洲国产cao| 日韩免费成人网| 99精品在线观看视频| 亚洲国产欧美日韩另类综合| 欧美精品一区二区三区一线天视频| 懂色av一区二区三区免费看| √…a在线天堂一区| 欧美成人乱码一区二区三区| 99久久777色| 精品一区二区三区香蕉蜜桃| 亚洲裸体xxx| 久久一区二区三区四区| 精品视频在线看| 色综合天天综合网国产成人综合天| 国产高清不卡一区| 美女久久久精品| 久久国产精品区| 国产精品一级二级三级| 久久不见久久见免费视频1 | 成人午夜短视频| 日本成人在线不卡视频| 洋洋成人永久网站入口| 国产精品国产三级国产aⅴ无密码| 国产精品色哟哟网站| 国产精品麻豆久久久| 在线观看区一区二| 亚洲国产精品影院| 精品国产伦一区二区三区免费| aaa欧美色吧激情视频| 日韩激情中文字幕| 欧美激情综合五月色丁香小说| 欧洲国产伦久久久久久久| 韩国av一区二区| 亚洲一区二区三区免费视频| 精品国产免费一区二区三区四区 | 欧美中文字幕一二三区视频| 久久国产免费看| 日韩理论在线观看| 日韩欧美不卡一区| 色就色 综合激情| 国产精品白丝jk黑袜喷水| 午夜精品福利久久久| 国产精品不卡在线观看| 日韩欧美国产精品一区| 色婷婷av一区| 国产成人综合亚洲网站| 日韩一区精品字幕| 国产精品国产精品国产专区不蜜| 欧美日韩一区二区三区视频| 国产宾馆实践打屁股91| 三级久久三级久久久| 亚洲精选免费视频| 日本一二三四高清不卡| 欧美tk丨vk视频| 欧美视频在线一区二区三区| 国产91丝袜在线观看| 美女视频网站黄色亚洲| 一区二区三区在线免费| 中文一区二区在线观看| 欧美va亚洲va香蕉在线| 在线成人免费观看| 欧洲av在线精品| 一本一道综合狠狠老| 成人黄色小视频在线观看| 激情欧美一区二区三区在线观看| 亚洲国产欧美在线| 亚洲激情六月丁香| ㊣最新国产の精品bt伙计久久| 久久久天堂av| 日韩免费一区二区三区在线播放| 欧美欧美午夜aⅴ在线观看| 91福利资源站| 色综合色狠狠天天综合色| 成人黄色在线网站| 成人晚上爱看视频| 国产69精品久久777的优势| 国产一区二区三区四区五区美女| 免费久久精品视频| 理论电影国产精品| 毛片基地黄久久久久久天堂| 男人操女人的视频在线观看欧美| 午夜影院久久久| 五月婷婷激情综合| 午夜日韩在线电影| 三级欧美韩日大片在线看| 五月天激情综合网| 亚洲123区在线观看| 亚洲成a人片在线不卡一二三区 | 欧美午夜影院一区| 色www精品视频在线观看| 91麻豆免费观看| 色婷婷久久久久swag精品 | 国产精品第一页第二页第三页| 国产精品视频在线看| 中文字幕高清一区| 国产精品免费丝袜| 综合精品久久久| 亚洲午夜在线观看视频在线| 亚洲va欧美va人人爽| 日韩电影免费在线观看网站| 琪琪久久久久日韩精品| 久久www免费人成看片高清| 极品瑜伽女神91| 国产福利一区在线| 99国产精品一区| 欧洲在线/亚洲| 91精品国产一区二区三区| 精品国产一区二区三区不卡 | 国产成人av一区二区三区在线| 成人永久免费视频| 97久久精品人人做人人爽|