lua-users home
lua-l archive

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


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?