All Projects → LeechanX → My Compiler Designer

LeechanX / My Compiler Designer

利用java语言写的编译器,自己设计了语言、文法、设计了词法分析、语法分析、语义分析和汇编代码生成

Programming Languages

java
68154 projects - #9 most used programming language

编译器界面图:

NewSWTApp.java UI部分(SWT组件) github

运行方法 Usage

CFanalyze.java 词法分析部分

在文本域输入你的代码(按照我给的文法 文法在myG.txt里) github 先点击第一个button生成词法分析 github YFanalyze.java 词法分析部分

再点击第二个button把代码转义成适配文法标识符的输入串 github 点第三个Button进行语法分析 如果语法正确,显示accepted 如图: github 如果语法错误,显示错误以及错误的地方 YYanalyze.java 词法分析部分

点第四个button进行语义分析 生成四元式 github HBgenerate.java 词法分析部分

点第五个Button进行四元式翻译,翻译成汇编代码 github

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].