From gwking at metabang.com Wed Jan 25 02:29:27 2006 From: gwking at metabang.com (Gary King) Date: Tue, 24 Jan 2006 21:29:27 -0500 Subject: [cl-ppcre-devel] Why is parse-string not exported Message-ID: Parse-string seems like a very handy tool for learning how to create parse trees and for creating them even if you already know about them. Is there a reason not to export it? thanks, -- Gary Warren King metabang.com http://www.metabang.com/ From gwking at metabang.com Wed Jan 25 04:05:53 2006 From: gwking at metabang.com (Gary King) Date: Tue, 24 Jan 2006 23:05:53 -0500 Subject: [cl-ppcre-devel] using parse-tree-synonyms to extend character classes... Message-ID: <75F3FC01-C64A-4518-8F10-03A0CA9759D2@metabang.com> Should i expect the following to work? (define-parse-tree-synonym hostname-char #.(cl-ppcre::parse-string "[-a-zA-Z0-9_.]")) (define-parse-tree-synonym pathname-char (:char-class hostname-char #\: #\@ #\& #\? #\= #\+ #\, #\! #\/ #\~ #\* #\' #\% #\\ #\$)) (define-parse-tree-synonym pathname (:sequence (:greedy-repetition 0 nil pathname-char))) (scan-to-strings '(:sequence pathname) "My page is at http://www.metabang.com/foo/ boo.") > Error: Unknown symbol HOSTNAME-CHAR in character class > While executing: PPCRE::CONVERT-CHAR-CLASS-TO-HASH > Type Command-. to abort. See the Restarts? menu item for further choices. 1 >  Thanks, -- Gary Warren King metabang.com http://www.metabang.com/ From edi at agharta.de Wed Jan 25 08:50:52 2006 From: edi at agharta.de (Edi Weitz) Date: Wed, 25 Jan 2006 09:50:52 +0100 Subject: [cl-ppcre-devel] Why is parse-string not exported In-Reply-To: (Gary King's message of "Tue, 24 Jan 2006 21:29:27 -0500") References: Message-ID: On Tue, 24 Jan 2006 21:29:27 -0500, Gary King wrote: > Parse-string seems like a very handy tool for learning how to create > parse trees and for creating them even if you already know about > them. Is there a reason not to export it? Hi Gary! I wouldn't mind exporting it but I don't think it makes sense when you're actually /using/ PPCRE. Seems more like something for the REPL to me. Cheers, Edi. From edi at agharta.de Wed Jan 25 08:53:07 2006 From: edi at agharta.de (Edi Weitz) Date: Wed, 25 Jan 2006 09:53:07 +0100 Subject: [cl-ppcre-devel] using parse-tree-synonyms to extend character classes... In-Reply-To: <75F3FC01-C64A-4518-8F10-03A0CA9759D2@metabang.com> (Gary King's message of "Tue, 24 Jan 2006 23:05:53 -0500") References: <75F3FC01-C64A-4518-8F10-03A0CA9759D2@metabang.com> Message-ID: On Tue, 24 Jan 2006 23:05:53 -0500, Gary King wrote: > Should i expect the following to work? No, parse tree synonyms are synonyms for parse trees. The constituents of a character class aren't parse trees. Cheers, Edi. From gwking at metabang.com Wed Jan 25 13:55:39 2006 From: gwking at metabang.com (Gary King) Date: Wed, 25 Jan 2006 08:55:39 -0500 Subject: [cl-ppcre-devel] using parse-tree-synonyms to extend character classes... In-Reply-To: References: <75F3FC01-C64A-4518-8F10-03A0CA9759D2@metabang.com> Message-ID: <984BFF1F-096E-4948-B7C5-4A8070F8FB1A@metabang.com> OK. That makes sense and it's what I was starting to decide was happening... thanks, On Jan 25, 2006, at 3:53 AM, Edi Weitz wrote: > On Tue, 24 Jan 2006 23:05:53 -0500, Gary King > wrote: > >> Should i expect the following to work? > > No, parse tree synonyms are synonyms for parse trees. The > constituents of a character class aren't parse trees. > > Cheers, > Edi. -- Gary Warren King metabang.com http://www.metabang.com/ From DKICK1 at motorola.com Wed Jan 25 18:56:28 2006 From: DKICK1 at motorola.com (Kick Damien-DKICK1) Date: Wed, 25 Jan 2006 13:56:28 -0500 Subject: [cl-ppcre-devel] Why is parse-string not exported Message-ID: Edi Weitz wrote: > On Tue, 24 Jan 2006 21:29:27 -0500, Gary King wrote: > > Parse-string seems like a very handy tool for learning how to create > > parse trees and for creating them even if you already know about them. > > Is there a reason not to export it? > I wouldn't mind exporting it but I don't think it makes sense when > you're actually /using/ PPCRE. Seems more like something for the > REPL to me. Unless, perhaps, someone wanted to write a code walker for a regular expression and wanted an easy way to canonicalize a regexp into parse tree form. From edi at agharta.de Wed Jan 25 23:00:56 2006 From: edi at agharta.de (Edi Weitz) Date: Thu, 26 Jan 2006 00:00:56 +0100 Subject: [cl-ppcre-devel] Why is parse-string not exported In-Reply-To: (Kick Damien-DKICK1's message of "Wed, 25 Jan 2006 13:56:28 -0500") References: Message-ID: On Wed, 25 Jan 2006 13:56:28 -0500, "Kick Damien-DKICK1" wrote: > Unless, perhaps, someone wanted to write a code walker for a regular > expression and wanted an easy way to canonicalize a regexp into > parse tree form. OK, you got me convinced. I'll export it in the next release. Cheers, Edi.