Home | History | Annotate | Download | only in grammars
      1 <?xml version="1.0" encoding="ISO8859-1" ?>
      2 <!--
      3 	Test grammar, here we test "hello" vs "hellow", used in places
      4 	where they YES will be confused with each other
      5 -->
      6 <grammar xml:lang="en-us" version="1.0" root="ROOT">
      7 <meta name="word_penalty" content="40" />
      8       
      9 <rule id="ROOT" scope="public">
     10   <one-of>
     11 	  <item><ruleref uri="#Phone"/>
     12 		<tag>meaning=Phone.V;</tag>
     13 	  </item>
     14 	  <item><ruleref uri="#Find"/>
     15 		<tag>meaning=Find.V;</tag>
     16 	  </item>
     17 	  <item><ruleref uri="#OtherCommands"/>
     18 		<tag>meaning=OtherCommands.V;</tag>
     19 	  </item>
     20   </one-of>
     21 </rule>
     22 
     23 <rule id="Phone">
     24   <item>
     25     <tag>C=(C?C:''); V=C+V;</tag>
     26     <item>
     27         <item >phone</item>
     28         <item>
     29           <one-of>
     30             <item>
     31 		enter
     32 		<tag>C='ENTER';</tag>
     33 	    </item>
     34 	<item>
     35 		hellow
     36 		<tag>V='HI';</tag>
     37 	</item>
     38 	<item>
     39 		hello
     40 		<tag>V='HI';</tag>
     41 	</item>
     42             <item>
     43 		delete
     44 		<tag>C='DEL';</tag>
     45 	    </item>
     46             <item>
     47 		remove
     48 		<tag>C='DEL';</tag>
     49 	    </item>
     50           </one-of>
     51         </item>
     52         <item>
     53 		<ruleref uri="#Names"/>
     54 		<tag>V=Names.V;</tag>
     55 	</item>
     56     </item>
     57   </item>
     58 </rule>
     59 
     60 <rule id="Find">
     61   <item>
     62     <tag>C=(C?C:''); V=C+V;</tag>
     63     <item>
     64         <item repeat="0-1">
     65 		find
     66 	</item>
     67         <item>
     68 		<ruleref uri="#Names"/>
     69 		<tag>V=Names.V;</tag>
     70 	</item>
     71     </item>
     72   </item>
     73 </rule>
     74 
     75 <rule id="Names" scope="public">
     76   <item>__Names__</item>
     77 </rule>
     78 
     79 <rule id="OtherCommands">
     80   <item>
     81     <tag>C=(C?C:''); V=C+V;</tag>
     82     <one-of>
     83 	<item>
     84 		hello
     85 		<tag>V='HI';</tag>
     86 	</item>
     87 	<item>
     88 		forward
     89                 <tag>V='FWD';</tag>
     90 	</item>
     91 	<item>
     92 		backward
     93                 <tag>V='BAK';</tag>
     94 	</item>
     95 	<item>
     96 		changer
     97                 <tag>V='CHANGER';</tag>
     98 	</item>
     99 	<item>
    100 		asterisk
    101                 <tag>V='STAR';</tag>
    102 	</item>
    103 	<item>
    104 		cd player
    105                 <tag>V='CDPL';</tag>
    106 	</item>
    107 	<item>
    108 		traffic information
    109                 <tag>V='TRFI';</tag>
    110 	</item>
    111 	<item>
    112 		traffic info
    113                 <tag>V='TRFI';</tag>
    114 	</item>
    115 	<item>
    116 		traffic
    117                 <tag>V='TRFI';</tag>
    118 	</item>
    119 	<item>
    120 		traffic memory
    121                 <tag>V='TRFM';</tag>
    122 	</item>
    123 	<item>
    124 		fahrenheit
    125                 <tag>V='DEGF';</tag>
    126 	</item>
    127 	<item>
    128 		celsius
    129                 <tag>V='DEGC';</tag>
    130 	</item>
    131     </one-of>
    132   </item>
    133 </rule>
    134 
    135 </grammar>
    136