search
Log In
1 vote
151 views

 For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.4$, give annotated parse trees for the following expressions:

  1. $(3+4)\ast(5+6)n.$
  2. $1\ast2\ast3\ast(4+5)n.$
  3. $(9+8\ast(7+6)+5)\ast 4n.$ 
in Compiler Design 151 views

Please log in or register to answer this question.

Related questions

1 vote
1 answer
2
1 vote
1 answer
3
104 views
Construct a syntax-directed translation scheme that translates arithmetic expressions from infix notation into prefix notation in which an operator appears before its operands; e.g., $-xy$ is the prefix notation for $x - y$. Give annotated parse trees for the inputs $9-5+2$ and $9-5*2$.
asked Jul 26, 2019 in Compiler Design Lakshman Patel RJIT 104 views
0 votes
1 answer
4
240 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 240 views
...