Sketching grammars