[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LPeg capturing too much?
- From: Peter Odding <xolox@...>
- Date: Sat, 07 Apr 2007 17:10:49 +0200
Thanks for taking the time to send me the patch. Much appreciated! It does the
trick. I should read the mailing list more :)
- Peter Odding
Eduardo Ochs wrote:
> Hi Peter and Michael,
>
> This is a known bug with a known fix.
> Here's the script that I use to compile a patched lpeg...
>
> --snip--snip--
>
> rm -Rfv ~/usrc/lpeg-0.5/
> tar -C ~/usrc/ -xvzf $S/http/www.inf.puc-rio.br/~roberto/lpeg-0.5.tar.gz
> cd ~/usrc/lpeg-0.5/
>
> chmod 644 lpeg.c
> # http://lua-users.org/lists/lua-l/2007-03/msg00616.html
> # http://lua-users.org/lists/lua-l/2007-03/msg00620.html
> patch -p0 lpeg.c <<'%%%'
> 470c470,471
> < capture[captop - 1].siz = s - capture[captop - 1].s + 1;
> ---
>> /* capture[captop - 1].siz = s - capture[captop - 1].s + 1; */
>> capture[captop - 1].siz = (s - getoff(p)) - capture[captop -
>> 1].s + 1;
> %%%