Skip to content

ksrky/p3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P3: Programmable Pratt Parser

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”.

Examples

See the examples in the test directory. Example2 is currently the most expressive example.

Using repl

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"

About

Programmable Pratt Parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages