Re:PEG Parsers
by pull_my_finger on Tuesday July 23, 2019 @02:36AM
(#20504878)
I got you covered fellow Lua user
http://leafo.net/guides/parsing-expression-grammars.html
http://www.wra1th.plus.com/lua/lpeg.html
http://www.wra1th.plus.com/lua/peg/PEG.html
http://lua-users.org/wiki/LpegTutorial
https://rawgit.com/dlaurie/lua-notes/master/lpeg-brief.html
> Remove all the Javascript from an html page.
This is probably the best reason I've seen why you should learn parsing.
They're... beautiful.
I keep feeling like I'm following in the steps of giants with lpeg. I loved my introduction to it when I was big on Lua. Some of those operators take functions with such strange signatures - until you try to do something clever later, and your realize you're being passed exactly the arguments you need to make it work.
http://www.inf.puc-rio.br/~roberto/lpeg/
The operator overloads are a lot to reckon with, beyond just the concepts, but it seems like there's something there worthwhile of study and learning. Hope to give it another try.
Be interested in any introductory material, if anyone has some good links.