W3C home > Mailing lists > Public > www-voice@w3.org > July to September 2003

RE: SISR: More comments on April 2003 WD

From: Serge LE HUITOUZE <slehuitouze@telisma.com>
Date: Thu, 31 Jul 2003 10:36:18 +0200
Message-ID: <3AB3C7F30279254494C258DE38FE7CB969F50E@cedre>
To: "Wyss, Felix" <FelixW@inin.com>, <www-voice@w3.org>

Wyss, Felix wrote:

> Why do you assign it to a temporary variable instead of directly
> assigning the GRR to the 'o' property of the GRN?
> $command2 = (set | turn) 
>             $<http://www.example.com/object> {$.o=$$}
>             $state {$.s=$$};

You're right.
I might have done so for this very example, but I preferred
using a more generally aplicable framework: You don't always know
where to put the result of the sub-grammar just after returning from
it. For example (I must admit it's quite artificial):
 $command3 = (set | turn) 
             $<http://www.example.com/object> {var obj = $$}
               $state {$.a=obj; $.b=$state}
               $location {$.x=obj; $.y=$location}

Wyss, Felix also wrote:

> An alternate workaround would be the following:
> $command1 = (set | turn) 
>             $object
>             $state
>             {$.o=$object; $.s=$state};
> private $object = $<http://www.example.com/object>;

This would not work as is: The semantics would be lost (see paragraph
5, Default Assignment, in SISR 2003 WD).
The private rule should be written:
 private $object = $<http://www.example.com/object> {$=$$};

Which brings us back to my original comment on the impossibility
to refer to the result of an external rule...

--Serge Le Huitouze
Received on Thursday, 31 July 2003 04:51:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:36 UTC