Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试为 c 语言的伪代码编写翻译器。编译器的哪些阶段是必要的?我尝试了词汇、语法、语义、中间代码就足够了,或者机器代码是必要的。我在上述阶段尝试了 flex,bison。这是对的吗?
是的,在回答您的问题之后;你想基本上为“新”语言设计一个编译器。
新语言将有自己的语法(您提到的算法),因此您只需要使用该配置设计一个编译器,采用算法并输出有效的C 代码