 2009 Pearson Education, Inc. All rights reserved. 1 Compilers Most slides courtesy of Ms. Stephany Coffman-Wolph Many slides modified by Prof. L. Lilien.

Slides:



Advertisements
Similar presentations
Programming Types of Testing.
Advertisements

 2005 Pearson Education, Inc. All rights reserved Introduction.
Chapter 1: Introduction
 2009 Pearson Education, Inc. All rights reserved. 1 Part I: Compilers Part II: Pair Programming Most slides courtesy of Ms. Stephany Coffman-Wolph Many.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
Three types of computer languages
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
Chapter 1: Introduction to Computers and Java
Introduction to Java.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
IB Computer Science II Paul Bui
Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Introduction to Java Lecture # Java History Green Team started by Sun Microsystems. *7 Handheld controller for multiple entertainment systems.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
Topics Introduction Hardware and Software How Computers Store Data
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
© 2006 Pearson Education 1 Obj: cont 1.3 and 1.4, to become familiar with identifiers and to understand how programming languages work HW: p.51 #1.8 –
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Chapter 1: Introduction to Computers and Java
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
POS 406 Java Technology And Beginning Java Code
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
CHAPTER 1 Introduction to Computers and Java Copyright © 2016 Pearson Education, Inc., Hoboken NJ.
Python From the book “Think Python”
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
 2006 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java: From Control Structures through Objects Third Edition.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
 2009 Pearson Education, Inc. All rights reserved. 1 Part I: Compilers Part II: Pair Programming Most slides courtesy of Ms. Stephany Coffman-Wolph Many.
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1: Introduction to Computers and Java 1-2 Chapter Topics Chapter 1 discusses the following main topics: –Introduction –Why Program? –Computer.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
CHAPTER 1 Introduction to Computers and Java Copyright © 2016 Pearson Education, Ltd.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Lecture 1b- Introduction
Java programming lecture one
Presentation transcript:

 2009 Pearson Education, Inc. All rights reserved. 1 Compilers Most slides courtesy of Ms. Stephany Coffman-Wolph Many slides modified by Prof. L. Lilien (even many without explicit message). Slides added by L.Lilien are © Leszek T. Lilien. Permision to use for non-commercial purposes slides added by L.Lilien’s will be gladly granted upon a written (e.g., ed) request.

 2009 Pearson Education, Inc. All rights reserved. 2 1)Machine Languages, Assembly Languages and High-Level Languages 2)The Compiler and the Java Virtual Machine (JVM) 3)Java Software Editions (Versions) 4)Compiling a Java Program 5)The Complete Compilation Process Outline

 2009 Pearson Education, Inc. All rights reserved. 3 Sources From Chapter 1 of the textbook (p.12) Plus many slides courtesy of Ms. Stephany Coffman-Wolph Plus slides modified and added by Dr. Lilien

 2009 Pearson Education, Inc. All rights reserved Machine Languages, Assembly Languages and High-Level Languages Programmers write instructions in various programming languages Three general types of computer languages : – Machine languages – Assembly languages – High-level languages

 2009 Pearson Education, Inc. All rights reserved. 5 Fig. 1.1 | Comparing machine, assembly and high-level languages. 1. Machine Languages, Assembly Languages and High-Level Languages (Cont.)

 2009 Pearson Education, Inc. All rights reserved. 6 ++READ LATER++ 1. Machine Languages, Assembly Languages and High-Level Languages (Cont.) A computer can directly understand only its own machine language – It consists of streams of numbers - Ultimately reduced to binary 1s and 0s Machine-language programs - nearly incomprehensible to humans – Example machine-language program snippet:

 2009 Pearson Education, Inc. All rights reserved. 7 Machine-language programming is slow and error prone English-like abbreviations form the basis of assembly languages – Easier to program in them – Easier to understand them A computer does not understand assembly languages – Until they are translated into computer’s machine language – Translation done by assemblers Assemblers convert assembly-language programs to machine- language programs – Example assembly-language program snippet: LOAD BASEPAY or: LD BASEPAY ADD OVERPAY STORE GROSSPAY or ++READ LATER++ 1. Machine Languages, Assembly Languages and High-Level Languages (Cont.)

 2009 Pearson Education, Inc. All rights reserved. 8 Example: Assembly code and its machine code [ [ ] ++READ LATER++ 1. Machine Languages, Assembly Languages and High-Level Languages (Cont.) NOTE: The “object code” of the assembler is the machine code Slide added by L.Lilien

 2009 Pearson Education, Inc. All rights reserved. 9 To facilitate programming, high-level languages were developed Keywords in English form the basis of high-level languages – Much easier to program in them – Much easier to understand them – Look almost like everyday English with math expressions: grossPay = basePay + overTimePay A computer does not understand high-level languages – Until they are translated into computer’s machine languages – Translation done by compilers Compilers convert high-level-language programs to machine- language programs ++READ LATER++ 1. Machine Languages, Assembly Languages and High-Level Languages (Cont.)

 2009 Pearson Education, Inc. All rights reserved. 10 A typical compilation process [ Fig. from: ] – With more detail that you need to know ++OPTIONAL++ 1. Machine, Assembly and High- Level Languages (Cont.) Slide added by L.Lilien

 2009 Pearson Education, Inc. All rights reserved. Program Development Process Text editor Source code (.java ) Saves Java statements Java compiler Is read by Byte code (.class ) Produces Java Virtual Machine (JVM) Is interpreted by Program Execution Results in 2. The Compiler and the Java Virtual Machine 11

 2009 Pearson Education, Inc. All rights reserved. The Compiler and the Java Virtual Machine A programmer writes Java programming statements for a program. These statements are known as source code. A text editor is used to edit and save a Java source code file. – Java source code files have a.java file extension. A compiler is a program that translates source code into an executable form. 12

 2009 Pearson Education, Inc. All rights reserved. ++READ LATER++ The Compiler and the Java Virtual Machine A compiler is run using a source code file as input. Syntax errors that may be in the program will be discovered during compilation. Syntax errors are mistakes that the programmer has made that violate the rules of the programming language. The compiler creates another file that holds the translated instructions. 13

 2009 Pearson Education, Inc. All rights reserved. The Compiler and the Java Virtual Machine Most compilers translate source code into executable files (executables) containing machine code. The Java compiler translates a Java source file into a file that contains byte code instructions. Byte code instructions are the machine language of the Java Virtual Machine (JVM) and cannot be directly executed directly by the CPU. 14

 2009 Pearson Education, Inc. All rights reserved. ++READ LATER++ The Compiler and the Java Virtual Machine Byte code files end with the.class file extension. JVM is a program – It emulates a micro-processor. – It executes instructions as they are read. JVM is often called an interpreter. – And Java is often referred to as an interpreted language. See figure on Slide 12 See next slide and Fig. 1-6/p.13 15

 2009 Pearson Education, Inc. All rights reserved. Portability JVM for Windows Byte code (.class) JVM for LinuxJVM for Mac JVM for Unix JVM = Java Virtual Machine 16 Text editor Source code (.java ) Saves Java statements Java compiler Is read by Byte code (.class ) Produces Java Virtual Machine (JVM) Is interpreted by Program Execution Results in

 2009 Pearson Education, Inc. All rights reserved. Portability Program portability – a program written on one type of computer can be run on a wide variety of computers, with little or no modification. Java byte code runs on the JVM – Not on any particular CPU – Therefore, compiled Java programs are highly portable. JVMs exist on many platforms: Unix BSD Etc. Windows Mac Linux 17

 2009 Pearson Education, Inc. All rights reserved. ++READ LATER++ Portability With most programming languages, portability is achieved by compiling a program for each CPU it will run on. Java provides an JVM for each platform so that programmers do not have to recompile for different platforms. 18

 2009 Pearson Education, Inc. All rights reserved. 3. Java Software Editions (Versions) The software you use to write Java programs is called the Java Development Kit, or JDK. There are different editions of the JDK: – Java SE - Java2 Standard Edition – Java EE - Java2 Enterprise Edition (for large business apps) – Java ME - Java2 Micro Edition (for cell phones, pagers, appliances, etc.) Available for download at

 2009 Pearson Education, Inc. All rights reserved. 4. Compiling a Java Program We use Eclipse IDE (or NetBeans IDE) to compile and run Java programs. There is also a Java compiler executing as a command line utility. – javac is this Java compiler. The command to compile a program is: javac filename.java – The.java file extension must be used. Example: To compile a java source code file named Payroll.java you would use the command: javac Payroll.java 20

 2009 Pearson Education, Inc. All rights reserved. Example: Using the command-line javac Compiler C:\> C:\>cd Temp2 C:\Temp2>dir Volume in drive C has no label. Volume Serial Number is 0694-AD70 Directory of C:\Temp2 01/20/ :33 PM. 01/20/ :33 PM.. 01/20/ :07 PM 361 HelloWorld.java 01/20/ :59 PM 344 HelloWorld2.java 01/20/ :21 PM 0 PATH 3 File(s) 705 bytes 2 Dir(s) 56,425,979,904 bytes free C:\Temp2>type H*d2.java HelloWorld2.java // PROJECT: HelloWorld2 // AUTHOR: Donna Kaminski // DESCRIPTION: Program displays Hello World to IDE output window. // **************************************************************************** / public class HelloWorld2 { public static void main(String[] args) { System.out.println("Hello World!"); } C:\Temp2>type H*d.java HelloWorld.java package helloworld; <------[This line is not in HelloWorld2.java above.] // PROJECT: HelloWorld // AUTHOR: Donna Kaminski // DESCRIPTION: Program displays Hello World to IDE output window. // **************************************************************************** / public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } 21 © 2014 L.T. Lilien

 2009 Pearson Education, Inc. All rights reserved. Cont.1 - Example: Using the command-line javac Compiler C:\Temp2>path PATH=C:\Program Files\Caminova\Document Express DjVu Plug-in\;C:\Windows\system3 2;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0 \;C:\Program Files\ZipGenius 6\;c:\Program Files\Microsoft SQL Server\90\Tools\b inn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Micr osoft SQL Server\100\DTS\Binn\;C:\Users\Adm\AppData\Local\Smartbar\Application\ C:\Temp2>PATH=C:\Program Files\Caminova\Document Express DjVu Plug-in\;C:\Window s\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerS hell\v1.0\;C:\Program Files\ZipGenius 6\;c:\Program Files\Microsoft SQL Server\9 0\Tools\binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program F iles\Microsoft SQL Server\100\DTS\Binn\;C:\Users\Adm\AppData\Local\Smartbar\Appl ication\;C:\Program Files\Java\jdk1.7.0_45\bin\ <----[Note last PATH component (folder with javac) added.] C:\Temp2>path PATH=C:\Program Files\Caminova\Document Express DjVu Plug-in\;C:\Windows\system3 2;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0 \;C:\Program Files\ZipGenius 6\;c:\Program Files\Microsoft SQL Server\90\Tools\b inn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Micr osoft SQL Server\100\DTS\Binn\;C:\Users\Adm\AppData\Local\Smartbar\Application\; C:\Program Files\Java\jdk1.7.0_45\bin\ C:\Temp2>dir Volume in drive C has no label. Volume Serial Number is 0694-AD70 Directory of C:\Temp2 01/20/ :33 PM. 01/20/ :33 PM.. 01/20/ :07 PM 361 HelloWorld.java 01/20/ :59 PM 344 HelloWorld2.java 01/20/ :21 PM 0 PATH 3 File(s) 705 bytes 2 Dir(s) 56,425,979,904 bytes free C:\Temp2>javac H*d2.java  --[Compilation completed, generated HelloWorld2.class file (see below).] C:\Temp2>dir Volume in drive C has no label. Volume Serial Number is 0694-AD70 Directory of C:\Temp2 01/20/ :35 PM. 01/20/ :35 PM.. 01/20/ :07 PM 361 HelloWorld.java 01/20/ :35 PM 428 HelloWorld2.class 01/20/ :59 PM 344 HelloWorld2.java 01/20/ :21 PM 0 PATH 4 File(s) 1,133 bytes 2 Dir(s) 56,425,979,904 bytes free 22 © 2014 L.T. Lilien

 2009 Pearson Education, Inc. All rights reserved. Cont.2 - Example: Using the command-line javac Compiler C:\Temp2>java -cp. H*d2 Error: Could not find or load main class H*d2 <---[Windows doesn't like '*'] C:\Temp2>java -cp. HelloWorld2 Hello World! <---[correct program execution now] C:\Temp2>dir Volume in drive C has no label. Volume Serial Number is 0694-AD70 Directory of C:\Temp2 01/20/ :35 PM. 01/20/ :35 PM.. 01/20/ :07 PM 361 HelloWorld.java 01/20/ :35 PM 428 HelloWorld2.class 01/20/ :59 PM 344 HelloWorld2.java 01/20/ :21 PM 0 PATH 4 File(s) 1,133 bytes 2 Dir(s) 56,425,979,904 bytes free C:\Temp2>javac HelloWorld.java  --[Compilation seems OK, generated HelloWorld.class file (see below)] C:\Temp2>dir Volume in drive C has no label. Volume Serial Number is 0694-AD70 Directory of C:\Temp2 01/20/ :38 PM. 01/20/ :38 PM.. 01/20/ :38 PM 437 HelloWorld.class 01/20/ :07 PM 361 HelloWorld.java 01/20/ :35 PM 428 HelloWorld2.class 01/20/ :59 PM 344 HelloWorld2.java 01/20/ :21 PM 0 PATH 5 File(s) 1,570 bytes 2 Dir(s) 56,425,979,904 bytes free C:\Temp2>java -cp. HelloWorld <-----[Problem with execution of the HellowWorld.class] Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld (wrong nam e: helloworld/HelloWorld) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) C:\Temp2> 23 © 2014 L.T. Lilien

 2009 Pearson Education, Inc. All rights reserved. 5. The Complete Compilation Process Complete compilation process I/O: – Input: high-level language (HLL) code – source code – Output: machine-code – object code 24 Slide added by L.Lilien

 2009 Pearson Education, Inc. All rights reserved. 5. The Complete Compilation Process (Cont.) Four basic steps performed by a typical compiler: 1) Preprocessing (a part of the compiler!) - To expand macros (details later) 2) Compilation (in the narrow sense) - Translates from high-level source code to assembly code - Not to byte code 3) Assembly (a part of the compiler!) - Translates from assembly code to machine code - When there are calls to external functions in the assembly source file, the assembler leaves the addresses of the external functions undefined, to be filled in later by the linker 4) Linking (a part of the compiler!) - Takes one or more objects and combines them into a single executable -An executable requires many external functions from system and run-time libraries - Creates the final executable (.exe in Windows) 25 Slide modifieds by L.Lilien This and next 9 slides courtesy of S. Coffman-Wolph, a few modified (slightly) by L. Lilien

 2009 Pearson Education, Inc. All rights reserved. 1) Preprocessing First stage of the overall compilation process Preprocessor processes compiler directives Directives – Allow for conditional compilations - To conditionally skip sections of source files, - To report errors and warning conditions - To have distinct regions of source code – E.g., in C#, always placed on their own line and begin with # NOTE: – There is no “Java preprocessor” on Oracle’s Java pages – See: – No “preprocessor “ found if searched for it on the Oracle page: – If interested, see also: If interested, see also: – – Hence, Java does not provide the capability to communicate with the Java compiler using compiler directives 26

 2009 Pearson Education, Inc. All rights reserved. 1) Preprocessing (Cont.) Example of C# Code w/Preprocessor Directives (lines starting with #) (Note: C# preprocessor used as an example, since we do not use preprocessors for Java) #define Debug // Debugging on #undef Trace // Tracing off class PurchaseTransaction { void Commit() { #if Debug CheckConsistency(); #if Trace WriteToLog(this.ToString()); #endif CommitHelper(); } 27

 2009 Pearson Education, Inc. All rights reserved. 2) Compilation The actual compilation — in the narrow sense Input: preprocessed source code Output: assembly language (for a specific processor) – ++OPTIONAL++ Major phases: - Scanner “Break up” the text/code into tokens Done via Regular Expressions - Parser Insures that the source code follows all the rules - Code generator Creates assembly language code 28

 2009 Pearson Education, Inc. All rights reserved. ++READ LATER++ 2) Compilation (Cont.) Regular Expressions Regular expressions are from the theoretical side of computer science – Automata theory – Formal language theory – These fields study models of computation (automata) and ways to describe and classify formal languages Regular expressions are used mainly for pattern matching 29

 2009 Pearson Education, Inc. All rights reserved. ++READ LATER++ 2) Compilation (Cont.) Regular Expression Basic Examples Match any digit – \d or [0-9] Match any non-digit – \D Match exactly three digits – \d{3} or \d\d\d or [0-9][0-9][0-9] or [0-9]{3} Match any sequence of letters in upper or lower case, but there must be at least 1 letter – [a-zA-Z]+ Match any sequence of at least one word character – \w+ 30

 2009 Pearson Education, Inc. All rights reserved. 3) Assembly Converts assembly language code into machine code – Input (source file):assembly language code – Output (object file):machine code Processes calls to external functions – They can be present in the source file (assembly language file) – Assembler leaves addresses of external functions undefined - To be filled in later by the linker (next overall compilation phase) 31

 2009 Pearson Education, Inc. All rights reserved. 4) Linking The final stage of compilation is the linking of object files to create an executable – Takes multiple object files and creates one executable file. – Among these object files are many external functions taken from system and run-time libraries Linker complains if it can not link proper methods/functions – Earlier in compilation, if a method/function did not exist, it was assumed that it was in another file (to be linked later) – You can think of this phase as the one trying to fill-in any remaining “blanks” and “ties” it all together 32

 2009 Pearson Education, Inc. All rights reserved. The Complete Compilation Process (Cont.) Summary: Four basic compiler steps: 1) Preprocessing (a part of the compiler!) 2) Compilation (in the narrow sense) 3) Assembly (a part of the compiler!) 4) Linking (a part of the compiler!) 33 Slide modifieds by L.Lilien

 2009 Pearson Education, Inc. All rights reserved. 34 The End