P3 is based on Pratt parser, but it is extended to parse almost any kind of expressions. Since no distinction is made between built-in and user-defined operators, P3 is, in that sense, “programmable”.
See the examples in the test
directory. Example2 is currently the most expressive example.
You can try the examples interactively using cabal repl
.
$ cabal repl p3-test
ghci> :m + *P3.Example2
ghci> parseInput "let double = \x -> x * 2 in double 5"