POV-Ray : Newsgroups : povray.off-topic : Mini-languages : Re: Mini-languages Server Time
3 Sep 2024 23:29:50 EDT (-0400)
  Re: Mini-languages  
From: Darren New
Date: 10 Nov 2010 10:57:54
Message: <4cdac102$1@news.povray.org>
Invisible wrote:
> On 09/11/2010 10:11 PM, Warp wrote:
> 
>>    *Using* a parser library for something which can be easily 
>> expressed with
>> a regexp string would be complete overkill.
> 
> Yeah, that's true. Writing
> 
>   string "foo"
>   many char
>   string "bar"
> 
> is drastically harder than just saying "foo*bar".
> 
> Oh, wait...

OK, so how do you do

(\+|-)[0-9]+(\.[0-9]+)?(E(\+|-)?[0-9]{1,3})?

in your parser language?

(That is, optional sign, one or more digits, optional decimal point followed 
by one or more digits, optional E followed by optional sign followed by one 
to three digits.)

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

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