edited by
700 views
0 votes
0 votes

Consider the following translation schema

S->TR

R->+T{printf(“+);}R|ε

T->num{printf(‘’num.val”);

for the string “9+5+2” the translation schema will print?

A.) 9+5+2

B.) 95+2+

C.) 952++

D.) ++952

My doubt here is: Since it is L-attributed SDT the answer should be 9+5+2 but answer given is 95+2+?

 

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
4