POV-Ray : Newsgroups : povray.off-topic : An interesting problem : Re: An interesting problem Server Time
28 Jul 2024 18:11:51 EDT (-0400)
  Re: An interesting problem  
From: Orchid Win7 v1
Date: 24 Apr 2013 16:07:59
Message: <51783b9f$1@news.povray.org>
On 24/04/2013 06:31 PM, Warp wrote:
> IIRC a regular expression can be (and is usually) converted into a state
> machine that traverses the input data linearly once.

Yes, that was my understanding. (Although I've never actually seen the 
algorithm in question, I imagine it can't be that complicated.)

> When the state machine
> ends up in one of specific nodes, you know that a match was found (and the
> node in question uniquely identifies which pattern was matching.)

I wasn't sure whether you could actually build such a state machine for 
*several* different regular expressions simultaneously. I'm not sure how 
you'd go about doing that...


Post a reply to this message

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