Xiaozhou Liu wrote:

> During the development of the new regexp, one thing confuses me a lot:
> ordered alternation. (e.g. given r.e. 'ab\|abc' and text 'abc', 'ab'
> matched, not 'abc')
> 
> I know that 100% compatibility is one of the project goals. So I try
> to keep this feature
> in the new regexp. But the problem is, ordered alternation is kind of
> 'side effect'
> of the original back track regexp matcher. AFAIK, It is very hard to
> implement this
> feature in the new, truly NFA matcher, if it is not impossible. We can resort
> to the original regexp when we see '\|',  but we don't solve the
> problem perfectly.
> 
> So does anyone really need this feature to be kept? If so, please do tell me.
> For me, the removal of this 'feature' won't break anything.

It is close to impossible to check that a change like this doesn't break
existing scripts.  And when something breaks, e.g. a syntax file, a
normal user is very unlikely to be able to figure out what caused the
problem.

I stick to the opinion that the new regexp engine must work exactly
like the existing one.  Most things can be made to work that way.  I
also thought that this behavior of an alternate branch could be made to
work in a DFA, with some effort.  And otherwise we would have to fall
back to the old engine when there is an alternate branch in the regexp.

-- 
hundred-and-one symptoms of being an internet addict:
174. You know what a listserv is.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui