Update of /project/climacs/cvsroot/climacs In directory clnet:/tmp/cvs-serv31724
Modified Files: prolog-syntax.lisp prolog2paiprolog.lisp Log Message: Be careful to claim any succeeding whitespace as having been parsed in update-syntax, but not the whole of the buffer if that hasn't actually been done.
Marginal improvements to Export Paiprolog debugging command.
--- /project/climacs/cvsroot/climacs/prolog-syntax.lisp 2008/01/10 10:48:24 1.34 +++ /project/climacs/cvsroot/climacs/prolog-syntax.lisp 2008/01/15 16:54:37 1.35 @@ -1221,9 +1221,10 @@ (advance-parse parser (list next-lexeme) (slot-value current-token 'state))) (incf valid-parse)))) - (values 0 (if (= valid-parse (nb-lexemes lexer)) - (size (buffer syntax)) - (start-offset (lexeme lexer valid-parse))))))) + (let ((scan (make-buffer-mark (buffer syntax) 0 :left))) + (setf (offset scan) (end-offset (lexeme lexer (1- valid-parse)))) + (skip-inter-lexeme-objects lexer scan) + (values 0 (offset scan))))))
;;; display #+nil ; old, not based on stroking pumps. --- /project/climacs/cvsroot/climacs/prolog2paiprolog.lisp 2008/01/10 10:48:24 1.4 +++ /project/climacs/cvsroot/climacs/prolog2paiprolog.lisp 2008/01/15 16:54:37 1.5 @@ -414,6 +414,8 @@ (define-command (com-export-paiprolog :name t :command-table prolog-table) ((pathname 'pathname)) (let ((expressions (view->paiprolog (current-view)))) - (with-open-file (s pathname :direction :output :if-exists :supersede) - (dolist (e expressions) - (prin1 e s))))) + (let ((*package* (find-package :paiprolog))) + (with-open-file (s pathname :direction :output :if-exists :supersede) + (dolist (e expressions) + (prin1 e s) + (terpri s))))))