cs 614: theory and construction of compilers lecture 8 fall 2002 department of computer science...
DESCRIPTION
©2002 Joel Jones Definitions P L MST L S L Program P expressed in language L Machine M Translator from S to T expressed in L Interpreter for S expressed in language LTRANSCRIPT
CS 614: Theory and Construction of Compilers
Lecture 8Fall 2002Department of Computer ScienceUniversity of AlabamaJoel Jones
©2002 Joel Jones
Outline “Everybody Dance Now”
Review Tombstone Diagrams Tombstone ‘til you drop
Reading & Questions for Next Class
©2002 Joel Jones
DefinitionsP
L
M
S TL
SL
Program P expressed in language L
Machine M
Translator from S to T expressed in L
Interpreter for S expressed in language L
©2002 Joel Jones
Tombstone Diagram Problems 1:
Compile a Triangle Source Program P Running the object program Disassembling the object program
2: (machine M, C compiler on M producing M, Java->C translator written in C) Diagrams for above Compile and run program P expressed in C Compile Java-into-C translator to machine code Compile and run program Q expressed in Java
©2002 Joel Jones
More Tombstone Diagram Problems 3: (Gnu RTL intermediate language; HLL: C, C+
+, Pascal; Machine Code: Alpha, PPC, SPARC; RTL->RTL optimizer; all written in C Install on SPARC, given a C compiler for SPARC Compile P in Pascal, into SPARC machine code Compile using RTL optimizer Cross-compile C++ program Q for PPC machine
code
©2002 Joel Jones
Reading & Questions for Next Class Java Cup Web page
http://www.cs.princeton.edu/~appel/modern/java/CUP/