/erlang-pratt

A short Pratt parser implementation in Erlang

Primary LanguageErlangMIT LicenseMIT

erlang-pratt

An Erlang implementation of the Pratt parser in Simple but Powerful Pratt Parsing by @matklad.

Build

Erlang and Rebar3 are required.

$ rebar3 escriptize

Run

$ echo "1 + 2 * 3" | _build/default/bin/pratt
(+ 1 (* 2 3))

Test

$ rebar3 eunit

License

Released under the MIT License (see LICENSE).