; FP interpreter/compiler
; Copyright (c) 1982 Scott B. Baden
; Copyright (c) 1982 Regents of the University of California.
; All rights reserved. The Berkeley software License Agreement
; specifies the terms and conditions for redistribution.
(setq SCCS-fpMacs.l "@(#)fpMacs.l 5.1 (Berkeley) 5/31/85")
(eval-when (compile eval load)
(setq whiteSpace ''(9 10 32))
(setq blankOrTab ''(9 32))
(cond ((and (null infile) ptport) (tyo z ptport))
(cond ((eq 'eof$$ (setq c (readc piport 'eof$$)))
(*throw 'parse$err 'eof$$))
(t (setq c (car (exploden c)))
((not (and (null in_buf) (memq c #.whiteSpace)))
(setq in_buf (cons c in_buf))))))
(cond ((and (null infile) ptport)
((not (and (null in_buf) (memq c #.whiteSpace)))
(cond ((and (null infile) ptport (not (listp z))) (patom z ptport)))
(cond ((and (null infile) ptport (not (listp z)))
((c (tyipeek) (tyipeek)))
((or (and (eq c #.CR) (Tyi) t)
(null (memq c #.blankOrTab))))
`(cond ((atom ,lst) (eq ,flg ,lst))
; we want top-level size, not total number of arguments
;; Special macros to help out tree insert
(defmacro treeIns (fn input Len)
`(cond ((zerop ,Len) (unitTreeInsert ,fn))
((onep ,Len) (car ,input))
((twop ,Len) (funcall ,fn ,input))
(t (treeInsWithLen ,fn ,input ,Len))))
(defmacro unitTreeInsert (fn)
`(let ((ufn (get 'u-fnc ,fn)))
(cond (ufn (funcall ufn))
(putprop 'fpMacs t 'loaded)