1、编译原理语法分析器#include#include#includetypedef structchar R;char r;int flag;array;typedef struct char E;char e;charLode;typedef structcharLode *base;int top;charstack;char str8080,arr8080,brr8080;array F20;int m,kk,p,ppp,FF=1;char r10;int crr2020,FLAG=0;char ccrr1120,ccrr2201;void Initstack(charstack s.to
2、p=-1;void push(charstack s.bases.top.E=w.E;s.bases.top.e=w.e;void pop(charstack w.e=s.bases.top.e;s.top-;int IsEmpty(charstack s)if(s.top=-1)return 1;else return 0;int IsLetter(char ch)if(ch=Afor(i=0;i;stri3=#;stri4=str00;stri5=#;stri6=0;cout“;cout“ “;coutendl;if(FF=1)char STR120;cout“请输入要规约的字符串:“endl;gets(STR0);int ii=strlen(STR0);STR0ii=#;cout“下面是规约的过程:“endl;process(STR,ii);