Grammars for speech recognition and natural language understanding