Consider the grammar G₂: Para → Sentence RP | Sentence RP → b Sentence RP | b…
PYQ GATE 1990Modified — slightly modified from the official paper; see the solution
Consider the grammar G₂: Para → Sentence RP | Sentence RP → b Sentence RP | b Sentence Sentence → Word b Sentence | Word Word → letter * Word | letter letter → id where id, ‘*’ and ‘b’ are terminals. Convert the grammar G₂ to an operator grammar. Define precedence relations among the terminals and show how to use a stack algorithm to parse the following string id*id b id*id. The parse should generate a rightmost derivation.
Sign up free to check your answer
Sign up freeLoading lesson…

