POV-Ray : Newsgroups : povray.off-topic : Mini-languages : Re: Mini-languages Server Time
3 Sep 2024 21:18:52 EDT (-0400)
  Re: Mini-languages  
From: Warp
Date: 9 Nov 2010 17:11:29
Message: <4cd9c711@news.povray.org>
scott <sco### [at] scottcom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.