2075 4

Compiler Design and Construction20756 marksNumerical: SLR parse table constructionLR parsing

Construct SLR parse table for the following grammarS→ES \rightarrow ES→EE→E+T∣TE \rightarrow E+T|TE→E+T∣TT→T∗F∣FT \rightarrow T*F|FT→T∗F∣FF→idF \rightarrow idF→id

Construct SLR parse table for the following grammarS→ES \rightarrow ES→EE→E+T∣TE \rightarrow E+T|TE→E+T∣TT→T∗F∣FT \rightarrow T*F|FT→T∗F∣FF→idF \rightarrow idF→id[6]

Grammar: - $S \rightarrow E$ - $E \rightarrow E + T \mid T$ - $T \rightarrow T F \mid F$ - $F \rightarrow id$ Terminals: ${+, , id}$, plus endmarker $$$ $$ Non-terminals: ${S, E, T, F}$ $

Up nextSyntax Directed Definition and Annotated Parse Tree