Question: 2. (10 points) Based on the following evaluation rules, draw an annotated parse tree that shows how the syntax tree for a-(b+c) is constructed. mknode

 2. (10 points) Based on the following evaluation rules, draw an

2. (10 points) Based on the following evaluation rules, draw an annotated parse tree that shows how the syntax tree for a-(b+c) is constructed. mknode () is similar to what is described on page 205 of the textbook. A good way to do this is to first draw the parse tree, then annotate the leaves and propogate the annotations up the tree. One of your parse tree nodes will look like this: (C Here is the grammar: Production Evaluation Rules Eo.nptr mknode(+, E,.nptr. T.nptr) Eo.nptr mknode(-, El.nptr. T.nptr) Eo.nptrT.nptr T.nptrE.nptr T.nptrmknode(id) EoErtT E0E-T -T T(E) -id

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!