GATE | GATE CS 1999 | Question 57

[5 Marks question]

Let synthesized attribute val  give the value of the binary number generated by S in the following grammar. For example, on output 101.101, S.val=5.625

S → LL | L

L → LB | B

B → 0 | 1

Write S-attributed values corresponding to each of the productions to find S.val.



Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.