[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Sun May 6 13:54:11 UTC 2007


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv19970

Modified Files:
	lr-syntax.lisp 
Log Message:
Added parser hack to make it possible to extend incomplete-lexemes to
the end of the buffer, instead of to their last lexeme.


--- /project/mcclim/cvsroot/mcclim/Drei/lr-syntax.lisp	2007/04/27 21:37:14	1.1
+++ /project/mcclim/cvsroot/mcclim/Drei/lr-syntax.lisp	2007/05/06 13:54:11	1.2
@@ -160,14 +160,17 @@
 	   until (typep child type)
 	   finally (return result))))
 
-(defmacro reduce-until-type (symbol type)
+(defmacro reduce-until-type (symbol type &optional end-of-buffer)
   `(let ((result (make-instance ',symbol
-		    :children (pop-until-type syntax ',type))))
-     (when (null (children result))
-       (with-slots (scan) syntax
-	  (with-slots (start-mark size) result
-	     (setf start-mark (clone-mark scan :right)
-		   size 0))))
+                  :children (pop-until-type syntax ',type))))
+     (with-slots (start-mark size) result
+       (when (null (children result))
+         (with-slots (scan) syntax
+           (setf start-mark (clone-mark scan :right)
+                 size 0)))
+       (when ,end-of-buffer
+         (setf size (- (size (buffer syntax))
+                       (start-offset result)))))
      result))
 
 (defun pop-all (syntax)




More information about the Mcclim-cvs mailing list