enjadi suatau keharusan bagi ... Makalah pada Mata Kuliah Pengelolaan Instalasi Komputer dengan begitu, para ...
enjadi suatau keharusan bagi ... Makalah pada Mata Kuliah Pengelolaan Instalasi Komputer dengan begitu, para ...
teknik konpilasiFull description
Ini Tugas dari pak sinurat. Wah.... Sangad susah. tapi akhirnya kami dapat menyelesaikanya.Full description
berisikan tentang penjelasan scanner
materi tentang teknik kompilasiFull description
berisikan tentang penjelasan scanner
Full description
diktat kuliah teknik kompilasi Bertha
Teknik Kompilasi Implementasi CodeDeskripsi lengkap
Full description
Full description
Teknik KompilasiFull description
untuk mata kuliah teknik kompilasi
Buku Kompilasi Lagu-lagu Gregorian Volume I dengan menggunakan notasi angka dan syair Bahasa Latin. Setiap lagu selalu ada terjemahan dan keterangan kecil tentang lagu tersebut. Buku kecil…Deskripsi lengkap
Full description
MUNTAH SETELAH MINUM ASI Seorang bayi laki-laki dengan usia kurang lebih 3 minggu diperiksakan orang tuanya ke Puskesmas Pembantu karena muntah yang terus-menerus. Ketika dianamnesis dokt…Full description
Teknik Kompilasi I
T EKNIK KO KOMPI MPILASI
Ernastuti & Sulistyo
Ernastuti & Sulistyo
1/45
Teknik Kompilasi I
Ernastuti & Sulistyo
2/45
Teknik Kompilasi I
MATERI
Ernastuti & Sulistyo
3/45
Teknik Kompilasi I
ARTI KATA TEKNIK KOMPILASI
Ernastuti & Sulistyo
4/45
Teknik Kompilasi I
TRANSLATOR: COMPILER & INTERPRETER
Ernastuti & Sulistyo
5/45
Teknik Kompilasi I
COMPILER & INTERPRETER
Ernastuti & Sulistyo
6/45
Teknik Kompilasi I
COMPILER
Ernastuti & Sulistyo
7/45
Teknik Kompilasi I
KENAPA PERLU TRANSLATOR ?
Ernastuti & Sulistyo
8/45
Teknik Kompilasi I
LATAR BELAKANG
Ernastuti & Sulistyo
9/45
Teknik Kompilasi I
Bagaimana dengan orang yang tidak mengerti bahasa mesin?
Ernastuti & Sulistyo
10/45
Teknik Kompilasi I
Ernastuti & Sulistyo
11/45
Teknik Kompilasi I
Ernastuti & Sulistyo
12/45
Teknik Kompilasi I
Ernastuti & Sulistyo
13/45
Teknik Kompilasi I
BAHASA TINGKAT TINGGI Pemrograman bisa menggunakan Bahasa Tingkat Tinggi.
Ernastuti & Sulistyo
14/45
Teknik Kompilasi I
Bahasa Tingkat Tinggi adalah:
Ernastuti & Sulistyo
15/45
Teknik Kompilasi I
Ernastuti & Sulistyo
16/45
Teknik Kompilasi I
Jenis Translator: ASSEMBLER
Ernastuti & Sulistyo
17/45
Teknik Kompilasi I
Jenis Translator: COMPILER
Ernastuti & Sulistyo
18/45
Teknik Kompilasi I
Jenis Translator: Interpreter
Ernastuti & Sulistyo
19/45
Teknik Kompilasi I
Why study compilers?
Most CS students do not go on to w rite a commercial compiler someday, but that's not w hy w e study compilers. W e study compiler construction for the follow ing reasons:
W riting a compiler gives experience w ith large-scale applications development. Y our compiler program may be the largest program you w rite as a student. Experience w orking w ith really big data structures and complex interactions betw een algorithms w ill help you out on your next big programm ing project.
Compiler w riting is one of the shining trium phs of CS theory. I t demon strates the value of theory over the impulse to just "hack up" a solution.
Compiler w riting is a basic element of programming language research. Many language researchers w rite compilers for the languages they design.
Many applications have similar properties to one or more phases of a compiler , and comp iler expertise and too ls can help an application programmer w orking on other projects besides compilers. Ernastuti & Sulistyo
20/45
Teknik Kompilasi I
There is no software development method for writing large programs that doesn't involve pain: pain is inevitable in software development (Berry's Theorem).
There is no way to learn the skills necessary for writing big programs without pain. A good CS course includes pain, and teaches pain management and minimization.
The questions we should ask, then, are: (a) should CS majors be required to spend a lot of time becoming really good programmers? (b) are we providing students with the assistance and access to the tools and information they need to accomplish their goals with the minimal doses of inevitable pain that are required?
Ernastuti & Sulistyo
21/45
Teknik Kompilasi I
What Are They and What Kinds of Compilers are Out There? • The purpose of a compiler is: to translate a program in some language (the source language ) into a lower-level language (the target language ). The compiler itself is written in some language, called the implementation language . To write a compiler you have to be very good at programming in the implementation language, and have to think about and understand the source language and target language. Ernastuti & Sulistyo
22/45
Teknik Kompilasi I
Several major kinds of compilers
Native Code Compiler Translates source code into hardware (assembly or machine code) instructions. Example: gcc.
Virtual Machine Compiler Translates source code into an abstract machine code, for execution by a virtual machine interpreter. Example: javac.
JIT Compiler Translates virtual machine code to native code. Operates within a virtual machine. Example: Sun's HotSpot java machine.
Preprocessor Translates source code into simpler or slightly lower level source code, for compilation by another compiler. Examples: cpp, m4.
Pure interpreter Executes source code on the fly, without generating machine code. Example: Lisp. Ernastuti & Sulistyo
23/45
Teknik Kompilasi I
Phases of a Compiler
Lexical Analysis: Converts a sequence of characters into words, or tokens
Syntax Analysis: Converts a sequence of tokens into a parse tree
Semantic Analysis: Manipulates parse tree to verify symbol and type information
Intermediate Code Generation: Converts parse tree into a sequence of intermediate code instructions
Optimization: Manipulates intermediate code to produce a more efficient program
Final Code Generation: Translates intermediate code into final (machine/assembly) code Ernastuti & Sulistyo
24/45
Teknik Kompilasi I
Blok Diagram
Program Program Sumber Sumber
Program Program Sasaran Sasaran
ANALISA Penganalisa Leksikal (scanner)
Penganalisa Sintaks (parser)
SINTESA Penganalisa Semantik Pembangkit Kode antara