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

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

?? parser.cup~1~

?? 用Java實現的編譯器。把源代碼編譯成SPARC匯編程序
?? CUP~1~
?? 第 1 頁 / 共 2 頁
字號:
method_param_list			::= 	method_param_list:md_para_lst COMMA method_param:md_para 			{:  RESULT = new MdParaList((MdPara)md_para,(MdParaList)md_para_lst); :}			|	method_param:md_para 				{:  RESULT = new MdParaList((MdPara)md_para,null); :}				;method_param::=	type:t ID:id			{: //if(debug) System.out.println("At Line ("+lineleft+"): method_param -> int/boolean ");				IDDescriptor idd = new IDDescriptor(id, parser.curType); idd.setOffset(parser.curOffset); parser.curOffset += 4;				idd.assertParamDescriptor();				parser.curST.addDescriptor(idd);				//parser.curST.addDescriptor(new IDDescriptor(id, parser.curType));			 RESULT = new MdPara((Typ)t,new Identifier(id, sym.NO_TYPE)); 		:}		;/**************************************************************************************/block		::= 	LCURLY:line			{: 				if(debug) System.out.println("At Line ("+lineleft+"): block ->  { }");				parser.curScopeST = parser.curST;				parser.curST = new SymbolTable(); parser.curST.setParent(parser.curScopeST);			:}				var_decl_list:var_decl_lst {:  parser.curScopeST.addChild(parser.curST); :}/*parser.curScopeST = parser.curST; :}*/				statement_list:stm_lst			RCURLY:blkline			{:				parser.curST = parser.curScopeST; parser.curScopeST = parser.curST.getParent();				RESULT = new Block(var_decl_lst==null?null:((VarDeclList)var_decl_lst).reverse(),stm_lst==null?null:((StmtList)stm_lst).reverse(), blklineleft); 			:};var_decl_list	::=	var_decl_list:var_lst var_decl:var                        {:  RESULT = new VarDeclList((VarDecl)var,(VarDeclList)var_lst); :}			|	empty				;var_decl		::=	type:t local_var_list:lc_var SEMI:line                                {: 					if(debug) System.out.println("At Line ("+lineleft+"): var_decl ->  int/boolean");					RESULT = new VarDecl((Typ)t,((LocVarList)lc_var).reverse()); 				:};local_var_list	::=	local_var_list:lc_var_lst COMMA local_var:lc_var                        {:  RESULT = new LocVarList((LocVar)lc_var,(LocVarList)lc_var_lst); :}			|	local_var:lc_var                        {:  RESULT = new LocVarList((LocVar)lc_var,null); :};local_var ::= ID:id 		{:	IDDescriptor idd = new IDDescriptor(id, parser.curType); idd.setOffset(parser.curOffset); parser.curOffset += 4;			parser.curST.addDescriptor(idd); 			RESULT = new LocVar(new Identifier(id, sym.NO_TYPE)); 		:};/*************************************************************************************************/statement_list	::=	statement_list:stm_lst statement:stm {:  RESULT = new StmtList((Stmt)stm,(StmtList)stm_lst); :}			|	empty				;statement	::=	location:l ASSIGN expr:e SEMI:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  location=expr"); 				if(l instanceof LocationId){					IDDescriptor idd = parser.curST.lookup_var(((LocationId)l).identifier_.identifier_);					if(idd.getType() != sym.ERROR_TYPE)						idd.assertInitialized();																									}				RESULT = new StmtLocation((Location)l, convPos((Exp)e,eleft)); //				System.out.println("Done with StmtLocation");			:}			|	method_call:m SEMI:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  method_call"); 				RESULT = new StmtMdCall((MdCall)m); 			:}			|	IF:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  if_elsel"); 			:}					LPAREN expr:e RPAREN 			{:						   Exp exp_ = (Exp)e;				  	   if(exp_.noError() &&  exp_.getType()!=sym.BOOLEAN)   	   				   	ErrorLog.log("Boolean type expected for IF condition");			:}				block:b1 else_content:b2			{:								RESULT = new StmtIfElse(convPos((Exp)e,eleft), (Block)b1, (Block)b2); 							:}						|	WHILE:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  while_loop"); 			:}					LPAREN expr:e RPAREN 			{:	Exp exp_ = (Exp)e;	  	   		if(exp_.noError() && exp_.getType()!=sym.BOOLEAN)   	   				ErrorLog.log("Boolean type expected in WHILE loop condition");			:}			block:b			{:						RESULT = new StmtWhileLoop(convPos((Exp)e,eleft), (Block)b); 						:}						|	FOR:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  for_loop"); 			:}					LPAREN ID:idt ASSIGN expr:e1 						{:	IDDescriptor idd = parser.curST.lookup_var(idt);							if(idd.getType() != sym.ERROR_TYPE)	idd.assertInitialized();								//check only, not instantiation							Identifier identifier1_ = new Identifier(idt, idd.getType()); //redundant just for semantic check						  	if(identifier1_.noError() && identifier1_.getType()!=sym.INT)						  	   	ErrorLog.log("for loop: '"+identifier1_.identifier_+"' must be an Integer type");						  	Exp exp1_ = (Exp)e1;						  	if(exp1_.noError() && exp1_.getType()!=sym.INT) 						  	   	ErrorLog.log("for loop: Integer assignment expected for '"+identifier1_.identifier_+"'");													:}					SEMI expr:e2 SEMI 					{:							Exp exp2_ = (Exp)e2;					  	   	if(exp2_.noError() && exp2_.getType()!=sym.BOOLEAN) 					  	   		ErrorLog.log("for loop: Boolean type expected for FOR loop condition");					:}					ID:id2 ASSIGN expr:e3						{:	IDDescriptor idd = parser.curST.lookup_var(id2);							if(idd.getType() != sym.ERROR_TYPE)	idd.assertInitialized();								//check only, not instantiation							Identifier identifier3_ = new Identifier(idt, idd.getType()); //redundant just for semantic check						  	if(identifier3_.noError() && identifier3_.getType()!=sym.INT) 						  	   	ErrorLog.log("for loop: '"+identifier3_.identifier_+"' must be an Integer type");   						  	Exp exp3_ = (Exp)e3;  	   						if(exp3_.noError() && exp3_.getType()!=sym.INT)   	   							ErrorLog.log("for loop: Integer assignment expected for '"+identifier3_.identifier_+"'");																:} 					RPAREN  block:b			{:				//int t1 = parser.curST.lookup_var(idt);				IDDescriptor idd1 = parser.curST.lookup_var(idt);				//int t2 = parser.curST.lookup_var(id2);				IDDescriptor idd2 =parser.curST.lookup_var(id2);				RESULT = new StmtForLoop(new Identifier(idt, idd1.getType(), idd1.getOffset(), idd1.isGlobal(), idd1.isParam()), convPos((Exp)e1,e1left), convPos((Exp)e2,e2left), new Identifier(id2, idd2.getType(), idd2.getOffset(), idd2.isGlobal(), idd2.isParam()), convPos((Exp)e3,e3left), (Block)b); 			:}			|	RETURN:line                        {: 				if(debug) System.out.println("At Line ("+lineleft+"): statement ->  return"); 			:}					return_content:e SEMI                        {:  				RESULT = new StmtReturn((Exp)e); 			:}			|	block:b 			{:  				RESULT = new StmtBlock((Block)b); 			:}			|	error				;else_content	::=	ELSE:line				{: 					if(debug) System.out.println("At Line ("+lineleft+"): statement ->  else"); 				:}				block:b {:  RESULT = b; :}			|	empty				;return_content::=	expr:e {: 					parser.curMD.checkMethodType(((Exp)e).getType());										RESULT = convPos((Exp)e,eleft); :}			|	empty {:					parser.curMD.checkMethodType(sym.VOID);				:}				;location		::=	ID:id {:  //int t = parser.curST.lookup_var(id); 				IDDescriptor idd = parser.curST.lookup_var(id);			 RESULT = new LocationId( new Identifier(id, idd.getType(), idd.getOffset(), idd.isGlobal(), idd.isParam())); 			 //System.out.println("Catched type: " + id + ": " + SymbolTable.getTypeName(t));			 :}			|	ID:idtd	LSQUARE expr:e RSQUARE {:					int i = 0;					Exp e_cov =convPos((Exp)e,eleft);					if (e_cov instanceof LtrInt){						int index = ((LtrInt)e_cov).ltrInt_;						//System.out.println("Index = "+i);						//Vinh The's table lookup here!!!!!!!!!!!					}			  					//int t = parser.curST.lookup_array(idtd, i);					IDDescriptor idd = parser.curST.lookup_array(idtd, i);					//System.out.println("===============>> Perform an array index range check for direct integers");															RESULT = new LocationArray(new Identifier(idtd, idd.getType(),idd.getOffset(), true, false), e_cov); :}				;expr			::=	location:l                                {:                                  // System.out.println("Catched expr -> location: " + ((Location)l).getType());                                                                                                 	if(l instanceof LocationId){							IDDescriptor idd = parser.curST.lookup_var(((LocationId)l).identifier_.identifier_);							if(idd.getType() != sym.ERROR_TYPE){								if(!idd.isInitialized()){									System.out.println(parser.infile+":" + Scanner.lineno + 										": WARNING: local variable '" + ((LocationId)l).identifier_.identifier_ + "' used without initialization");									ClassProgram.numOfWarning++;								}							}						}		                                RESULT = (Location)l;                                                                 :}			|	method_call:mdc                                {:  RESULT = (MdCall)mdc; :}			|	literal:lit                                {:  RESULT = (Literal)lit; :}			|	expr_bin_op_expr:e                                {:  RESULT = (Exp)e; :}		        |     MINUS expr:e {:  RESULT = convNeg((Exp)e, eleft); :}		              %prec UMINUS			|	LPAREN expr:e1 RPAREN                                {:  RESULT = convPos((Exp)e1,e1left); :}				;literal		::=	INTLIT:i {:  RESULT = new LtrInt(i); :}			| 	CHARLIT:c {:  RESULT = new LtrChar((Character)c); :}			| 	bool_literal:bl {: RESULT = bl; :}				;expr_bin_op_expr			::=	expr:e1 SHIFTLEFT expr:e2                                {:  RESULT = new ExpShiftLeft(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 SHIFTRIGHT expr:e2                                {:  RESULT = new ExpShiftRight(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 PLUS expr:e2                                {:  RESULT = new ExpPlus(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 MINUS expr:e2                                {:  RESULT = new ExpMinus(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 MULT expr:e2                                {:  RESULT = new ExpTimes(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 DIVIDE expr:e2                                {:  RESULT = new ExpDivide(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 MOD expr:e2                                {:  RESULT = new ExpMod(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 LESSTHAN expr:e2                                {:  RESULT = new ExpLessThan(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 GREATERTHAN expr:e2                                {:  RESULT = new ExpGreaterThan(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 LTOE expr:e2                                {:  RESULT = new ExpLessThEql(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 GTOE expr:e2                                {:  RESULT = new ExpGreaterThEql(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 EQUAL expr:e2                                {:  RESULT = new ExpEqualTo(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 NOTEQUAL expr:e2                                {:  RESULT = new ExpNotEqualTo(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}			|	expr:e1 AND expr:e2                                {:  RESULT = new ExpAndOp(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :}                        |	expr:e1 OR expr:e2                                {:  RESULT = new ExpOrOp(convPos((Exp)e1,e1left), convPos((Exp)e2,e2left)); :};bool_literal	::=	BOOLTRUE  {:  RESULT = new LtrBoolTrue(); :}                      | BOOLFALSE {:  RESULT = new LtrBoolFalse(); :};method_call	::=	ID:id LPAREN method_call_content:mcl RPAREN                        {:                          	ExpList mcl_rev = mcl==null?null:((ExpList)mcl).reverse();                        	int t = parser.classProgram.methods.lookup_method(id, mcl_rev);                        	RESULT = new MdCallIn(new Identifier(id, sym.NO_TYPE), mcl_rev, t);                         	                        	:}			|	CALLOUT LPAREN STRINGLIT:stlit callout_content:clc RPAREN                        {:  RESULT = new MdCallOut(new LtrString(stlit), clc==null?null:((CallOutArgList)clc).reverse()); :}			;method_call_content			::=	expr_list:el {:  RESULT = el; :}			|	empty				;callout_content::=	COMMA callout_arg_list:cal {:  RESULT = cal; :}			|	empty				;expr_list		::=	expr_list:el COMMA expr:e {:  RESULT = new ExpList(convPos((Exp)e,eleft),(ExpList)el); :}			|	expr:e {:  RESULT = new ExpList(convPos((Exp)e,eleft),null); :}				;callout_arg_list::=	callout_arg_list:calst COMMA callout_arg:cal {:  RESULT = new CallOutArgList((CallOutArg)cal,(CallOutArgList)calst); :}			|	callout_arg:c {:  RESULT = new CallOutArgList((CallOutArg)c,null); :}				;callout_arg	::=	expr:e {:  RESULT = new CallOutArgExp(convPos((Exp)e,eleft)); :}			| STRINGLIT:stlit {:  RESULT = new CallOutArgStr(new LtrString(stlit)); :}				;empty 		::= /* nothing */;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区在线观看| 国产美女精品一区二区三区| 国产精品18久久久久久久久久久久| 97久久精品人人爽人人爽蜜臀| 91精品国产综合久久精品性色| 中文字幕视频一区| 麻豆91在线播放| 一本久久a久久精品亚洲| 日韩免费在线观看| 亚洲成人免费视| 99综合影院在线| 久久久久九九视频| 日本va欧美va瓶| 欧美色爱综合网| 亚洲视频 欧洲视频| 国产精品中文字幕欧美| 欧美一二三四区在线| 一区二区三区加勒比av| 不卡视频免费播放| 国产亚洲成av人在线观看导航| 秋霞成人午夜伦在线观看| 色噜噜偷拍精品综合在线| 国产精品视频免费看| 久久国产精品无码网站| 欧美精品三级日韩久久| 玉米视频成人免费看| www.色精品| 国产欧美一区二区精品仙草咪 | 欧洲一区在线观看| 国产精品乱子久久久久| 国产老肥熟一区二区三区| 精品日韩成人av| 免费的国产精品| 91精品国产aⅴ一区二区| 亚洲1区2区3区视频| 欧美怡红院视频| 亚洲精品日日夜夜| 色欧美乱欧美15图片| 国产精品久久久久久亚洲毛片| 国产成人日日夜夜| 国产午夜精品久久| 国产福利视频一区二区三区| 久久久综合网站| 国产精品99久久久久久有的能看| 精品剧情在线观看| 精品无码三级在线观看视频| 日韩你懂的电影在线观看| 久久精品国产成人一区二区三区 | 色综合中文综合网| 曰韩精品一区二区| 欧美综合一区二区三区| 亚洲狠狠爱一区二区三区| 欧美午夜电影网| 香蕉影视欧美成人| 欧美一区日韩一区| 久久国内精品视频| 久久久不卡网国产精品一区| 国产高清精品在线| 国产精品成人免费在线| 色悠悠亚洲一区二区| 综合色中文字幕| 欧美亚日韩国产aⅴ精品中极品| 亚洲第四色夜色| 69久久99精品久久久久婷婷| 天天操天天色综合| 日韩欧美国产不卡| 黄色日韩网站视频| 中文字幕不卡在线观看| 成人在线综合网| 一区二区三区欧美视频| 欧美亚洲一区二区三区四区| 日韩高清不卡在线| 欧美mv日韩mv亚洲| 成人丝袜视频网| 亚洲人成网站在线| 欧美一区二区精品久久911| 首页欧美精品中文字幕| 久久先锋影音av鲁色资源网| 国产二区国产一区在线观看| 亚洲日本成人在线观看| 91久久久免费一区二区| 亚洲视频在线一区观看| 91久久精品国产91性色tv| 午夜免费久久看| 日韩一区二区免费高清| 精东粉嫩av免费一区二区三区| 久久久久国产精品厨房| 国产综合色产在线精品| 中文欧美字幕免费| 在线亚洲一区观看| 蜜臀国产一区二区三区在线播放| 精品国产一区二区三区久久久蜜月 | 欧美成人三级在线| 高清在线成人网| 国产精品人妖ts系列视频 | 精品免费视频一区二区| 国产精品 日产精品 欧美精品| 国产精品久久久久精k8| 欧美日韩一二三| 亚洲精品成a人| 欧美日韩三级在线| 国产一区二区三区免费看| 亚洲欧洲韩国日本视频 | 日韩av在线发布| 久久久久久久网| 日本精品视频一区二区三区| 五月天国产精品| 国产偷国产偷精品高清尤物| 91免费精品国自产拍在线不卡| 天堂蜜桃91精品| 中文字幕不卡的av| 欧美男人的天堂一二区| 久草中文综合在线| 亚洲精品国产一区二区三区四区在线| 制服丝袜一区二区三区| 成人午夜激情在线| 日本视频免费一区| 国产精品欧美精品| 精品视频999| 99精品欧美一区二区三区综合在线| 天天综合日日夜夜精品| 国产欧美一区二区精品婷婷| 欧美日韩视频专区在线播放| 国产东北露脸精品视频| 图片区小说区国产精品视频| 亚洲视频一区在线观看| 欧美mv和日韩mv的网站| 色系网站成人免费| 国产伦精品一区二区三区视频青涩 | 国产精品丝袜91| 91精品麻豆日日躁夜夜躁| 色94色欧美sute亚洲13| 国产自产视频一区二区三区| 一区二区高清在线| 中文字幕免费一区| 日韩精品一区二区在线| 在线视频中文字幕一区二区| 久久精品国产亚洲aⅴ| 亚洲第一在线综合网站| 136国产福利精品导航| 久久一区二区视频| 欧美精品少妇一区二区三区| 99国产精品国产精品久久| 国产毛片一区二区| 天天综合天天做天天综合| 亚洲精品视频一区二区| 中文字幕巨乱亚洲| 久久久久久久久97黄色工厂| 日韩一级高清毛片| 欧美日韩一卡二卡三卡| 99国产精品国产精品毛片| 国产精品69毛片高清亚洲| 麻豆91在线播放免费| 日本亚洲一区二区| 亚洲成人精品在线观看| 一区二区在线观看视频在线观看| 亚洲国产成人一区二区三区| 欧美韩日一区二区三区四区| 久久影院午夜论| 日韩一本二本av| 色先锋aa成人| 在线亚洲免费视频| 国产高清不卡一区| 国产91精品久久久久久久网曝门| 日韩电影在线观看一区| 国产精品久久久久一区二区三区| 久久久亚洲高清| 久久综合色天天久久综合图片| 日韩免费电影一区| 欧美日韩黄视频| 欧美精品在线一区二区三区| 欧美色倩网站大全免费| 91久久人澡人人添人人爽欧美| 色先锋资源久久综合| 国产成人在线视频网站| 国产在线视频不卡二| 日本女优在线视频一区二区| 日韩1区2区3区| 男女男精品网站| 精品在线免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 午夜国产不卡在线观看视频| 蜜臀久久久久久久| 久久国产精品99精品国产| 韩国v欧美v日本v亚洲v| 国产成人一级电影| 国产在线精品不卡| 另类欧美日韩国产在线| 国产一区二区美女| 激情欧美一区二区| 国产成人免费网站| 国产一区二区三区久久悠悠色av| 国产久卡久卡久卡久卡视频精品| 国产福利一区在线| 色综合天天综合网国产成人综合天| 91官网在线观看| 8x8x8国产精品| 日韩一区二区免费高清| 国产日韩欧美精品在线| 亚洲视频一区在线|