Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv30926/Drei
Modified Files:
lisp-syntax-swine.lisp lisp-syntax.lisp lr-syntax.lisp
Log Message:
Do less incrementality-pretending in Lr syntax, but be more aware of the possibility in Lisp syntax.
--- /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax-swine.lisp 2007/12/16 14:42:07 1.10
+++ /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax-swine.lisp 2008/01/09 08:55:24 1.11
@@ -566,7 +566,7 @@
provided are, in order: the form, the forms operator, the indices
to the operand at `offset', or the indices to an operand entered
at that position if none is there, and the operands in the form."
- (update-parse syntax 0 offset)
+ (update-parse syntax)
(let* ((form
;; Find a form with a valid (fboundp) operator.
(let ((immediate-form
--- /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp 2008/01/08 21:16:16 1.60
+++ /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp 2008/01/09 08:55:24 1.61
@@ -1209,7 +1209,6 @@
(defun need-to-update-package-list-p (prefix-size suffix-size syntax)
(let ((low-mark-offset prefix-size)
(high-mark-offset (- (size (buffer syntax)) suffix-size)))
- (update-parse syntax)
(flet ((test (x)
(let ((start-offset (start-offset x))
(end-offset (end-offset x)))
@@ -1249,17 +1248,18 @@
(defun update-package-list (syntax)
(setf (package-list syntax) nil)
+ (update-parse syntax)
(flet ((test (x)
(when (form-list-p x)
(let ((candidate (first-form (children x))))
(and (form-token-p candidate)
(eq (form-to-object syntax candidate
- :no-error t)
+ :no-error t)
'cl:in-package)))))
(extract (x)
(let ((designator (second-form (children x))))
(form-to-object syntax designator
- :no-error t))))
+ :no-error t))))
(with-slots (stack-top) syntax
(loop for child in (children stack-top)
when (test child)
--- /project/mcclim/cvsroot/mcclim/Drei/lr-syntax.lisp 2008/01/08 21:05:50 1.14
+++ /project/mcclim/cvsroot/mcclim/Drei/lr-syntax.lisp 2008/01/09 08:55:24 1.15
@@ -267,8 +267,7 @@
(print-unreadable-object (mark stream :type t :identity t)
(format stream "~s" (offset mark))))
-(defun parse-patch (syntax begin end)
- (declare (ignore begin))
+(defun parse-patch (syntax)
(with-slots (current-state stack-top scan potentially-valid-trees) syntax
(parser-step syntax)
(finish-output *trace-output*)
@@ -359,12 +358,13 @@
(defmethod update-syntax values-max-min ((syntax lr-syntax-mixin) prefix-size suffix-size
&optional (begin 0) (end (size (buffer syntax))))
+ (declare (ignore begin end))
(let* ((low-mark-offset prefix-size)
(high-mark-offset (- (size (buffer syntax)) suffix-size)))
(when (<= low-mark-offset high-mark-offset)
(catch 'done
- (with-slots (current-state stack-top scan potentially-valid-trees
- initial-state) syntax
+ (with-slots (current-state stack-top scan potentially-valid-trees
+ initial-state) syntax
(setf potentially-valid-trees
(if (null stack-top)
nil
@@ -373,12 +373,12 @@
(setf stack-top (find-last-valid-lexeme stack-top low-mark-offset))
(setf (offset scan) (if (null stack-top) 0 (end-offset stack-top))
current-state (if (null stack-top)
- initial-state
+ initial-state
(new-state syntax
(parser-state stack-top)
stack-top)))
- (loop do (parse-patch syntax begin end)))))
- (values 0 end)))
+ (loop do (parse-patch syntax)))))
+ (values 0 (offset (scan syntax)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;