OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] Fwd: [office-comment] ODF Part 2 Open Formula -Whitespace between FunctionName and opening parentheses of parameter list


I've changed my mind on this one. 

I'm trying to decide if one could interpret the two statements in a 
non-contradictory way.  I think you can.

Take an easier example:

Imagine we say in one place we say:

PrimeNumber ::= [0-9]+

and in another place we say:

"PrimeNumber must be a prime number, i.e., no integer divisors except for 
1 and itself".

The definition in the text certainly disallows some values permitted by 
the EBNF, but this is not a problem because there are values that satisfy 
both conditions.  This is actually quite common in ODF, where we give a 
lexical definition one place and then specify additional semantic 
constraints elsewhere.

Back to OpenFormula.  We have EBNF referring to:

FunctionName Whitespace* '(' ParameterList ')' |

and text that says:

"Whitespace shall be ignored just before a function name, but whitespace 
shall not separate a function name from its initial opening parentheses."

In a similar way it is possible to satisfy both of these constraints 
simultaneously.  This is because the EBNF allows zero or more whitespace 
characters.

On the other hand, if the EBNF had said:

FunctionName Whitespace+ '(' ParameterList ')' |

In that case we'd have a more serious problem since "one or more" 
whitespace cannot be satisfied simultaneously with "whitespace shall not 
separate a function name from its initial opening parentheses" 

So yes, this certainly is a defect, but I don't think fixing it will be 
considered a substantive change.  We could fix this in errata.

Regards,

-Rob


Robert Weir/Cambridge/IBM wrote on 02/08/2011 08:20:00 AM:

> 
> Subject:
> 
> Re: [office-formula] Fwd: [office-comment] ODF Part 2 Open Formula -
> Whitespace between FunctionName and  opening parentheses of parameter 
list
> 
> If we go forward with the spec as-is, then we'll need to permit 
> optional white space per the EBNF.  And we won't be able to change 
> this in errata.
> 
> Does this break anyone? 
> 
> -Rob
> 
> Eike Rathke <eike.rathke@oracle.com> wrote on 02/08/2011 07:16:27 AM:
> 
> > 
> > On Tuesday, 2011-02-08 00:41:11 -0500, David A. Wheeler wrote:
> > 
> > > The following message was just posted; it looks like an error in 
> > the part 2 spec (since the report indicates an inconsistency).
> > > 
> > > Comments?
> > > 
> > > ----- Start Forwarded Message -----
> > > Sent: Mon, 07 Feb 2011 20:50:35 -0800
> > > From: Martin Devlin <martin.devlin@ireland.com>
> > > To: office-comment@lists.oasis-open.org
> > > Subject: [office-comment] ODF Part 2 Open Formula - Whitespace 
> > between FunctionName and
> > >  opening parentheses of parameter list
> > [...]
> > > In Section 5.2:
> > [...]
> > >   Expression ::=
> > >     ....
> > >     FunctionName Whitespace* '(' ParameterList ')' |
> > >     ....
> > [...]
> > > In Section 5.14:
> > > "Whitespace shall be ignored just before a function name, but 
whitespace
> > > shall not separate a function name from its initial opening
> > > parentheses."
> > 
> > I digged out a mail dating back to 2006 and conclude that we may have
> > meant to say that whitespace is not allowed between function name and
> > opening parentheses:
> > 
> > Date: Mon, 21 Aug 2006 19:16:16 -0400
> > Subject: [office-formula] Re: [office] Syntax Comments (Weir)
> > From: "David A. Wheeler" <dwheeler@dwheeler.com>
> > To: office-formula@lists.oasis-open.org
> > Message-id: <44EA3EC0.2010103@dwheeler.com>
> > 
> > | robert_weir:
> > [...]
> > | > 5.13 -- "whitespace may not separate a function name from its
> > | > initial opening parentheses" -- why the restriction?  Is there any
> > | > ambiguity from having whitespace there?
> > | No, not to my knowledge, directly.
> > | 
> > | The issue is disambiguating between named expressions
> > | and function calls, because until you get to the "(" or non-"(" you 
don't
> > | know what you have.  Requiring this means that if you hand-write 
your
> > | analyzer,
> > | you don't have to put in a whitespace walker there.  It's not a big 
deal.
> > | But I think Excel's display syntax would have a problem if this rule
> > | were relaxed,
> > | and it might be tricky to store whitespace if the display format
> > | couldn't handle it.
> > | So this is a mild concession to a common display format.
> > [...]
> > 
> > 
> > However, OOoCalc currently allows and if given stores a space at that
> > place. How about other implementations?
> > 
> >   Eike
> > 
> > 
> > -- 
> > Automatic string conversions considered dangerous. They are the 
> GOTOstatements
> > of spreadsheets.  --Robert Weir on the OpenDocument formula 
> > subcommittee's list.
> > [attachment "attemeqm.dat" deleted by Robert Weir/Cambridge/IBM] 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]