Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jcla1/gisp

Simple LISP in Go
https://github.com/jcla1/gisp

Last synced: 10 days ago
JSON representation

Simple LISP in Go

Awesome Lists containing this project

README

        

gisp
====

Simple (non standard) compiler of Lisp/Scheme to Go.

## Includes
- Lexer based on Rob Pike's [Lexical Scanning in Go](http://cuddle.googlecode.com/hg/talk/lex.html#title-slide)
- Simple recursive parser, supporting ints, floats, strings, bools
- TCO via loop/recur
- AST generating REPL included

## Build and Run
```
> go build && ./gisp
>>
```
From here you can type in forms and you'll get the Go AST back.
To compile a file:
```
> ./gisp filename.gsp
````

# Functions
```
+, -, *, mod, let, if, ns, def, fn, all pre-existing Go functions
```
See [examples](examples) for some Project Euler solutions

# License

MIT