Exams › GATE › Technical
Which one of the following statements is TRUE?
- The LALR(1) parser for a grammar G cannot have reduce-reduce conflict if the LR(1) parser for G does not have reduce-reduce conflict.
- Symbol table is accessed only during the lexical analysis phase.
- Data flow analysis is necessary for run-time memory management.
- LR(1) parsing is sufficient for deterministic context-free languages.
Correct answer: LR(1) parsing is sufficient for deterministic context-free languages.
Solution
LR(1) parsing is designed to handle deterministic context-free languages by using a lookahead symbol to make parsing decisions, ensuring that it can resolve ambiguities and conflicts that may arise in the parsing process.
Related GATE Technical questions
⚔️ Practice GATE Technical free + battle 1v1 →