[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.
Answer:
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post
Recommended Posts:
- GATE | GATE CS 1999 | Question 55
- GATE | GATE CS 1999 | Question 46
- GATE | GATE CS 1999 | Question 45
- GATE | GATE CS 1999 | Question 44
- GATE | GATE CS 1999 | Question 43
- GATE | GATE CS 1999 | Question 42
- GATE | GATE CS 1999 | Question 47
- GATE | GATE CS 1999 | Question 54
- GATE | GATE CS 1999 | Question 53
- GATE | GATE CS 1999 | Question 52
- GATE | GATE CS 1999 | Question 51
- GATE | GATE CS 1999 | Question 50
- GATE | GATE CS 1999 | Question 41
- GATE | GATE CS 1999 | Question 40
- GATE | GATE CS 1999 | Question 20
- GATE | GATE CS 1999 | Question 19
- GATE | GATE CS 1999 | Question 18
- GATE | GATE CS 1999 | Question 17
- GATE | GATE CS 1999 | Question 16
- GATE | GATE CS 1999 | Question 15

