Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I guess the main question I have is what are you trying to achieve. Are you trying to make regular expressions simpler and more descriptive? Or are you trying to do higher level parsing with regular expressions?

    The problem with doing the latter is that most things people want to parse are too sophisticated for parsing with regular expressions. The Perl5 regex engine is more powerful than standard regular expressions and can match higher-level grammars. I suspect that the regular expressions used would become nasty and slow.

    This is the reason people use hybrid parsers on programming languages. The tokens are matched with regular expressions, which are much faster and easier to understand with simple expressions. Assembling the tokens into a parse tree requires a more powerful parser to match the context-free grammar.