Skip to content

bajdcc/MyScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LISP解释器

(define introduction (lambda ()
  (let ()
    (println "Hello world!")
    (println "Refer: http://piumarta.com/software/lysp/lysp-1.1/lysp.c")
    (println "Using: ANTLR 4.7")
    (println "Author: bajdcc"))))

介绍

C++实现的LISP解释器,语法分析用ANTLR完成,解释器参考的lysp代码。

实现

  • quote
  • list
  • caar, cddr, ...
  • lambda
  • define
  • eval, apply
  • cons
  • let
  • while, if, for
  • assq
  • map
  • print
  • 四则运算
  • 等式判断

进度

程序可以运行。分两部分ANTLR静态库和LISP解释器。

分析原作者代码中。。。

重点

  1. GC(抄自自己的clib库)
  2. Cell结构
  3. Env
  4. List

About

LISP解释器(with ANTLR), IDE=VS2017

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages