edited by
40,370 views

1 Answer

0 votes
0 votes

Here all the attributes are synthesized attributes. The attribute value of digit is provided by lexical analyzer since it is a terminal

1. (3+4)∗(5+6)n

Parse Tree

Annotated Parse Tree

2. 1∗2∗3∗(4+5)n

Synthesized attributes are used in conjunction with bottom up parsers to pass info up the tree

3. (9+8∗(7+6)+5)∗4n

edited by

Related questions

2 votes
2 votes
0 answers
1
admin asked Sep 6, 2019
1,979 views
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.4$, give annotated parse trees for the following expressions:$(3+4)\ast(5+6)n.$$1\ast2\ast3\ast(4+5)n.$$(9+8\ast(7+6)...
0 votes
0 votes
1 answer
2