(Go 版)https://github.com/hazbo/the-super-tiny-compiler super-tiny-compiler.js 编译器(NodeJS) test.js 是测编译器的代码, 提前手写了正确的结果, 再和程序输出的比对. no-comments-super-tiny-compiler.js 没注释的编译器, 读完有注释的版本后可以看下这个 super-tiny-
这是Jamie Kyle 的 GitHub 项目 the-super-tiny-compiler 的中文翻译,原项目地址:https://git.io/compiler。 翻译者:姚永泽 这是一个包含了所有现代编译器重要组成部分的超级简化编译器。使用简洁,易理解的 JavaScript 编写。 通读加了注释的代码能够帮助你学习大部分编译器是如何从头到尾工作的。 想要立即看代码...
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库:https://github.com/jamiebuilds/the-super-tiny-compiler 分支(1) 标签(1) 管理 管理 v1.0.0 克隆/下载 HTTPSSSHSVNSVN+SSH 该操作需登录 Gitee 帐号,请先登录后再操作。 提示
这里的解析包括词法分析及语法分析,由词法分析器把代码串转换成一系列词法单元(token),再由语法分析器生成能够描述语法结构(包括语法成分及其关系)的中间表示形式(Intermediate Representation)或抽象语法树(Abstract Syntax Tree) 从结构上看,词法单元是一组描述独立语法成分(比如数值,标签,标点符号,操作符等)的小对象,...
主要讲述了编译器大概有什么步骤,怎么把文字转化成对应语言的代码 如何构建AST语法树,怎么处理nested function call等等。 思否文章: https://segmentfault.com/a/1190000021365376 原REPO: https://github.com/jamiebuilds/the-super-tiny-compiler 我翻译的REPO:...
仅用1000 行 JavaScript 代码实现的迷你编译器,其中注释还占了一大半,实际代码只有 200 行左右。它虽然代码量不多,但完整地实现了编译器基本功能,可以用来学习编译器原理。 收录于: 第80 期 标签: JavaScript 编译器 评论 没用过 用过 评分: 发布 暂无精选评论...
该操作需登录 Gitee 帐号,请先登录后再操作。 JavaScript 1 https://gitee.com/mirrors/the-super-tiny-compiler.git git@gitee.com:mirrors/the-super-tiny-compiler.git mirrors the-super-tiny-compiler the-super-tiny-compiler 北京奥思研工智能科技有限公司版权所有...
git地址:https://github.com/jamiebuilds/the-super-tiny-compiler 本文案例:将lisp语言描述转为c语言描述 代码语言:javascript 代码运行次数:0 LISPC2+2(add22)add(2,2)4-2(subtract42)subtract(4,2)2+(4-2)(add2(subtract42))add(2,subtract(4,2)) ...
josegomezr/the-super-tiny-compilerPublic NotificationsYou must be signed in to change notification settings Fork2 Star29 Issues Files master Sign in to see the full file tree. super_tiny_compiler.py Latest commit josegomezr added some comments, and wrote some asserts on test.py ...
Tiny C Compiler - The Smallest ANSI C compiler. Contribute to alekmaul/tcc development by creating an account on GitHub.