|
|
|
|
|
by spc476
4670 days ago
|
|
Well, for a personal project I've written a parser for email (https://github.com/spc476/LPeg-Parsers/blob/master/email.lua) but I've also used LPeg for work to parse the logging output of some of our components (as part of the regression test) since they have a set structure (a mixture of "var=333" (example), "var=1/5/22" (minimum, average, maximum) and "time=33/55/88ms" (now with time units!). Yes, it's nothing that a regex couldn't do, but I find the LPeg code easier to read and modify than a regex, and I don't have to do two passes over the data (one to break the input into multiple strings, then convert the appropriate strings into numerical values). |
|