Ideas from implementing the grammar.