[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: is this behavior correct?
- From: Philippe Lhoste <PhiLho@...>
- Date: Mon, 20 Jun 2011 15:24:06 +0200
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.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --