CS 614: Theory and Construction of Compilers Lecture 7 Fall 2002 Department of Computer Science University of Alabama Joel Jones
©2002 Joel Jones Outline Representing Translation Processes and components Tombstone Diagrams Reading & Questions for Next Class
©2002 Joel Jones Language Processors Give definitions of the following: Translator Compiler Source program Object (target) program
©2002 Joel Jones Tombstone Diagrams Program Machine Translators Interpreters
©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 Program P expressed in language L
©2002 Joel Jones Example Programs sort Ada chess LISP sort x86 sort program expressed in Ada chess program expressed in LISP sort program expressed in x86 machine code
©2002 Joel Jones Example Machines x86PPCSPARC Intel x86 family machine PowerPC machine (Apple, IBM) SPARC machine (Sun workstations and servers)
©2002 Joel Jones Example Translators Cx86 C compiler on x86 for x86 AdaPPC x86 Cross compilation: C compiler on x86 for PPC sort Ada x86 sort PPC sort PPC
©2002 Joel Jones Example Translators (cont.) AdaC x86 sort Ada x86 sort C Cx86 sort x86 Two-stage compilation x86
©2002 Joel Jones Reading & Questions for Next Class Java Cup Web page ava/CUP/ ava/CUP/