<<<<<<< HEAD
=======
5ea248c30bb2d888d178fda4c3d3ae28e100421e
- Bernhard Posselt
- Christoph Sladkovsky
- The interpreter accepts only symbols (variable/function identifiers) that are one character long (because hashmaps in C are hard :P)
- The language is function scoped
Not really needed but it can be done like:
sub m () begin
end
m();
Globals are read only since the scope is copied for function calls
Could be but was not done in this example
There are currently only ints for simplicity
Integer variable declaration is optional. All int variables are initialized with 0
Not done for the sake of a common return type (int)
- getopt
- bison
- make
Run:
make
To execute a file pass the path as its first argument like:
./interpreter programs/fibonacci
This example program has to functions, one which calculates the fibonacci numbers in a loop and one which calculates the numbers recursively
Run:
./interpreter programs/fibonacci -d
5ea248c30bb2d888d178fda4c3d3ae28e100421e