欢迎来到天天文库
浏览记录
ID:39673205
大小:272.69 KB
页数:55页
时间:2019-07-08
《《编译系统》PPT课件》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CompilerConstruction編譯系統朱治平成功大學資訊工程系1Acompilerisanexecutableprogramthatcanreadaprograminonehigh-levellanguageandtranslateitintoanequivalentexecutableprograminmachinelanguage.Compilerprograminhigh-levellanguageoutputExecutableprograminmachinelanguageexecutableprograminmachinelanguageinputDefi
2、nition2Textbook:CompilerConstructionPrincipleandPractice--authoredbyKennethC.LoudenReferencebook:Lex&yacc--byJohnR.Levine,TonyMason&DougBrownO’Reilly&Associates,Inc.3WebSitehttp://casd.csie.ncku.edu.tw/資工系軟體發展實驗室網頁http://www.cs.sjsu.edu/faculty/louden/4GradingHomework(25%)-Programming(lex,y
3、acc,semanticactions)-Hand-writtenAssignments(3)MidtermExam(25%)FinalExam(25%)FinalProject(25%)5PrerequisitesDataStructuresDiscreteMathematicsProgrammingLanguagesComputerArchitecturesAssemblyLanguagesFiniteAutomata(helpful)6Chapter1Introduction7CompilerSourceprogramTargetprogram8Theprogressio
4、nofprogramminglanguages:Machinelanguagec70600000002Assemblylanguagemovx2High-levellanguagex=2*ThefirstcompilerwasdevelopedbytheteamatIBMledbyJohnBackusbetween1954and1957.9Whydoweneedtolearncompilers?(1)fornewplatforms(2)fornewlanguages-languageextensions&improvement-specificationlanguages-4t
5、hgenerationlanguages(3)foundationofparallelizingcompilers&relatedtools10(4)theorieslearnedareapplicabletootherfieldse.g.,siliconcompiler,prototypingtools,databaselanguages,textformatter,FSM(FiniteStateMachine)translator,queryinterpreter,commandinterpreter,interfaceprograms,etc.(5)forimprovin
6、gcapabilitiesofexistingcompiler/interpreter11SiliconcompilerSourcelanguage:conventionalprogramminglanguageVariablesRepresentsnotthelocationbutlogicalsignals(0or1)orgroupsofsignalsinaswitchingcircuit.Output:circuitdesigninanappropriatelanguage12ProgramsRelatedtoCompilersInterpretersAssemblers
7、LinkersLoadersPreprocessorsEditorsDebuggersProfilersProjectManagerspreprocessorcompilerassemblerlinker/loadersourceprogrammodifiedsourceprogramtargetassemblyprogramrelocatablemachinecodetargetmachinecodeLibraryfiles13DefinitionsofLanguages-Sourcela
此文档下载收益归作者所有