COMPSCI 61C Lecture Notes - Lecture 12: Symbol Table, Motorola 68000 Series, High-Level Programming Language
Document Summary
An interpreter is a program that executes other programs. In general, we interpret a high-level language when e ciency is not critical and translate to a lower-level language to increase performance. Although this is becoming a distinction without a di erence , many interpreters do a just in time runtime compilation to bytecode that either is emulated or directly compiled to machine code. Interpreter: directly executes the program in the source language. Translator: converts a program from the source language to an equivalent program in another language. Switched from motorola 680x0 instruction architecture to powerpc. Could require all programs to be re-translated from high level language. Instead, let executables contain old and/or new machine code, interpret old code in software if necessary (emulation) Interpreter closer to high-level, so can give better error messages (e. g. , mars) Translator reaction: add extra information to help debugging (line numbers, names) Interpreter provides instruction set independence: run on any machine.