How do I retrieve binding powers in a Maxima function definition
Subject: How do I retrieve binding powers in a Maxima function definition
From: Dieter Kaiser
Date: Thu, 03 Nov 2011 20:33:22 +0100
Am Donnerstag, den 03.11.2011, 13:30 -0400 schrieb Stavros Macrakis:
Perhaps it is of interest. This is a complete table of operators defined
in nparse.lisp and their corresponding properties. The columns nud and
led contain the functions, which the parser calls to get the operands.
The functions matchfix, infix, postfix, ... correspond to the type of
the operator. The entry `function' in these columns means a special
defined function for the operator. The binding powers are lbp and rbp.
pos, lpos, and rpos specifies the type of the operands and the type of
the operator.
Operator nud led header lbp rbp pos lpos rpos
------------------------------------------------------------------------
[ matchfix function (mlist) 200 any any
] delim-err erb-err 5
( function function (mprogn)
) delim-err erb-err 5
' function (mquote)
'' function
: infix (msetq) 180 20 any any any
:: infix (mset) 180 20 any any any
:= infix (mdefine) 180 20 any any any
::= infix (mdefmacro) 180 20 any any any
! postfix (mfactorial) 160 expr expr
!! function ($genfact) 160
^ function (mexpt) 140 139 expr expr expr
^^ function (mncexpt) 140 139 expr expr expr
. infix (mnctimes) 130 129 expr expr expr
* nary (mtimes) 120 expr
**
/ prefix (mquotient) 120 120 expr expr expr
+ prefix function (mplus) 100 134 expr expr
- prefix (mminus) 100 134 expr expr
= infix (mequal) 80 80 clause expr expr
> infix (mgreaterp) 80 80 clause expr expr
>= infix (mgeqp) 80 80 clause expr expr
< infix (mlessp) 80 80 clause expr expr
<= infix (mleqp) 80 80 clause expr expr
$ premterm-err (nodisplay) -1
; premterm-err (display) -1
&& delim-err -1
# infix (mnotequal) 80 80 clause expr expr
, nary ($ev) 10 any any
not prefix (mnot) 70 clause clause clause
and nary (mand) 65 clause clause
or nary (mor) 60 clause clause
then delim-err 5 25
else delim-err 5 25
elseif delim-err 5 45 any clause
if function (mcond) 200 45 any clause
do parse-$do (mdo) 25 25 any
for parse-$do 25 200 any
from parse-$do 25 95 any
in 95
step parse-$do 25 95 expr
next parse-$do 25 45 any
thru parse-$do 25 95 expr
unless parse-$do 25 45 clause
while parse-$do 25 45 clause
Dieter Kaiser