Monadic Parser Combinators using C# 3.0 - LukeH's WebLog - Site Home -

added by schalkvanwyk
1/11/2011 8:00:32 PM

1 Kicks, 154 Views

Parser combinators are an idea that I enjoy every time I go back and look at again. They are an approach to building parsers by composing very simple atomic parsers into bigger and bigger units which can ultimately express real world grammars. This idea has been particularly popular in functional languages where the parsers can naturally be thought of as functions from input strings to parse trees, and composition of parsers is just function composition. This approach often leads to a simple syntax which makes the resulting parsers pleasantly declarative in that internal-DSL kind of way.


0 comments