1,393 views
0 votes
0 votes

 Below is a grammar for expressions involving operator $+$ and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point.

  • $E\rightarrow E+T\mid T$
  • $T\rightarrow num.num\mid num$
  1. Give an SDD to determine the type of each term $T$ and expression $E$.
  2. Extend your SDD of $(a)$ to translate expressions into postfix notation.Use the unary operator intToFloat to turn an integer into an equivalent float. 

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
3
0 votes
0 votes
0 answers
4
admin asked Sep 6, 2019
510 views
We mentioned in Section $5.4.2$ that it is possible to deduce, from the LR state on the parsing stack, what grammar symbol is represented by the state. How would we disco...