A Monadic Pratt Parser in F#

added by jemts
12/29/2011 8:30:03 AM

4 Kicks, 256 Views

A blog post detailing the creation of a monadic pratt parser implemented in F#. Demonstrates the combination of Pratt parsing with parser combinators.


12/29/2011 8:31:37 AM
Sometimes I look at a piece of code written in a functional language, much like the Pratt parser in the article, and imagine how many lines of code it would take me to accomplish the same thing in an imperative or OO language...and I cry a little.

12/29/2011 9:31:46 AM
The brevity you gain with functional language and type inference is very comforting. At work I am using C# and JS mostly and there are times when I know what I just did could be expressed so much cleaner in a functional language.