W3C home > Mailing lists > Public > w3c-math-erb@w3.org > September 1996

Re: notation for extending precedence

From: Bruce Smith <bruce@wolfram.com>
Date: Sat, 21 Sep 1996 12:40:05 -0700
Message-Id: <v02130503ae69edc7a26c@[199.182.131.98]>
To: raman@Adobe.COM
Cc: w3c-math@w3.org
Maybe I can explain my question even better, now:
what I am asking about is not how to do anything
algorithmically, but what single notation for new operators
can conveniently handle all three common cases of how
one would like to define them:

- just lower (or higher) in precedence than the previous operator
in the list (without naming it);

- the same precedence as the previous operator in the list
(without naming it);

- just lower, higher, or the same, in precedence as some
named operator.

Now that I explain the question this way, one possible answer is
apparent -- just use your suggested notation, but with
an additional keyword :previous to use in place of the operator
name. So you could make incremental definitions relative to
the precedence of named operators, but let the definitions in
your large file of built-in operators be relative to whatever
operator came just earlier in the list, regardless of name.

This is still not good enough with regard to editing the main
list to change the order within a group of operators of the
same precedence, since the first one of the group is the one
which has to say it is :lower-than :previous rather than
:same-as :previous.

This problem is analogous to the problem
with comma-separated list formats, when you want to add or delete
items at the end, or reorder items including the one at the end.
This is (I imagine) why the C programing language allows a trailing
comma at the end of an array initializer.

- Bruce
Received on Saturday, 21 September 1996 15:39:31 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 15 April 2023 17:19:57 UTC