Degenerate Regex Case

Guillaume via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 26 07:22:48 PDT 2015


On Saturday, 25 April 2015 at 09:30:55 UTC, Dmitry Olshansky 
wrote:
>
> A quick investigation shows that it gets stuck at the end of 
> pattern compilation stage.
>
> The problem is that as a last pass D's regex goes to optimize 
> the pattern to construct simple bit-scanning engine as 
> approximation for prefix of original pattern. And that process 
> is a lot like Thompson NFA ... _BUT_ the trick of merging 
> equivalent threads wasn't applied there.
>
> So in short: file a bug, optimizer absolutely should do 
> de-duplication of threads.
>
> ---
> Dmitry Olshansky

Thanks for your help, I'll go file a bug.


More information about the Digitalmars-d-learn mailing list