Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


Question No 1: Marks 20
Consider the following grammar productions. Suppose you have an attribute E.type which can
be set to either INT, BOOL. Assume that the type of an expression is set to INT if an error is
detected and you have a routine msg() similar to printf() that can be used to print error
message.
E → CONST {E.type=??}
| ID {E.type =getType(ID.name);}
| E1 +E2 {E.type=??}
| E1< E2 {E.type=??}
| E1= =E2 {E.type=??}
| (E1) {E.type=??}
You are required to add rules to the attribute grammar to calculate E.type for each grammar
production.

Views: 2257

Attachments:

Replies to This Discussion

slution uplod kar do sny2ksa tmhy duaien doooo ga bohat zyada:)

very gud

ur pdf file is not opening.

yes curropted

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service