Search code examples
f#fparsec

Can someone give an example of using chainl1 in FParsec?


This is the most puzzling combinator in all of FParsec...

http://www.quanttec.com/fparsec/reference/primitives.html#members.chainl1

...but there is no example on how to use it in the documentation or, AFAIK, on any web pages on the internet. I have a left-recursive parse that seems to require it, but for the life of me I can't figure out how to call it or what to pass to it.

Please help :)


Solution

  • I have some pretty diagrams involving chainl1 (from my own C# code) here:

    http://lorgonblog.wordpress.com/2007/12/04/monadic-parser-combinators-part-three/