aboutsummaryrefslogtreecommitdiff
path: root/src/interp/debug.lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-06-07 04:02:54 +0000
committerdos-reis <gdr@axiomatics.org>2012-06-07 04:02:54 +0000
commitd03a3c6cb297be5f5b7726c2f346075d41faad1d (patch)
treeced95206d3aa122ce08b03c870f584c8be66be69 /src/interp/debug.lisp
parenta4b48cade8c5a9ae034cfd1cfcd21739bcab7ce5 (diff)
downloadopen-axiom-d03a3c6cb297be5f5b7726c2f346075d41faad1d.tar.gz
* interp/lexing.boot: Move %Line to io.boot.
* interp/debug.lisp (SPAD_LONG_ERROR): Take a reader parameter. Tidy.
Diffstat (limited to 'src/interp/debug.lisp')
-rw-r--r--src/interp/debug.lisp27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp
index e0231e65..2b3205ab 100644
--- a/src/interp/debug.lisp
+++ b/src/interp/debug.lisp
@@ -1130,19 +1130,36 @@ EXAMINE (SETQ RECNO (NOTE |$InputStream|))
"Print syntax error indication, underline character, scrub line."
(BUMPERRORCOUNT '|syntax|)
(COND ((AND (EQ DEBUGMODE 'YES) (NOT(CONSOLEINPUTP IN-STREAM)))
- (SPAD_LONG_ERROR))
- ((SPAD_SHORT_ERROR)))
+ (SPAD_LONG_ERROR rd))
+ ((SPAD_SHORT_ERROR rd)))
(|ioClear!| rd)
(throw |$SpadReaderTag| nil))
-(defun SPAD_LONG_ERROR ()
+(defun SPAD_LONG_ERROR (rd)
(SPAD_ERROR_LOC SPADERRORSTREAM)
- (iostat)
+ (|readerPrintCurrentLine| rd)
+ (and |$lineStack| (format t "Currently preparsed lines are:~%~%"))
+ (mapcar #'(lambda (line)
+ (format t "~&~5D> ~A~%" (car line) (cdr Line)))
+ |$lineStack|)
+ (if (= |$validTokens| 0)
+ (format t "~%There are no valid tokens.~%")
+ (format t "~%The number of valid tokens is ~S.~%" |$validTokens|))
+ (if (> |$validTokens| 0)
+ (progn (format t "The current token is~%")
+ (describe |$currentToken|)))
+ (if (> |$validTokens| 1)
+ (progn (format t "The next token is~%")
+ (describe |$nextToken|)))
+ (if (|tokenType| |$priorToken|)
+ (progn (format t "The prior token was~%")
+ (describe |$priorToken|)))
(unless (EQUAL OUT-STREAM SPADERRORSTREAM)
(SPAD_ERROR_LOC OUT-STREAM)
(TERPRI OUT-STREAM)))
-(defun SPAD_SHORT_ERROR () (current-line-show))
+(defun SPAD_SHORT_ERROR (rd)
+ (|readerPrintCurrentLine| rd))
(defun SPAD_ERROR_LOC (STR)
(format str "******** Spad Syntax Error detected ********"))