freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

編譯原理-數(shù)據(jù)類型和類型檢查-資料下載頁

2024-10-17 02:27本頁面
  

【正文】 ts an identifier into the symbol table and associates a type to it. ? The associated type is constructed according to the grammar rules for typeexp. Compiler Theory Fall 2021 Jianhui Yue Statements ? Statements do not have types, but substructures will need to be checked for type correctness. ? Conditional expression stmt if exp then stmt must have Boolean type. if not typeEqual(, boolean) then typeerror(stmt) ? In case of assignment statement stmt id := exp, the variable being assigned must have the same type as the expression whose value to is to receive. ? This depends on the type equivalence algorithm. Compiler Theory Fall 2021 Jianhui Yue Expressions ? Constant expressions (numbers and Boolean values) have integer or boolean types. ? Types for variable names are determined by lookup in the symbol table. Compiler Theory Fall 2021 Jianhui Yue array ? The array node is : ? makeTypeNode( array ,size ,type ) ? exp1exp2[exp3] ? if isArrayType(exp2,type) amp。 typeEqual( ,integer ) ? then = ? else typeerror( exp1) array (size) type Compiler Theory Fall 2021 Jianhui Yue Overloading ? An operator is overloaded of the same operator is used for two different operations. ? 2+3 represents integer additions ? + represents floatingpoint addition ? Overloading can be extended to user–defined functions. int max (int x, int y) double max ( double x, double y) ? The type checker can decide which function is meant based on the types of parameters (C++, Ada). Compiler Theory Fall 2021 Jianhui Yue Type Conversion and Coercion ? A mon extension of the type rules of a language is to allow arithmetic expressions of mixed type, such as + 3 ? A mon type must be found that is patible with all the types of the subexpression. ? One of the possibility is for a type checker to supply the conversion operation automatically (C). ? The other possibility is to require a programmer supply a conversion function +double (3) (Modula2)
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1