You are on page 1of 42

Learn More Scribd Upload a Document

Search Documents

Explore Sign Up | Log In / 64

Download this Document for Free

#include<ios tream.h>#inc lude<conio.h >#include<fs

tream.h>#inc lude<string.h >#include <cfg.h>void main() {clrscr();g.ge tdfg();int

h[100],count =0,rt=0,foun d=0;set_of_it em cc[20];str t=putdot (g.p[0],2);cc[ 0] =

closure(t.ele) ;int tab[20] [20];for(int i=0; i<20; i+ +)for(int j=0; j<20;j++)tab [i][j] =0;int

m=0;count+ +;char a[20];int ll=0;for (i=0; i<g.nv;i++) {a[i]=g.v[i];} for(j=0;

j=g.nt;j++) {a[i]=g.t[j];i + +;a[i]=$;i+ +;a[i]=\0;fo r(i=0; i<count; i++)

{m=0;for(j= 0; j<g.nv; j+ +){found = 0;set_of_ite m t=go_to(cc[i] ,g.v[j]);if(t.c

!=0){for(int k =0; k<count ; k+ +)if(cc[k] equals (t) ==1){for(int ml=0;

ml<strlen (a) ;ml++){

m=ml;tab [i] [m] =k;m+ +;}}found=1 ;break;}if (found != 1) {for (int

ml=0; ml<strlen (a); ml++){if (a[ml] == g.v[j]; {m=ml;tsb [i] [m] =

count;m+ +;}}cc [count++] =t;}}}for (j=0; j<g.nt; j++) {found=0;set

_of_item t = go_to(cc [i], g.t[j]);if(t.c ! = 0){for(int k=0; k<count ;k++)if(cc [k].equals (t)

==1){fpr(int ml=0; ml<strlen(a) ;ml++) {if(a[ml] == g.t [j]) {m=ml;tab[i]

[m] = k;m+ +;}}found=1 ;break;}if(fo und !=1){

for(int ml=0;ml<strl en(a); ml++) {if(a[ml] == g.v[j]); {m=ml;tab[i]

[m] =count;m+ +;}}cc[count + +]=t;}}}for(j =0;j<g.nt;j+ +)

{found=0;set _of_item t=go_to(cc[i] ,g.t[j]);if(t.c ! =0){for(int ml=0;ml<strl en(a);ml++)

{if(a[ml] ==g.t[j]) {m=ml;tab [i][m] =k;m+ +;}}found=1 ;break;}if(po ped==tab[0]

[j])break;}}e lse{cout<<n ot accepted;ge tch();exit(0); }}cout<<ac

cepted;getc h();}

OUTPUT

:IN.DAT

357ETF+*()I S = EE = E + TE = TT = T * FT = FF = ( E )F = iSLR-

TABLEE T F + * ( ) i $ 0 1 2 3

S S S62 r S r r

4 5 2 7 2 2

r r r r 8 3 S

4 4 4 4 4

4 2

S r r r r 9 S

5 6 6 6 6 4

6 3

S 1 S S S S 1

5 0 4 5 6 1 9

7 8

r S r r 0 r r

1 7 1 1 3 3

r r 1 r r r r

3 3 5 5 5 5

RESULT:

Hence, the given program has been executed and

the output has beenverified successfully.

Compiler designlab final


Download this Document for FreePrintMobileCollectionsReport Document

Info and Rating


Follow Abhijeet Abhi

Sections
show all prev | next

INDEX Expt SYSTEM SOFTWARE COMPILER DESIGN AIM: ALGORITHM: PROGRAM: INPUT FILE: RESULT:

Share & Embed

More from this user


PreviousNext 1.

64 p.

Recent Readcasters

Add a Comment

Upload a Document

Search Documents

Follow Us! scribd.com/scribd twitter.com/scribd facebook.com/scribd About Press Blog Partners Scribd 101 Web Stuff Scribd Store Support FAQ Developers / API Jobs Terms Copyright Privacy

Copyright 2011 Scribd Inc. Language: English

You might also like