Spring 2001, CSE 428: Quiz 1.3 - 18 Jan 2001
Solution
The right answer is 5: The language of all the strings of the form
ab, abab, ababab
, etc.
The right answer is 2: A grammar is ambiguous if there are two different derivation trees for the same string
"
^
" is right associative
true
"
-
" has precedence over "
^
"
false
The grammar is unambiguous:
true
- 1
not derivable
1 - 2
derivable
A /|\ / | \ A - B /|\ | / | \ | A - B C | | | B C 1 | | C 1 | 2