һ - רҵ·ĵϷƽ̨

LL(1)语法分析程序实验报告 - 百度文库

Դû ʱ䣺2025/10/16 23:08:42 loading ƪĵֻ
˵ݽԤݿܲȫҪĵҪݣwordʹáword΢ź:xxxxxxxQQxxxxxx ܸṩĵл֧½⡣

.

{

if(curtocmp!='#') {

changchartoint(); if(table[i][j]) {

t=10*i+j; doforpush(t); continue; } else {

right=0; break; } } else

if(curtocmp!=curchar) {

right=0; break; } else break; } else

if(curtocmp!=curchar) {

right=0; break; } else {

h=h->next; continue; } } }

void main(void) {

char ch;

cout<<\ļ: ﷨\cout<<\

.

.

cout<<\˵ */\

cout<<\endl;

cout<<\ B=T */\

cout<<\Ŀ : LL(1)ķַԶжַ -\

cout<<\ Ϊķľӣ̡ܸ -\

cout<<\endl;

cout<<\ʽķΪ\

cout<<\ cout<<\ cout<<\

cout<<\ҪĴ(#Ž)\ right=1;

base=(struct Lchar*)malloc(sizeof(Lchar)); base->next=NULL; base->char_ch='#';

temp=(struct Lchar*)malloc(sizeof(Lchar)); temp->next=base; temp->char_ch='E'; top=temp;

h=(struct Lchar*)malloc(sizeof(Lchar)); h->next=NULL; p=h; do{

ch=getch(); putch(ch);

if(ch=='i'||ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='('||ch==')'||ch=='#') {

temp=(struct Lchar*)malloc(sizeof(Lchar)); temp->next=NULL; temp->char_ch=ch; h->next=temp; h=h->next; } else

.

.

{

temp=p->next;

printf(\for(;;) {

if (temp!=NULL)

printf(\else break;

temp=temp->next; } }

}while(ch!='#'); p=p->next; h=p;

dosome(); if(right)

printf(\ɹ!\\n\else

printf(\!\\n\getch(); }

ͼ

.

.

ĿαݣѧҪͨ䣬ﵽݵ ֮ͨǽԵ˲ֵ֣ԣһܡĶԲˣԵԴ󵽲˼顣

.

LL(1)语法分析程序实验报告 - 百度文库.doc ĵWordĵصԣ㸴ơ༭ղغʹӡ
Ƽ
Copyright © 2012-2023 һ Ȩ | ϵ
:վز֪ʶȨݡϢ紫ȨתصƷַȨ,һ֪ͨǣǻἰʱɾ
ͷQQxxxxxx 䣺xxxxxx@qq.com
ICP2023013149
Top