search
Log In
0 votes
230 views

Extend the SDD of Fig. $5.4$ to handle expressions as in Fig. $5.1$. 

in Compiler Design 230 views

Please log in or register to answer this question.

Related questions

1 vote
0 answers
1
172 views
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.4$, give annotated parse trees for the following expressions: $(3+4)\ast(5+6)n.$ $1\ast2\ast3\ast(4+5)n.$ $(9+8\ast(7+6)+5)\ast 4n.$
asked Sep 6, 2019 in Compiler Design Lakshman Patel RJIT 172 views
1 vote
1 answer
2
0 votes
1 answer
3
254 views
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an S-attributed SDD to compute $S.val$, the decimal-number value of an input string. For example, the translation of string $101.101$ should be the decimal number $5.625$.
asked Sep 6, 2019 in Compiler Design Lakshman Patel RJIT 254 views
0 votes
0 answers
4
228 views
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an L-attributed SDD to compute $S.val$ ... be the decimal number $5.625$. Hint: use an inherited attribute $L.side$ that tells which side of the decimal point a bit is on.
asked Sep 6, 2019 in Compiler Design Lakshman Patel RJIT 228 views
...