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: Syntax issues


The #1 feedback comment we've heard from several people is
"show me implementation!", which is fair enough.
A while back I had created bison/flex implementation, so I started
tweaking it to handle the current implementation.

Unfortunately, the most recent tweaks for named expressions had various
troubles, and after fiddling, I realized that the syntax was overgeneral.
We really don't NEED to support named expressions on subcells, etc.
The problem boils down to "." having different uses - it's essentially part
of the name for function calls, but is a separator for source/sheet.

Thus, I'd propose modifying the named expression syntax to this:
 NamedExpression ::= Identifier | NamedExprLocator?
                                 '$$' (Identifier |  SINGLEQUOTED)
 ExpLocator ::= (Source '#')? (QuotedSheetName '.')?

I propose requiring a "$$" when referencing another source/sheet's named expression.
Otherwise the names of named expressions look disturbingly like
cell or sheetnames.   It's not necessary for local names, though if you want
odd characters for the name, $$'...' is supported.  I think it's important
that the FORMAT be able to handle names with odd characters, so that the
format at least is not harmed.  This doesn't harm OOo; OOo cannot currently do
external sheet named expressions, though it CAN do external cell references.
Excel can do external named references, but CANNOT do external cell references.
We want to be able to represent "all of the above", and in fact, it makes sense
for applications to support "all of the above" too.

We should probably predefine the following:
  SingleQuoted ::= "'" ( [^'] | "''" )* "'"
It's got enough quote marks that I'd like to isolate its oddities to ONE place.

Sample formulas with named expressions:
=Hello
=$$Hello
=$$'Hello I am a name'+5
='Sheet1'.$$Hello            # Look for Sheet-local name first, THEN global.
='./test.ods'#$$Hello
='./test.ods'#'Sheet1'.$$Hello

I intend to include this proposal in the next draft, but I'm always
delighted to hear alternatives.  Please do make some!

I also suspect that the subtable stuff in references may be a little
overgeneral.  Will discuss that separately, but others' comments would be welcome!

--- David A. Wheeler 


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