2 ms·
The Pratt/TDOP scheme is a decentralized or OO way to organize the same idea. I coded them both, at https://github.com/darius/sketchbook/blob/master/parsing/pre
by abecedarius 11y ago
The Pratt/TDOP scheme is a decentralized or OO way to organize the same idea. I coded them both, at https://github.com/darius/sketchbook/blob/master/parsing/precedence_climbing.py https://github.com/darius/sketchbook/blob/master/parsing/pre... and https://github.com/darius/sketchbook/blob/master/parsing/pratt.py https://github.com/darius/sketchbook/blob/master/parsing/pra...
(My Pratt is smaller than my precedence-climbing here because I ended up actually using the latter, so it got some extras added.)