Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Introduction1 Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. Kuliah ini membahas beberapa teknik.

Presentasi serupa


Presentasi berjudul: "Introduction1 Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. Kuliah ini membahas beberapa teknik."— Transcript presentasi:

1 Introduction1 Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. Teknik-teknik ini akan dibahas sesuai dengan tahap pembuatan suatu kompilator. Dimulai dari tahap pembacaan program sumber, analisis tatabahasa, dan diakhiri oleh pembentukan kode (bahasa sasaran). Teknik-teknik ini akan dibahas sesuai dengan tahap pembuatan suatu kompilator. Dimulai dari tahap pembacaan program sumber, analisis tatabahasa, dan diakhiri oleh pembentukan kode (bahasa sasaran). Peserta kuliah akan mempelajari model suatu kompilator sesuai dengan tahapan tersebut, mengembangkannya dengan menambah fitur- fitur suatu kompilator. Peserta kuliah akan mempelajari model suatu kompilator sesuai dengan tahapan tersebut, mengembangkannya dengan menambah fitur- fitur suatu kompilator. Teknik Kompilator (Compiler Techniques) IKI40800 Dosen: Heru Suhartanto Room : Gedung A, 1216

2 Introduction2References Semester : Genap (was Ganjil in 2008/2009) Semester : Genap (was Ganjil in 2008/2009) 1.Compilers: Principles, Tehchniques, and Tools Aho, A. V., Sethi, R., Ullman, J. D. Addison Wesley Modern Compiler Implementation in Java 3.Dick Grune et. Al, Modern Compiler Design, John Wiley & Sons, Lex - A Lexical Analyzer Generator (available on line - aol) 5.Yacc - Yet Another Compiler-Compiler (aol) 5.Yacc - Yet Another Compiler-Compiler (aol) 6.Heru Suhartanto, 6.Heru Suhartanto, Model Pemroses Bahasa Pemrograman Dengan tools berbasis Java, 2006., Resources : see at scele Resources : see at scele

3 Introduction3 Topics and Ref. To Text book WeekTopicsChapters/Sections WeekTopicsChapters/Sections 1-2Introduction, Lexical Analysis , Introduction, Lexical Analysis , Parsing 2.4, , Parsing 2.4, , 4-7 5Symbol Table2.7, 7.6 5Symbol Table2.7, Syntax directed translation 2.5, Syntax directed translation 2.5, Type checking Type checking Run-time organization , Run-time organization , Intermediate code generation Intermediate code generation Code generation Code generation Code optimization Code optimization

4 Introduction4 Tools: –http://www.cs.princeton.edu/~appel/modern/java/JLex/ –http://www.cs.princeton.edu/~appel/modern/java/CUP/ –http://www2.informatik.unibw-muenchen.de/Research/Tools/JACCIE/jaccie.html –http://www.jflex.de/ –http://troi.lincom-asg.com/~rjamison/byacc/ –http://www.javaworld.com/javaworld/jw /jw-12-jack.html

5 Introduction5 Jlex,CUP and Jaccie are available here at Jlex,CUP and Jaccie are available here at Cara penilaian: lihat BRP Cara penilaian: lihat BRP Assignments: lihat BRP Assignments: lihat BRP

6 Introduction6 RULES  Exams and homework  Cheating=0 mark,  Homework  Deduction of 5% for each day lateness, unaccepted for 1 (or more) week delays.  Cheating : any kind of plagiarism !

7 Introduction7 Introduction: Definisi A compiler is a program that accepts as input a program text in a certain language and produces as output a program text in another language, while preserving the meaning of that text. A compiler is a program that accepts as input a program text in a certain language and produces as output a program text in another language, while preserving the meaning of that text. The process is called translation. The process is called translation. The input is considered the source language and the output is target language. The input is considered the source language and the output is target language. The language the compiler itself is written in is called the implementation language. The language the compiler itself is written in is called the implementation language.

8 Introduction8 Introduction: kenapa perlu teknik kompilasi [4]? Compiler construction is a very succesful branch of computer science, and one of the earliest to earn that predicate; Compiler construction is a very succesful branch of computer science, and one of the earliest to earn that predicate; Given its close relation to file conversion, it has wider application than just compilers; Given its close relation to file conversion, it has wider application than just compilers; It contains many generally useful algorithms in a realistic setting. It contains many generally useful algorithms in a realistic setting.

9 Introduction9 Introduction : proses kompilasi dan running a compiler [fig 1.1 – 4]

10 Introduction10 Introduction: perbedaan compiler dan interpreter [fig 1.3 – 4]

11 Introduction11 Introduction: struktur suatu kompilator [fig 1.21 – 4] AST :: Abstract Syntax Tree


Download ppt "Introduction1 Kuliah ini membahas beberapa teknik pembuatan suatu kompilator berdasarkan tatabahasa yang diberikan. Kuliah ini membahas beberapa teknik."

Presentasi serupa


Iklan oleh Google