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.
SAS{print(1)};SAB{print(2)};Aa{print(3)};BbC{print(4)};S \rightarrow AS \{print(1)\}; S \rightarrow AB \{print(2)\}; A \rightarrow a \{print(3)\}; B \rightarrow bC \{print(4)\};
BdB{print(5)};Ce{print(6)}B \rightarrow dB \{print(5)\}; C \rightarrow e \{print(6)\}

Similar questions