3 3 votes Consider the following attributed grammar \[ \begin{array}{l} \mathrm{S} \rightarrow \mathrm{ABCT}\left\{\mathrm{x}=5^{*} \mathrm{x}+1 ;\right\} \\ \mathrm{T} \rightarrow \mathrm{a}\left\{\mathrm{x}=4^{*} \mathrm{x}+1 ;\right\} \\ \mathrm{C} \rightarrow \mathrm{bb}\left\{\mathrm{x}=3^{*} \mathrm{x}-3 ;\right\} \\ \mathrm{B} \rightarrow \mathrm{Be}\left\{\mathrm{x}=2^{*} \mathrm{x}+1 ;\right\} \\ \mathrm{B} \rightarrow \mathrm{e}\{\mathrm{x}=\mathrm{x}+1 ;\} \\ \mathrm{A} \rightarrow \mathrm{gBd}\left\{\mathrm{x}=5^{*} \mathrm{x}-1 ;\right\} \end{array} \] All semantic actions update the same global variable $x$ Assume $x$ initialized before parsing to zero. What is the final value of x in bottom up parse of following $\mathrm{i} / \mathrm{p}$ string gedeebba? Compiler Design compiler-design syntax-directed-translation numerical-answers test-series + – KISHALAY DAS 634 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 5 5 votes 606 is answer Prashant. answered Nov 14, 2016 • selected Nov 14, 2016 by KISHALAY DAS Prashant. comment Share Follow 0 reply Please log in or register to add a comment.