Parselix

A parser combinator library for Elixir.
hex.pm version

Document

Parselix Document

Features

For what?

Installation

Add {:parselix, "~> 0.1.0"} to deps of your app.

Example

See the json parser implementation by Parselix.
And, see the following its usage.

iex> use Parselix
iex> use Parselix.Prepared.JSON
iex> json |> parse("{\"name\": \"Parselix\"}")
{:ok, %{"name" => "Parselix"}, "",
 %Parselix.Position{horizontal: 20, index: 20, vertical: 0}}
iex> json |> parse("{\"name\": \"Parselix}")
{:error, "No parser succeeded.",
 %Parselix.Position{horizontal: 0, index: 0, vertical: 0}}

License

MIT

Author

ryo33