Context-free Grammar

San Skulrattanakulchai

February 21, 2019

Context-free grammar (CFG)

Notational Conventions

Derivations

Ambiguity

Verifying that a CFG generates the desired language

Writing a grammar

Eliminating immediate left-recursion

Eliminating left-recursion in general

Example of left-recursion elimination

Left factoring

Example of left factoring