problem 3 consider the grammar abcd dcb bbbc or cb or b or e cc cd c d
Search for question
Question
Problem 3. Consider the grammar
A->BCD|DCB B -> b B c | c B | b | & C-+cd|c D -+ d Dc | bC
where A, B, C, and D are non-terminal, A is the start symbol and b, c and d are tokens. Remember that & represents the empty sequence. Y -> & means that Y does not have to match any tokens or, equivalently, it matches an empty sequence of tokens.
1. Give a parse tree for the sequence of tokens: bccbccbc
2. Give a another (different) parse tree for the sequence of tokens:
bccbccbc
3. Is this grammar ambiguous?