(a) Define Ambiguity related to grammars, also discuss the rules to d…
Previous year question for Compiler Design.
Question
(a) Define Ambiguity related to grammars, also discuss the rules to disambiguate. Check whether the following grammar is ambiguous. If so, then remove the ambiguity $E \to E+E \mid E-E \mid E*E \mid E/E \mid (E) \mid -E \mid id$.
(b) Describe the method of the shift reduce parsing and how it is implemented using stack ? Explain with suitable example.
- 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) Explain basic parsing techniques. What is top down parsing? (b) Give a formal definition of context - free grammar (CFG). Discuss role of parser in compile…