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