1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
Another lisp dialect (mirror)
Find a file
2022-02-11 18:07:32 +07:00
blspc refactor: better args handling 2022-02-11 18:07:32 +07:00
.gitignore refactor: move instructions definition to middle 2022-02-11 18:07:32 +07:00
Cargo.lock refactor: merge all repos 2022-02-11 18:07:32 +07:00
Cargo.toml refactor: merge all repos 2022-02-11 18:07:32 +07:00
Makefile refactor: merge all repos 2022-02-11 18:07:32 +07:00
README.md docs: update readme 2022-02-11 18:07:32 +07:00

bobbylisp

another lisp dialect

Also available on https://git.ablecorp.us/azur/bobbylisp

; example/s.blsp
(fun factorial (x)
    (if (<= x 1)
        1
        (* x (factorial (- x 1)))))
(do
    (print (factorial 7)))

Compliation flow:

Input(file) -> Parser -> Compile(Bytecode) -> Interpret
  String       SExprs        Bytecode            IO
                                          |->  Compile
                                              Assembly(?)

Installation

$ make

or

$ make debug

The binary will be installed in ~/bin/blspc run it with:

$ blspc -h

Example

If no -r or -c specified. It will check for file extension instead. If found .blsp, it will compile, if found .bsm it will run vm and interpret the bytecode.

$ blspc ./example/hello.blsp
$ blspc ./hello.bsm
Hello, World!

Progress:

  • Lexer & Parser
  • Syntax checker & Type checker
  • Interpreter
  • Compiler