This is the cmu-infix Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:42:49 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cmu-infix
Mathematical infix notation for Common Lisp.
Robert Smith <robert@rigetti.com>
Mark Kantrowitz
Custom (See LICENSE.txt)
named-readtables
(system).
package.lisp
(file).
cmu-infix.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cmu-infix/cmu-infix.lisp
package.lisp
(file).
cmu-infix
(system).
string->prefix
(function).
*infix-readtable*
(special variable).
*normal-readtable*
(special variable).
*operator-ordering*
(special variable).
*peeked-token*
(special variable).
*right-associative-operators*
(special variable).
*token-infix-operator-table*
(special variable).
*token-operators*
(special variable).
*token-prefix-operator-table*
(special variable).
apply-token-infix-operator
(function).
apply-token-prefix-operator
(function).
define-character-tokenization
(macro).
define-token-operator
(macro).
fancy-number-format-p
(function).
gather-superiors
(function).
get-first-token
(function).
get-next-token
(function).
get-token-infix-operator
(function).
get-token-prefix-operator
(function).
infix-error
(macro).
infix-read-delimited-list
(function).
infix-reader
(function).
operator-lessp
(function).
operator-right-associative-p
(function).
peek-token
(function).
post-process-expression
(function).
read-infix
(function).
read-regular
(function).
read-token
(function).
same-operator-p
(function).
same-token-p
(function).
token-operator-p
(function).
valid-numberp
(function).
Packages are listed by definition order.
cmu-infix
Package holding the readtable designator for mathematical infix notation.
The following two tables enumerate the supported operators along with
their precedence.
Operators:
NOTE: == is equality, = is assignment (C-style).
\ quoting character: x\-y –> x-y
! lisp escape !(foo bar) –> (foo bar)
; comment
x = y assignment (setf x y)
x += y increment (incf x y)
x -= y decrement (decf x y)
x *= y multiply and store (setf x (* x y))
x /= y divide and store (setf x (/ x y))
x|y bitwise logical inclusive or (logior x y)
x^y bitwise logical exclusive or (logxor x y)
x&y bitwise logical and (logand x y)
x<<y left shift (ash x y)
x>>y right shift (ash x (- y))
~x ones complement (unary) (lognot x)
x and y conjunction (and x y)
x && y conjunction (and x y)
x or y disjunction (or x y)
x || y disjunction (or x y)
not x negation (not x)
x^^y exponentiation (expt x y)
x,y sequence (progn x y)
(x,y) sequence (progn x y)
also parenthesis (x+y)/z –> (/ (+ x y) z)
f(x,y) functions (f x y)
a[i,j] array reference (aref a i j)
x+y x*y arithmetic (+ x y) (* x y)
x-y x/y arithmetic (- x y) (/ x y)
-y value negation (- y)
x % y remainder (mod x y)
x<y x>y inequalities (< x y) (> x y)
x <= y x >= y inequalities (<= x y) (>= x y)
x == y equality (= x y)
x != y equality (not (= x y))
if p then q conditional (when p q)
if p then q else r conditional (if p q r)
Precedence:
The following precedence conventions are obeyed by the infix operators:
[ ( !
^^
~
* / %
+ -
<< >>
< == > <= != >=
&
^
|
not
and
or
= += -= *= /=
,
if
then else
] )
Note that logical negation has lower precedence than numeric comparison so that "not a<b" becomes (not (< a b)), which is different from the C precedence conventions. You can change the precedence conventions by modifying the value of the variable *operator-ordering*.
common-lisp
.
editor-hints.named-readtables
.
string->prefix
(function).
*infix-readtable*
(special variable).
*normal-readtable*
(special variable).
*operator-ordering*
(special variable).
*peeked-token*
(special variable).
*right-associative-operators*
(special variable).
*token-infix-operator-table*
(special variable).
*token-operators*
(special variable).
*token-prefix-operator-table*
(special variable).
apply-token-infix-operator
(function).
apply-token-prefix-operator
(function).
define-character-tokenization
(macro).
define-token-operator
(macro).
fancy-number-format-p
(function).
gather-superiors
(function).
get-first-token
(function).
get-next-token
(function).
get-token-infix-operator
(function).
get-token-prefix-operator
(function).
infix-error
(macro).
infix-read-delimited-list
(function).
infix-reader
(function).
operator-lessp
(function).
operator-right-associative-p
(function).
peek-token
(function).
post-process-expression
(function).
read-infix
(function).
read-regular
(function).
read-token
(function).
same-operator-p
(function).
same-token-p
(function).
token-operator-p
(function).
valid-numberp
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Convert a string to a prefix s-expression using the infix reader. If the argument is not a string, just return it as is.
Ordered list of operators of equal precedence.
Gathers an expression whose operators all exceed the precedence of the operator to the left.
Jump to: | A D F G I M O P R S T V |
---|
Jump to: | A D F G I M O P R S T V |
---|
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|