Thanks for your clarification, Edi. Now that you mentioned it, I noticed the correct idiom to use create-scanner in scan documentation:
* (let ((s (cl-ppcre:create-scanner "(([a-c])+)x"))) (cl-ppcre:scan s "abcxy"))
I should say, though, the documentation was a bit unclear (at least to me): documentation for scan never mentioned that you can use a pre-computed scanner instead of regex, and documentation for create-scanner said that it returns a closure - and my interpretation was that you have to call it directly to scan for strings. It's probably my poor lisp knowledge and not your fault, but I'd say it would be helpful to include an example of correct create-scanner usage in the create-scanner section.
Thank you very much for all your libraries!
Best Regards, Victor.
PS. Is your Amazon wish list up-to-date?
On Jan 6, 2008 4:40 PM, Edi Weitz edi@agharta.de wrote:
On Sun, 6 Jan 2008 03:12:54 -0600, "Victor Kryukov" victor.kryukov@gmail.com wrote:
(funcall (cl-ppcre:create-scanner "test") "This is a test")
Why are you calling the scanner this way? That's not how it is intended to be done. If you call a highly optimized function with the wrong number of arguments, you shouldn't be surprised if the compiler is confused.
Edi. _______________________________________________ cl-ppcre-devel site list cl-ppcre-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-ppcre-devel