Page 1 of 1

Specifying * in a grammar

Posted: Wed Sep 01, 2004 3:10 pm
by tloring
Is there a builtin grammar which would include all digits, and also include the * key?

Or is there a way to specify * in a JSGF grammar?

I currently have something like...

Code: Select all

<field name='pressed' type="digits?length=1">
...
</field>
but, I need to include *

Thanks,
Thom

Posted: Wed Sep 01, 2004 3:32 pm
by tloring
Ok, answered my own question..

Code: Select all

<field name='pressed'>
    <grammar>1|2|3|4|5|6|7|8|9|0|"*"</grammar>
</field>
I had tried with single quotes, Programmer's Reference noted the double quote requirement.

Thom