- From: Serge LE HUITOUZE <slehuitouze@telisma.com>
- Date: Thu, 1 Apr 2004 10:52:28 +0200
- To: <www-voice@w3.org>
Guillaume Berche wrote: > In the following example with an ambiguous grammar, [...] > > Expansion: t0 (t1 {tag1}) <0-2> t1 t2 > Input: t0,t1,t1,t2 > Output 1: ["t0",{!{tag1}!},"t1","t1","t2" ] > Output 2: [REJECT after evaluating: "t0",{!{tag1}!},"t1",{!{tag1}!},"t1"] First (cosmetic) remark: Output 1 is not the expected output, according to Appendix H of SRGS Proposed Recommendation from 18 December 2003. It should be: ["t0","t1",{!{tag1}!},"t1","t2" ] Second, more important, remark: This grammar is *not* ambiguous. The only three inputs that are recognized by this grammar are: 1. t0, t1, t2 2. t0, t1, t1, t2 3. t0, t1, t1, t1, t2 Each of them are *unambiguously* parsed, giving respective unique outputs: 1. ["t0","t1","t2" ] 2. ["t0","t1",{!{tag1}!},"t1","t2" ] 3. ["t0","t1",{!{tag1}!},"t1",{!{tag1}!},"t1","t2" ] Best regards. --Serge Le Huitouze
Received on Thursday, 1 April 2004 03:55:53 UTC