3 ms·
They're the same algorithm expressed in different styles: structured for precedence climbing, and as you say OO or 'data driven' for Pratt. https://github.com/
by abecedarius 11y ago
They're the same algorithm expressed in different styles: structured for precedence climbing, and as you say OO or 'data driven' for Pratt.
https://github.com/darius/sketchbook/blob/master/parsing/precedence_climbing.py#L29 https://github.com/darius/sketchbook/blob/master/parsing/pre...
https://github.com/darius/sketchbook/blob/master/parsing/pratt.py#L13 https://github.com/darius/sketchbook/blob/master/parsing/pra...