Explain GOTO and CLOSURE function in LR grammars. Consider the follow…
Previous year question for Compiler Design.
Question
Explain GOTO and CLOSURE function in LR grammars. Consider the following grammar:
$E \rightarrow E+T \mid T$
$T \rightarrow T*F \mid F$
$F \rightarrow (E) \mid id$
Find the collection of LR (0) items for the above grammar.
- Year: 2018
- Subject: Compiler Design
Related pages
- LR Parsers — topic
- Compiler Design syllabus
More PYQs on LR Parsers
- (a) Explain the algorithm to eliminate Left-Recursion from a grammar with no cycle with suitable example. [10] (b) Discuss SLR and LALR parsing. [10]
- (a) Discuss the difference between the basic types of parsing. Also define the role of operator precedence grammar. Explain the algorithm for computation of le…