Back to the 2022 paper

Module 3 : Semantic Analysis & Symbol Table

20227m

For the given grammar and associated semantic rules. Find the output for the input: aadbd.
S→AS{print(1)};S→AB{print(2)};A→a{print(3)};B→bC{print(4)};S \rightarrow AS \{print(1)\}; S \rightarrow AB \{print(2)\}; A \rightarrow a \{print(3)\}; B \rightarrow bC \{print(4)\};
B→dB{print(5)};C→e{print(6)}B \rightarrow dB \{print(5)\}; C \rightarrow e \{print(6)\}

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.