简体   繁体   English

自动伪代码到C语言转换器

[英]automatic pseudo code to c language converter

I'm trying to write a translator for pseudo-code to c language.which phases of compiler are necessary? 我正在尝试为C语言编写伪代码的翻译器。编译器的哪些阶段是必需的? I tried lexical,syntax,semantic,intermediate code is enough or machine code is necessary. 我尝试了词汇,语法,语义,中间代码就足够了,或者需要机器代码。 I tried flex,bison for the above phases. 我在以上阶段尝试过flex,bison。 Is it correct? 这是正确的吗?

Yea, following the replies on your question; 是的,关注您的问题; you want to basically design a compiler for a 'new' language. 您基本上希望为“新”语言设计一个编译器。

The new language will have it's own syntax (the algorithm you mentioned) so you'll just need to design a compiler with that configuration, take in algorithim and output valid C code 新语言将具有自己的语法(您提到的算法),因此您只需要设计具有该配置的编译器,采用算法并输出有效的C代码即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM