lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Daurnimator once stated:
> On 11 April 2015 at 11:08, Sean Conner <sean@conman.org> wrote:
> >   I've just uploaded three LPeg based modules to parse various data formats
> > as LuaRocks.  The modules are:
> >
> >         org.conman.parsers.email
> >                 Parse RFC-5322 Internet format messages, which includes
> >                 email and USENET (Lua >= 5.1, LPeg >= 0.10)
> >
> >         org.conman.parsers.ini
> >                 Parse INI files (Lua >= 5.1, LPeg >= 0.10)
> >
> >         org.conman.parsers.ip
> >                 Parse IPv4 or IPv6 addresses into binary in network byte
> >                 order (admittedly an odd choice for the results, but it
> >                 fit a usecase I needed).  (Lua >= 5.1, LPeg >= 0.12)
> >
> >   Of the three, the INI one is the less tested of them, as it was just
> > written on a whim.
> >
> >   -spc (Anyway, download and enjoy)
> >
> 
> FWIW, I did a similar thing:
> https://rocks.moonscript.org/modules/daurnimator/lpeg_patterns
> https://github.com/daurnimator/lpeg_patterns
> Includes
>   - IPv4
>   - IPv6
>   - URI
>   - Email
>   - Phone numbers
> I released it as a single package, as the various bits are interdependant.
> e.g. URI requires the IP patterns.
> 
> I'd be happy to merge projects if you're interested?

   Not terribly interested, sorry.  I'm not sure what exactly, could be
merged, IP or Email wise.  I'm working on a URL scheme that's extensible [1] 
and while I might be able to use the phone number parsing module at work,
it's not that critical as the numbers I'm already dealing with are valid
NANP (seeing how they arrive from The Monopolistic Phone Company).

  -spc (Thanks for the offer)

[1]     Not only do I deal with http: and https: at work, but tel:, sip: an
        sips:.