合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

        COMP3173代做、代寫C/C++程序設計

        時間:2023-11-04  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯


        COMP31**代做、代寫C/C++程序設計
        Project Implementation
        Phase 1 Lexical analysis
        In phase 1, you need to implement a lexer for the language described in “COMP31** 23F Project Description.docx”. Your lexer consists of five source files: “func.c”, “lexer.h”, “lexer.c”,  “symbol_table.h”, and “symbol_table.c”. Detailed requirements are listed below.
        “func.c” 
        -It is the main entry of the entire project (all phases). 
        -It opens the source program.
        -The source program is passed to the main function as an argument.
        -It makes calls to the function “next_token” defined in “lexer.h” and “lexer.c”.
        -It maintains a symbol table defined in “symbol_table.h” and “symbol_table.c” to store all the identifiers.
        -If the function “next_token” returns a token, print the token and its attribute(s) on the screen for verification purpose.
        -If “next_token” returns an error flag, report the error and its location.
        -After the entire process is finished, print out the symbol table.
        “lexer.h” and “lexer.c” 
        -You need to design and implement a DFA to complete this task.
        -To implement the DFA, you must use a transition table.
        -You must define the transition table in “lexer.h” in a proper way (for example, as a 2-dimensional constant array).
        -It reads and cuts the source program into lexemes.
        -It returns the first token which is found every time when “next_token” is called.
        -It ignores spaces, indentations, line breaks, and comments.
        -If the token is an identifier, insert the token into the symbol table. Each token has an attribute to record its memory location in the symbol table.
        -If the token is an integer literal, the token has two attributes: type, for its data type; and value, for its value.
        -If the token is none of the above, it does not have an attribute.
        -If there is any lexical error, returns an error flag to the main function.
        “symbol_table.h” and “symbol_table.c”
        -It should be implemented as a data structure (AVL tree is recommended to search and insert symbols efficiently or you can use any data structure you want. Efficiency is not required here.);
        -Each identifier has its variable name and its type. (This language has two three types of identifiers, integers natural numbers, Boolean, and functions.)
        -Currently, the type of identifiers cannot be decided (it is done by semantic analysis). So, the corresponding type in the symbol table is just NULL.
        -The symbol table also needs a function to print out its content.

        The implementation must be done in standard C (not in Visual C). For those who do not have standard C installed on your local computer, you can try to install MinGW from https://www.mingw-w64.org/ or use online GDB at https://www.onlinegdb.com/ . TA will use make file to check your analyzer.

        Example: 
        In the package “Example.zip”, you will find all the source files described above. Currently, they are all empty. The main function simply prints the argument on the screen. The package also contains “make.bat”. You can open it by a txt reader. Then, you can see the compilation commands. 

        After executing “make.bat” (suppose you are using Windows and have GCC installed), you will have “func.exe”, which is the compiled analyzer.

        Suppose the source program that we want to analyze is “sample.txt”, we execute “func sample.txt”.

        Submission requirements
        Each team need to clearly indicate the contribution of each team member in a txt file. To submit your work, you need to pack all files (source code and contribution txt) in a package. Rename the package as COMP31**_23F_TeamXX, where XX is your team number. Only team leaders need to upload the package to iSpace.
        請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp
         

        掃一掃在手機打開當前頁
      1. 上一篇:代做COP5615、代寫Java,Python編程
      2. 下一篇:代做comp3511、代寫Python/Java編程
      3. 無相關信息
        合肥生活資訊

        合肥圖文信息
        出評 開團工具
        出評 開團工具
        挖掘機濾芯提升發動機性能
        挖掘機濾芯提升發動機性能
        戴納斯帝壁掛爐全國售后服務電話24小時官網400(全國服務熱線)
        戴納斯帝壁掛爐全國售后服務電話24小時官網
        菲斯曼壁掛爐全國統一400售后維修服務電話24小時服務熱線
        菲斯曼壁掛爐全國統一400售后維修服務電話2
        美的熱水器售后服務技術咨詢電話全國24小時客服熱線
        美的熱水器售后服務技術咨詢電話全國24小時
        海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
        海信羅馬假日洗衣機亮相AWE 復古美學與現代
        合肥機場巴士4號線
        合肥機場巴士4號線
        合肥機場巴士3號線
        合肥機場巴士3號線
      4. 上海廠房出租 短信驗證碼 酒店vi設計

        主站蜘蛛池模板: 香蕉视频一区二区| 国产精品一区二区久久精品| 色综合视频一区二区三区| 天堂一区二区三区精品| 波多野结衣中文一区二区免费| 伊人色综合一区二区三区| 亚洲欧美日韩中文字幕在线一区| 久久一区二区三区精华液使用方法| 一区国严二区亚洲三区| 精品国产鲁一鲁一区二区| 久久久久女教师免费一区| 波多野结衣在线观看一区| 无码人妻久久久一区二区三区| 日韩一区二区三区电影在线观看| 久久久精品人妻一区二区三区四| 欧洲精品免费一区二区三区| 无码午夜人妻一区二区三区不卡视频| 福利电影一区二区| 日本一区二区三区免费高清在线 | 另类ts人妖一区二区三区| 午夜福利一区二区三区在线观看 | 一区二区三区无码高清视频| 国产精品亚洲专区一区| 日本高清天码一区在线播放| 蜜臀AV免费一区二区三区| 亚洲一区二区三区四区视频| 一区二区视频在线播放| 狠狠色综合一区二区| 在线精品一区二区三区| 人妻精品无码一区二区三区| 国产一区二区精品久久91| 亚洲第一区精品观看| 无码人妻精品一区二区三18禁 | 久久亚洲日韩精品一区二区三区| 无码国产精品一区二区免费模式| 国产一区二区三区在线2021| 精品无码人妻一区二区免费蜜桃| 国产精品亚洲一区二区麻豆| 亚洲爽爽一区二区三区| 日韩精品中文字幕无码一区| 在线视频一区二区三区四区|