Course Hero Logo

IIT2019063_PPL_ASS1.docx - PPL Assignment 1 Divyesh Rana -...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 4 out of 9 pages.

PPLAssignment 1Divyesh Rana - IIT2019063Question 1:Perform the pairwise disjointness test for the following grammarrules.a.AaB | b | cBBb.BaB | bA | aBbc.C → aaA | b | caB:Perform the pairwise disjointness test for the following grammar rules.
A.A → aB|b|cBBFIRST(aB)=aFIRST(b)=bFIRST(cBB)=cThey don’t intersect and pass the testB.B → aB|bA|aBb
Question 2.Perform the pairwise disjointness test for the following grammarrules.a.S → aSb | bAAb.A → b{aB} | ac.B → aB | a
Question 3:Show a trace of the recursive descent parser given in Section4.4.1 for the string a + b * c.
Call lex /* returns + */Exit <factor>Exit <term>Call lex /* returns b */Enter <term>Enter <factor>Call lex /* returns * */Exit <factor>

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 9 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
posma
Tags
parse tree, Recursive descent parser

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture