stuff that works on at least small toy grammars