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


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

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

Subject: Proposal: More detailed specification for formulas

I propose that the portion of section 8.3.1 that defines formulas
be modified to define more precisely the syntax for formulas
(in the default unnamed namespace).  Spreadsheets in particular
are mostly useless unless formulas can be exchanged.

I've attached a proposed rewrite for that section.
I took the original material, and I have added more precisely
exactly what it all means.  For example, instead of saying
"operators", I listed the operators along with their
precedence and associativity.  Instead of saying
"logical operators", I listed them and their semantics.
I defined what an expression is.  And so on.
This isn't a change in the document's scope; it ALREADY
had this kind of material. This just nails it down
more precisely.

I had to do a lot of
experimentation to learn this, so I suspect other
implementors will find this more precise specification
VERY useful.  I had trouble with the cross-references;
you'll need to re-insert x-references if you cut & paste this text in.
I tracked changes, so you can see what I changed
once I cut-and-pasted that section into a new document.

I have NOT tried to define
a complete set of functions, but I do mention a short
list that actually would suffice for a number of purposes.
Ideally there'd be a standard predefined set of functions,
but it sounds like the TC doesn't want to go there
at this time.

How did I create the rewrite?  The answer is that
I created a tiny implementation of a grammar checker,
just to be sure I got the specification correct, using
flex and bison.  The process of trying to write a program
to match the syntax helped me make sure that I
wrote down enough to have a clear specification.
I then took what I learned, and wrote the text in formula.sxw.
For your amusement, I'm including the .y, .l, and makefile
files I created, which are mostly comments.  If you want to
examine or extend the specification further, you
might find this code helpful to ensure that you're
thinking clearly.

No doubt there are many more improvements that could
be made, but I think this proposed text is MUCH better
than the current ambiguous text.  Remember, the point
is to specify in enough detail so that implementations can
share information; I think this is a big step forward.

If you like it, I'd appreciate credit for it. I offer this text
under the same terms as Sun provided the original spec.
My goal in providing this text is to aid interoperability.
Feel free to use it however you'd like, and obviously
feel free to modify it as the group sees fit.


--- David A. Wheeler





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