Discover Your Island University

Graduate Projects


Project ID: 149
Author: David Mosel
Project Title: The Implementation of an Interpreter for a Programming Language
Semester: Spring 1999
Committe Chair: Dr. R. Stephen Dannelly
Committee Member 1: Dr. Mario Guimaraes
Committee Member 2: Dr. Holly Patterson
Project Description: This project is an implementation of an interpreter for a simple programming language. The interpreter may be used by anyone who wishes to study the translation of a high-level language into three-address code. The interpreter can be used in this way because it can show the three-address code generated during parsing, show the execution of the three-address code, and show the firingactions to reduce grammar productions during parsing. The interpreter is capable of performing floating-point computations and is designed for use on single-source-file programming solutions that require assignment to variables, flow of control statements, subroutine calls, and recursion. The syntax for the programming language is a modified subset of the C programming language. The interpreter works by translating program source code into a form of three-address code known as quadruples. These quadruples are pushed onto a stack during parsing, and serve as the object code which the interpreter executes. The Unix tools Flex and YACC were used in the intepreter implementation. Flex was used to create a lexical analyzer, and YACC was used to generate a parser for the programming language.
Project URL:   149.pdf