Consider the grammar:
S → aSbS | bSaS | 𝜖
Right most derivations for abab:
Case 1:
S → aSbS
→ aSb (applying S → 𝜖)
→ abSaSb (applying S → bSaS)
→ abSab (applying S → 𝜖)
→ abab (applying S → 𝜖)
Case 2:
S → aSbS
→ aSbaSbS (applying S → aSbS)
→ aSbaSb (applying S → 𝜖)
→ aSbab (applying S → 𝜖)
→ abab (applying S → 𝜖)
What is Basic Block? List out the basic blocks and draw the flow graph for the following code:
1. |
location= -1 |
2. |
i=0 |
3. |
i<100 goto 5 |
4. |
goto 13 |
5. |
t1=4*i |
6. |
t2=A[t1] |
7. |
if t2=x goto 9 |
8. |
goto 10 |
9. |
location=i |
10. |
t3=i+1 |
11. |
i=t3 |
12. |
goto 3 |
13. |
… |
Write short notes on:
Show that no left recursive grammar can be LL(1). Show that no LL(1) grammar can be ambiguous.
Convert the Regular Expression into e-NFA and then corresponding DFA.
Difference between ISO and CMM standards.
Define packet switching and circuit switching. What is MANET?