Grammar Literals

The grammar literal is always of type Grammar.


GrammarLiteral:
 	DigitGrammar
 	GSLGrammar (deprecated)
	SRGSGrammar
 	UserGrammar

Each grammar literal is a reference to an instance of a class that implements the interface com.cisco.grammar.Recognizable.

Example Grammar Literals:


G[], SG[]—An empty grammar. (No value gets recognized.)
G[grammar.grxml]—A user-defined grammar located in the Grammars repository.
The topic describes the following grammar literals:
  • User Grammar Literals

  • Digit Grammar Literals, page 3-66

  • GSL Grammar Literals, page 3-67

  • SRGS Grammar Literals, page 3-68

Each grammar literal is a reference to an instance of a class that implements the interface com.cisco.grammar.Recognizable.

Note

The GSLGrammar is deprecated. That means that, although it can be used, it is restricted. This type of grammar is automatically converted to the SRGSGrammar (Speech Recognition Grammar) format. You must use the SRGSGrammar rather then the GSLGrammar.