[ANN] LPeg 1.0.1

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] LPeg 1.0.1

Roberto Ierusalimschy
LPeg is a pattern-matching library for Lua, based on Parsing Expression
Grammars (PEGs).

Documentation: http://www.inf.puc-rio.br/~roberto/lpeg/

Download: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.1.tar.gz

This is release 1.0.1. It is a bug-fix release.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Shmuel Zeigerman
On 13/01/2017 15:57, Roberto Ierusalimschy wrote:
> This is release 1.0.1. It is a bug-fix release.
>

I compiled it for Lua 5.1 and ran test.lua. Then got the following:
    test.lua:1135: attempt to call field 'unpack' (a nil value)

After replacing 'table.unpack' on line 1135 with 'unpack' I got:

lua: test.lua:1135: too many results to unpack
stack traceback:
     [C]: in function 'unpack'
     test.lua:1135: in function <test.lua:1133>
     [C]: in function 'match'
     test.lua:1151: in main chunk
     [C]: ?

--
Shmuel


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Roberto Ierusalimschy
> On 13/01/2017 15:57, Roberto Ierusalimschy wrote:
> >This is release 1.0.1. It is a bug-fix release.
> >
>
> I compiled it for Lua 5.1 and ran test.lua. Then got the following:
>    test.lua:1135: attempt to call field 'unpack' (a nil value)
>
> After replacing 'table.unpack' on line 1135 with 'unpack' I got:
>
> lua: test.lua:1135: too many results to unpack
> [...]

Fixed. (Lua 5.1 has a much lower limit for the number of values returned
by a function. Both issues were with the test file, not with LPeg
itself.)  Thanks for the feedback.

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Shmuel Zeigerman
On 14/01/2017 21:02, Roberto Ierusalimschy wrote:
>
> Fixed. (Lua 5.1 has a much lower limit for the number of values returned
> by a function. Both issues were with the test file, not with LPeg
> itself.)  Thanks for the feedback.
>

Many thanks!

--
Shmuel


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Alexander Nasonov
In reply to this post by Roberto Ierusalimschy
Roberto Ierusalimschy wrote:
> > On 13/01/2017 15:57, Roberto Ierusalimschy wrote:
> > lua: test.lua:1135: too many results to unpack
> > [...]
>
> Fixed. (Lua 5.1 has a much lower limit for the number of values returned
> by a function. Both issues were with the test file, not with LPeg
> itself.)  Thanks for the feedback.

Apart from this issue, what bugs were fixed in 1.0.1?

Alex

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Sean Conner
It was thus said that the Great Alexander Nasonov once stated:

> Roberto Ierusalimschy wrote:
> > > On 13/01/2017 15:57, Roberto Ierusalimschy wrote:
> > > lua: test.lua:1135: too many results to unpack
> > > [...]
> >
> > Fixed. (Lua 5.1 has a much lower limit for the number of values returned
> > by a function. Both issues were with the test file, not with LPeg
> > itself.)  Thanks for the feedback.
>
> Apart from this issue, what bugs were fixed in 1.0.1?

  A bug raised in September [1] that I recently reminded Roberto of [2].

  -spc

[1] http://lua-users.org/lists/lua-l/2016-09/msg00189.html

[2] http://lua-users.org/lists/lua-l/2017-01/msg00113.html


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Patrick Donnelly
Hi Sean,

On Sat, Jan 14, 2017 at 6:30 PM, Sean Conner <[hidden email]> wrote:

> It was thus said that the Great Alexander Nasonov once stated:
>> Roberto Ierusalimschy wrote:
>> > > On 13/01/2017 15:57, Roberto Ierusalimschy wrote:
>> > > lua: test.lua:1135: too many results to unpack
>> > > [...]
>> >
>> > Fixed. (Lua 5.1 has a much lower limit for the number of values returned
>> > by a function. Both issues were with the test file, not with LPeg
>> > itself.)  Thanks for the feedback.
>>
>> Apart from this issue, what bugs were fixed in 1.0.1?
>
>   A bug raised in September [1] that I recently reminded Roberto of [2].
>
>   -spc
>
> [1]     http://lua-users.org/lists/lua-l/2016-09/msg00189.html

