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 Dirk Laurie once stated:
> 2015-08-03 5:12 GMT+02:00 Sean Conner <sean@conman.org>:
> 
> >   It doesn't have to use re, it can be in straight lpeg.
> 
> I've always thought of the re module as a demo application: see here,
> this is how one should build a large, complex LPeg program.
> 
> You seem to prefer re and fall back to straight LPeg as a last resort.

  Actually, I don't mind LPeg.  This particular project is mostly using re
because other people might have to (and have) modified it (it's a
work-related project).  

> Should I invest some time getting to grips with the idiolectic syntax
> expected by re.compile, or is that recommended only for those who
> already know and love several other regexes?

  I started with it because I found it easier to read and write (it's more
like BNF than it is a regular expression).  It also makes it easier to
translate the various RFCs into something useful.  

  -spc (Except you still can't do a folding capture in re ... )