diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 1b01267..65dd896 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -3135,6 +3135,13 @@ To pair badge and badgee @ +\defmacro{idChar?} +<>= +(defmacro |idChar?| (x) + `(or (alphanumericp ,x) (member ,x '(#\? #\% #\' #\!) :test #'char=))) + +@ + \defun{scanW}{scanW} <>= (defun |scanW| (b) @@ -3341,7 +3348,7 @@ NOTE: do not replace ``lyne'' with ``line'' \end{verbatim} <>= (defun |scanCheckRadix| (r w) - (let (a done ns) + (let (a ns) (declare (special |$n| |$linepos|)) (setq ns (length w)) ((lambda (Var1 i) @@ -3865,6 +3872,992 @@ The dqAppend function appends 2 dq's, destroying the first @ +\chapter{Message Handling} + +\defun{msgCreate}{msgCreate} +\begin{verbatim} +msgObject tag -- catagory of msg + -- attributes as a-list + 'imPr => dont save for list processing + toWhere, screen or file + 'norep => only display once in list + pos -- position with possible FROM/TO tag + key -- key for message database + argL -- arguments to be placed in the msg test + prefix -- things like "Error: " + text -- the actual text +\end{verbatim} +<>= +(defun |msgCreate| (tag posWTag key argL optPre &rest optAttr) + (let (msg) + (when (consp key) (setq tag '|old|)) + (setq msg (list tag posWTag key argL optPre nil)) + (when (car optAttr) (|setMsgForcedAttrList| msg (car optAttr))) + (|putDatabaseStuff| msg) + (|initImPr| msg) + (|initToWhere| msg) + msg)) + +@ + +\defun{getMsgPosTagOb}{getMsgPosTagOb} +<>= +(defun |getMsgPosTagOb| (msg) (elt msg 1)) + +@ + +\defun{getMsgKey}{getMsgKey} +<>= +(defun |getMsgKey| (msg) (elt msg 2)) + +@ + +\defun{getMsgArgL}{getMsgArgL} +<>= +(defun |getMsgArgL| (msg) (elt msg 3)) + +@ + +\defun{getMsgPrefix}{getMsgPrefix} +<>= +(defun |getMsgPrefix| (msg) (elt msg 4)) + +@ + +\defun{setMsgPrefix}{setMsgPrefix} +<>= +(defun |setMsgPrefix| (msg val) (setf (elt msg 4) val)) + +@ + +\defun{getMsgText}{getMsgText} +<>= +(defun |getMsgText| (msg) (elt msg 5)) + +@ + +\defun{setMsgText}{setMsgText} +<>= +(defun |setMsgText| (msg val) + (setf (elt msg 5) val)) + +@ + +\defun{getMsgPrefix?}{getMsgPrefix?} +<>= +(defun |getMsgPrefix?| (msg) + (let ((pre (|getMsgPrefix| msg))) + (unless (eq pre '|noPre|) pre))) + +@ + +\defun{getMsgTag}{getMsgTag} +The valid message tags are: +line, old, error, warn, bug, unimple, remark, stat, say, debug +<>= +(defun |getMsgTag| (msg) (|ncTag| msg)) + +@ + +\defun{getMsgTag?}{getMsgTag?} +<>= +(defun |getMsgTag?| (|msg|) + (ifcar (member (|getMsgTag| |msg|) + (list '|line| '|old| '|error| '|warn| '|bug| + '|unimple| '|remark| '|stat| '|say| '|debug|)))) + +@ + +\defun{line?}{line?} +<>= +(defun |line?| (msg) (eq (|getMsgTag| msg) '|line|)) + +@ + +\defun{leader?}{leader?} +<>= +(defun |leader?| (msg) (eq (|getMsgTag| msg) '|leader|)) + +@ + +\defun{toScreen?}{toScreen?} +<>= +(defun |toScreen?| (msg) (not (eq (|getMsgToWhere| msg) '|fileOnly|))) + +@ + +\defun{ncSoftError}{ncSoftError} +Messages for the USERS of the compiler. +The program being compiled has a minor error. +Give a message and continue processing. +<>= +(defun |ncSoftError| (pos erMsgKey erArgL &rest optAttr) + (declare (special |$compErrorPrefix| |$newcompErrorCount|)) + (setq |$newcompErrorCount| (+ |$newcompErrorCount| 1)) + (when (|desiredMsg| erMsgKey) + (|processKeyedError| + (|msgCreate| '|error| pos erMsgKey erArgL + |$compErrorPrefix| optAttr)))) + +@ + +\defun{ncHardError}{ncHardError} +The program being compiled is seriously incorrect. +Give message and throw to a recovery point. +<>= +(defun |ncHardError| (pos erMsgKey erArgL &rest optAttr) + (let (erMsg) + (declare (special |$compErrorPrefix| |$newcompErrorCount|)) + (setq |$newcompErrorCount| (+ |$newcompErrorCount| 1)) + (if (|desiredMsg| erMsgKey) + (setq erMsg + (|processKeyedError| + (|msgCreate| '|error| pos erMsgKey erArgL |$compErrorPrefix| optAttr))) + (|ncError|)))) + +@ + +\defun{desiredMsg}{desiredMsg} +<>= +(defun |desiredMsg| (erMsgKey &rest optCatFlag) + (cond + ((|isKeyQualityP| erMsgKey '|show|) t) + ((|isKeyQualityP| erMsgKey '|stifle|) nil) + ((null (null optCatFlag)) (car optCatFlag)) + (t t))) + +@ + +\defun{isKeyQualityP}{isKeyQualityP} +This seems dumb logic to me. There is nothing that iterates in the loop. +Thus the value is either found immediate or never found at all. +But if we ever enter the loop it would be infinite. +\begin{verbatim} +isKeyQualityP (key,qual) == + --returns pair if found, else NIL + found := false + while not found and (qualPair := ASSOC(key,$specificMsgTags)) repeat + if CDR qualPair = qual then found := true + qualPair +\end{verbatim} +<>= +(defun |isKeyQualityP| (key qual) + (let (qualPair found) + (declare (special |$specificMsgTags|)) + (do () + ((not (and (null found) + (setq qualPair (assoc key |$specificMsgTags|)))) + nil) + (when (equal (cdr qualPair) qual) (setq found t))) + qualPair)) + +@ + +\defun{processKeyedError}{processKeyedError} +<>= +(defun |processKeyedError| (msg) + (prog (pre erMsg) + (declare (special |$ncMsgList|)) + (cond + ((eq (|getMsgTag?| msg) '|old|) + (setq erMsg (|getMsgKey| msg)) + (cond + ((setq pre (|getMsgPrefix?| msg)) + (setq erMsg (cons '|%b| (cons pre (cons '|%d| erMsg)))))) + (|sayBrightly| (cons "old msg from " (cons (|CallerName| 4) erMsg)))) + ((|msgImPr?| msg) (|msgOutputter| msg)) + (t (setq |$ncMsgList| (cons msg |$ncMsgList|)))))) + +@ + +\defun{msgOutputter}{msgOutputter} +<>= +(defun |msgOutputter| (msg) + (let (alreadyOpened shouldFlow st) + (declare (special $loglength $linelength)) + (setq st (|getStFromMsg| msg)) + (setq shouldFlow (null (or (|leader?| msg) (|line?| msg)))) + (when (|toScreen?| msg) + (when shouldFlow (setq st (|flowSegmentedMsg| st $linelength 0))) + (|sayBrightly| st)) + (when (|toFile?| msg) + (when shouldFlow (setq st (|flowSegmentedMsg| st $loglength 0))) + (setq alreadyOpened (|alreadyOpened?| msg))))) + +@ + +\defun{listOutputter}{listOutputter} +<>= +(defun |listOutputter| (outputList) + (dolist (msg outputList) + (|msgOutputter| msg))) + +@ + +\defun{getStFromMsg}{getStFromMsg} +<>= +(defun |getStFromMsg| (msg) + (let (|$optKeyBlanks| st optKey msgKey posStL preStL) + (declare (special |$showKeyNum| |$optKeyBlanks|)) + (setq |$optKeyBlanks| "") + (|setOptKeyBlanks|) + (setq preStL (|getPreStL| (|getMsgPrefix?| msg))) + (cond + ((eq (|getMsgTag| msg) '|line|) + (cons |$optKeyBlanks| + (cons "%x1" (append preStL (cons (|getMsgText| msg) nil))))) + (t + (setq posStL (|getPosStL| msg)) + (setq optKey + (cond + (|$showKeyNum| + (cond + ((setq msgKey (|getMsgKey?| msg)) (pname msgKey)) + (t "no key "))) + (t ""))) + (setq st + (cons posStL + (cons (|getMsgLitSym| msg) + (cons optKey + (append preStL + (cons (|tabbing| msg) + (|getMsgText| msg))))))))))) + +@ + +\defun{setOptKeyBlanks}{setOptKeyBlanks} +<>= +(defun |setOptKeyBlanks| () + (declare (special |$optKeyBlanks| |$showKeyNum|)) + (setq |$optKeyBlanks| (if |$showKeyNum| "%x8" ""))) + +@ + +\defun{getPreStL}{getPreStL} +<>= +(defun |getPreStL| (optPre) + (let (spses extraPlaces) + (declare (special |$preLength|)) + (cond + ((null optPre) (list (make-full-cvec 2))) + (t + (setq spses + (cond + ((< 0 (setq extraPlaces (- (- |$preLength| (size optPre)) 3))) + (make-full-cvec extraPlaces)) + (t ""))) + (list '|%b| optPre spses ":" '|%d|))))) + +@ + +\defun{getPosStL}{getPosStL} +<>= +(defun |getPosStL| (msg) + (let (printedOrigin printedLineNum printedFileName fullPrintedPos howMuch + msgPos) + (declare (special |$optKeyBlanks| |$lastPos|)) + (cond + ((null (|showMsgPos?| msg)) "") + (t + (setq msgPos (|getMsgPos| msg)) + (setq howMuch + (if (|msgImPr?| msg) + (|decideHowMuch| msgPos |$lastPos|) + (|listDecideHowMuch| msgPos |$lastPos|))) + (setq |$lastPos| msgPos) + (setq fullPrintedPos (|ppos| msgPos)) + (setq printedFileName + (cons "%x2" (cons "[" (append (|remLine| fullPrintedPos) (cons "]" nil))))) + (setq printedLineNum + (cons "%x2" (cons "[" (append (|remFile| fullPrintedPos) (cons "]" nil))))) + (setq printedOrigin + (cons "%x2" (cons "[" (append fullPrintedPos (cons "]" nil))))) + (cond + ((eq howMuch 'org) + (cons |$optKeyBlanks| (append printedOrigin (cons '|%l| nil)))) + ((eq howMuch 'line) + (cons |$optKeyBlanks| (append printedLineNum (cons '|%l| nil)))) + ((eq howMuch 'file) + (cons |$optKeyBlanks| (append printedFileName (cons '|%l| nil)))) + ((eq howMuch 'all) + (cons |$optKeyBlanks| + (append printedFileName + (cons '|%l| + (cons |$optKeyBlanks| + (append printedLineNum + (cons '|%l| nil))))))) + (t "")))))) + +@ + +\defun{remFile}{remFile} +<>= +(defun |remFile| (positionList) (ifcdr (ifcdr positionList))) + +@ + +\defun{showMsgPos?}{showMsgPos?} +<>= +(defun |showMsgPos?| (msg) + (declare (special |$erMsgToss|)) + (or |$erMsgToss| (and (null (|msgImPr?| msg)) (null (|leader?| msg))))) + +@ + +\defun{msgImPr?}{msgImPr?} +<>= +(defun |msgImPr?| (msg) + (eq (|getMsgCatAttr| msg '|$imPrGuys|) '|imPr|)) + +@ + +\defun{getMsgCatAttr}{getMsgCatAttr} +<>= +(defun |getMsgCatAttr| (msg cat) + (ifcdr (qassq cat (|ncAlist| msg)))) + +@ + +\defun{getMsgPos}{getMsgPos} +<>= +(defun |getMsgPos| (msg) + (if (|getMsgFTTag?| msg) + (cadr (|getMsgPosTagOb| msg)) + (|getMsgPosTagOb| msg))) + +@ + +\defun{getMsgFTTag?}{getMsgFTTag?} +<>= +(defun |getMsgFTTag?| (msg) + (ifcar (member (ifcar (|getMsgPosTagOb| msg)) (list 'from 'to 'fromto)))) + +@ + +\defun{decideHowMuch}{decideHowMuch} +When printing a msg, we wish not to show pos information that was +shown for a previous msg with identical pos info. +org prints out the word noposition or console +<>= +(defun |decideHowMuch| (pos oldPos) + (cond + ((or (and (|poNopos?| pos) (|poNopos?| oldPos)) + (and (|poPosImmediate?| pos) (|poPosImmediate?| oldPos))) + 'none) + ((or (|poNopos?| pos) (|poPosImmediate?| pos)) 'org) + ((or (|poNopos?| oldPos) (|poPosImmediate?| oldPos)) 'all) + ((not (equal (|poFileName| oldPos) (|poFileName| pos))) 'all) + ((not (equal (|poLinePosn| oldPos) (|poLinePosn| pos))) 'line) + (t 'none))) + +@ + +\defun{listDecideHowMuch}{listDecideHowMuch} +<>= +(defun |listDecideHowMuch| (pos oldPos) + (cond + ((or (and (|poNopos?| pos) (|poNopos?| oldPos)) + (and (|poPosImmediate?| pos) (|poPosImmediate?| oldPos))) + 'none) + ((|poNopos?| pos) 'org) + ((|poNopos?| oldPos) 'none) + ((< (|poGlobalLinePosn| pos) (|poGlobalLinePosn| oldPos)) + (if (|poPosImmediate?| pos) 'org 'line)) + (t 'none))) + +@ + +\defun{remLine}{remLine} +<>= +(defun |remLine| (positionList) (list (ifcar positionList))) + +@ + +\defun{getMsgKey?}{getMsgKey?} +<>= +(defun |getMsgKey?| (msg) + (let ((val (|getMsgKey| msg))) + (when (identp val) val))) + +@ + +\defun{getMsgLitSym}{getMsgLitSym} +<>= +(defun |getMsgLitSym| (msg) + (if (|getMsgKey?| msg) " " "*")) + +@ + +\defun{tabbing}{tabbing} +<>= +(defun |tabbing| (msg) + (let (chPos) + (declare (special |$showKeyNum| |$preLength|)) + (setq chPos 2) + (when (|getMsgPrefix?| msg) (setq chPos (- (+ chPos |$preLength|) 1))) + (when |$showKeyNum| (setq chPos (+ chPos 8))) + (cons '|%t| chPos))) + +@ + +\defun{getMsgToWhere}{getMsgToWhere} +<>= +(defun |getMsgToWhere| (msg) (|getMsgCatAttr| msg '|$toWhereGuys|)) + +@ + +\defun{toFile?}{toFile?} +<>= +(defun |toFile?| (msg) + (declare (special |$fn|)) + (and (consp |$fn|) (not (eq (|getMsgToWhere| msg) '|screenOnly|)))) + +@ + +\defun{alreadyOpened?}{alreadyOpened?} +<>= +(defun |alreadyOpened?| (msg) (null (|msgImPr?| msg))) + +@ + +\defun{setMsgForcedAttrList}{setMsgForcedAttrList} +<>= +(defun |setMsgForcedAttrList| (msg attrlist) + (dolist (attr attrlist) + (|setMsgForcedAttr| msg (|whichCat| attr) attr))) + +@ + +\defun{setMsgForcedAttr}{setMsgForcedAttr} +<>= +(defun |setMsgForcedAttr| (msg cat attr) + (if (eq cat '|catless|) + (|setMsgCatlessAttr| msg attr) + (|ncPutQ| msg cat attr))) + +@ + +\defun{whichCat}{whichCat} +<>= +(defun |whichCat| (attr) + (let ((found '|catless|) done) + (declare (special |$attrCats|)) + (loop for cat in |$attrCats| do + (when (|ListMember?| attr (eval cat)) + (setq found cat) + (setq done t)) + until done) + found)) + +@ + +\defun{setMsgCatlessAttr}{setMsgCatlessAttr} +<>= +(defun |setMsgCatlessAttr| (msg attr) + (|ncPutQ| msg |catless| ; probably should be '|catless|? -- TPDHERE + (cons attr (ifcdr (qassq |catless| (|ncAlist| msg)))))) + +@ + +\defun{putDatabaseStuff}{putDatabaseStuff} +<>= +(defun |putDatabaseStuff| (msg) + (let (attributes text tmp) + (setq tmp (|getMsgInfoFromKey| msg)) + (setq text (car tmp)) + (setq attributes (cadr tmp)) + (when attributes (|setMsgUnforcedAttrList| msg al)) + (|setMsgText| msg text))) + +@ + +\defun{getMsgInfoFromKey}{getMsgInfoFromKey} +<>= +(defun |getMsgInfoFromKey| (msg) + (let (|$msgDatabaseName| attributes tmp msgText dbl msgKey) + (declare (special |$msgDatabaseName| |$erGlbMsgDatabaseName| + |$erLocMsgDatabaseName|)) + (setq |$msgDatabaseName| nil) + (setq msgText + (cond + ((setq msgKey (|getMsgKey?| msg)) + (setq dbl (list |$erLocMsgDatabaseName| |$erGlbMsgDatabaseName|)) + (|getErFromDbL| msgKey dbl)) + (t (|getMsgKey| msg)))) + (setq msgText (|segmentKeyedMsg| msgText)) + (setq tmp (|removeAttributes| msgText)) + (setq msgText (car tmp)) + (setq attributes (cadr tmp)) + (setq msgText (|substituteSegmentedMsg| msgText (|getMsgArgL| msg))) + (list msgText attributes))) + +@ + +\defun{getErFromDbL}{getErFromDbL} +\begin{verbatim} +;getErFromDbL (erMsgKey,dbL) == +; erMsg := NIL +; while null erMsg repeat +; dbName := CAR dbL +; dbL := CDR dbL +; $msgDatabaseName := dbName +; lastName := null dbL +;-- fileFound := '"co_-eng.msgs" +; fileFound := '"s2_-us.msgs" +; if fileFound or lastName then +; erMsg := fetchKeyedMsg(erMsgKey,not lastName) +; erMsg +\end{verbatim} +<>= +(defun |getErFromDbL| (erMsgKey dbL) + (let (fileFound lastName dbName erMsg) + (declare (special |$msgDatabaseName|)) + ((lambda () + (loop + (cond + (erMsg (return nil)) + (t + (setq dbName (car dbl)) + (setq dbl (cdr dbl)) + (setq |$msgDatabaseName| dbName) + (setq lastName (null dbl)) + (setq fileFound "s2-us.msgs") + (cond + ((or fileFound lastName) + (setq erMsg (|fetchKeyedMsg| erMsgKey (null lastName)))))))))) + erMsg)) + +@ + +\defun{setMsgUnforcedAttrList}{setMsgUnforcedAttrList} +<>= +(defun |setMsgUnforcedAttrList| (msg attrlist) + (dolist (attr attrlist) + (|setMsgUnforcedAttr| msg (|whichCat| attr) attr))) + +@ + +\defun{setMsgUnforcedAttr}{setMsgUnforcedAttr} +<>= +(defun |setMsgUnforcedAttr| (msg cat attr) + (cond + ((eq cat '|catless|) (|setMsgCatlessAttr| msg attr)) + ((null (qassq cat (|ncAlist| msg))) (|ncPutQ| msg cat attr)))) + +@ + +\defun{initImPr}{initImPr} +<>= +(defun |initImPr| (msg) + (declare (special |$imPrTagGuys| |$erMsgToss|)) + (when (or |$erMsgToss| (memq (|getMsgTag| msg) |$imPrTagGuys|)) + (|setMsgUnforcedAttr| msg '|$imPrGuys| '|imPr|))) + +@ + +\defun{initToWhere}{initToWhere} +<>= +(defun |initToWhere| (msg) + (if (member '|trace| (|getMsgCatAttr| msg '|catless|)) + (|setMsgUnforcedAttr| msg '|$toWhereGuys| '|screenOnly|))) + +@ + +\defun{ncBug}{ncBug} +Bug in the compiler: something which shouldn't have happened did. +<>= +(defun |ncBug| (erMsgKey erArgL &rest optAttr) + (let (erMsg) + (declare (special |$compBugPrefix| |$nopos| |$newcompErrorCount|)) + (setq |$newcompErrorCount| (+ |$newcompErrorCount| 1)) + (setq erMsg + (|processKeyedError| + (|msgCreate| '|bug| |$nopos| erMsgKey erArgL |$compBugPrefix| optAttr))) + (enable-backtrace nil) + (break) + (|ncAbort|))) + +@ + +\defun{processMsgList}{processMsgList} +<>= +(defun |processMsgList| (erMsgList lineList) + (let (|$noRepList| |$outputList| st globalNumOfLine msgLine) + (declare (special |$noRepList| |$outputList|)) + (setq |$outputList| nil) + (setq |$noRepList| nil) + (setq erMsgList (|erMsgSort| erMsgList)) + (dolist (line lineList) + (setq msgLine (|makeMsgFromLine| line)) + (setq |$outputList| (cons msgLine |$outputList|)) + (setq globalNumOfLine (|poGlobalLinePosn| (|getMsgPos| msgLine))) + (setq erMsgList (|queueUpErrors| globalNumOfLine erMsgList))) + (setq |$outputList| (append erMsgList |$outputList|)) + (setq st "---------SOURCE-TEXT-&-ERRORS------------------------") + (|listOutputter| (reverse |$outputList|)))) + +@ + +\defun{erMsgSort}{erMsgSort} +<>= +(defun |erMsgSort| (erMsgList) + (let (msgWOPos msgWPos tmp) + (setq tmp (|erMsgSep| erMsgList)) + (setq msgWPos (car tmp)) + (setq msgWOPos (cadr tmp)) + (setq msgWPos (|listSort| #'|erMsgCompare| msgWPos)) + (setq msgWOPos (reverse msgWOPos)) + (append msgWPos msgWOPos))) + +@ + +\defun{erMsgCompare}{erMsgCompare} +<>= +(defun |erMsgCompare| (ob1 ob2) + (|compareposns| (|getMsgPos| ob2) (|getMsgPos| ob1))) + +@ + +\defun{erMsgSep}{erMsgSep} +<>= +(defun |erMsgSep| (erMsgList) + (let (msgWOPos msgWPos) + (dolist (msg erMsgList) + (if (|poNopos?| (|getMsgPos| msg)) + (setq msgWOPos (cons msg msgWOPos)) + (setq msgWPos (cons msg msgWPos)))) + (list msgWPos msgWOPos))) + +@ + +\defun{makeMsgFromLine}{makeMsgFromLine} +<>= +(defun |makeMsgFromLine| (line) + (let (localNumOfLine stNum i globalNumOfLine textOfLine posOfLine) + (declare (special |$preLength|)) + (setq posOfLine (|getLinePos| line)) + (setq textOfLine (|getLineText| line)) + (setq globalNumOfLine (|poGlobalLinePosn| posOfLine)) + (setq stNum (stringimage (|poLinePosn| posOfLine))) + (setq localNumOfLine + (strconc (|rep| (|char| '| |) (- |$preLength| 7 (size stNum))) stNum)) + (list '|line| posOfLine nil nil (strconc "Line" localNumOfLine) textOfLine))) + +@ + +\defun{rep}{rep} +<>= +(defun |rep| (c n) + (if (< 0 n) + (make-full-cvec n c) + "")) + +@ + +\defun{getLinePos}{getLinePos} +<>= +(defun |getLinePos| (line) (car line)) + +@ + +\defun{getLineText}{getLineText} +<>= +(defun |getLineText| (line) (cdr line)) + +@ + +\defun{queueUpErrors}{queueUpErrors} +\begin{verbatim} +;queueUpErrors(globalNumOfLine,msgList)== +; thisPosMsgs := [] +; notThisLineMsgs := [] +; for msg in msgList _ +; while thisPosIsLess(getMsgPos msg,globalNumOfLine) repeat +; --these are msgs that refer to positions from earlier compilations +; if not redundant (msg,notThisPosMsgs) then +; notThisPosMsgs := [msg,:notThisPosMsgs] +; msgList := rest msgList +; for msg in msgList _ +; while thisPosIsEqual(getMsgPos msg,globalNumOfLine) repeat +; if not redundant (msg,thisPosMsgs) then +; thisPosMsgs := [msg,:thisPosMsgs] +; msgList := rest msgList +; if thisPosMsgs then +; thisPosMsgs := processChPosesForOneLine thisPosMsgs +; $outputList := NCONC(thisPosMsgs,$outputList) +; if notThisPosMsgs then +; $outputList := NCONC(notThisPosMsgs,$outputList) +; msgList +\end{verbatim} +<>= +(DEFUN |queueUpErrors| (|globalNumOfLine| |msgList|) + (PROG (|notThisPosMsgs| |notThisLineMsgs| |thisPosMsgs|) + (DECLARE (SPECIAL |$outputList|)) + (RETURN + (PROGN + (SETQ |thisPosMsgs| NIL) + (SETQ |notThisLineMsgs| NIL) + ((LAMBDA (|bfVar#7| |msg|) + (LOOP + (COND + ((OR (ATOM |bfVar#7|) + (PROGN (SETQ |msg| (CAR |bfVar#7|)) NIL) + (NOT (|thisPosIsLess| (|getMsgPos| |msg|) + |globalNumOfLine|))) + (RETURN NIL)) + ('T + (PROGN + (COND + ((NULL (|redundant| |msg| |notThisPosMsgs|)) + (SETQ |notThisPosMsgs| + (CONS |msg| |notThisPosMsgs|)))) + (SETQ |msgList| (CDR |msgList|))))) + (SETQ |bfVar#7| (CDR |bfVar#7|)))) + |msgList| NIL) + ((LAMBDA (|bfVar#8| |msg|) + (LOOP + (COND + ((OR (ATOM |bfVar#8|) + (PROGN (SETQ |msg| (CAR |bfVar#8|)) NIL) + (NOT (|thisPosIsEqual| (|getMsgPos| |msg|) + |globalNumOfLine|))) + (RETURN NIL)) + ('T + (PROGN + (COND + ((NULL (|redundant| |msg| |thisPosMsgs|)) + (SETQ |thisPosMsgs| (CONS |msg| |thisPosMsgs|)))) + (SETQ |msgList| (CDR |msgList|))))) + (SETQ |bfVar#8| (CDR |bfVar#8|)))) + |msgList| NIL) + (COND + (|thisPosMsgs| + (SETQ |thisPosMsgs| + (|processChPosesForOneLine| |thisPosMsgs|)) + (SETQ |$outputList| (NCONC |thisPosMsgs| |$outputList|)))) + (COND + (|notThisPosMsgs| + (SETQ |$outputList| + (NCONC |notThisPosMsgs| |$outputList|)))) + |msgList|)))) + +@ + +\defun{thisPosIsLess}{thisPosIsLess} +<>= +(defun |thisPosIsLess| (pos num) + (unless (|poNopos?| pos) (< (|poGlobalLinePosn| pos) num))) + +@ + +\defun{thisPosIsEqual}{thisPosIsEqual} +<>= +(defun |thisPosIsEqual| (pos num) + (unless (|poNopos?| pos) (equal (|poGlobalLinePosn| pos) num))) + +@ + +\defun{redundant}{redundant} +\begin{verbatim} +redundant(msg,thisPosMsgs) == + found := NIL + if msgNoRep? msg then + for item in $noRepList repeat + sameMsg?(msg,item) => return (found := true) + $noRepList := [msg,$noRepList] + found or MEMBER(msg,thisPosMsgs) +\end{verbatim} +<>= +(defun |redundant| (msg thisPosMsgs) + (prog (found) + (declare (special |$noRepList|)) + (return + (progn + (cond + ((|msgNoRep?| msg) + ((lambda (Var9 item) + (loop + (cond + ((or (atom Var9) (progn (setq item (car Var9)) nil)) + (return nil)) + (t + (cond + ((|sameMsg?| msg item) (return (setq found t)))))) + (setq Var9 (cdr Var9)))) + |$noRepList| nil) + (setq |$noRepList| (list msg |$noRepList|)))) + (or found (member msg thisPosMsgs)))))) + +@ + +\defun{msgNoRep?}{msgNoRep?} +<>= +(defun |msgNoRep?| (msg) (eq (|getMsgCatAttr| msg '|$repGuys|) '|noRep|)) + +@ + +\defun{sameMsg?}{sameMsg?} +<>= +(defun |sameMsg?| (msg1 msg2) + (and (equal (|getMsgKey| msg1) (|getMsgKey| msg2)) + (equal (|getMsgArgL| msg1) (|getMsgArgL| msg2)))) + +@ + +\defun{processChPosesForOneLine}{processChPosesForOneLine} +<>= +(defun |processChPosesForOneLine| (msgList) + (let (leaderMsg oldPre posLetter chPosList) + (declare (special |$preLength|)) + (setq chPosList (|posPointers| msgList)) + (dolist (msg msgList) + (when (|getMsgFTTag?| msg) (|putFTText| msg chPosList)) + (setq posLetter (cdr (assoc (|poCharPosn| (|getMsgPos| msg)) chPosList))) + (setq oldPre (|getMsgPrefix| msg)) + (|setMsgPrefix| msg + (strconc oldPre + (make-full-cvec (- |$preLength| 4 (size oldPre))) posLetter))) + (setq leaderMsg (|makeLeaderMsg| chPosList)) + (nconc msgList (list leaderMsg)))) + +@ + +\defun{makeLeaderMsg}{makeLeaderMsg} +\begin{verbatim} +makeLeaderMsg chPosList == + st := MAKE_-FULL_-CVEC ($preLength- 3) + oldPos := -1 + for [posNum,:posLetter] in reverse chPosList repeat + st := STRCONC(st, _ + rep(char ".", (posNum - oldPos - 1)),posLetter) + oldPos := posNum + ['leader,$nopos,'nokey,NIL,NIL,[st]] +\end{verbatim} +<>= +(defun |makeLeaderMsg| (chPosList) + (let (posLetter posNum oldPos st) + (declare (special |$nopos| |$preLength|)) + (setq st (make-full-cvec (- |$preLength| 3))) + (setq oldPos -1) + ((lambda (Var15 Var14) + (loop + (cond + ((or (atom Var15) (progn (setq Var14 (car Var15)) nil)) + (return nil)) + (t + (and (consp Var14) + (progn + (setq posNum (car Var14)) + (setq posLetter (cdr Var14)) + t) + (progn + (setq st + (strconc st (|rep| (|char| '|.|) (- posNum oldPos 1)) posLetter)) + (setq oldPos posNum))))) + (setq Var15 (cdr Var15)))) + (reverse chPosList) nil) + (list '|leader| |$nopos| '|nokey| nil nil (list st)))) + +@ + +\defun{posPointers}{posPointers} +<>= +(defun |posPointers| (msgList) + (let (posLetterList pos ftPosList posList increment pointers) + (setq pointers "ABCDEFGHIJKLMONPQRS") + (setq increment 0) + (dolist (msg msgList) + (setq pos (|poCharPosn| (|getMsgPos| msg))) + (unless (equal pos (ifcar posList)) + (setq posList (cons pos posList))) + ; this should probably read TPDHERE + ; (when (eq (getMsgPosTagOb| msg) 'fromto) + (when (eq getMsgFTTag 'fromto) + (setq ftPosList (cons (|poCharPosn| (|getMsgPos2| msg)) ftPosList)))) + (dolist (toPos ftPosList) + (setq posList (|insertPos| toPos posList))) + (dolist (pos posList) + (setq posLetterList + (cons (cons pos (elt pointers increment)) posLetterList)) + (setq increment (+ increment 1))) + posLetterList)) + +@ + +\defun{getMsgPos2}{getMsgPos2} +<>= +(defun |getMsgPos2| (msg) + (if (|getMsgFTTag?| msg) + (caddr (|getMsgPosTagOb| msg)) + (|ncBug| "not a from to" nil))) + +@ + +\defun{insertPos}{insertPos} +This function inserts a position in the proper place of a position list. +This is used for the 2nd pos of a fromto +<>= +(defun |insertPos| (newPos posList) + (let (pos top bot done) + (setq bot (cons 0 posList)) + (do () (done) + (setq top (cons (car bot) top)) + (setq bot (cdr bot)) + (setq pos (car bot)) + (setq done + (cond + ((< pos newPos) nil) + ((equal pos newPos) t) + ((< newPos pos) + (setq top (cons newPos top)) + t)))) + (cons (cdr (reverse top)) bot))) + +@ + +\defun{putFTText}{putFTText} +<>= +(defun |putFTText| (msg chPosList) + (let (charMarker2 pos2 markingText charMarker pos tag) + (setq tag (|getMsgFTTag?| msg)) + (setq pos (|poCharPosn| (|getMsgPos| msg))) + (setq charMarker (cdr (assoc pos chPosList))) + (cond + ((eq tag 'from) + (setq markingText (list "(from " charMarker " and on) ")) + (|setMsgText| msg (append markingText (|getMsgText| msg)))) + ((eq tag 'to) + (setq markingText (list "(up to " charMarker ") ")) + (|setMsgText| msg (append markingText (|getMsgText| msg)))) + ((eq tag 'fromto) + (setq pos2 (|poCharPosn| (|getMsgPos2| msg))) + (setq charMarker2 (cdr (assoc pos2 chPosList))) + (setq markingText (list "(from " charMarker " up to " charMarker2 ") ")) + (|setMsgText| msg (append markingText (|getMsgText| msg))))))) + +@ + +\defun{From}{From} +This is called from parameter list of nc message functions +<>= +(defun |From| (pos) (list 'from pos)) + +@ + +\defun{To}{To} +This is called from parameter list of nc message functions +<>= +(defun |To| (pos) (list 'to pos)) + +@ + +\defun{FromTo}{FromTo} +This is called from parameter list of nc message functions +<>= +(defun |FromTo| (pos1 pos2) (list 'fromto pos1 pos2)) + +@ + \chapter{The Interpreter Syntax} \section{syntax assignment} \label{assignment} @@ -19902,7 +20895,6 @@ maxindex |%pform| |poGlobalLinePosn| |porigin| -|processMsgList| |resetStackLimits| |shoeread-line| |StreamNull| @@ -19917,6 +20909,7 @@ maxindex <> <> +<> <> <> <> @@ -19927,6 +20920,7 @@ maxindex <> <> <> +<> <> <> <> @@ -19964,6 +20958,7 @@ maxindex <> <> +<> <> <> <> @@ -19984,6 +20979,7 @@ maxindex <> <> <> +<> <> <> <> @@ -20016,6 +21012,9 @@ maxindex <> <> <> +<> +<> +<> <> <> @@ -20036,6 +21035,8 @@ maxindex <> <> <> +<> +<> <> <> @@ -20045,10 +21046,32 @@ maxindex <> <> <> +<> +<> +<> <> <> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> +<> <> +<> +<> <> +<> <> <> <> @@ -20115,9 +21138,12 @@ maxindex <> <> <> +<> <> <> +<> <> +<> <> <> <> @@ -20130,6 +21156,7 @@ maxindex <> <> <> +<> <> <> <> @@ -20142,6 +21169,7 @@ maxindex <> <> +<> <> <> <> @@ -20156,8 +21184,11 @@ maxindex <> <> <> +<> <> <> +<> +<> <> <> @@ -20166,6 +21197,8 @@ maxindex <> <> <> +<> +<> <> <> <> @@ -20175,12 +21208,18 @@ maxindex <> <> <> +<> +<> +<> +<> <> +<> <> <> <> <> +<> <> <> <> @@ -20193,6 +21232,7 @@ maxindex <> <> <> +<> <> <> <> @@ -20225,20 +21265,27 @@ maxindex <> <> <> +<> <> <> <> +<> +<> +<> <> <> <> <> <> <> +<> <> +<> <> <> <> +<> <> <> @@ -20251,9 +21298,13 @@ maxindex <> <> <> +<> +<> +<> <> <> <> +<> <> <> <> @@ -20268,6 +21319,7 @@ maxindex <> <> +<> <> <> <> @@ -20324,7 +21376,15 @@ maxindex <> <> <> +<> +<> +<> +<> +<> +<> +<> <> +<> <> <> <> @@ -20338,6 +21398,7 @@ maxindex <> <> <> +<> <> <> <> @@ -20374,11 +21435,17 @@ maxindex <> <> +<> +<> +<> +<> <> <> <> <> +<> <> +<> <> <> <> @@ -20418,6 +21485,7 @@ maxindex <> <> <> +<> <> <> <> diff --git a/changelog b/changelog index b8cc4b3..df6150c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +20091111 tpd src/axiom-website/patches.html 20091111.01.tpd.patch +20091111 tpd books/bookvol5 merge msg.lisp +20091111 tpd src/interp/Makefile remove msg.lisp +20091111 tpd src/interp/msg.lisp removed, merged with bookvol5 +20091111 tpd src/interp/sys-pkg.lisp move idChar? to bookvol5 +20091111 tpd src/interp/vmlisp.lisp move idChar? to bookvol5 20091110 tpd src/axiom-website/patches.html 20091110.01.tpd.patch 20091110 tpd books/bookvol10.3 fix failing tests caused by SetCategory change 20091110 tpd books/bookvol10.2 define hash=SXHASH in SetCategory diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 0990e3a..9dbc6ef 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2245,5 +2245,7 @@ books/bookvol10.3 fix comment typo
src/input/complexfactor.input demo complex factoring
20091110.01.tpd.patch bookvol10.2, bookvol10.3 define hash=SXHASH in SetCategory
+20091111.01.tpd.patch +bookvol5 merge msg.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 35740e1..7656907 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -165,7 +165,7 @@ OBJS= ${OUT}/vmlisp.${O} \ ${OUT}/intfile.${O} \ ${OUT}/lisplib.${O} ${OUT}/macex.${O} \ ${OUT}/match.${O} \ - ${OUT}/monitor.${O} ${OUT}/msg.${O} \ + ${OUT}/monitor.${O} \ ${OUT}/msgdb.${O} ${OUT}/nci.${O} \ ${OUT}/newaux.${O} ${OUT}/newfort.${O} \ ${OUT}/nrunfast.${O} \ @@ -3446,29 +3446,6 @@ ${MID}/ptrop.lisp: ${IN}/ptrop.lisp.pamphlet @ -\subsection{msg.lisp} -<>= -${OUT}/msg.${O}: ${MID}/msg.lisp - @ echo 136 making ${OUT}/msg.${O} from ${MID}/msg.lisp - @ ( cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/msg.lisp"' \ - ':output-file "${OUT}/msg.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/msg.lisp"' \ - ':output-file "${OUT}/msg.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/msg.lisp: ${IN}/msg.lisp.pamphlet - @ echo 137 making ${MID}/msg.lisp from ${IN}/msg.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/msg.lisp.pamphlet >msg.lisp ) - -@ - \subsection{serror.lisp} <>= ${OUT}/serror.${O}: ${MID}/serror.lisp @@ -4239,9 +4216,6 @@ clean: <> <> -<> -<> - <> <> diff --git a/src/interp/msg.lisp.pamphlet b/src/interp/msg.lisp.pamphlet deleted file mode 100644 index 16d8e2d..0000000 --- a/src/interp/msg.lisp.pamphlet +++ /dev/null @@ -1,1431 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp msg.lisp} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -<<*>>= - -(IN-PACKAGE "BOOT") - -;--% Messages for the USERS of the compiler. -;-- The program being compiled has a minor error. -;-- Give a message and continue processing. -;ncSoftError(pos, erMsgKey, erArgL,:optAttr) == -; $newcompErrorCount := $newcompErrorCount + 1 -; desiredMsg erMsgKey => -; processKeyedError _ -; msgCreate ('error, pos, erMsgKey, erArgL, $compErrorPrefix,optAttr) - -(DEFUN |ncSoftError| (|pos| |erMsgKey| |erArgL| &REST |optAttr|) - (PROG () - (DECLARE (SPECIAL |$compErrorPrefix| |$newcompErrorCount|)) - (RETURN - (PROGN - (SETQ |$newcompErrorCount| (+ |$newcompErrorCount| 1)) - (COND - ((|desiredMsg| |erMsgKey|) - (|processKeyedError| - (|msgCreate| '|error| |pos| |erMsgKey| |erArgL| - |$compErrorPrefix| |optAttr|)))))))) - -;-- The program being compiled is seriously incorrect. -;-- Give message and throw to a recovery point. -;ncHardError(pos, erMsgKey, erArgL,:optAttr) == -; $newcompErrorCount := $newcompErrorCount + 1 -; desiredMsg erMsgKey => -; erMsg := processKeyedError _ -; msgCreate('error,pos,erMsgKey, erArgL, $compErrorPrefix,optAttr) -; ncError() - -(DEFUN |ncHardError| (|pos| |erMsgKey| |erArgL| &REST |optAttr|) - (PROG (|erMsg|) - (DECLARE (SPECIAL |$compErrorPrefix| |$newcompErrorCount|)) - (RETURN - (PROGN - (SETQ |$newcompErrorCount| (+ |$newcompErrorCount| 1)) - (COND - ((|desiredMsg| |erMsgKey|) - (SETQ |erMsg| - (|processKeyedError| - (|msgCreate| '|error| |pos| |erMsgKey| |erArgL| - |$compErrorPrefix| |optAttr|)))) - ('T (|ncError|))))))) - -;-- Bug in the compiler: something which shouldn't have happened did. -;ncBug (erMsgKey, erArgL,:optAttr) == -; $newcompErrorCount := $newcompErrorCount + 1 -; erMsg := processKeyedError _ -; msgCreate('bug,$nopos, erMsgKey, erArgL,$compBugPrefix,optAttr) -; -- The next line is to try to deal with some reported cases of unwanted -; -- backtraces appearing, MCD. -; ENABLE_-BACKTRACE(nil) -; BREAK() -; ncAbort() - -(DEFUN |ncBug| (|erMsgKey| |erArgL| &REST |optAttr|) - (PROG (|erMsg|) - (DECLARE (SPECIAL |$compBugPrefix| |$nopos| |$newcompErrorCount|)) - (RETURN - (PROGN - (SETQ |$newcompErrorCount| (+ |$newcompErrorCount| 1)) - (SETQ |erMsg| - (|processKeyedError| - (|msgCreate| '|bug| |$nopos| |erMsgKey| |erArgL| - |$compBugPrefix| |optAttr|))) - (ENABLE-BACKTRACE NIL) - (BREAK) - (|ncAbort|))))) - -;--% Lower level functions -; -;--msgObject tag -- catagory of msg -;-- -- attributes as a-list -;-- 'imPr => dont save for list processing -;-- toWhere, screen or file -;-- 'norep => only display once in list -;-- pos -- position with possible FROM/TO tag -;-- key -- key for message database -;-- argL -- arguments to be placed in the msg test -;-- prefix -- things like "Error: " -;-- text -- the actual text -; -;msgCreate(tag,posWTag,key,argL,optPre,:optAttr) == -; if PAIRP key then tag := 'old -; msg := [tag,posWTag,key,argL,optPre,NIL] -; if CAR optAttr then -; setMsgForcedAttrList(msg,car optAttr) -; putDatabaseStuff msg -; initImPr msg -; initToWhere msg -; msg - -(DEFUN |msgCreate| - (|tag| |posWTag| |key| |argL| |optPre| &REST |optAttr|) - (PROG (|msg|) - (RETURN - (PROGN - (COND ((CONSP |key|) (SETQ |tag| '|old|))) - (SETQ |msg| (LIST |tag| |posWTag| |key| |argL| |optPre| NIL)) - (COND - ((CAR |optAttr|) - (|setMsgForcedAttrList| |msg| (CAR |optAttr|)))) - (|putDatabaseStuff| |msg|) - (|initImPr| |msg|) - (|initToWhere| |msg|) - |msg|)))) - -;processKeyedError msg == -; getMsgTag? msg = 'old => --temp -; erMsg := getMsgKey msg --temp -; if pre := getMsgPrefix? msg then --temp -; erMsg := ['%b, pre, '%d, :erMsg] --temp -; sayBrightly ['"old msg from ",_ -; CallerName 4,:erMsg] --temp -; msgImPr? msg => -; msgOutputter msg -; $ncMsgList := cons (msg, $ncMsgList) - -(DEFUN |processKeyedError| (|msg|) - (PROG (|pre| |erMsg|) - (DECLARE (SPECIAL |$ncMsgList|)) - (RETURN - (COND - ((EQ (|getMsgTag?| |msg|) '|old|) - (PROGN - (SETQ |erMsg| (|getMsgKey| |msg|)) - (COND - ((SETQ |pre| (|getMsgPrefix?| |msg|)) - (SETQ |erMsg| - (CONS '|%b| (CONS |pre| (CONS '|%d| |erMsg|)))))) - (|sayBrightly| - (CONS "old msg from " (CONS (|CallerName| 4) |erMsg|))))) - ((|msgImPr?| |msg|) (|msgOutputter| |msg|)) - ('T (SETQ |$ncMsgList| (CONS |msg| |$ncMsgList|))))))) - -;--------------------------------- -;--%getting info from db. -;putDatabaseStuff msg == -; [text,attributes] := getMsgInfoFromKey msg -; if attributes then setMsgUnforcedAttrList(msg,aL) -; setMsgText(msg,text) - -(DEFUN |putDatabaseStuff| (|msg|) - (PROG (|attributes| |text| |LETTMP#1|) - (RETURN - (PROGN - (SETQ |LETTMP#1| (|getMsgInfoFromKey| |msg|)) - (SETQ |text| (CAR |LETTMP#1|)) - (SETQ |attributes| (CADR |LETTMP#1|)) - (COND (|attributes| (|setMsgUnforcedAttrList| |msg| |aL|))) - (|setMsgText| |msg| |text|))))) - -;getMsgInfoFromKey msg == -; $msgDatabaseName : local := [] -; msgText := -; msgKey := getMsgKey? msg => --temp oldmsgs use key tostoretext -; dbL := [$erLocMsgDatabaseName,$erGlbMsgDatabaseName] -; getErFromDbL (msgKey,dbL) -; getMsgKey msg --temp oldmsgs -; msgText := segmentKeyedMsg msgText -; [msgText,attributes] := removeAttributes msgText -; msgText := substituteSegmentedMsg(msgText, getMsgArgL msg) -; [msgText,attributes] - -(DEFUN |getMsgInfoFromKey| (|msg|) - (PROG (|$msgDatabaseName| |attributes| |LETTMP#1| |msgText| |dbL| - |msgKey|) - (DECLARE (SPECIAL |$msgDatabaseName| |$erGlbMsgDatabaseName| - |$erLocMsgDatabaseName|)) - (RETURN - (PROGN - (SETQ |$msgDatabaseName| NIL) - (SETQ |msgText| - (COND - ((SETQ |msgKey| (|getMsgKey?| |msg|)) - (PROGN - (SETQ |dbL| - (LIST |$erLocMsgDatabaseName| - |$erGlbMsgDatabaseName|)) - (|getErFromDbL| |msgKey| |dbL|))) - ('T (|getMsgKey| |msg|)))) - (SETQ |msgText| (|segmentKeyedMsg| |msgText|)) - (SETQ |LETTMP#1| (|removeAttributes| |msgText|)) - (SETQ |msgText| (CAR |LETTMP#1|)) - (SETQ |attributes| (CADR |LETTMP#1|)) - (SETQ |msgText| - (|substituteSegmentedMsg| |msgText| (|getMsgArgL| |msg|))) - (LIST |msgText| |attributes|))))) - -;getErFromDbL (erMsgKey,dbL) == -; erMsg := NIL -; while null erMsg repeat -; dbName := CAR dbL -; dbL := CDR dbL -; $msgDatabaseName := dbName -; lastName := null dbL -;-- fileFound := '"co_-eng.msgs" -; fileFound := '"s2_-us.msgs" -; if fileFound or lastName then -; erMsg := fetchKeyedMsg(erMsgKey,not lastName) -; erMsg - -(DEFUN |getErFromDbL| (|erMsgKey| |dbL|) - (PROG (|fileFound| |lastName| |dbName| |erMsg|) - (DECLARE (SPECIAL |$msgDatabaseName|)) - (RETURN - (PROGN - (SETQ |erMsg| NIL) - ((LAMBDA () - (LOOP - (COND - (|erMsg| (RETURN NIL)) - ('T - (PROGN - (SETQ |dbName| (CAR |dbL|)) - (SETQ |dbL| (CDR |dbL|)) - (SETQ |$msgDatabaseName| |dbName|) - (SETQ |lastName| (NULL |dbL|)) - (SETQ |fileFound| "s2-us.msgs") - (COND - ((OR |fileFound| |lastName|) - (SETQ |erMsg| - (|fetchKeyedMsg| |erMsgKey| - (NULL |lastName|))))))))))) - |erMsg|)))) - -;----------------------- -;--%character position marking -; -;processChPosesForOneLine msgList == -; chPosList := posPointers msgList -; for msg in msgList repeat -; if getMsgFTTag? msg then -; putFTText (msg,chPosList) -; posLetter := CDR ASSOC(poCharPosn getMsgPos msg,chPosList) -; oldPre := getMsgPrefix msg -; setMsgPrefix (msg,STRCONC(oldPre,_ -; MAKE_-FULL_-CVEC ($preLength - 4 - SIZE oldPre),posLetter) ) -; leaderMsg := makeLeaderMsg chPosList -; NCONC(msgList,LIST leaderMsg) --a back cons - -(DEFUN |processChPosesForOneLine| (|msgList|) - (PROG (|leaderMsg| |oldPre| |posLetter| |chPosList|) - (DECLARE (SPECIAL |$preLength|)) - (RETURN - (PROGN - (SETQ |chPosList| (|posPointers| |msgList|)) - ((LAMBDA (|bfVar#1| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#1|) - (PROGN (SETQ |msg| (CAR |bfVar#1|)) NIL)) - (RETURN NIL)) - ('T - (PROGN - (COND - ((|getMsgFTTag?| |msg|) - (|putFTText| |msg| |chPosList|))) - (SETQ |posLetter| - (CDR (ASSOC (|poCharPosn| (|getMsgPos| |msg|)) - |chPosList|))) - (SETQ |oldPre| (|getMsgPrefix| |msg|)) - (|setMsgPrefix| |msg| - (STRCONC |oldPre| - (MAKE-FULL-CVEC - (- (- |$preLength| 4) - (SIZE |oldPre|))) - |posLetter|))))) - (SETQ |bfVar#1| (CDR |bfVar#1|)))) - |msgList| NIL) - (SETQ |leaderMsg| (|makeLeaderMsg| |chPosList|)) - (NCONC |msgList| (LIST |leaderMsg|)))))) - -;posPointers msgList == -;--gets all the char posns for msgs on one line -;--associates them with a uppercase letter -; pointers := '"ABCDEFGHIJKLMONPQRS" -; increment := 0 -; posList:= [] -; ftPosList := [] -; for msg in msgList repeat -; pos := poCharPosn getMsgPos msg -; if pos ^= IFCAR posList then -; posList := [pos,:posList] -; if getMsgFTTag = 'FROMTO then -; ftPosList := [poCharPosn getMsgPos2 msg,:ftPosList] -; for toPos in ftPosList repeat -; posList := insertPos(toPos,posList) -; for pos in posList repeat -; posLetterList := [[pos,:pointers.increment],:posLetterList] -; increment := increment + 1 -; posLetterList - -(DEFUN |posPointers| (|msgList|) - (PROG (|posLetterList| |pos| |ftPosList| |posList| |increment| - |pointers|) - (RETURN - (PROGN - (SETQ |pointers| "ABCDEFGHIJKLMONPQRS") - (SETQ |increment| 0) - (SETQ |posList| NIL) - (SETQ |ftPosList| NIL) - ((LAMBDA (|bfVar#2| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#2|) - (PROGN (SETQ |msg| (CAR |bfVar#2|)) NIL)) - (RETURN NIL)) - ('T - (PROGN - (SETQ |pos| (|poCharPosn| (|getMsgPos| |msg|))) - (COND - ((NOT (EQUAL |pos| (IFCAR |posList|))) - (SETQ |posList| (CONS |pos| |posList|)))) - (COND - ((EQ |getMsgFTTag| 'FROMTO) - (SETQ |ftPosList| - (CONS (|poCharPosn| (|getMsgPos2| |msg|)) - |ftPosList|))))))) - (SETQ |bfVar#2| (CDR |bfVar#2|)))) - |msgList| NIL) - ((LAMBDA (|bfVar#3| |toPos|) - (LOOP - (COND - ((OR (ATOM |bfVar#3|) - (PROGN (SETQ |toPos| (CAR |bfVar#3|)) NIL)) - (RETURN NIL)) - ('T (SETQ |posList| (|insertPos| |toPos| |posList|)))) - (SETQ |bfVar#3| (CDR |bfVar#3|)))) - |ftPosList| NIL) - ((LAMBDA (|bfVar#4| |pos|) - (LOOP - (COND - ((OR (ATOM |bfVar#4|) - (PROGN (SETQ |pos| (CAR |bfVar#4|)) NIL)) - (RETURN NIL)) - ('T - (PROGN - (SETQ |posLetterList| - (CONS (CONS |pos| (ELT |pointers| |increment|)) - |posLetterList|)) - (SETQ |increment| (+ |increment| 1))))) - (SETQ |bfVar#4| (CDR |bfVar#4|)))) - |posList| NIL) - |posLetterList|)))) - -;insertPos(newPos,posList) == -;--insersts a position in the proper place of a positon list -;--used for the 2nd pos of a fromto -; done := false -; bot := [0,:posList] -; top := [] -; while not done repeat -; top := [CAR bot,:top] -; bot := CDR bot -; pos := CAR bot -; done := -; pos < newPos => false -; pos = newPos => true -; pos > newPos => -; top := [newPos,:top] -; true -; [CDR reverse top,:bot] - -(DEFUN |insertPos| (|newPos| |posList|) - (PROG (|pos| |top| |bot| |done|) - (RETURN - (PROGN - (SETQ |done| NIL) - (SETQ |bot| (CONS 0 |posList|)) - (SETQ |top| NIL) - ((LAMBDA () - (LOOP - (COND - (|done| (RETURN NIL)) - ('T - (PROGN - (SETQ |top| (CONS (CAR |bot|) |top|)) - (SETQ |bot| (CDR |bot|)) - (SETQ |pos| (CAR |bot|)) - (SETQ |done| - (COND - ((< |pos| |newPos|) NIL) - ((EQUAL |pos| |newPos|) T) - ((< |newPos| |pos|) - (PROGN - (SETQ |top| (CONS |newPos| |top|)) - T)))))))))) - (CONS (CDR (REVERSE |top|)) |bot|))))) - -;putFTText (msg,chPosList) == -; tag := getMsgFTTag? msg -; pos := poCharPosn getMsgPos msg -; charMarker := CDR ASSOC(pos,chPosList) -; tag = 'FROM => -; markingText := ['"(from ",charMarker,'" and on) "] -; setMsgText(msg,[:markingText,:getMsgText msg]) -; tag = 'TO => -; markingText := ['"(up to ",charMarker,'") "] -; setMsgText(msg,[:markingText,:getMsgText msg]) -; tag = 'FROMTO => -; pos2 := poCharPosn getMsgPos2 msg -; charMarker2 := CDR ASSOC(pos2,chPosList) -; markingText := ['"(from ",charMarker,'" up to ",_ -; charMarker2,'") "] -; setMsgText(msg,[:markingText,:getMsgText msg]) - -(DEFUN |putFTText| (|msg| |chPosList|) - (PROG (|charMarker2| |pos2| |markingText| |charMarker| |pos| |tag|) - (RETURN - (PROGN - (SETQ |tag| (|getMsgFTTag?| |msg|)) - (SETQ |pos| (|poCharPosn| (|getMsgPos| |msg|))) - (SETQ |charMarker| (CDR (ASSOC |pos| |chPosList|))) - (COND - ((EQ |tag| 'FROM) - (PROGN - (SETQ |markingText| - (LIST "(from " |charMarker| " and on) ")) - (|setMsgText| |msg| - (APPEND |markingText| (|getMsgText| |msg|))))) - ((EQ |tag| 'TO) - (PROGN - (SETQ |markingText| (LIST "(up to " |charMarker| ") ")) - (|setMsgText| |msg| - (APPEND |markingText| (|getMsgText| |msg|))))) - ((EQ |tag| 'FROMTO) - (PROGN - (SETQ |pos2| (|poCharPosn| (|getMsgPos2| |msg|))) - (SETQ |charMarker2| (CDR (ASSOC |pos2| |chPosList|))) - (SETQ |markingText| - (LIST "(from " |charMarker| " up to " |charMarker2| - ") ")) - (|setMsgText| |msg| - (APPEND |markingText| (|getMsgText| |msg|)))))))))) - -;rep (c,n) == -; n > 0 => -; MAKE_-FULL_-CVEC(n, c) -; '"" - -(DEFUN |rep| (|c| |n|) - (PROG () - (RETURN (COND ((< 0 |n|) (MAKE-FULL-CVEC |n| |c|)) ('T ""))))) - -;--called from parameter list of nc message functions -;From pos == ['FROM, pos] - -(DEFUN |From| (|pos|) (PROG () (RETURN (LIST 'FROM |pos|)))) - -;To pos == ['TO, pos] - -(DEFUN |To| (|pos|) (PROG () (RETURN (LIST 'TO |pos|)))) - -;FromTo (pos1,pos2) == ['FROMTO, pos1, pos2] - -(DEFUN |FromTo| (|pos1| |pos2|) - (PROG () (RETURN (LIST 'FROMTO |pos1| |pos2|)))) - -;------------------------ -;--%processing error lists -;processMsgList (erMsgList,lineList) == -; $outputList :local := []--grows in queueUp errors -; $noRepList :local := []--grows in queueUp errors -; erMsgList := erMsgSort erMsgList -; for line in lineList repeat -; msgLine := makeMsgFromLine line -; $outputList := [msgLine,:$outputList] -; globalNumOfLine := poGlobalLinePosn getMsgPos msgLine -; erMsgList := -; queueUpErrors(globalNumOfLine,erMsgList) -; $outputList := append(erMsgList,$outputList) --the nopos's -; st := '"---------SOURCE-TEXT-&-ERRORS------------------------" -; listOutputter reverse $outputList - -(DEFUN |processMsgList| (|erMsgList| |lineList|) - (PROG (|$noRepList| |$outputList| |st| |globalNumOfLine| |msgLine|) - (DECLARE (SPECIAL |$noRepList| |$outputList|)) - (RETURN - (PROGN - (SETQ |$outputList| NIL) - (SETQ |$noRepList| NIL) - (SETQ |erMsgList| (|erMsgSort| |erMsgList|)) - ((LAMBDA (|bfVar#5| |line|) - (LOOP - (COND - ((OR (ATOM |bfVar#5|) - (PROGN (SETQ |line| (CAR |bfVar#5|)) NIL)) - (RETURN NIL)) - ('T - (PROGN - (SETQ |msgLine| (|makeMsgFromLine| |line|)) - (SETQ |$outputList| (CONS |msgLine| |$outputList|)) - (SETQ |globalNumOfLine| - (|poGlobalLinePosn| (|getMsgPos| |msgLine|))) - (SETQ |erMsgList| - (|queueUpErrors| |globalNumOfLine| |erMsgList|))))) - (SETQ |bfVar#5| (CDR |bfVar#5|)))) - |lineList| NIL) - (SETQ |$outputList| (APPEND |erMsgList| |$outputList|)) - (SETQ |st| - "---------SOURCE-TEXT-&-ERRORS------------------------") - (|listOutputter| (REVERSE |$outputList|)))))) - -;erMsgSort erMsgList == -; [msgWPos,msgWOPos] := erMsgSep erMsgList -; msgWPos := listSort(function erMsgCompare, msgWPos) -; msgWOPos := reverse msgWOPos -; [:msgWPos,:msgWOPos] - -(DEFUN |erMsgSort| (|erMsgList|) - (PROG (|msgWOPos| |msgWPos| |LETTMP#1|) - (RETURN - (PROGN - (SETQ |LETTMP#1| (|erMsgSep| |erMsgList|)) - (SETQ |msgWPos| (CAR |LETTMP#1|)) - (SETQ |msgWOPos| (CADR |LETTMP#1|)) - (SETQ |msgWPos| (|listSort| #'|erMsgCompare| |msgWPos|)) - (SETQ |msgWOPos| (REVERSE |msgWOPos|)) - (APPEND |msgWPos| |msgWOPos|))))) - -;erMsgCompare(ob1,ob2)== -; pos1 := getMsgPos ob1 -; pos2 := getMsgPos ob2 -; compareposns(pos2,pos1) - -(DEFUN |erMsgCompare| (|ob1| |ob2|) - (PROG (|pos2| |pos1|) - (RETURN - (PROGN - (SETQ |pos1| (|getMsgPos| |ob1|)) - (SETQ |pos2| (|getMsgPos| |ob2|)) - (|compareposns| |pos2| |pos1|))))) - -;erMsgSep erMsgList == -; msgWPos := [] -; msgWOPos := [] -; for msg in erMsgList repeat -; if poNopos? getMsgPos msg then -; msgWOPos := [msg,:msgWOPos] -; else -; msgWPos := [msg,:msgWPos] -; [msgWPos,msgWOPos] - -(DEFUN |erMsgSep| (|erMsgList|) - (PROG (|msgWOPos| |msgWPos|) - (RETURN - (PROGN - (SETQ |msgWPos| NIL) - (SETQ |msgWOPos| NIL) - ((LAMBDA (|bfVar#6| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#6|) - (PROGN (SETQ |msg| (CAR |bfVar#6|)) NIL)) - (RETURN NIL)) - ('T - (COND - ((|poNopos?| (|getMsgPos| |msg|)) - (SETQ |msgWOPos| (CONS |msg| |msgWOPos|))) - ('T (SETQ |msgWPos| (CONS |msg| |msgWPos|)))))) - (SETQ |bfVar#6| (CDR |bfVar#6|)))) - |erMsgList| NIL) - (LIST |msgWPos| |msgWOPos|))))) - -;getLinePos line == CAR line - -(DEFUN |getLinePos| (|line|) (PROG () (RETURN (CAR |line|)))) - -;getLineText line == CDR line - -(DEFUN |getLineText| (|line|) (PROG () (RETURN (CDR |line|)))) - -;queueUpErrors(globalNumOfLine,msgList)== -; thisPosMsgs := [] -; notThisLineMsgs := [] -; for msg in msgList _ -; while thisPosIsLess(getMsgPos msg,globalNumOfLine) repeat -; --these are msgs that refer to positions from earlier compilations -; if not redundant (msg,notThisPosMsgs) then -; notThisPosMsgs := [msg,:notThisPosMsgs] -; msgList := rest msgList -; for msg in msgList _ -; while thisPosIsEqual(getMsgPos msg,globalNumOfLine) repeat -; if not redundant (msg,thisPosMsgs) then -; thisPosMsgs := [msg,:thisPosMsgs] -; msgList := rest msgList -; if thisPosMsgs then -; thisPosMsgs := processChPosesForOneLine thisPosMsgs -; $outputList := NCONC(thisPosMsgs,$outputList) -; if notThisPosMsgs then -; $outputList := NCONC(notThisPosMsgs,$outputList) -; msgList - -(DEFUN |queueUpErrors| (|globalNumOfLine| |msgList|) - (PROG (|notThisPosMsgs| |notThisLineMsgs| |thisPosMsgs|) - (DECLARE (SPECIAL |$outputList|)) - (RETURN - (PROGN - (SETQ |thisPosMsgs| NIL) - (SETQ |notThisLineMsgs| NIL) - ((LAMBDA (|bfVar#7| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#7|) - (PROGN (SETQ |msg| (CAR |bfVar#7|)) NIL) - (NOT (|thisPosIsLess| (|getMsgPos| |msg|) - |globalNumOfLine|))) - (RETURN NIL)) - ('T - (PROGN - (COND - ((NULL (|redundant| |msg| |notThisPosMsgs|)) - (SETQ |notThisPosMsgs| - (CONS |msg| |notThisPosMsgs|)))) - (SETQ |msgList| (CDR |msgList|))))) - (SETQ |bfVar#7| (CDR |bfVar#7|)))) - |msgList| NIL) - ((LAMBDA (|bfVar#8| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#8|) - (PROGN (SETQ |msg| (CAR |bfVar#8|)) NIL) - (NOT (|thisPosIsEqual| (|getMsgPos| |msg|) - |globalNumOfLine|))) - (RETURN NIL)) - ('T - (PROGN - (COND - ((NULL (|redundant| |msg| |thisPosMsgs|)) - (SETQ |thisPosMsgs| (CONS |msg| |thisPosMsgs|)))) - (SETQ |msgList| (CDR |msgList|))))) - (SETQ |bfVar#8| (CDR |bfVar#8|)))) - |msgList| NIL) - (COND - (|thisPosMsgs| - (SETQ |thisPosMsgs| - (|processChPosesForOneLine| |thisPosMsgs|)) - (SETQ |$outputList| (NCONC |thisPosMsgs| |$outputList|)))) - (COND - (|notThisPosMsgs| - (SETQ |$outputList| - (NCONC |notThisPosMsgs| |$outputList|)))) - |msgList|)))) - -;redundant(msg,thisPosMsgs) == -; found := NIL -; if msgNoRep? msg then -; for item in $noRepList repeat -; sameMsg?(msg,item) => return (found := true) -; $noRepList := [msg,$noRepList] -; found or MEMBER(msg,thisPosMsgs) - -(DEFUN |redundant| (|msg| |thisPosMsgs|) - (PROG (|found|) - (DECLARE (SPECIAL |$noRepList|)) - (RETURN - (PROGN - (SETQ |found| NIL) - (COND - ((|msgNoRep?| |msg|) - ((LAMBDA (|bfVar#9| |item|) - (LOOP - (COND - ((OR (ATOM |bfVar#9|) - (PROGN (SETQ |item| (CAR |bfVar#9|)) NIL)) - (RETURN NIL)) - ('T - (COND - ((|sameMsg?| |msg| |item|) - (IDENTITY (RETURN (SETQ |found| T))))))) - (SETQ |bfVar#9| (CDR |bfVar#9|)))) - |$noRepList| NIL) - (SETQ |$noRepList| (LIST |msg| |$noRepList|)))) - (OR |found| (MEMBER |msg| |thisPosMsgs|)))))) - -;sameMsg? (msg1,msg2) == -; (getMsgKey msg1 = getMsgKey msg2) and _ -; (getMsgArgL msg1 = getMsgArgL msg2) -; - -(DEFUN |sameMsg?| (|msg1| |msg2|) - (PROG () - (RETURN - (AND (EQUAL (|getMsgKey| |msg1|) (|getMsgKey| |msg2|)) - (EQUAL (|getMsgArgL| |msg1|) (|getMsgArgL| |msg2|)))))) - -;thisPosIsLess(pos,num) == -; poNopos? pos => NIL -; poGlobalLinePosn pos < num - -(DEFUN |thisPosIsLess| (|pos| |num|) - (PROG () - (RETURN - (COND - ((|poNopos?| |pos|) NIL) - ('T (< (|poGlobalLinePosn| |pos|) |num|)))))) - -;thisPosIsEqual(pos,num) == -; poNopos? pos => NIL -; poGlobalLinePosn pos = num - -(DEFUN |thisPosIsEqual| (|pos| |num|) - (PROG () - (RETURN - (COND - ((|poNopos?| |pos|) NIL) - ('T (EQUAL (|poGlobalLinePosn| |pos|) |num|)))))) - -;--%outputting stuff -; -;listOutputter outputList == -; for msg in outputList repeat -; msgOutputter msg - -(DEFUN |listOutputter| (|outputList|) - (PROG () - (RETURN - ((LAMBDA (|bfVar#10| |msg|) - (LOOP - (COND - ((OR (ATOM |bfVar#10|) - (PROGN (SETQ |msg| (CAR |bfVar#10|)) NIL)) - (RETURN NIL)) - ('T (|msgOutputter| |msg|))) - (SETQ |bfVar#10| (CDR |bfVar#10|)))) - |outputList| NIL)))) - -;msgOutputter msg == -; st := getStFromMsg msg -; shouldFlow := not (leader? msg or line? msg) -; if toScreen? msg then -; if shouldFlow then -; st := flowSegmentedMsg(st,$LINELENGTH,0) -; sayBrightly st -; if toFile? msg then -; if shouldFlow then -; st := flowSegmentedMsg(st,$LOGLENGTH,0) -; alreadyOpened := alreadyOpened? msg - -(DEFUN |msgOutputter| (|msg|) - (PROG (|alreadyOpened| |shouldFlow| |st|) - (DECLARE (SPECIAL $LOGLENGTH $LINELENGTH)) - (RETURN - (PROGN - (SETQ |st| (|getStFromMsg| |msg|)) - (SETQ |shouldFlow| - (NULL (OR (|leader?| |msg|) (|line?| |msg|)))) - (COND - ((|toScreen?| |msg|) - (COND - (|shouldFlow| - (SETQ |st| (|flowSegmentedMsg| |st| $LINELENGTH 0)))) - (|sayBrightly| |st|))) - (COND - ((|toFile?| |msg|) - (COND - (|shouldFlow| - (SETQ |st| (|flowSegmentedMsg| |st| $LOGLENGTH 0)))) - (SETQ |alreadyOpened| (|alreadyOpened?| |msg|)))))))) - -;toScreen? msg == getMsgToWhere msg ^= 'fileOnly - -(DEFUN |toScreen?| (|msg|) - (PROG () (RETURN (NOT (EQ (|getMsgToWhere| |msg|) '|fileOnly|))))) - -;toFile? msg == -; PAIRP $fn and _ -; getMsgToWhere msg ^= 'screenOnly - -(DEFUN |toFile?| (|msg|) - (PROG () - (DECLARE (SPECIAL |$fn|)) - (RETURN - (AND (CONSP |$fn|) - (NOT (EQ (|getMsgToWhere| |msg|) '|screenOnly|)))))) - -;alreadyOpened? msg == -; not msgImPr? msg - -(DEFUN |alreadyOpened?| (|msg|) - (PROG () (RETURN (NULL (|msgImPr?| |msg|))))) - -;getStFromMsg msg == -; $optKeyBlanks : local := '"" --set in setOptKeyBlanks() -; setOptKeyBlanks() -; preStL := getPreStL getMsgPrefix? msg -; getMsgTag msg = 'line => -; [$optKeyBlanks, '"%x1" , :preStL,_ -; getMsgText msg] -; posStL := getPosStL msg -; optKey := -; $showKeyNum => -; msgKey := getMsgKey? msg => PNAME msgKey -; '"no key " -; '"" -; st :=[posStL,getMsgLitSym msg,_ -; optKey,:preStL,_ -; tabbing msg,:getMsgText msg] - -(DEFUN |getStFromMsg| (|msg|) - (PROG (|$optKeyBlanks| |st| |optKey| |msgKey| |posStL| |preStL|) - (DECLARE (SPECIAL |$showKeyNum| |$optKeyBlanks|)) - (RETURN - (PROGN - (SETQ |$optKeyBlanks| "") - (|setOptKeyBlanks|) - (SETQ |preStL| (|getPreStL| (|getMsgPrefix?| |msg|))) - (COND - ((EQ (|getMsgTag| |msg|) '|line|) - (CONS |$optKeyBlanks| - (CONS "%x1" - (APPEND |preStL| - (CONS (|getMsgText| |msg|) NIL))))) - ('T - (PROGN - (SETQ |posStL| (|getPosStL| |msg|)) - (SETQ |optKey| - (COND - (|$showKeyNum| - (COND - ((SETQ |msgKey| (|getMsgKey?| |msg|)) - (PNAME |msgKey|)) - ('T "no key "))) - ('T ""))) - (SETQ |st| - (CONS |posStL| - (CONS (|getMsgLitSym| |msg|) - (CONS |optKey| - (APPEND |preStL| - (CONS (|tabbing| |msg|) - (|getMsgText| |msg|)))))))))))))) - -;tabbing msg == -; chPos := 2 -; if getMsgPrefix? msg then -; chPos := chPos + $preLength - 1 -; if $showKeyNum then chPos := chPos + 8 -; ["%t",:chPos] - -(DEFUN |tabbing| (|msg|) - (PROG (|chPos|) - (DECLARE (SPECIAL |$showKeyNum| |$preLength|)) - (RETURN - (PROGN - (SETQ |chPos| 2) - (COND - ((|getMsgPrefix?| |msg|) - (SETQ |chPos| (- (+ |chPos| |$preLength|) 1)))) - (COND (|$showKeyNum| (SETQ |chPos| (+ |chPos| 8)))) - (CONS '|%t| |chPos|))))) - -;setOptKeyBlanks() == -; $optKeyBlanks := -; $showKeyNum => '"%x8" -; '"" - -(DEFUN |setOptKeyBlanks| () - (PROG () - (DECLARE (SPECIAL |$optKeyBlanks| |$showKeyNum|)) - (RETURN - (SETQ |$optKeyBlanks| (COND (|$showKeyNum| "%x8") ('T "")))))) - -;getPosStL msg == -; not showMsgPos? msg => '"" -; msgPos := getMsgPos msg -; howMuch := -; msgImPr? msg => -; decideHowMuch (msgPos,$lastPos) -; listDecideHowMuch (msgPos,$lastPos) -; $lastPos := msgPos -; fullPrintedPos := ppos msgPos -; printedFileName := ['"%x2",'"[",:remLine fullPrintedPos,'"]" ] -; printedLineNum := ['"%x2",'"[",:remFile fullPrintedPos,'"]" ] -; printedOrigin := ['"%x2",'"[",:fullPrintedPos,'"]" ] -; howMuch = 'ORG => [$optKeyBlanks,:printedOrigin, '%l] -; howMuch = 'LINE => [$optKeyBlanks,:printedLineNum, '%l] -; howMuch = 'FILE => [$optKeyBlanks,:printedFileName, '%l] -; howMuch = 'ALL => [$optKeyBlanks,:printedFileName, '%l,_ -; $optKeyBlanks,:printedLineNum, '%l] -; '"" - -(DEFUN |getPosStL| (|msg|) - (PROG (|printedOrigin| |printedLineNum| |printedFileName| - |fullPrintedPos| |howMuch| |msgPos|) - (DECLARE (SPECIAL |$optKeyBlanks| |$lastPos|)) - (RETURN - (COND - ((NULL (|showMsgPos?| |msg|)) "") - ('T - (PROGN - (SETQ |msgPos| (|getMsgPos| |msg|)) - (SETQ |howMuch| - (COND - ((|msgImPr?| |msg|) - (|decideHowMuch| |msgPos| |$lastPos|)) - ('T (|listDecideHowMuch| |msgPos| |$lastPos|)))) - (SETQ |$lastPos| |msgPos|) - (SETQ |fullPrintedPos| (|ppos| |msgPos|)) - (SETQ |printedFileName| - (CONS "%x2" - (CONS "[" - (APPEND (|remLine| |fullPrintedPos|) - (CONS "]" NIL))))) - (SETQ |printedLineNum| - (CONS "%x2" - (CONS "[" - (APPEND (|remFile| |fullPrintedPos|) - (CONS "]" NIL))))) - (SETQ |printedOrigin| - (CONS "%x2" - (CONS "[" - (APPEND |fullPrintedPos| (CONS "]" NIL))))) - (COND - ((EQ |howMuch| 'ORG) - (CONS |$optKeyBlanks| - (APPEND |printedOrigin| (CONS '|%l| NIL)))) - ((EQ |howMuch| 'LINE) - (CONS |$optKeyBlanks| - (APPEND |printedLineNum| (CONS '|%l| NIL)))) - ((EQ |howMuch| 'FILE) - (CONS |$optKeyBlanks| - (APPEND |printedFileName| (CONS '|%l| NIL)))) - ((EQ |howMuch| 'ALL) - (CONS |$optKeyBlanks| - (APPEND |printedFileName| - (CONS '|%l| - (CONS |$optKeyBlanks| - (APPEND |printedLineNum| - (CONS '|%l| NIL))))))) - ('T "")))))))) - -;showMsgPos? msg == -; $erMsgToss or (not msgImPr? msg and not msgLeader? msg) - -(DEFUN |showMsgPos?| (|msg|) - (PROG () - (DECLARE (SPECIAL |$erMsgToss|)) - (RETURN - (OR |$erMsgToss| - (AND (NULL (|msgImPr?| |msg|)) (NULL (|msgLeader?| |msg|))))))) - -;remFile positionList == -; IFCDR IFCDR positionList - -(DEFUN |remFile| (|positionList|) - (PROG () (RETURN (IFCDR (IFCDR |positionList|))))) - -;remLine positionList == -; [IFCAR positionList] - -(DEFUN |remLine| (|positionList|) - (PROG () (RETURN (LIST (IFCAR |positionList|))))) - -;decideHowMuch(pos,oldPos) == -;--when printing a msg, we wish not to show pos infor that was -;--shown for a previous msg with identical pos info. -;--org prints out the word noposition or console -; ((poNopos? pos) and (poNopos? oldPos)) or _ -; ((poPosImmediate? pos) and (poPosImmediate? oldPos)) => 'NONE -; (poNopos? pos) or (poPosImmediate? pos) => 'ORG -; (poNopos? oldPos) or (poPosImmediate? oldPos) => 'ALL -; poFileName oldPos ^= poFileName pos => 'ALL -; poLinePosn oldPos ^= poLinePosn pos => 'LINE -; 'NONE - -(DEFUN |decideHowMuch| (|pos| |oldPos|) - (PROG () - (RETURN - (COND - ((OR (AND (|poNopos?| |pos|) (|poNopos?| |oldPos|)) - (AND (|poPosImmediate?| |pos|) - (|poPosImmediate?| |oldPos|))) - 'NONE) - ((OR (|poNopos?| |pos|) (|poPosImmediate?| |pos|)) 'ORG) - ((OR (|poNopos?| |oldPos|) (|poPosImmediate?| |oldPos|)) 'ALL) - ((NOT (EQUAL (|poFileName| |oldPos|) (|poFileName| |pos|))) - 'ALL) - ((NOT (EQUAL (|poLinePosn| |oldPos|) (|poLinePosn| |pos|))) - 'LINE) - ('T 'NONE))))) - -;listDecideHowMuch(pos,oldPos) == -; ((poNopos? pos) and (poNopos? oldPos)) or _ -; ((poPosImmediate? pos) and (poPosImmediate? oldPos)) => 'NONE -; (poNopos? pos) => 'ORG -; (poNopos? oldPos) => 'NONE -; poGlobalLinePosn pos < poGlobalLinePosn oldPos => -; poPosImmediate? pos => 'ORG -; 'LINE -; --(poNopos? pos) or (poPosImmediate? pos) => 'ORG -; 'NONE - -(DEFUN |listDecideHowMuch| (|pos| |oldPos|) - (PROG () - (RETURN - (COND - ((OR (AND (|poNopos?| |pos|) (|poNopos?| |oldPos|)) - (AND (|poPosImmediate?| |pos|) - (|poPosImmediate?| |oldPos|))) - 'NONE) - ((|poNopos?| |pos|) 'ORG) - ((|poNopos?| |oldPos|) 'NONE) - ((< (|poGlobalLinePosn| |pos|) (|poGlobalLinePosn| |oldPos|)) - (COND ((|poPosImmediate?| |pos|) 'ORG) ('T 'LINE))) - ('T 'NONE))))) - -;getPreStL optPre == -; null optPre => [MAKE_-FULL_-CVEC 2] -; spses := -; (extraPlaces := ($preLength - (SIZE optPre) - 3)) > 0 => -; MAKE_-FULL_-CVEC extraPlaces -; '"" -; ['%b, optPre,spses,'":", '%d] - -(DEFUN |getPreStL| (|optPre|) - (PROG (|spses| |extraPlaces|) - (DECLARE (SPECIAL |$preLength|)) - (RETURN - (COND - ((NULL |optPre|) (LIST (MAKE-FULL-CVEC 2))) - ('T - (PROGN - (SETQ |spses| - (COND - ((< 0 - (SETQ |extraPlaces| - (- (- |$preLength| (SIZE |optPre|)) 3))) - (MAKE-FULL-CVEC |extraPlaces|)) - ('T ""))) - (LIST '|%b| |optPre| |spses| ":" '|%d|))))))) - -;------------------- -;--% a-list stuff -;desiredMsg (erMsgKey,:optCatFlag) == -; isKeyQualityP(erMsgKey,'show) => true -; isKeyQualityP(erMsgKey,'stifle) => false -; not null optCatFlag => CAR optCatFlag -; true - -(DEFUN |desiredMsg| (|erMsgKey| &REST |optCatFlag|) - (PROG () - (RETURN - (COND - ((|isKeyQualityP| |erMsgKey| '|show|) T) - ((|isKeyQualityP| |erMsgKey| '|stifle|) NIL) - ((NULL (NULL |optCatFlag|)) (CAR |optCatFlag|)) - ('T T))))) - -;isKeyQualityP (key,qual) == -; --returns pair if found, else NIL -; found := false -; while not found and (qualPair := ASSOC(key,$specificMsgTags)) repeat -; if CDR qualPair = qual then found := true -; qualPair - -(DEFUN |isKeyQualityP| (|key| |qual|) - (PROG (|qualPair| |found|) - (DECLARE (SPECIAL |$specificMsgTags|)) - (RETURN - (PROGN - (SETQ |found| NIL) - ((LAMBDA () - (LOOP - (COND - ((NOT (AND (NULL |found|) - (SETQ |qualPair| - (ASSOC |key| |$specificMsgTags|)))) - (RETURN NIL)) - ('T - (COND - ((EQUAL (CDR |qualPair|) |qual|) (SETQ |found| T)))))))) - |qualPair|)))) - -;----------------------------- -;--% these functions handle the attributes -; -;initImPr msg == -; $erMsgToss or MEMQ (getMsgTag msg,$imPrTagGuys) => -; setMsgUnforcedAttr (msg,'$imPrGuys,'imPr) - -(DEFUN |initImPr| (|msg|) - (PROG () - (DECLARE (SPECIAL |$imPrTagGuys| |$erMsgToss|)) - (RETURN - (COND - ((OR |$erMsgToss| (MEMQ (|getMsgTag| |msg|) |$imPrTagGuys|)) - (IDENTITY (|setMsgUnforcedAttr| |msg| '|$imPrGuys| '|imPr|))))))) - -;initToWhere msg == -; MEMBER ('trace,getMsgCatAttr (msg,'catless)) => -; setMsgUnforcedAttr (msg,'$toWhereGuys,'screenOnly) - -(DEFUN |initToWhere| (|msg|) - (PROG () - (RETURN - (COND - ((MEMBER '|trace| (|getMsgCatAttr| |msg| '|catless|)) - (IDENTITY - (|setMsgUnforcedAttr| |msg| '|$toWhereGuys| '|screenOnly|))))))) - -;msgImPr? msg == -; (getMsgCatAttr (msg,'$imPrGuys) = 'imPr) - -(DEFUN |msgImPr?| (|msg|) - (PROG () (RETURN (EQ (|getMsgCatAttr| |msg| '|$imPrGuys|) '|imPr|)))) - -;msgNoRep? msg == -; (getMsgCatAttr (msg,'$repGuys) = 'noRep) - -(DEFUN |msgNoRep?| (|msg|) - (PROG () (RETURN (EQ (|getMsgCatAttr| |msg| '|$repGuys|) '|noRep|)))) - -;msgLeader? msg == -; getMsgTag msg = 'leader - -(DEFUN |msgLeader?| (|msg|) - (PROG () (RETURN (EQ (|getMsgTag| |msg|) '|leader|)))) - -;getMsgToWhere msg == -; getMsgCatAttr (msg,'$toWhereGuys) - -(DEFUN |getMsgToWhere| (|msg|) - (PROG () (RETURN (|getMsgCatAttr| |msg| '|$toWhereGuys|)))) - -;getMsgCatAttr (msg,cat) == -; IFCDR QASSQ(cat, ncAlist msg) - -(DEFUN |getMsgCatAttr| (|msg| |cat|) - (PROG () (RETURN (IFCDR (QASSQ |cat| (|ncAlist| |msg|)))))) - -;setMsgForcedAttrList (msg,aL) == -; for attr in aL repeat -; setMsgForcedAttr(msg,whichCat attr,attr) - -(DEFUN |setMsgForcedAttrList| (|msg| |aL|) - (PROG () - (RETURN - ((LAMBDA (|bfVar#11| |attr|) - (LOOP - (COND - ((OR (ATOM |bfVar#11|) - (PROGN (SETQ |attr| (CAR |bfVar#11|)) NIL)) - (RETURN NIL)) - ('T (|setMsgForcedAttr| |msg| (|whichCat| |attr|) |attr|))) - (SETQ |bfVar#11| (CDR |bfVar#11|)))) - |aL| NIL)))) - -;setMsgUnforcedAttrList (msg,aL) == -; for attr in aL repeat -; setMsgUnforcedAttr(msg,whichCat attr,attr) - -(DEFUN |setMsgUnforcedAttrList| (|msg| |aL|) - (PROG () - (RETURN - ((LAMBDA (|bfVar#12| |attr|) - (LOOP - (COND - ((OR (ATOM |bfVar#12|) - (PROGN (SETQ |attr| (CAR |bfVar#12|)) NIL)) - (RETURN NIL)) - ('T - (|setMsgUnforcedAttr| |msg| (|whichCat| |attr|) |attr|))) - (SETQ |bfVar#12| (CDR |bfVar#12|)))) - |aL| NIL)))) - -;setMsgForcedAttr(msg,cat,attr) == -; cat = 'catless => setMsgCatlessAttr(msg,attr) -; ncPutQ(msg,cat,attr) - -(DEFUN |setMsgForcedAttr| (|msg| |cat| |attr|) - (PROG () - (RETURN - (COND - ((EQ |cat| '|catless|) (|setMsgCatlessAttr| |msg| |attr|)) - ('T (|ncPutQ| |msg| |cat| |attr|)))))) - -;setMsgUnforcedAttr(msg,cat,attr) == -; cat = 'catless => setMsgCatlessAttr(msg,attr) -; not QASSQ(cat, ncAlist msg) => ncPutQ(msg,cat,attr) - -(DEFUN |setMsgUnforcedAttr| (|msg| |cat| |attr|) - (PROG () - (RETURN - (COND - ((EQ |cat| '|catless|) (|setMsgCatlessAttr| |msg| |attr|)) - ((NULL (QASSQ |cat| (|ncAlist| |msg|))) - (|ncPutQ| |msg| |cat| |attr|)))))) - -;setMsgCatlessAttr(msg,attr) == -; ncPutQ(msg,catless,CONS (attr, IFCDR QASSQ(catless, ncAlist msg))) - -(DEFUN |setMsgCatlessAttr| (|msg| |attr|) - (PROG () - (RETURN - (|ncPutQ| |msg| |catless| - (CONS |attr| (IFCDR (QASSQ |catless| (|ncAlist| |msg|)))))))) - -;whichCat attr == -; found := 'catless -; for cat in $attrCats repeat -; if ListMember? (attr,EVAL cat) then -; found := cat -; return found -; found - -(DEFUN |whichCat| (|attr|) - (PROG (|found|) - (DECLARE (SPECIAL |$attrCats|)) - (RETURN - (PROGN - (SETQ |found| '|catless|) - ((LAMBDA (|bfVar#13| |cat|) - (LOOP - (COND - ((OR (ATOM |bfVar#13|) - (PROGN (SETQ |cat| (CAR |bfVar#13|)) NIL)) - (RETURN NIL)) - ('T - (COND - ((|ListMember?| |attr| (EVAL |cat|)) - (SETQ |found| |cat|) (RETURN |found|))))) - (SETQ |bfVar#13| (CDR |bfVar#13|)))) - |$attrCats| NIL) - |found|)))) - -;-------------------------------------- -;--% these functions directly interact with the message object -; -;makeLeaderMsg chPosList == -; st := MAKE_-FULL_-CVEC ($preLength- 3) -; oldPos := -1 -; for [posNum,:posLetter] in reverse chPosList repeat -; st := STRCONC(st, _ -; rep(char ".", (posNum - oldPos - 1)),posLetter) -; oldPos := posNum -; ['leader,$nopos,'nokey,NIL,NIL,[st]] - -(DEFUN |makeLeaderMsg| (|chPosList|) - (PROG (|posLetter| |posNum| |oldPos| |st|) - (DECLARE (SPECIAL |$nopos| |$preLength|)) - (RETURN - (PROGN - (SETQ |st| (MAKE-FULL-CVEC (- |$preLength| 3))) - (SETQ |oldPos| (- 1)) - ((LAMBDA (|bfVar#15| |bfVar#14|) - (LOOP - (COND - ((OR (ATOM |bfVar#15|) - (PROGN (SETQ |bfVar#14| (CAR |bfVar#15|)) NIL)) - (RETURN NIL)) - ('T - (AND (CONSP |bfVar#14|) - (PROGN - (SETQ |posNum| (CAR |bfVar#14|)) - (SETQ |posLetter| (CDR |bfVar#14|)) - 'T) - (PROGN - (SETQ |st| - (STRCONC |st| - (|rep| (|char| '|.|) - (- (- |posNum| |oldPos|) 1)) - |posLetter|)) - (SETQ |oldPos| |posNum|))))) - (SETQ |bfVar#15| (CDR |bfVar#15|)))) - (REVERSE |chPosList|) NIL) - (LIST '|leader| |$nopos| '|nokey| NIL NIL (LIST |st|)))))) - -;makeMsgFromLine line == -; posOfLine := getLinePos line -; textOfLine := getLineText line -; globalNumOfLine := poGlobalLinePosn posOfLine -; localNumOfLine := -; i := poLinePosn posOfLine -; stNum := STRINGIMAGE i -; STRCONC(rep(char " ", ($preLength - 7 - SIZE stNum)),_ -; stNum) -; ['line,posOfLine,NIL,NIL, STRCONC('"Line", localNumOfLine),_ -; textOfLine] - -(DEFUN |makeMsgFromLine| (|line|) - (PROG (|localNumOfLine| |stNum| |i| |globalNumOfLine| |textOfLine| - |posOfLine|) - (DECLARE (SPECIAL |$preLength|)) - (RETURN - (PROGN - (SETQ |posOfLine| (|getLinePos| |line|)) - (SETQ |textOfLine| (|getLineText| |line|)) - (SETQ |globalNumOfLine| (|poGlobalLinePosn| |posOfLine|)) - (SETQ |localNumOfLine| - (PROGN - (SETQ |i| (|poLinePosn| |posOfLine|)) - (SETQ |stNum| (STRINGIMAGE |i|)) - (STRCONC (|rep| (|char| '| |) - (- (- |$preLength| 7) (SIZE |stNum|))) - |stNum|))) - (LIST '|line| |posOfLine| NIL NIL - (STRCONC "Line" |localNumOfLine|) |textOfLine|))))) - -;getMsgTag msg == ncTag msg - -(DEFUN |getMsgTag| (|msg|) (PROG () (RETURN (|ncTag| |msg|)))) - -;getMsgTag? msg == -; IFCAR MEMBER (getMsgTag msg,_ -; ['line,'old,'error,'warn,'bug,'unimple,'remark,'stat,'say,'debug]) -; -(DEFUN |getMsgTag?| (|msg|) - (PROG () - (RETURN - (IFCAR (MEMBER (|getMsgTag| |msg|) - (LIST '|line| '|old| '|error| '|warn| '|bug| - '|unimple| '|remark| '|stat| '|say| - '|debug|)))))) - -;leader? msg == getMsgTag msg = 'leader - -(DEFUN |leader?| (|msg|) - (PROG () (RETURN (EQ (|getMsgTag| |msg|) '|leader|)))) - -;line? msg == getMsgTag msg = 'line - -(DEFUN |line?| (|msg|) - (PROG () (RETURN (EQ (|getMsgTag| |msg|) '|line|)))) - -;getMsgPosTagOb msg == msg.1 - -(DEFUN |getMsgPosTagOb| (|msg|) (PROG () (RETURN (ELT |msg| 1)))) - -;getMsgPos msg == -; getMsgFTTag? msg => CADR getMsgPosTagOb msg -; getMsgPosTagOb msg - -(DEFUN |getMsgPos| (|msg|) - (PROG () - (RETURN - (COND - ((|getMsgFTTag?| |msg|) (CADR (|getMsgPosTagOb| |msg|))) - ('T (|getMsgPosTagOb| |msg|)))))) - -;getMsgPos2 msg == -; getMsgFTTag? msg => CADDR getMsgPosTagOb msg -; ncBug('"not a from to",[]) - -(DEFUN |getMsgPos2| (|msg|) - (PROG () - (RETURN - (COND - ((|getMsgFTTag?| |msg|) (CADDR (|getMsgPosTagOb| |msg|))) - ('T (|ncBug| "not a from to" NIL)))))) - -;getMsgFTTag? msg == IFCAR MEMBER (IFCAR getMsgPosTagOb msg,_ -; ['FROM,'TO,'FROMTO]) - -(DEFUN |getMsgFTTag?| (|msg|) - (PROG () - (RETURN - (IFCAR (MEMBER (IFCAR (|getMsgPosTagOb| |msg|)) - (LIST 'FROM 'TO 'FROMTO)))))) - -;getMsgKey msg == msg.2 - -(DEFUN |getMsgKey| (|msg|) (PROG () (RETURN (ELT |msg| 2)))) - -;getMsgKey? msg == IDENTP (val := getMsgKey msg) => val - -(DEFUN |getMsgKey?| (|msg|) - (PROG (|val|) - (RETURN - (COND - ((IDENTP (SETQ |val| (|getMsgKey| |msg|))) (IDENTITY |val|)))))) - -;getMsgArgL msg == msg.3 - -(DEFUN |getMsgArgL| (|msg|) (PROG () (RETURN (ELT |msg| 3)))) - -;getMsgPrefix? msg == -; (pre := msg.4) = 'noPre => NIL -; pre - -(DEFUN |getMsgPrefix?| (|msg|) - (PROG (|pre|) - (RETURN - (COND ((EQ (SETQ |pre| (ELT |msg| 4)) '|noPre|) NIL) ('T |pre|))))) - -;getMsgPrefix msg == msg.4 - -(DEFUN |getMsgPrefix| (|msg|) (PROG () (RETURN (ELT |msg| 4)))) - -;getMsgLitSym msg == -; getMsgKey? msg => '" " -; '"*" - -(DEFUN |getMsgLitSym| (|msg|) - (PROG () (RETURN (COND ((|getMsgKey?| |msg|) " ") ('T "*"))))) - -;getMsgText msg == msg.5 - -(DEFUN |getMsgText| (|msg|) (PROG () (RETURN (ELT |msg| 5)))) - -;setMsgPrefix (msg,val) == msg.4 := val - -(DEFUN |setMsgPrefix| (|msg| |val|) - (PROG () (RETURN (SETF (ELT |msg| 4) |val|)))) - -;setMsgText (msg,val) == msg.5 := val - -(DEFUN |setMsgText| (|msg| |val|) - (PROG () (RETURN (SETF (ELT |msg| 5) |val|)))) - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/sys-pkg.lisp.pamphlet b/src/interp/sys-pkg.lisp.pamphlet index 7064101..16d9c60 100644 --- a/src/interp/sys-pkg.lisp.pamphlet +++ b/src/interp/sys-pkg.lisp.pamphlet @@ -603,19 +603,6 @@ provides support for compiler code. (in-package "BOOT") (lisp:export '(boot::ncloop boot::ncrecover)) (lisp:import '(vmlisp::make-input-filename vmlisp::is-console)) -;; (lisp:import '(boot::|openServer|)) -;; (lisp:import '(boot::|sockGetInt|)) -;; (lisp:import '(boot::|sockSendInt|)) -;; (lisp:import '(boot::|sockGetInts|)) -;; (lisp:import '(boot::|sockSendInts|)) -;; (lisp:import '(boot::|sockGetString|)) -;; (lisp:import '(boot::|sockSendString|)) -;; (lisp:import '(boot::|sockGetFloat|)) -;; (lisp:import '(boot::|sockSendFloat|)) -;; (lisp:import '(boot::|sockGetFloats|)) -;; (lisp:import '(boot::|sockSendFloats|)) -;; (lisp:import '(boot::|sockSendWakeup|)) -;; (lisp:import '(boot::|sockSendSignal|)) (lisp:import '(vmlisp::qsdifference)) (lisp:import '(vmlisp::qsminusp)) (lisp:import '(vmlisp::qsplus)) @@ -640,8 +627,7 @@ provides support for compiler code. (lisp:import '(vmlisp::make-cvec)) (lisp:import '(vmlisp::make-full-cvec)) (lisp:import '(vmlisp::make-vec)) -#-(or :lispm :lucid) (lisp:import '(vmlisp::memq)) -#+(and :lucid (not :ibm/370)) (lisp:import '(system:memq)) +(lisp:import '(vmlisp::memq)) (lisp:import '(vmlisp::movevec)) (lisp:import '(vmlisp::pname)) (lisp:import '(vmlisp::prettyprin0)) @@ -707,7 +693,6 @@ provides support for compiler code. (lisp:import '(vmlisp::strpos)) (lisp:import '(vmlisp::strposl)) (lisp:import '(vmlisp::substring)) -;; (lisp:import '(boot::|error|)) (lisp:import '(vmlisp::ivecp)) (lisp:import '(vmlisp::rvecp)) (lisp:import '(vmlisp::dig2fix)) @@ -724,7 +709,6 @@ provides support for compiler code. (lisp:import '(vmlisp::neq)) (lisp:import '(vmlisp::hashtable-class)) (lisp:import '(vmlisp::maxindex)) -;; (lisp:import '(boot::remdup)) (lisp:import '(vmlisp::upcase)) (lisp:import '(vmlisp::downcase)) (lisp:import '(vmlisp::vecp)) @@ -732,10 +716,6 @@ provides support for compiler code. (lisp:import '(vmlisp::defiostream)) (lisp:import '(vmlisp::shut)) (lisp:import '(vmlisp::prin2cvec)) -;; (lisp:import '(boot::lasttail)) -;; (lisp:import '(boot::lastpair)) -;; (lisp:import '(boot::lastatom)) -;; (lisp:import '(boot::|last|)) (lisp:import '(vmlisp::ncons)) (lisp:import '(vmlisp::rplpair)) (lisp:import '(vmlisp::nump)) @@ -756,22 +736,12 @@ provides support for compiler code. (lisp:import '(vmlisp::id)) (lisp:import '(vmlisp::vec-setelt)) (lisp:import '(vmlisp::make-bvec)) -;; (lisp:import '(boot::bvec-make-full)) -;; (lisp:import '(boot::bvec-setelt)) (lisp:import '(vmlisp::|shoeread-line|)) (lisp:import '(vmlisp::|shoeInputFile|)) (lisp:import '(vmlisp::|shoeConsole|)) (lisp:import '(vmlisp::|startsId?|)) -(lisp:import '(vmlisp::|idChar?|)) (lisp:import '(vmlisp::|npPC|)) (lisp:import '(vmlisp::|npPP|)) -;; (lisp:import '(boot::mkprompt)) -;; (lisp:import '(boot::|fillerSpaces|)) -;; (lisp:import '(boot::|sayString|)) -;; (lisp:import '(boot::help)) -;; (lisp:import '(boot::|version|)) -;; (lisp:import '(boot::|pp|)) -;; (lisp:import '(boot::$dalymode)) (lisp:import 'boot::$IEEE) diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 3c4c99b..63694d8 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -154,9 +154,6 @@ documentclass{article} (eql (the fixnum ,gx) (the fixnum ,gy))) ((eql (the integer ,gx) (the integer,gy)))))))) -(defmacro |idChar?| (x) - `(or (alphanumericp ,x) (member ,x '(#\? #\% #\' #\!) :test #'char=))) - (defmacro ifcar (x) (if (atom x) `(and (consp ,x) (qcar ,x))