3 ms·
I've recently discovered Lua Parsing Expression Grammars (LPEG)[1]. They are built on a different approach to parsing and are much more capable than conventiona
by Aerbil313 2y ago
I've recently discovered Lua Parsing Expression Grammars (LPEG)[1]. They are built on a different approach to parsing and are much more capable than conventional regexes, able to handle recursive sequences, able to include code, have debugging utilities, are often much more performant than regexes and they are an absolute delight to work with. It also has a module called re [2] which uses a similar syntax to regexes.
1: https://www.inf.puc-rio.br/~roberto/lpeg/ https://www.inf.puc-rio.br/~roberto/lpeg/
2: https://www.inf.puc-rio.br/~roberto/lpeg/re.html https://www.inf.puc-rio.br/~roberto/lpeg/re.html