Consider the following syntax-directed definition (SDD).
Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute )?
Tap to open full sizeFigure description
A table of eight productions with semantic actions: S -> D H T U S.val = D.val + H.val + T.val + U.val;; D -> "M" D1 D.val = 5 + D1.val;; D -> epsilon D.val = -5;; H -> "L" H1 H.val = 5*10 + H1.val;; H -> epsilon H.val = -10;; T -> "C" T1 T.val = 5*100 + T1.val;; T -> epsilon T.val = -5;; U -> "K" U.val = 5;.
- (A)
45
- (B)
50
- (C)
55
- (D)
65