BASIC INTERPRETER
March 6, 2013 ยท View on GitHub
This project is a basic interpreter for a very simple language.
Language Rules
The syntax for this language is defined by the following grammar:
-> A | B | C | D | E
Note:
Also,
- At most five variables can be defined in a program.
- The symbol, ':' is the assignment operator.
- It assigns the result of an expression to a variable.
Set Up
Pre-requisites
- GCC
Instructions:
- Run the following command: gcc interpreter.c -std=c99 -o interpreter ./interpreter [PROGRAM_FILE_NAME]
Sample Program
File content:
A:1 B:A+0 display A
Output: 1
More sample programs in the samples directory.