Skip to content

liuyongvs/lisp-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lisp-interpreter

====

Code on Github

在线阅读

文档目录

参考资料

  1. Project Markdown
  2. Markdown Syntax zh_TW
  3. Markdown Syntax CN
  4. Wiki Markdown
  5. XBeta Wiki Markdown

共享协议

本文由 LearnShare 整理并在 CC BY-SA 3.0 协议下发布,主要为了给自己和各位朋友作为学习 Markdown 的入门及参考资料。

请各位遵循 Markdown: License 及其它参考文献的共享协议来使用、修改和发布。

implement a lisp interpreter with low level language in C.

  1. design the data struct to represent the atom type, ATOM_NIL, ATOM_SYMBOL, ATOM_INTEGER, ATOM_PAIR, ATOM_FUNCTION, ATOM_CLOSURE

  2. lexer and parser

  3. support basic functional programming operate such as car cdr cons nil

  4. extend to arithmetic (+, - , * ,/)

  5. support boolean and if(which is a short-circuit evaluation), such as(< 1 2) (= (+ 1 2) (- 21 12))

  6. expand to lambda expressions and closures(lambda (x) (* x x)). and simple syntatic sugar(such as ('(1 2)), which is a list)

  7. use the mark sweep algorithm proposed by John McCarthy to implement a simle garbage collector .

more works deserve to be done, and i will do it later

  1. support other type, such as float, big number, complex and so on

  2. support variadic functions, such as(+ 1 2 3 4)

  3. tail recursive optimization

  4. environment use the hash table to speed up

  5. alternative GC

About

implement a lisp interpreter with low level language in C.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published