> lpeg = require"lpeg"
> lpeg.version()
1.0.1
> do
>>
>> local patt = lpeg.Cg(lpeg.Ct"", "foo") * lpeg.Cb "foo" * lpeg.Cb "foo";
>> print(patt:match "")
>> end
table: 0x1926fd0        table: 0x1927010

Doesn't look fixed? Are you referring to some other issue?

--
Patrick Donnelly

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Parke
>> It was thus said that the Great Alexander Nasonov once stated:
>>> what bugs were fixed in [LPeg] 1.0.1?


> On Sat, Jan 14, 2017 at 6:30 PM, Sean Conner <[hidden email]> wrote:
>>   A bug raised in September [1] that I recently reminded Roberto of [2].
>>
>>   -spc
>>
>> [1]     http://lua-users.org/lists/lua-l/2016-09/msg00189.html
>> [2]     http://lua-users.org/lists/lua-l/2017-01/msg00113.html


On Sun, Apr 9, 2017 at 9:03 AM, Patrick Donnelly <[hidden email]> wrote:

>> lpeg = require"lpeg"
>> lpeg.version()
> 1.0.1
>> do
>>>
>>> local patt = lpeg.Cg(lpeg.Ct"", "foo") * lpeg.Cb "foo" * lpeg.Cb "foo";
>>> print(patt:match "")
>>> end
> table: 0x1926fd0        table: 0x1927010
>
> Doesn't look fixed? Are you referring to some other issue?


The below is my attempt to remove some ambiguity from this old thread.

I suspect Sean's [1] link is incorrect, and Sean meant to link to this thread:
http://lua-users.org/lists/lua-l/2016-09/threads.html#00148
Subject: [LPeg] intermittent stack exhaustion

Regarding Sean's actual [1] link, which contains the "issue" mentioned
above by Patrick:

The "issue" is not a bug.  In this case, LPeg's behavior is acceptable
and in line with the documentation, as explained by Roberto in the
following posts:

http://lua-users.org/lists/lua-l/2016-09/msg00258.html
http://lua-users.org/lists/lua-l/2016-09/msg00260.html

Cheers,

Parke

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] LPeg 1.0.1

Soni "They/Them" L.


On 2017-06-10 07:18 PM, Parke wrote:

>>> It was thus said that the Great Alexander Nasonov once stated:
>>>> what bugs were fixed in [LPeg] 1.0.1?
>
>> On Sat, Jan 14, 2017 at 6:30 PM, Sean Conner <[hidden email]> wrote:
>>>    A bug raised in September [1] that I recently reminded Roberto of [2].
>>>
>>>    -spc
>>>
>>> [1]     http://lua-users.org/lists/lua-l/2016-09/msg00189.html
>>> [2]     http://lua-users.org/lists/lua-l/2017-01/msg00113.html
>
> On Sun, Apr 9, 2017 at 9:03 AM, Patrick Donnelly <[hidden email]> wrote:
>>> lpeg = require"lpeg"
>>> lpeg.version()
>> 1.0.1
>>> do
>>>> local patt = lpeg.Cg(lpeg.Ct"", "foo") * lpeg.Cb "foo" * lpeg.Cb "foo";
>>>> print(patt:match "")
>>>> end
>> table: 0x1926fd0        table: 0x1927010
>>
>> Doesn't look fixed? Are you referring to some other issue?
>
> The below is my attempt to remove some ambiguity from this old thread.
>
> I suspect Sean's [1] link is incorrect, and Sean meant to link to this thread:
> http://lua-users.org/lists/lua-l/2016-09/threads.html#00148
> Subject: [LPeg] intermittent stack exhaustion
>
> Regarding Sean's actual [1] link, which contains the "issue" mentioned
> above by Patrick:
>
> The "issue" is not a bug.  In this case, LPeg's behavior is acceptable
> and in line with the documentation, as explained by Roberto in the
> following posts:
>
> http://lua-users.org/lists/lua-l/2016-09/msg00258.html
> http://lua-users.org/lists/lua-l/2016-09/msg00260.html
>
> Cheers,
>
> Parke
>

I, too, have a preference for memoization. I believe Cg should create a
lazy-evaluated-once variable. Would help with RAM usage and GC.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.