Re: Regexp Alternatives (was Re: Wondering what I'm doing wrong?)
"Adam Weaver (as adam at cleversure dot com dot au)" <[email protected]> Fri, 12 Jun 2026 01:13:19 +0000
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Re-arranged, because top-posting is a sin. On Jun 11, 2026, at 17:45, Adam Weaver (as adam at cleversure dot com dot au) <[email protected]><mailto:[email protected]> wrote: DM, I don't suppose you're interested in trying your number parser out using LW's built-in PARSERGEN package? > On 12/6/26 09:05, David McClain wrote: Yes, I’ll give it a go. But there is no equivalent for SBCL, and I was trying for portability. Yabbut we *are* talking on a LW mailing list :) Also, IIRC, the Parsergen in LW needs a lexical analyzer built for it. All my other parsers do the lexical analysis in stride as part of the parsing. True, but that's easily fixed with some macrology. ** I might have a crack at this over the weekend - distraction over doing Real Work instead :) The one thing I found, about Parseq (dunno yet about ESRAP), unlike a regexp matcher where you can anchor the pattern to the end of the line, you have to manually do your anchoring in the parsing grammar. I do that with an EOS Rule: (defrule eos () (* char) (:test (&rest es) (null es))) Noice. A ** I did once experiment with some read-macrology to convert a PCRE style regexp into the built-in Lispworks regexp format (which I think was Emacs inspired). It was fuuuuuuuuuuuggggggleeeeeeeeeeee.