3 ms·
A while back I made a PEG parser in Python in ~400 LOC, that can parse itself. It's actually quite straightforward: https://gist.github.com/orlp/e880287287985cc
by nightcracker 10y ago
A while back I made a PEG parser in Python in ~400 LOC, that can parse itself. It's actually quite straightforward: https://gist.github.com/orlp/e880287287985ccd9288def8f6741b47 https://gist.github.com/orlp/e880287287985ccd9288def8f6741b4....
I've also added a 'skipper' feature, that makes handling whitespace a breeze.