Programming #5 Implementation of a complete interpreter for the full
Biola language
Option
1: Enhance what you have
from programming #4 to implement your own interpreter class to do the job.
Option
2:Use the 95% implemented
interpreter class provided in the skeleton
framework
- Download this zip file to get the skeleton
framework, a fully functional sample executable, and several sample source
programs like prime.txt.
- All you need to do is to
understand the framework and then add your own code to complete the
implementation of the following two member functions of the interpreter
class in interpreter.cpp (see the header file and the .cpp
cource code file
of the interpreter class)
- Interpreter::executeDisplayInterpreterInstruction
- Interpreter::executeOneMoreInterpreterInstruction
- Note: the syntax
analyzer module here (header
file and the .cpp
cource code
file) implements classes for processing function definitions, which are
used by the interpreter class.
Reference
1: Syntax
of BIOLA: our target programming language.
Reference
2: Use the sample interpreter (download and unzip this zip file) to see how it can execute this non-trivial
sample Biola source
program (prime.txt) to repeatedly find all the prime numbers less
than an integer value n given by the user.