Controls:
Grammar for balanced parentheses
()()
Production Rules:
Parse Tree
Click red nodes to select, then use production rule buttons above to expand. Target: ()()
Derivation Steps
- S [Start Symbol]
- SS [S → SS]
- (S)S [S → (S)]
- ()S [S → ε]
- ()(S) [S → (S)]
- ()() [S → ε]