[Prev][Next][Index][Thread]
Re: Progress on Parsing

To: dsr@w3.org

Subject: Re: Progress on Parsing

From: Neil Soiffer <soiffer@wolfram.com>

Date: Sun, 28 Apr 1996 00:37:13 0500 (CDT)

Cc: w3cmatherb@w3.org

From soiffer@wolfram.com Sun Apr 28 01: 37:16 1996

MessageId: <199604280537.AAA09515@morrison.wolfram.com>
> Treating + and  as nary rather than binary operators is an
> interesting idea, but can perhaps be handled via the code that
> exports the expressions to say Mathematica or Maple.
It could be done that way. Certainly the decision as to how they
are represented is an internal one unless precedence files, which are
public (I think), force them to (unnaturally) be left or right associative
as in your example.
I think that you will find, as you progress in your implementation, that
treating them as binary operators is a bad idea. Functionality that
is depthrelated, such as line breaking, will be significantly more
complicated. My guess is that most applications will want to treat
them as nary operators. Perhaps Raman can comment on whether this is
true for speech.
I should also note that computer algebra systems treat '+' and '' as
equals. I.e., "a+bc" are all at the same level. The same is true for
inequalities such as "a < b <= c". Again, doing differntly will make
depthrelated functionality much harder to implement.
Neil