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 activation record? Explain clearly the components of an activation record.
Explain different stages of compiler with a suitable example. What is token, Patterns and Lexeme?
Discuss Software Maintenance
Describe various actions of a shift reduce parsers.