Given the following grammar and the right sentential form, draw a parse
tree and show the phrases and simples phrases, as well as the handle.
S → aAb | bBA A → ab | aAB B → aB | b
Given the following grammar and the right sentential form, draw a parse
tree and show the phrases and simples phrases, as well as the handle.
S → AbB | bAc A → Ab | aBB B → Ac | cBb | c
Using the following parse tree for the following grammar, create a parse tree for the phrases below:
| A | B | C | |
|---|---|---|---|
| a | - | - | - |
| b | 2 | - | - |
| d | 1 | 3 | - |
| e | 1 | 4 | - |
| f | - | - | - |
| g | - | - | 5 |
| h | - | - | 6 |
| $ | - | - | - |
A → Ba | bC B → d | eBf C → gC | h