june / Bin-stack Compiler
0 喜歡
0 分支
4 檔案
最後活躍 2 weeks ago
A compiler from a multi-bit-stack VM to C.
| 1 | |:: read a character :@stdio: read| |
| 2 | :end of file: |
| 3 | |:: read a character :@stdio: $x| |
| 4 | :buffer: $x |
| 5 | |:: read a character?| |
| 6 | :@stdio: read |
| 7 | |
| 8 | |:: reverse? :buffer: $x| |
| 9 | :text: $x |
| 10 | |:: reverse| |
june / Multi-bit-stack VM
0 喜歡
0 分支
1 檔案
最後活躍 2 weeks ago
A sketch of a small virtual machine that operates on multiple stacks of bits.
| 1 | ||:: dispatch |
| 2 | |
| 3 | |:: dispatch| :: evaluate :text: " |
| 4 | initial state |
| 5 | 01 11 11 11 |
| 6 | rules |
| 7 | rule |
| 8 | and if |
| 9 | 1 match |
| 10 | else |
上一頁
下一頁