+ Link For Assignments, GDBs & Online Quizzes Solution |
+ Link For Past Papers, Solved MCQs, Short Notes & More |
Objective:
To learn and understand the concepts of LR(1) parsers, canonical collections and shift/reduce conflicts.
Lectures Covered: 22-30
Instructions:
Please read the following instructions carefully before submitting assignment:
Question No 1: Marks 20
Consider the following context free grammar:
S → Sa
S → bS
S → c
(a) Write the canonical collections of LR(1) items for the given context free grammar:
[4 marks]
(b) Identify all conflicting items from solution of part a, and the types of the conflicts. [4 marks]
(c) Could the original grammar be converted into an LALR(1) parser that parses all input correctly by resolving conflicts, in the way that YACC and similar parser generators allow? If so, how should they be resolved? In either case, please explain briefly. [4 marks]
(d) Rewrite the grammar in an equivalent form that is suitable for LL parsing and minimizes the use of stack space. [4 marks]
(e) Rewrite the grammar in an equivalent form that is directly suitable for LR parsing (i.e., does not result in conflicts) and minimizes the use of stack space. [4 marks]
Tags:
+ 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)Plz guid about solution
Thanks GOD ...... me done complete
shokhaa....
anwar jaisooo ko ata jata kuch hota nai... aur shooky hoty rehty hai...
ja pai kam kar apna... kar li hai too announcement krva dy VU pay
thanks dear on this compliment
agr mujy nhi ati to ap bana kar upload kar dy dekhty hn u kya ho ..............
Anwar ul haq please share idea
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We have been working very hard since 2009 to facilitate in learning Read More. We can't keep up without your support. Donate.
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post