47 lines
1.3 KiB
XML
Executable File
47 lines
1.3 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN"
|
|
"grammar.dtd">
|
|
<!-- the default grammar language is FR -->
|
|
<grammar version="1.0"
|
|
mode ="voice"
|
|
xmlns="http://www.w3.org/2001/06/grammar"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://www.w3.org/2001/06/grammar
|
|
grammar.xsd"
|
|
xml:lang="fr-FR" root="answer" tag-format="semantics/1.0">
|
|
|
|
<rule id="answer" scope="public">
|
|
<ruleref special="GARBAGE" />
|
|
<one-of>
|
|
<item><ruleref uri="#couleur"/></item>
|
|
<item><ruleref uri="#action"/></item>
|
|
</one-of>
|
|
<tag>out = rules.latest().text;</tag>
|
|
<ruleref special="GARBAGE" />
|
|
</rule>
|
|
|
|
<rule id="couleur">
|
|
<item>couleur <ruleref uri="#couleur_nom"/></item>
|
|
</rule>
|
|
|
|
<rule id="action">
|
|
<one-of>
|
|
<item>ici</item>
|
|
<item>ça</item>
|
|
<item>là</item>
|
|
</one-of>
|
|
<tag>out.text = "VOCAL action=" + meta.current().text;</tag>
|
|
</rule>
|
|
|
|
<rule id="couleur_nom">
|
|
<one-of>
|
|
<item>rouge</item>
|
|
<item>bleu</item>
|
|
<item>vert</item>
|
|
<item>jaune</item>
|
|
</one-of>
|
|
<tag>out.text = "VOCAL couleur=" + meta.current().text;</tag>
|
|
</rule>
|
|
|
|
</grammar>
|