Index: trunk/example.lisp
===================================================================
--- trunk/example.lisp	(revision 18)
+++ trunk/example.lisp	(revision 19)
@@ -29,5 +29,5 @@
 (defun un-dquote (s) (regex-replace-all "\"\"" (snip s) "\""))
 
-(deflexer scan-csv
+(deflexer scan-csv (:priority-only t)
   ("," comma)
   ("[^\"',]+" value)
@@ -35,13 +35,5 @@
   ("\"(?:[^\"]|\"\")*\"" value un-dquote))
 
-(defun scan-all (input)
-  (labels ((scan (start tokens)
-	     (if (> (length input) start)
-		 (multiple-value-bind (class image remainder)
-		     (scan-csv input start)
-		   (when class
-		     (scan remainder (cons (cons class image) tokens))))
-		 (nreverse tokens))))
-    (scan 0 '())))
 
-(scan-all "no quotes,'a ''quote''',\"another \"\"quote\"\"\"")
+
+(lex-all 'scan-csv "no quotes,'a ''quote''',\"another \"\"quote\"\"\"")
