GATEverse Practice, past papers & mock tests
GATE 2021 · Set-1
Compiler DesignParsing TechniqueshardMCQ2 marks

Consider the following context-free grammar where the set of terminals is {a,b,c,d,f}.

GRAMMAR RULES
Sd a T | R f
Ta S | b a T | ε
Rc a T R | ε The following is a partially-filled LL(1) parsing table, with rows S, T, R and columns a, b, c, d, f, $. Known entries: S row: at column c is cell (1); at column d is '
Sd a T'; at column f is cell (2). T row: at column a is '
Ta S'; at column b is '
Tb a T'; at column c is cell (3); at column f is '
Tε'; at column $ is cell (4). R row: at column c is '
Rc a T R'; at column f is '
Rε'.

Which one of the following choices represents the correct combination for the numbered cells in the parsing table ("blank" denotes that the corresponding cell is empty)?

Save your progress

Related Compiler Design PYQs