lua-users home
lua-l archive

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


On 20/06/2011 15.24, Philippe Lhoste wrote:
On 20/06/2011 15:15, Lorenzo Donati wrote:
Moreover PCRE-like regexps are extremely common, so knowing how to use
them is likely to
be a very "reusable" knowlegde (ranging from other programming
languages to utility
programs), whereas Lpeg is a "Lua-only" tool (so the effort to learn
it must be really
counterbalanced by the benefits one can achieve).

Note that the concept itself, ie. Peg, is implemented in several
languages, although with differing syntaxes, of course, depending on the
(lack of) capability to have DSLs for example.

In Java (and Scala), for example, you have the Parboiled library.

So half of the effort is to learn the concept, and the other half is to
learn the given implementation, but the first half is reusable... :-)

Beside, you can do with Pegs everything you can do in regexes (with a
slightly more verbose syntax, which can be seen as an advantage or
not...), but also much more! So it is worth the investment in time.

Oh yes, I'm aware of that, thanks!

That's why I call it unfortunate the fact that I lack the time to learn them right now.