|
![](/i/fill.gif) |
scott <sco### [at] scott com> wrote:
> >> In short, people tend to use regexs for quick and dirty hacks that kinda
> >> work, rather than doing the job properly with a full parser. And I'm
> >> really not fond of hacks.
> >
> > Writing a parser, even with the aid of a specialized description language
> > such as BNF, is very laborious. Simple string matching can be often
> > expressed
> > with very short regular expressions which you can write in a few seconds.
> > Writing a parser would be complete overkill.
> I think he meant using a parser library, not writing one from scratch.
I was talking about parser libraries (you know, those which eat BNF or
other such syntax definition languages).
If you had to code a parser from scratch, it would be a hundred times
more work still.
> Indeed writing a parser (or a regex library) would be a total overkill for
> pretty much any project.
*Using* a parser library for something which can be easily expressed with
a regexp string would be complete overkill.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |