search
Log In
0 votes
104 views

 Assuming that function $widen$ in Fig. $6.26$ can handle any of the types in the hierarchy of Fig. $6.25(a)$, translate the expressions below. Assume that c and d are characters, $s$ and $t$ are short integers, $i$ and $j$ are integers, and $x$ is a float.

  1. $x=s+c$
  2. $i=s+c$
  3. $x=(s+c)\ast(t+d)$ 
in Compiler Design 104 views

Please log in or register to answer this question.

Related questions

1 vote
0 answers
1
212 views
As in Ada, suppose that each expression must have a unique type, but that from a subexpression, by itself, all we can deduce is a set of possible types. That is, the application of function $E_{1}$ to argument $E_{2}$ ... and, once the unique type of the overall expression is determined, proceeds top-down to determine attribute $unique$ for the type of each subexpression.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 212 views
0 votes
0 answers
2
47 views
Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following cases: An array $A$ of two dimensions, in row-major form. The first dimension has indexes running from $l_{1}$ ... has indexes running from $l_{j}$ to $h_{j}$.The same as $(c)$ but with the array stored in column-major form.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 47 views
0 votes
0 answers
3
0 votes
0 answers
4
...