lua-users home
lua-l archive

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

On 22/10/2009 06:03, Fernando P. García wrote:
Based on your experience, may you tell me why LPEG is better than PCRE?

It might be arguable for simple patterns like checking a date format (without checking the validity of the date!) or looking that a string has no spaces, for example. But for real parsing (using context and such), a parser (Peg based or something else) is always better than a RE engine... :-)

It might be interesting to do some comparisons (memory usage, speed, compactness of expression vs. readability, etc.) between Lpeg and a binding of PCRE for a number of cases (from simple cases above to the shown expression using lot of alternatives, look-ahead expressions and so on).
I am not volunteer...


Philippe Lhoste
--  (near) Paris -- France
--  --  --  --  --  --  --  --  --  --  --  --  --  --