You can place grammars inside several VoiceXML elements. However, you get the best performance from the speech-recognition engine if you modularize your grammars and place them inside the lowest level element for which they are relevant. Doing so minimizes the set of expressions the speech-recognition engine matches against at any given time. You can use these built-in grammars when you need them. Most often, you need to define grammars that are particular to your application.
Grammars can range from a simple list of possible words to a complex set of possible phrases.
A grammar in GSL consists of one or more rules. Although assignment commands can follow each grammar expression, they are not always needed. The following example shows a grammar rule without assignment commands. A slot name identifies the field item variable to be assigned the specified value when a user utterance matches the grammar expression. The following example shows a grammar rule with assignment commands.