loading...

CS606 Compiler Construction Assignment 3 Solution Fall 2013

Question No 1: Marks 20
Consider the following grammar:
S → Sb
S → cS
S → a
(a) Identify all conflicting items, and the types of the conflicts. [10 marks]
(b) Rewrite the grammar in an equivalent form that is suitable for LL parsing and minimizes the
use of stack space. [5 marks]

(c) Rewrite the grammar in an equivalent form that is directly suitable for LR parsing (i.e., does
not result in conflicts) and minimizes the use of stack space. [5 marks]

DOWNLOAD SOLUTION HERE
loading...