How do I retrieve binding powers in a Maxima function definition
Subject: How do I retrieve binding powers in a Maxima function definition
From: Stavros Macrakis
Date: Thu, 3 Nov 2011 13:28:11 -0400
Re:
> For example, does all such information reside on the property list of a
symbol?
Yes, but you probably shouldn't try to manipulate property lists in Maxima
-- there will be many cases where there are things in the property list
that will confuse Maxima. Try, for example
?symbol\-plist(%e);
or
?symbol\-plist(verbify("+"));
-s
On Tue, Nov 1, 2011 at 13:56, David R Stoutemyer <dstout at hawaii.edu> wrote:
> Thanks, that seems to be just what I need!
>
> I don't know the distinction between mplus and "+", or if any such pairs
> have different binding powers. However, I want the binding power that is
> used in Maxima, not Lisp. The only reason I used ?+ was that I saw it in
> the on-line documentation for "infix" and inferred that it was the Maxima
> binding power.
>
> There is other parser data that I would like to access, but can't find
> online documentation about how to do so.
>
> In particular, I would like to determine if a symbol is a matchfix
> operator, and if so, what is its companion right delimiter?
>
> For example, does all such information reside on the property list of a
> symbol?
>
> If so, is there a function that returns the entire property list of a
> symbol so that I could study it and learn the proper keys to use with get()?
>
> The reason for all of this is that I am writing a function that tries to
> transform an expression into a particularly narrow expression. This
> involves partial deparsing to compare the predicted widths. I want the
> program to be robust about operators added by a user, so I don't want to
> simply hard wire the binding powers etc. published in the on-line manual.
>
> I would also like to automatically access character widths for the
> currently selected display font --the subject of an earlier mailing-list
> query. However, I suspect that involves forbiding forays into perhaps
> black-box interface, xml, and operating-system code. Until and unless I
> find out how to do that, the user will simply have to choose between Times
> New Roman and pdflatex -- or else supplement my measured width properties,
> which is _very_ tedious.
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>