1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-09-28 05:17:37 +00:00
Another lisp dialect (mirror)
Go to file
2022-02-11 18:07:32 +07:00
example refactor: simplify parser 2022-02-11 18:07:32 +07:00
src refactor: simplify parser 2022-02-11 18:07:32 +07:00
.gitignore feat: init 2022-01-22 06:43:50 +07:00
Cargo.lock refactor: simplify parser 2022-02-11 18:07:32 +07:00
Cargo.toml refactor: simplify parser 2022-02-11 18:07:32 +07:00
README.md refactor: simplify parser 2022-02-11 18:07:32 +07:00

vl

another lisp dialect

(fun factorial [x]
    (if (<= x 1)
        1
        (* x (factorial (- x 1)))))

(def times 7)
(do
    (print (factorial times)))

Compliation flow:

Input(file) -> Lexer -> Parser -> Interpret
  String       Token     Expr         IO
                              |-> Compile(TODO)
                                     File 

Progress:

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

Problems:

  • Parser only detect the first error.
  • Parser can't detect (())) syntax error.