Bad performance of simple regular expression - why??

Manfred Nowak svv1999 at hotmail.com
Tue Feb 6 11:54:53 PST 2007


Walter Bright <newshound at digitalmars.com> wrote

> My understanding is that backtracking is difficult to do with the
> DFA.

On converting _one_ regular expression to a DFA there is no need to 
backtrack ever.

The example considered in the article is roughly equivalent to
a^n a?^n. No need for backtracking and the normal tool chain handles 
this.

Also for maximal munching several regular expression there is no need 
for backtracking. 

-manfred 




More information about the Digitalmars-d mailing list