W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2004

Question about semantic/1.0

From: Jia Pu <JiaPu@LumenVox.com>
Date: Thu, 8 Apr 2004 13:41:35 -0700
To: <www-voice@w3.org>
Message-ID: <LV-SVRML4bf84SFqzx100000c92@lv-svr.lumenvox.com>

I have question on example 17 in the draft.

$x = $a<1-> {$$};
$$ resolves to the last occurrence of $a.
The effect is equivalent to $x = ($a {$$})<1->.

I think there is one difference between the two rules. In the first one,
{$$} only gets evaluated once when $x was matched. But in the second case,
($$) gets evaluated every time $a was matched. 

If we parse "111" using following grammars:
1.
root $x;
$a = '1';
$x = {$=""} $a<1-> {$+=$$};

2.
root $x;
$a = '1';
$x = {$=""} ($a{$+=$$})<1-> ; 

I think the first one gives us $x="1", and the second one $x="111".

Am I right?


Jia (Jay) Pu
Software Engineer
LumenVox LLC
-------------------------------------------
Anytime a linguist leaves the group 
the recognition rate goes up.
--Fred Jelinek 
  (then of the IBM speech group) (1988)
Received on Thursday, 8 April 2004 16:44:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 October 2006 12:48:59 GMT