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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Regular expressions and tokens (Score:1)
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.
Reply to This