合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        COMP3173代做、代寫(xiě)C/C++程序設(shè)計(jì)

        時(shí)間:2023-11-04  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)


        COMP31**代做、代寫(xiě)C/C++程序設(shè)計(jì)
        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.
        請(qǐng)加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp
         

        掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
      1. 上一篇:代做COP5615、代寫(xiě)Java,Python編程
      2. 下一篇:代做comp3511、代寫(xiě)Python/Java編程
      3. 無(wú)相關(guān)信息
        合肥生活資訊

        合肥圖文信息
        出評(píng) 開(kāi)團(tuán)工具
        出評(píng) 開(kāi)團(tuán)工具
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)400(全國(guó)服務(wù)熱線)
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話24小時(shí)服務(wù)熱線
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話2
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)客服熱線
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)
        海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
      4. 短信驗(yàn)證碼 酒店vi設(shè)計(jì) 投資移民

        關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

        Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
        ICP備06013414號(hào)-3 公安備 42010502001045

        国产精品99久久久久久猫咪| 国产 日韩 中文字幕 制服| 99精品视频在线观看免费播放 | 久久精品免费视频观看| 中文字幕精品在线视频| 久久精品亚洲男人的天堂| 日韩人妻无码一区二区三区久久| 日韩精品视频免费网址| 亚洲国产精品无码中文lv| 国产精品jizz在线观看直播| 91精品国产乱码在线观看 | 琪琪精品视频在线观看| 久久国语露脸国产精品电影| 成人国产精品视频频| 无码日本精品XXXXXXXXX| 99re66热这里只有精品17| 久久99热精品这里久久精品| 久久精品视频99| 日本一区二区三区精品中文字幕 | 国产92成人精品视频免费| 亚洲精品国产电影午夜| 91精品久久国产青草| 91精品综合久久久久久五月天| 99热这里只有精品国产动漫| 日韩精品无码一区二区三区免费 | 精品国产污污免费网站入口在线| 伊人精品久久久久7777| porn在线精品视频| 在线观看日韩精品| 91久久亚洲国产成人精品性色| 99精品国产高清一区二区| 久久精品中文字幕无码绿巨人 | 国产精品午夜爆乳美女| 国产精品三级av及在线观看| 国产手机精品视频| 亚洲日韩激情无码一区| 日韩精品人妻系列无码专区免费| 日韩伦理片电影在线免费观看| 第一福利永久视频精品| 国产精品99久久久久久董美香| 久久久久人妻一区精品|