P. 1
Augmented Grammar - Compiler Design - Dr. D. P. Sharma - NIT Surathkal by wahid311

Augmented Grammar - Compiler Design - Dr. D. P. Sharma - NIT Surathkal by wahid311

|Views: 384|Likes:
Published by Abdul Wahid Khan
Augmented Grammar - Compiler Design - Dr. D. P. Sharma - NIT Surathkal by wahid311
Augmented Grammar - Compiler Design - Dr. D. P. Sharma - NIT Surathkal by wahid311

More info:

Categories:Types, Research
Published by: Abdul Wahid Khan on Mar 17, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

11/14/2014

pdf

text

original

S E

E E + (E) | int

1

0 S E E

yE, $ yE+(E), $/+ yint, $/+
E

E

int y, $/+

1

E+y(E), $/+

3

2 S E

Ey, $ Ey +(E), $/+ E E E E+(yE), $/+ yE+(E), )/+ yint, )/+

4

6 E E E

E+(yE), $/+ yE+(E), )/+ yint, )/+

E

int y, )/+

5
2

0 S E E

yE, $ yE+(E), $/+ yint, $/+
E

int

E int y, $/+ 1 E int on $,+ E E+y(E), $/+ ( E E E E+(yE), $/+ yE+(E), )/+ yint, )/+ int E E int y, )/+

+

3

2 S Ey, $ E Ey +(E), $/+ accept on $
E

4

6 E E E

E+(yE), $/+ yE+(E), )/+ yint, )/+

5 int on ),+
3

1. 2. 3. 4. 5. 6.

S' E E T T F

E T²E T FvT F id
4

y Let us parse the expression

x ² y v z using the CLR(1) table y The scanner will encode the input string as id ² id v id $ where $ is the EOF marker

5

id 0 s4 1 2 3 4 5 s4 6 s4 7 8

Action ² v s5 r5 r6

$ acc r3 r5 r6

E 1

Goto T 2

F 3

s6 r6

7 r2 r4

2 8

3 3

r4

6

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->