Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nydragon/glados-2023
A Scheme interpreter in Haskell.
https://github.com/nydragon/glados-2023
haskell scheme scheme-interpreter
Last synced: 20 days ago
JSON representation
A Scheme interpreter in Haskell.
- Host: GitHub
- URL: https://github.com/nydragon/glados-2023
- Owner: Nydragon
- License: unlicense
- Created: 2023-01-09T15:51:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T11:57:09.000Z (over 1 year ago)
- Last Synced: 2023-04-26T21:37:18.529Z (over 1 year ago)
- Topics: haskell, scheme, scheme-interpreter
- Language: Haskell
- Homepage:
- Size: 535 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GLaDOS-2023
# Features
- Basic **scheme interpreter**
- Written in **Haskell**
- **Strict** testing policy
- Continuous integration running tests on every **Pull Request**
- **Over 100** Unit tests and close to **50% coverage**
- **Close to 20** Integration tests
- **Abstract Syntax Tree** and **Concrete Parse Tree** implementation
- Standard input reading
- An [ABNF syntax description](./doc/syntax-description.md)
- An [ABNF syntax description for the "compiled" code](./doc/compiled-syntax-description)
- **Infix notations** for operators and custom functions## Supported Scheme Features
- Atoms
- Signed Integers
- Symbol
- Boolean type
- Function execution
- Function definition
- Named Functions
- Lambda Functions
- Variable definition
- Conditional expressions## Builtin Functions
In addition to these basic features, our interpreter also implements the following builtins :
- println
- div
- mod
- \*
- \-
- \+
- <
- <=
- \>
- \>=
- eq?## Repl mode
You can also enter into an **interactive** session by running :
```
./glados -i
```or
```
./glados --interactive
```## Install Dependencies
Install cabal by installing GHCUP or another method described on the [Haskell Website](https://www.haskell.org/).
```sh
cabal update;
```Also install the following VSCode/Codium/CodeOSS extensions:
```
hoovercj.haskell-linter
justusadam.language-haskell
haskell.haskell
```## Run project
```sh
cabal run glados -- file.scm;
```or
```sh
make ARGS="file.scm"
```## Running the tests
In order to see coloured output and no coverage when running the tests, please run the tests with one of the following commands:
```sh
cabal run test
``````sh
make test
```[Build Guide](doc/dev-install.md)
# Bonus ideas :
- Fully featured REPL
- Exception stack tracing
- Exception line tracing