|
|
Module 2 Exercise Solutions
1. (a)
(b)
(c)
(d)
-
An interpretation is: time as an imperative verb: to time (using a clock)
flies the
same way arrows are timed (clocked).
-
The string "1 2 3" has more than one parse tree:
An unambiguous grammar which generates the same set of strings is:
Number -> Digit | Digit Number
Digit -> 0 | 1 | 2 | 3 | ... | 9
-
(a) Strings of balanced parentheses (including none)
(b) Not ambiguous
(c) Not left recursive
|