Back to the 2024 paper

Module 2 : Syntax Analysis (Parser)

20242m

Consider the following grammar:
E→E+T∣TE \rightarrow E + T | T
T→T∗F∣FT \rightarrow T * F | F
F→(E)∣idF \rightarrow (E) | id

Determine whether the grammar is SLR(1), clearly stating any shift-reduce or reduce-reduce conflicts.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.