On 06:28 Mon 29 Jul , Marcin Szamotulski wrote:
> On 22:07 Sun 28 Jul , Bram Moolenaar wrote:
> >
> > Marcin Szamotulski wrote:
> >
> > > Vim crashes with the following pattern:
> > >
> > > \%(\%(\|\d\|-\|\.\)*\|\*\)
> > >
> > > And it does not crash with
> > >
> > > \%(\%(\d\|-\|\.\)*\|\*\)
> > >
> > > It is part of a pattern that matches package (the part matches the
> > > version number) inside:
> > >
> > > sys-kernel/gentoo-sources-3.6.11
> > >
> > > I am not sure why I put "\(\|" inside the pattern, but vim (with -u
> > > NONE) crashes when searching for that pattern in a file which contains
> > > the above example.
> >
> > I can easily reproduce it, unfortunately.
> >
> > --
> > How To Keep A Healthy Level Of Insanity:
> > 17. When the money comes out the ATM, scream "I won!, I won! 3rd
> > time this week!!!!!"
> >
> > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
> > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> > \\\ an exciting new programming language -- http://www.Zimbu.org ///
> > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
> This is a simpler pattern that crashes vim:
>
> \%(\%(\|a\)*\)
>
> but
>
> \(\(\|a\)*\)
>
> works fine. Also
>
> \%(\(\|a\)*\)
>
> works fine but
>
> \(\%(\|a\)*\)
>
> crashes. So there is some problem with the inner \%(\) group.
>
> Best regards,
> Marcin
Today a user of my plugin reported that vim crashes and this is due to
a similar problem. Now vim crashes with this pattern:
{\%([^{}]*\|{\%([^{}]\)*}\)*}
but changing only the outer \%(...\) to \(...\) fixes the problem. This
pattern matches what is inside {...} but also will match { {....} },
i.e when another {...} is embedded.
Bets regards,
Marcin
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.