Parsing with derivatives in Rust.
Racket Rust
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Cargo.toml
LICENSE-APACHE.md
LICENSE-MIT.md
README.md
dparse.rkt

README.md

Parrot: Parsing with Derivatives

Parrot is a Rust library implementing Parsing with Derivatives (PWD), an efficient (and easy to understand!) algorithm for parsing context-free languages. Unlike other common parsing methods, like parser combinators or parsing expression grammars, PWD parses all possible context-free grammars, so there's no need to fiddle around rewriting your grammar to get it working.

The Algorithm

The PWD algorithm was first described by Matthew Might, David Darais, and Daniel Spiewak in their paper "Parsing with Derivatives: A Functional Pearl." The performance was then improved by Michael Adams, Celeste Hollenbeck, and Matthew Might in their paper "On the Complexity and Performance of Parsing with Derivatives."

Licensing

This library is dual-licensed under the MIT license and Apache 2.0 license.