大小: 0.22M
文件类型: .zip
金币: 1
下载: 0 次
发布日期: 2020-12-27
标签:
资源简介
java实现c语言编译器,包括词法分析,语法分析,语义分析,目标代码生成四个部分,总体实现编译器功能,有运行界面,代码精简,值得下载。
资源截图
代码片段和文件信息
//#include//阶乘
void main()
{
int isumn;
i=0;
//int main //语义错误,非法标识符
//int 1m2;//词法出错
//scanf(“%d“n);//语法法出错
//int n;//语义错误,重复定义
//kk=9;//语义错误,没有定义
scanf(“%d“&n);
if(n<1){
sum=0;
}else{
sum=1;
}
while(i{
i=i+1;
sum=sum*i;
}
/*
for(int j=1;j<=n;j++){
sum=sum*j;
printf(“%d“sum);
}
*/
printf(“%d“sum);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-12-30 16:02 C-Compiler\
文件 248 2011-12-18 14:32 C-Compiler\.classpath
文件 386 2016-01-21 10:50 C-Compiler\.project
目录 0 2015-12-29 13:48 C-Compiler\.settings\
文件 404 2015-12-29 13:47 C-Compiler\.settings\org.eclipse.core.resources.prefs
文件 629 2011-12-18 15:37 C-Compiler\.settings\org.eclipse.jdt.core.prefs
目录 0 2016-01-21 10:50 C-Compiler\bin\
目录 0 2016-01-21 10:50 C-Compiler\bin\com\
目录 0 2016-01-21 10:50 C-Compiler\bin\com\compiler\
文件 2932 2016-01-21 10:50 C-Compiler\bin\com\compiler\AnalyseNode.class
文件 9818 2016-01-21 10:50 C-Compiler\bin\com\compiler\Asm.class
文件 602 2016-01-21 10:50 C-Compiler\bin\com\compiler\Error.class
文件 698 2016-01-21 10:50 C-Compiler\bin\com\compiler\FourElement.class
文件 14244 2016-01-21 10:50 C-Compiler\bin\com\compiler\LexAnalyse.class
文件 24504 2016-01-21 10:50 C-Compiler\bin\com\compiler\Parser.class
文件 710 2016-01-21 10:50 C-Compiler\bin\com\compiler\Typeword.class
文件 2830 2016-01-21 10:50 C-Compiler\bin\com\compiler\Word.class
目录 0 2016-01-21 10:50 C-Compiler\bin\com\view\
文件 1548 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$1.class
文件 698 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$2.class
文件 1818 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$3.class
文件 2038 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$4.class
文件 1721 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$5.class
文件 2635 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform$6.class
文件 7642 2016-01-21 10:50 C-Compiler\bin\com\view\Mainform.class
目录 0 2015-12-29 13:48 C-Compiler\result\
文件 1279 2016-01-04 21:35 C-Compiler\result\c_to_asm.asm
文件 96 2016-01-04 21:35 C-Compiler\result\FourElement.txt
文件 38428 2015-12-29 15:41 C-Compiler\result\LL1.txt
文件 2829 2015-12-29 15:22 C-Compiler\result\wordList.txt
目录 0 2015-12-29 13:48 C-Compiler\src\
............此处省略19个文件信息