Written work 5
Due on October 1st @ 3:00 PM (in class, to Drew, or at Engineering front office)
Not accepted late
Question 1

Recall that Levi is a statically-scoped language. Assume a new variant of Levi, called Levi', that uses the exact same syntax as Levi but is dynamically-scoped. Provide an input file that would be valid in both Levi or Levi', but prints a different result based on which scoping system is used. Show what the output would be either under scheme.

Question 2

Provide an input file that would be valid in Levi', but not in Levi.

Question 3

Explain the difference between an SLR and an LR(0) parser. Provide an example grammar that is SLR-parseable but not LR(0) parseable.