A parser that checks if an imputed TTL file conforms to the given grammar. As well as an Interpreter to handle the logic of these files and output them to a desired format. This was then followed by an extension which gives the user a way to visually create their own TTL files.
Project Gramma in BNF form
These instructions will provide you with a copy of the project and get them running on your local machine for development and testing purposes.
- GCC
- Clang
- Valgrind
Follow these steps to get the development environment running:
- Clone this repository using
git clone https://github.com/JamesLove1/Turtle.git
. - Navigate to the project directory using
cd Turtle
.
Run make all
to compile the project.
replace FILE with a .ttl file found with the TTLs Dir
Run make ./parse_s TTLs/FILE.ttl
to parse a TTL file.
Replace FILE with a .ttl file found with the TTLs Dir
Run ./interp_s TTLs/FILE.ttl
If no output is specified the code will output to the terminal.
For .txt output replace OUTPUT_FILE.txt with the name of the file you wish to output.
Run ./interp_s TTLs/FILE.ttl OUTPUT_FILE.txt
For .ps output replace OUTPUT_FILE.ps with the name of the file you wish to output.
Run ./interp_s TTLs/FILE.ttl OUTPUT_FILE.ps
-
Compile code e.g.
Make extension_s
-
Run executable with place holder TTL file and .ttl out file e.g.
./extension_s ./TTLs/turn.ttl ./out_Extension.ttl
-
Use the instructions within the program to operate the terminal
-
Check the outputted TTL file (The file can be passed to the
./interp_s file
).
This is an assignment given by the instructor at the University of Bristol: Neil from the Programming in C course.