Re:Just Write the Parser
by wahern on Wednesday October 21, 2020 @11:08PM
(#24854525)
LPeg also has what it calls match-time captures (http://www.inf.puc-rio.br/~roberto/lpeg/#matchtime), which can be used to parse non-context free grammars like common TLV (tag, length, value) formats. For example, I've written a pure LPeg parser for parsing PKIX objects like X.509 certificates. Example edited code snippets with some high-level and low-level bits:
[ Parent
| on HN ]
There are no comments on this comment yet.