Which one of the following statements is TRUE?

A.

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. 

B.

Symbol table is accessed only during the lexical analysis phase.

C.

Data flow analysis is necessary for run-time memory management. 

D.

LR(1) parsing is sufficient for deterministic context-free languages. 

Solution:

Option A:  False, In LALR(1) parsing table we merge two similar states from LR(1) parsing table with different lookahead symbols. This process can cause R-R conflict in LALR(1) parser. So, LALR(1) parser can have reduce-reduce conflict if the LR(1) parser does not have reduce-reduce conflict for a given grammar.

Option B: False, symbol table is accessible to all the phases of a compiler.

Option C: False, Data Flow analysis helps in code optimization.

Option D: True, LR(1) parser is the powerful bottom-up parser, which is sufficient for DCFLs parsing.