Skip to content
Stasenko-KonstantinPublic

About

simple and inaccurate interpreter in ± 800 lines of code

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

Repository files navigation

lisp

design is very human. very easy to use
simple lisp from scratch in ± 800 lines of code (including some tests)

Build & Run

git clone https://github.com/Stasenko-Konstantin/lisp
cd lisp
go build -o lisp cmd/lisp/main.go

usage: ./lisp [*.scm] [arg] where arg:
        --help   -- prints the help
        --past   -- prints intermediate 
        

Usage

./lisp
<<< :h
>>> :l, :load *.scm      -- evaluate file
>>> :h, :help            -- prints the help
>>> :p, :past            -- prints intermediate ast
>>> :q, :quit            -- program exit
<<< :p
>>> OK
<<< (println 1)

type = LIST_O, content = 
        type = NAME_O, content = println, x = 1, y = 0;
        type = NUM_O, content = 1, x = 10, y = 0;, x = 0, y = 0;

1 
>>> ( 1 )
<<< 

About

simple and inaccurate interpreter in ± 800 lines of code

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages