https://github.com/yxw007/tinyjs
一个非常mini的编译器,让你对编译原理有个大概的了解
https://github.com/yxw007/tinyjs
Last synced: 3 months ago
JSON representation
一个非常mini的编译器,让你对编译原理有个大概的了解
- Host: GitHub
- URL: https://github.com/yxw007/tinyjs
- Owner: yxw007
- Created: 2023-08-29T03:06:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-02T02:40:04.000Z (about 2 years ago)
- Last Synced: 2024-12-28T01:13:42.134Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TinyJS
一个非常mini的编译器,让你对编译原理有个大概的了解。具体demo:将Lisp代码 转成 javascript代码
# 翻译步骤
1. 识别Lisp语言token
2. Lisp token 构建 Lisp AST
3. Lisp AST 转换成 JsAST
4. 遍历JsAST进行代码生成
## 相关资料
- https://citw.dev/tutorial/create-your-own-compiler?p=6