Question: 1 . Problem A programmer is provided with the following two grammars: Grammar A S - > qABC A - > a | bbD B
Problem
A programmer is provided with the following two grammars:
Grammar A
SqABC
Aa bbD
B a epsi
C b epsi
D c epsi
Grammar B
S S A A
A a
He is required to design suitable parsers for the two given grammars. Your task is to help him
design appropriate parsers.
Deliverables
You need to answer the following. Each question has equal weightage:
i Show that the grammar A is LL or not without constructing parsing table
ii Show that the grammar B is SLR but not LL
iii. Construct parsing table for grammar A
iv Give parsing actions for the input string aaaa for the SLR parser of grammar B
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
