An open API service indexing awesome lists of open source software.

https://github.com/rachitnigam/interpreter-plai

Interpreter for a language which supports higher order functions and multiple let bindings
https://github.com/rachitnigam/interpreter-plai

Last synced: 4 months ago
JSON representation

Interpreter for a language which supports higher order functions and multiple let bindings

Awesome Lists containing this project

README

        

##PLAI - Interpreter

Implemetation of an interpreter from [this assignment](https://cs.brown.edu/courses/cs173/2010/Assignments/extended-interpreter.html) from the 2010 offerring of CS1730 in Brown university.

The language implemeted has the following BNF:
```
::=
| {+ }
| {- }
| {* }
| {/ }
|
| {if0 }
| {with {{ } ...} }
| {fun { ...} }
| { ...}
```

#####Features:
The implemtation has the uses/supports the following:

1. Closures for function definitions
2. First class functions: The implementation allows for functions to passed as paramters and allows returning functions from other functions.
3. Mutli-argument functions: The implementation allows for functions to have multiple arguments
4. Let bindings: Implementation allows for identifiers to be bound to values for functions

Note: A variety of test cases, to test the above mentioned functionality are included in the program. They make use of the (test ... ...) syntax defined in PLAI for racket.

####To do
- Make it more usable by creating an interactive environment

*Note - I have stopped working on this project and am instead working on a better Interpreter I wrote in OCaml. Expect very few updates, though I intend to eventually setup an interactive environment for this*