电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

编译器源代码

编译器源代码_第1页
编译器源代码_第2页
编译器源代码_第3页
#include "stdio.h" #include "string.h" #define ACC -2 /**************************************/ #define sy_if 0 #define sy_then 1 #define sy_else 2 #define sy_while 3 #define sy_begin 4 #define sy_do 5 #define sy_end 6 #define a 7 #define semicolon 8 #define e 9 #define jinghao 10 #define S 11 #define L 12 #define tempsy 15 #define EA 18 #define E0 19 #define plus 34 #define times 36 #define becomes 38 #define op_and 39 #define op_or 40 #define op_not 41 #define rop 42 #define lparent 48 #define rparent 49 #define ident 56 #define intconst 57 /********************************************/ char ch='\0'; int count=0; static char spelling[10]={""}; static char line[81]={""}; char *pline; static char ntab1[100][10]; struct ntab { int tc; int fc; }ntab2[200]; int label=0; struct rwords { char sp[10]; int sy; }; struct rwords reswords[10]={{"if",sy_if}, {"do",sy_do}, {"else",sy_else}, {"while",sy_while}, {"then",sy_then}, {"begin",sy_begin}, {"end",sy_end}, {"and",op_and}, {"or",op_or}, {"not",op_not}}; struct aa { int sy1; int pos; }buf[1000], n, n1, E, sstack[100], ibuf[100], stack[1000]; struct aa oth; struct fourexp { char op[10]; struct aa arg1; struct aa arg2; int result; }fexp[200]; int ssp=0; struct aa *pbuf=buf; int nlength=0; int lnum=0; int tt1=0; FILE *cfile; /********************************************************/ int newt=0; int nxq=100; int lr; int lr1; int sp=0; int stack1[100]; int sp1=0; int num=0; struct ll { int nxq1; int tc1; int fc1; }labelmark[10]; int labeltemp[10]; int pointmark=-1,pointtemp=-1; int sign=0; /********************³ÌÐòÓï¾äµÄLR·ÖÎö±í********************/ static int action[19][13]= {{2,-1,-1,3,4,-1,-1,5,-1,-1,10,1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,ACC,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1,-1,6,-1,-1,-1},...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

小辰7+ 关注
实名认证
内容提供者

出售各种资料和文档

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部