Grammar tab Syntax Buttons

The Grammar tab syntax buttons indicate all the ways you can add a Grammar object to an expression. Clicking on one of the buttons adds the indicated syntax (minus the question marks) to your expression. In the spaces left by the question marks, enter the appropriate values.

Grammar Syntax Button Descriptions

Syntax Button

Description

G[?]

Grammar object. See Grammar Literals and User Grammar Literals,.

Examples:

G[DigitGrammar]
G[MyGrammar.gsl] 

G[?,?]

Grammar and argument(s). See Grammar Literals, and User Grammar Literals.

The first argument must be of type string and specifies the name of the grammar to retrieve from the user or system repository.

The second argument (or argument list) corresponds to the expected parameterized arguments of a complex expression block defined in a grammar template file. Examples:

G[SRGSGrammar,SRGS]
G[“myGrammar.tgl”,
						“dtmf-2”, tagValue]

DG[?]

DTMF Grammar. See Digit Grammar Literals

Example:

DG[<grammar xml:lang="en-US" root = "pin" mode="dtmf"
xmlns="http://www.w3.org/2001/06/grammar">]

XG[?]

XML Grammar (SRGS). See Digit Grammar Literals,.

Example:
XG[<grammar version="1.0" xmlns=http://www.w3.org/2001/06/grammar></grammar>]

GG[?]

GSL Grammar. See SRGS Grammar Literals,

Example:

GG[[[yes digit-1] {tag yes} [no digit-2] u{tag no}]]
Note

Depreciated. GSL grammars are no longer supported.

?||?

Compound Grammar. The compound grammar operator || combines multiple grammars together. See Compound Grammar.

Example:

G[grammar1.digit] || G[grammar2.grxml] 

?[?]

Indexing a compound grammar. The index is 0 based. See Compound Grammar Indexing.

Example:

Grammar[5]