[ANN] Pegex: regex engine using LPeg

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

[ANN] Pegex: regex engine using LPeg

Chris Emerson
Hi,

I've uploaded (newly renamed) pegex to Luarocks.

It's a simple regex engine which works by converting regexes to equivalent
LPeg expressions (using the algorithm in this paper co-authored by a Roberto
Ierusalimschy: http://www.inf.puc-rio.br/~roberto/docs/ry10-01.pdf -
thanks!); the only dependency is LPeg.

It supports basic regular expression features as well as some common
extensions like captures and backreferences.

There is a small amount of documentation:

https://github.com/jugglerchris/ta-regex

I originally implemented this to add regex searches in the Textadept editor
(hence the repository name), but the engine doesn't depend on anything
Textadept-specific, so thought it was worth publishing separately in case
it's useful for anyone where Lua patterns aren't quite powerful enough.

Regards,

Chris

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Pegex: regex engine using LPeg

William Ahern
On Thu, Sep 17, 2015 at 11:19:01PM +0100, Chris Emerson wrote:

> Hi,
>
> I've uploaded (newly renamed) pegex to Luarocks.
>
> It's a simple regex engine which works by converting regexes to equivalent
> LPeg expressions (using the algorithm in this paper co-authored by a Roberto
> Ierusalimschy: http://www.inf.puc-rio.br/~roberto/docs/ry10-01.pdf -
> thanks!); the only dependency is LPeg.
>
> It supports basic regular expression features as well as some common
> extensions like captures and backreferences.

Nice work. And thanks for providing the URL to the paper. I didn't know
about it.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Pegex: regex engine using LPeg

Hisham Muhammad


On Sep 17, 2015 11:48 PM, "William Ahern" <[hidden email]> wrote:
>
> On Thu, Sep 17, 2015 at 11:19:01PM +0100, Chris Emerson wrote:
> > Hi,
> >
> > I've uploaded (newly renamed) pegex to Luarocks.
> >
> > It's a simple regex engine which works by converting regexes to equivalent
> > LPeg expressions (using the algorithm in this paper co-authored by a Roberto
> > Ierusalimschy: http://www.inf.puc-rio.br/~roberto/docs/ry10-01.pdf -
> > thanks!); the only dependency is LPeg.
> >
> > It supports basic regular expression features as well as some common
> > extensions like captures and backreferences.
>
> Nice work. And thanks for providing the URL to the paper. I didn't know
> about it.

I'm not sure if it is linked from lua.org, but in any case LabLua's site (where I work) includes our list of publications and is at http://www.lua.inf.puc-rio.br

-- Hisham
http://hisham.hm/