We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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
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

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 2185


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Replies to This Discussion



E1.true = E.true 

E1.false = E.false 

E.code =  E1.code

i think aisay ho ga.

help plz?

y ever1 comments at the last day? 

no solution or no any idea yet..

tariq bhai do something for this..

or somebody plz share the solution or idea for this..its last day


@zeeshan we are discussing the solution..So plzz don't just wait for the solution..share ur opinion too..:)

@salma iqbal. sorry to say, i have no idea about assignment. 

that's y i am waiting for solution.

@zeeshan If u did mind of my saying then I apologize.._The point which I  was trying to convey to u was if we all will discuss about assignment then at the end will be able to get the desired solution..I am also unable to grasp the concepts of this subject bt at least sharing my opinion using general knowledge..No body will come to give cooked stuff..

@salma iqbal...nops i didnt mind. actually i tried allot but in the end gain nothing about this subject and assignment. and bcz of my job i have no enough time for studies. but you right. 

@sny2ksa kal say main is assignnment pay bahout damagh lara rahi hun..hadndouts main jahan jahan possibility hy assignment saay regarding question ka answer find karnay main..m trying but still m not sure..and jis sentence ka aap nay poocha hay m also confused regarding that..any how sharing points which i noted from handouts..

  • if E----> CONST goto INT

          goto BOOL

  • if E----->E1+E2 goto BOOL

           goto INT

  • if E1<E2 goto BOOL

          goto INT

  • E----->(E1)





idea solution attached..

but rules hv to be applied in it also.


sny2ksa jo ap ny pdf fil atech ki opn nhi ho rhi wo plzzz wo dobara tech kr 2


it will not like this.

first discussion was right.

first declare types and then write their Rules.

for error checking check attached file.


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

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