Computer Science, asked by JAISAL115, 1 year ago

Write the steps to construct syntax tree using the semantic rules. Construct a syntax tree for the following SDD :
Production rule
E\rightarrow E_1+T
E\rightarrow E_1-T
E \rightarrow   T
T\rightarrow    (E)
T \rightarrow id
T \rightarrow  num
Semantic rules
E.node = new Node (‘+’, E_1.node, T.node)
E.node = new Node (‘–’, E_1.node, T.node)
E.node = T.node
T.node = E.node
T.node = new Leaf (id, id.entry)
T.node = new Leaf(num, num.val).

Answers

Answered by studdybuddy45
0

jfsvloteypptwwdikvdyokdvmidgmk

Similar questions