8cc.go:用Go语言编写的C编译器

上传者: 42107491 | 上传时间: 2022-11-29 14:49:40 | 文件大小: 69KB | 文件类型: ZIP
8cc.go C编译器 8cc.go是用Go语言编写的C编译器。 这是8cc的端口( ) 作者 DQNEO (最初来自上山瑞 ) 用法 输出汇编代码只能在Linux上运行。 如果您使用其他平台,我会建议Docker运行它。 $ docker run -it --rm -v `pwd`:/mnt dqneo/ubuntu-build-essential:go bash root@62b0d706a586:/mnt# echo 'int main(){printf("%s\n","hello world");}' |./gorun|./asrun hello world 它支持哪种语法? 如果别的 对于 二进制运算符(+-/ *&|) 逻辑运算符(&&,||) 三元运算符(?:) 功能声明 函数调用 分配给局部变量 分配给全局变量 primitiv数据类型(int,char,char *,float,double) 复合数据类型(数组,结构,联合,指针) 指针算术 指针取消引用 测试 $ docker run -it --rm -v `pwd`:/mnt dqneo

文件下载

资源详情

[{"title":"( 69 个子文件 69KB ) 8cc.go:用Go语言编写的C编译器","children":[{"title":"8cc.go-master","children":[{"title":".gitignore <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 443B </span>","children":null,"spread":false},{"title":"util.c <span style='color:#111;'> 977B </span>","children":null,"spread":false},{"title":"main.go <span style='color:#111;'> 320B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"bothtest.sh <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"dict.h <span style='color:#111;'> 532B </span>","children":null,"spread":false},{"title":"lex.go <span style='color:#111;'> 8.42KB </span>","children":null,"spread":false},{"title":"ctestone.sh <span style='color:#111;'> 223B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"go.yml <span style='color:#111;'> 399B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"util.h <span style='color:#111;'> 550B </span>","children":null,"spread":false},{"title":"gen.go <span style='color:#111;'> 15.37KB </span>","children":null,"spread":false},{"title":"gen.c <span style='color:#111;'> 20.26KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"comp.c <span style='color:#111;'> 330B </span>","children":null,"spread":false},{"title":"decl.c <span style='color:#111;'> 594B </span>","children":null,"spread":false},{"title":"control.c <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"global.c <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"number.c <span style='color:#111;'> 80B </span>","children":null,"spread":false},{"title":"sizeof.c <span style='color:#111;'> 901B </span>","children":null,"spread":false},{"title":"float.c <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"scope.c <span style='color:#111;'> 195B </span>","children":null,"spread":false},{"title":"macro.c <span style='color:#111;'> 3.89KB </span>","children":null,"spread":false},{"title":"extern.c <span style='color:#111;'> 147B </span>","children":null,"spread":false},{"title":"include","children":[{"title":"test.h <span style='color:#111;'> 59B </span>","children":null,"spread":false},{"title":"test2.h <span style='color:#111;'> 27B </span>","children":null,"spread":false}],"spread":false},{"title":"arith.c <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"union.c <span style='color:#111;'> 423B </span>","children":null,"spread":false},{"title":"include.c <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"function.c <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"pointer.c <span style='color:#111;'> 463B </span>","children":null,"spread":false},{"title":"struct.c <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"array.c <span style='color:#111;'> 913B </span>","children":null,"spread":false},{"title":"enum.c <span style='color:#111;'> 263B </span>","children":null,"spread":false},{"title":"int.c <span style='color:#111;'> 714B </span>","children":null,"spread":false},{"title":"util","children":[{"title":"util.c <span style='color:#111;'> 436B </span>","children":null,"spread":false}],"spread":false},{"title":"type.c <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"MakefileGo <span style='color:#111;'> 746B </span>","children":null,"spread":false},{"title":"header.go <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false},{"title":"dict.go <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false},{"title":"docker-test.sh <span style='color:#111;'> 159B </span>","children":null,"spread":false},{"title":"dict.c <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"string.c <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"test.sh <span style='color:#111;'> 4.03KB </span>","children":null,"spread":false},{"title":"crun <span style='color:#111;'> 75B </span>","children":null,"spread":false},{"title":"TODO <span style='color:#111;'> 37B </span>","children":null,"spread":false},{"title":"debug.c <span style='color:#111;'> 7.34KB </span>","children":null,"spread":false},{"title":"parse.c <span style='color:#111;'> 40.05KB </span>","children":null,"spread":false},{"title":"8cc.h <span style='color:#111;'> 4.89KB </span>","children":null,"spread":false},{"title":"list.c <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"f <span style='color:#111;'> 78B </span>","children":null,"spread":false},{"title":"debug.go <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"gotest.sh <span style='color:#111;'> 58B </span>","children":null,"spread":false},{"title":"README <span style='color:#111;'> 524B </span>","children":null,"spread":false},{"title":"asrun <span style='color:#111;'> 155B </span>","children":null,"spread":false},{"title":"util.go <span style='color:#111;'> 812B </span>","children":null,"spread":false},{"title":"utiltest.c <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"adapter.go <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"list.h <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"list.go <span style='color:#111;'> 534B </span>","children":null,"spread":false},{"title":"sample","children":[{"title":"nqueen.c <span style='color:#111;'> 1007B </span>","children":null,"spread":false}],"spread":false},{"title":"Makefile <span style='color:#111;'> 910B </span>","children":null,"spread":false},{"title":"string.go <span style='color:#111;'> 119B </span>","children":null,"spread":false},{"title":"cpp.go <span style='color:#111;'> 13.91KB </span>","children":null,"spread":false},{"title":"cpp.c <span style='color:#111;'> 17.91KB </span>","children":null,"spread":false},{"title":"gorun <span style='color:#111;'> 150B </span>","children":null,"spread":false},{"title":"lex.c <span style='color:#111;'> 10.29KB </span>","children":null,"spread":false},{"title":"parse.go <span style='color:#111;'> 33.52KB </span>","children":null,"spread":false},{"title":"ctest.sh <span style='color:#111;'> 111B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明