Multiple choice

Consider the grammar with transition rule and E is the start symbol.

E $\rightarrow$ E1 $\ne$ T {E1.value = E1.value + T.value}
|T {E.value = T.value} T $\rightarrow$ T1 & F {T.value = T1.value / F.value}
|F {T.value = F.value} F $\rightarrow$ num {F.value = num.value} Concept E. The value for the root of the parse tree for expression 6 # 4 and 2 # 16 and 4 is

  1. 16

  2. 12

  3. 8

  4. 6

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation