Writing and deriving with context-free grammars, the four Chomsky types with their machines, and checked example grammars.