Pratt Parsers: Expression Parsing Made Easy
journal.stuffwithstuff.com
Pratt Parsers: Expression Parsing Made Easy
1–10 of 21 posts
Re: Pratt Parsers: Expression Parsing Made Easy
#2This perfectly describes all parsing discussions and papers I've read. I love it.
Re: Pratt Parsers: Expression Parsing Made Easy
#3Re: Pratt Parsers: Expression Parsing Made Easy
#4Re: Pratt Parsers: Expression Parsing Made Easy
#5Good post. I need to ruminate on this some more but it might well apply to something I'm working on.
Re: Pratt Parsers: Expression Parsing Made Easy
#6Re: Pratt Parsers: Expression Parsing Made Easy
#7I slapped together a crude lexer that works and we’ll just pretend that tokens are raining down from heaven or something. This perfectly describes all parsing discussions and papers I've read. I love it.
Re: Pratt Parsers: Expression Parsing Made Easy
#8I believe this algorithm is also known as "precedence climbing", and it's the most common way to deal with operator precedence in a recursive-descent parser.
the pratt parser is just a way of implementing such a parser.
to be technical, it is a form of left-corner parsing
Re: Pratt Parsers: Expression Parsing Made Easy
#9Re: Pratt Parsers: Expression Parsing Made Easy
#10I believe this algorithm is also known as "precedence climbing", and it's the most common way to deal with operator precedence in a recursive-descent parser.
Delphi uses this parsing method for expressions, and is one of the reasons it's so fast at compiling.