<?xml version="1.0" encoding="ISO-8859-1" ?>
<grammar version="1.0" xml:lang="en-US" mode="voice" root="_digits">
<!-- 
	Test grammar, this digits grammar recognizes a variable number of
	digits.  For best accuracy, is is always better to apply constraints
	to the grammar, such as phone number constraints, length constraints
	or other.   
-->
<meta name="word_penalty" content="160"/>

   <rule id="_digits" scope="public">
      <item>
      <ruleref uri="#S"/>
      <tag>MEANING=S.X;</tag>
      </item>
   </rule>
      
   <rule id="S">
      <item repeat="1-">
         <ruleref uri="#DIGIT"/>
         <tag>X=X?X:'';X=X+DIGIT.V;</tag>
      </item>
   </rule>

   <rule id="DIGIT">
      <one-of>
         <item>
            zero
            <tag>V='0'</tag>
         </item>
         <item>
            oh
            <tag>V='0'</tag>
         </item>
         <item>
            one
            <tag>V='1'</tag>
         </item>
         <item>
            two
            <tag>V='2'</tag>
         </item>
         <item>
            three
            <tag>V='3'</tag>
         </item>
         <item>
            four
            <tag>V='4'</tag>
         </item>
         <item>
            five
            <tag>V='5'</tag>
         </item>
         <item>
            six
            <tag>V='6'</tag>
         </item>
         <item>
            seven
            <tag>V='7'</tag>
         </item>
         <item>
            eight
            <tag>V='8'</tag>
         </item>
         <item>
            nine
            <tag>V='9'</tag>
         </item>
      </one-of>
   </rule>

</grammar>