1 <?xml version="1.0" encoding="ISO8859-1" ?> 2 <!-- 3 Test grammar, here we test "hello" vs "hellow", used in places 4 where they won't 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 repeat="0-1">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 delete 40 <tag>C='DEL';</tag> 41 </item> 42 <item> 43 remove 44 <tag>C='DEL';</tag> 45 </item> 46 </one-of> 47 </item> 48 <item> 49 <ruleref uri="#Names"/> 50 <tag>V=Names.V;</tag> 51 </item> 52 </item> 53 </item> 54 </rule> 55 56 <rule id="Find"> 57 <item> 58 <tag>C=(C?C:''); V=C+V;</tag> 59 <item> 60 <item repeat="0-1"> 61 find 62 </item> 63 <item> 64 <ruleref uri="#Names"/> 65 <tag>V=Names.V;</tag> 66 </item> 67 </item> 68 </item> 69 </rule> 70 71 <rule id="Names" scope="public"> 72 <item>__Names__</item> 73 </rule> 74 75 <rule id="OtherCommands"> 76 <item> 77 <tag>C=(C?C:''); V=C+V;</tag> 78 <one-of> 79 <item> 80 hello 81 <tag>V='HI';</tag> 82 </item> 83 <item> 84 forward 85 <tag>V='FWD';</tag> 86 </item> 87 <item> 88 backward 89 <tag>V='BAK';</tag> 90 </item> 91 <item> 92 changer 93 <tag>V='CHANGER';</tag> 94 </item> 95 <item> 96 asterisk 97 <tag>V='STAR';</tag> 98 </item> 99 <item> 100 cd player 101 <tag>V='CDPL';</tag> 102 </item> 103 <item> 104 traffic information 105 <tag>V='TRFI';</tag> 106 </item> 107 <item> 108 traffic info 109 <tag>V='TRFI';</tag> 110 </item> 111 <item> 112 traffic 113 <tag>V='TRFI';</tag> 114 </item> 115 <item> 116 traffic memory 117 <tag>V='TRFM';</tag> 118 </item> 119 <item> 120 fahrenheit 121 <tag>V='DEGF';</tag> 122 </item> 123 <item> 124 celsius 125 <tag>V='DEGC';</tag> 126 </item> 127 </one-of> 128 </item> 129 </rule> 130 131 </grammar> 132