Skip to content

Latest commit

 

History

History
121 lines (92 loc) · 2.61 KB

README.md

File metadata and controls

121 lines (92 loc) · 2.61 KB

GLaDOS-2023

drawing

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
  • An ABNF syntax description for the "compiled" code
  • 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
  • print
  • 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.

cabal update;

Also install the following VSCode/Codium/CodeOSS extensions:

hoovercj.haskell-linter
justusadam.language-haskell
haskell.haskell

Run project

cabal run glados -- file.scm;

or

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:

cabal run test
make test

Build Guide

Bonus ideas :

  • Fully featured REPL
  • Exception stack tracing
  • Exception line tracing