Xiaozhou Liu wrote:
> Hi Vimmers,
> 
> 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.

I prefer the behaviour which I presume you have in your NFA implementation, of 
preferring longer matches, just as * is greedy by default, so would actually 
welcome the change.

Ben.




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

Raspunde prin e-mail lui