duangsuse::Echo
... 说得太详细了实在是脑洞啊 简要说一下每个类的功能(看了一点后我还是觉得 Lice 的设计有点大了... 不知道为什么)
我大概看了一遍,已经找到分词、解析器、数值类型自动提升运算工具、内部函数位置、辅助扩展函数、AST 求值逻辑位置
目前依然需要确定的可能是内部函数分派逻辑
刚才去迂腐的编译原理裙里看看,冰封不在所以为啥要给 Kotlin 的内部 handler 加 mangle 我就没问到
目前依然需要确定的可能是内部函数分派逻辑
刚才去迂腐的编译原理裙里看看,冰封不在所以为啥要给 Kotlin 的内部 handler 加 mangle 我就没问到
然后我怂了... 因为我感觉 InScript + JNI Bison + Flex Lexer 会更好玩一些,之前没玩过,都是自写的分词器,然后递归下降 Recursive descent method 解析器不会写... 二元运算优先级和左优先级右优先级不了解... 所以都不知道如何整理 BinaryNode
不过我还是乐意出一个支持最新基本词法语法定义的 Lime 去和 Lice 比速度
不过我还是乐意出一个支持最新基本词法语法定义的 Lime 去和 Lice 比速度
平时指令式 imperative 写多了声明式 declarative 写少了的 duangsuse 不会看满屏括号(
至少不知 C++ template 元编程 metaprogramming 为何物
至少不知 C++ template 元编程 metaprogramming 为何物
duangsuse::Echo
https://gist.github.com/duangsuse/7dba2f4b41e45c3533158226091438e3 我准备翻译一下这篇文档,然后用这种模式写一个解释器...
然后惊喜的发现 MinVM、LiteVM 的设计与 Kent 大佬的有相似之处
https://github.com/kenpratt/rusty_scheme
https://github.com/picrin-scheme/libpicrin/ Tracing GC
https://github.com/cslarsen/mickey-scheme R7RS 的这个比较大了 500 提交
https://github.com/uhmanoa-transpiler-project/shaka-scheme 推荐,使用 C++,简洁明了
https://github.com/ignorabimus/minischeme 推荐,使用复制 GC,单文件实现
https://github.com/boynton/scheme 推荐,字节码解释
https://github.com/ltoddy/scheme.c/blob/master/scheme/object.h 简单的 C 实现
https://github.com/picrin-scheme/libpicrin/ Tracing GC
https://github.com/cslarsen/mickey-scheme R7RS 的这个比较大了 500 提交
https://github.com/uhmanoa-transpiler-project/shaka-scheme 推荐,使用 C++,简洁明了
https://github.com/ignorabimus/minischeme 推荐,使用复制 GC,单文件实现
https://github.com/boynton/scheme 推荐,字节码解释
https://github.com/ltoddy/scheme.c/blob/master/scheme/object.h 简单的 C 实现
GitHub
kenpratt/rusty_scheme
A Scheme interpreter written in Rust. Contribute to kenpratt/rusty_scheme development by creating an account on GitHub.
duangsuse::Echo
https://github.com/kenpratt/rusty_scheme https://github.com/picrin-scheme/libpicrin/ Tracing GC https://github.com/cslarsen/mickey-scheme R7RS 的这个比较大了 500 提交 https://github.com/uhmanoa-transpiler-project/shaka-scheme 推荐,使用 C++,简洁明了 https://github.com/igno…
BiwaScheme 更上层一些,不需要考虑 GC 什么的,光靠分析它的虚拟机就可以了解现代的 R6RS 解释器实现还挺值