syntax-directed definition to determine the type of expression

342 views Asked by At

Consider the grammar:

E→E+T/T
T→num.num/num

The grammar generates the expression of + to integer or real. When two integers are added, the resulting type is integer otherwise, it is real.

Give a syntax-directed definition to determine the type of expression. How can I solve this problem? Please can anyone explain me. Thank You!!!

0

There are 0 answers