Comment

Comment by cbarrick

Indeed. Regexes are _regular_, which is non hierarchical by definition.

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.

parent cbarrick 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton