[Melbourne-pm] Extracting a parenthesized fragment from a string
daniel at rimspace.net
Sat Sep 12 02:53:11 PDT 2009
"Timothy S. Nelson" <wayland at wayland.id.au> writes:
> On Sat, 12 Sep 2009, Daniel Pittman wrote:
>> "Timothy S. Nelson" <wayland at wayland.id.au> writes:
>>> On Fri, 11 Sep 2009, Sam Watkins wrote:
>>>> On Fri, Sep 11, 2009 at 07:05:45PM +1000, Robert Norris wrote:
>> I am curious why you say that using Parse::RecDescent is wrong with Perl5?
>> I consider it likely to be more work than is strictly needed, and perhaps
>> difficult to feed a protocol stream rather than a complete text, into, but
>> I can't see why it would be any less right than in Perl6.
>> Do you mind explaining further? You obviously see something I don't, and
>> I would love to understand what. :)
> No, I think we're seeing the same thing here. I agree about feeding in the
> stream -- I had a patch for Parse::RecDescent that made that easy which I
> sent Damian, but I don't know that he ever applied it.
*nod* Thanks for explaining. I think you are right, and they are the same
issues that we saw, differently expressed. :)
> I'm assuming that this is something where he has only a small amount of text
> (which may be an invalid assumption), and a pretty good idea of what it
> contains, and yes, Text::Balanced is probably exactly right for this. I
> basically thought that for something this size, Parse::RecDescent might be
> more hassle than it's worth.
Yeah. If I was going to bother with a parser I would target the entire IMAP
protocol structure, either as a stream, or as a per-command-and-unsolicited
-responses parser. Which would be a big job and appropriate and all.
Sadly, I /have/ considered this, after I looked at the ... way that the
existing IMAP modules were laid out, and prototyped QRESYNC support for three
of them. *shudder*
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
Looking for work? Love Perl? In Melbourne, Australia? We are hiring.
More information about the Melbourne-pm