Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML
Unofficial Hacker News client; not affiliated with Y Combinator.
le-mark · · focus · HN ↗
jjba23 · · focus · HN ↗
cbarrick · · focus · HN ↗
The two are useful for different layers of abstraction: regex is for lexing and PEG is for parsing.
Speaking of the Chomsky hierarchy, last I checked, it is still unproven whether or not PEGs can parse all context free languages. Intuitively, they're _probably_ weaker than CFGs, but no one has yet provided a counter example.
sparkie · · focus · HN ↗
earleybird · · focus · HN ↗