3 ms·
Yup, they are all variations of the same idea. What makes the Pratt parser so much nicer is how naturally it fits with the rest of a recursive descent parser. T
by sirwhinesalot 3y ago
Yup, they are all variations of the same idea. What makes the Pratt parser so much nicer is how naturally it fits with the rest of a recursive descent parser. The original paper is somewhat annoying to read due to very strange naming of things, but you can write a pratt parser in like 4 lines of code (not counting the mapping from operator to the next parser call), it's crazy simple.