in reply to Re: Altering regular expression trees
in thread Altering regular expression trees

While I've found P::RD to be very cool and useful in the past (parsing an old machine-readable dictionary with embedded type-setting codes), I've never used it for anything as complicated as perl regular expressions. I'd imagine that would be a non-trivial task.

For now, I'm going with japhy's YAPE::Regex, as suggested by diotalevi. I like the design, and it allows you to do most of the things tzz describes above, without having to create a regular expression grammar.

  • Comment on Re: Re: Altering regular expression trees

Replies are listed 'Best First'.
Re: Re: Re: Altering regular expression trees
by diotalevi (Canon) on Jul 31, 2003 at 16:34 UTC

    Actually, that's the point. YAPE::Regex has a grammar in it. You'd just be reimplementing Y::R if you wrote your own grammar.

Re: Re: Re: Altering regular expression trees
by tzz (Monk) on Jul 31, 2003 at 18:27 UTC
    I was unclear. I didn't mean you should try to parse generic Perl regular expressions with P::RD, but instead that you can give your users a simpler syntax that they may like better. Your original message implied you don't need exact compatibility with the Perl regex syntax. With P::RD you can design a syntax that matches what the users need, rather than trying to teach them Perl regular expressions. I've found the latter to be a difficult battle for most users.