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

正文內(nèi)容

編譯原理-數(shù)據(jù)類型和類型檢查(參考版)

2024-10-20 02:27本頁面
  

【正文】 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) 。 vardecl | vardecl vardecl id : typeexp typeexp int | bool | array [num] of typeexp stmts stmts 。 Both t1 and t2 are equivalent to int (they are aliases to the type name int). t1 and t3 are equivalent under declaration equivalence, but neither is equivalent to t2. Compiler Theory Fall 2021 Jianhui Yue Implementation of Declaration Equivalence ? A new operation getBaseTypeName must be provided by the symbol table. ? It fetches the base type name rather than associated type expression. Compiler Theory Fall 2021 Jianhui Yue Type Equivalence in Languages ? Pascal uses declaration equivalence. ? C uses declaration equivalence for structures and unions, but structural equivalence for pointers and arrays. ? Occasionally, a language will offer a choice of structural, declaration, or name equivalence, where different type declarations are used for different forms of equivalence. – Example: ML language allows type names to be declared as aliases using the keyword type and cre
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1