(a) Explain basic parsing techniques. What is top down parsing? (b) G…

Previous year question for Compiler Design.

Question

(a) Explain basic parsing techniques. What is top down parsing?

(b) Give a formal definition of context - free grammar (CFG). Discuss role of parser in compiler design. Consider the following CFG:

$E \rightarrow E+E \mid E-E$

$E \rightarrow E*E \mid E/E$

$E \rightarrow d$

Check whether the grammar is ambiguous or not for the following string.

$id + id + id$

Related pages

More PYQs on Ambiguity in Grammars

Open on CachedInfo