(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$
- Year: 2018
- Subject: Compiler Design
Related pages
More PYQs on Ambiguity in Grammars
- Write notes on the following: (a) Properties of LR Parser. (b) Ambiguity with example. (c) Context-free Grammar. (d) Push-down Automata.
- (a) What do you mean by single pass and multi-compiler? Also discuss various phases of compilation. [10] (b) Define Ambiguity related to grammars, also discuss…
- (a) Define Ambiguity related to grammars, also discuss the rules to disambiguate. Check whether the following grammar is ambiguous. If so, then remove the ambi…