Question: Compiler Construction Assignment# 2 Question-1: Consider the following grammar: E TE E -TE| T FT T *TE| F a | (E) i) Convert the above
Compiler Construction Assignment# 2
Question-1: Consider the following grammar:
E TE E -TE| T FT T *TE| F a | (E)
i) Convert the above grammar into an operator grammar. ii) Generate an operator precedence table for the operator grammar. iii) Parse the string w= a(a*a - a) using operator precedence algorithm.
Question-2: Consider the following grammar:
E TE E -TE| T FT T *TE| F a | (E)
a) Generate an LL(1) parsing table for the above grammar. b) Parse the string w= a(a*a - a) using LL(1) parsing algorithm.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
