A tree walking interpreter for a subset of R5RS Scheme.
╭─────────╮ ╭────────────╮ ╭────────╮
Text ──► │ Parse │ ─── Scheme value ──► │ AstParse │ ──── AST ────► │ Eval │ ───► Effects and result
╰─────────╯ ╰────────────╯ ╰────────╯
Source code is parsed into S-expressions, represented as Scheme data.
This is then parsed into an abstract syntax tree (AST), which
contains primitive Scheme expressions.
The AST is then evaluated.
The primary purpose of ash has been learning and fun. There has been no attempt to improve performance.
ash was initially based on Write Yourself a Scheme in 48 Hours
and Write You A Scheme, Version 2.0, but currently has little in common with
these tutorials.
The following are not supported
- Mutation
- Macros
- Continuations
- Non-integral numbers
- Quasiquotations
Almost all standard procedures, excluding those involving the above features, are available.
GHC and Cabal are required. The recommended way to install these is using GHCup.
See the downloads page on haskell.org for details.
git clone https://github.com/meooow25/ash.git
cd ash
cabal install
Then simply run
ash -h
- Macros
- Flonums
- Compile to byte code