gpt4 book ai didi

ruby - 您如何为该语言编写编译器?

转载 作者:数据小太阳 更新时间:2023-10-29 06:43:14 24 4
gpt4 key购买 nike

<分区>

Possible Duplicates:
How can a language's compiler be written in that language?
implementing a compiler in “itself”

我在看 Rubinius ,一个使用用 Ruby 编写的编译器编译为字节码的 Ruby 实现。我无法理解这个。您如何为语言本身编写编译器?看起来它只是文本,没有任何东西可以将其编译成可执行文件,然后可以编译 future 用 Ruby 编写的代码。我只是输入那句话感到困惑。谁能帮忙解释一下?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com