W3C home > Mailing lists > Public > public-ixml@w3.org > April 2021

Re: Consuming the input (was: none)

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Tue, 13 Apr 2021 10:28:56 -0600
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, public-ixml@w3.org, Steven Pemberton <steven.pemberton@cwi.nl>
Message-Id: <BCE39D93-6C26-4549-BF64-34F0D56E4AFB@blackmesatech.com>
To: Tomos Hillman <yamahito@gmail.com>
I confess to two worries in this connection:

(1) I don’t think I know how to define “maximal consumption”.

(2) In the case of infinite streams, I am not sure that I would want maximal consumption to be the default behavior, because it seems likely in the general case to require unbounded lookahead.

If “maximal consumption” means finding the longest prefix, if any, of the input that is accepted as a sentence, then it seems not to capture the desire that given the grammar 

  string: “a”*.

and the input “aaab”, we probably want the ixml parser to return an error document, not a parse for substring($input, 1, 3).

Michael

> On 13,Apr2021, at 10:14 AM, Tomos Hillman <yamahito@gmail.com> wrote:
> 
> How about "The default behaviour of the implementation must be to maximally consume the available input" to allow parsers/users to go off reservation at their own risk?
> 
> T
> 
> _________________
> Tomos Hillman
> eXpertML Ltd
> +44 7793 242058
> On 13 Apr 2021, 17:08 +0100, Steven Pemberton <steven.pemberton@cwi.nl>, wrote:
>> So how about we say something like "The implementation must maximally
>> consume the available input". Then the implementation can decides what the
>> "available input" is, whether it's streaming or a static document.
>> Steven
>> 
>> On Monday 12 April 2021 11:25:47 (+02:00), Steven Pemberton wrote:
>> 
>>> The new draft spec asks the question:
>>> Should there be a requirement that the input is completely consumed?
>>> 
>>> I think the answer is yes.
>>> 
>>> Otherwise, if a grammar was:
>>> 
>>> string: "a"*.
>>> 
>>> and the input was
>>> 
>>> aaa
>>> 
>>> it would be permissible to produce as result:
>>> 
>>> <string/>
>>> 
>>> Steven
>>> 
>>> 
>>> 
>>> 
>> 

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************
Received on Tuesday, 13 April 2021 16:29:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 13 April 2021 16:29:20 UTC