Neotoma Compiler
A mix compiler which adds support for compiling
Neotoma .peg
files into Erlang source.
Installation
Add to your dependencies by adding it to the deps in you mix.exs
. You only
need to add it to your :dev
and maybe :test
environments to compile your
parsers for export as part of your mix package.
def deps do
[
# ...
{:neotoma_compiler, "~> 0.1.1", only: [:dev, :test], runtime: false},
# ...
]
end
Additionally you must add it to your project's compilers:
def project do
[
# ...
compilers: compilers(Mix.env())
# ...
]
end
defp compilers(env) when env in [:dev, :test], do: [:neotoma | Mix.compilers()]
defp compilers(_env), do: Mix.compilers()
Now any file ending in .peg
will be compiled into a corresponding .erl
file
in the same directory.
Github Mirror
This repository is mirrored on Github from it's primary location on my Forgejo instance. Feel free to raise issues and open PRs on Github.
License
This software is licensed under the terms of the
HL3-FULL, see the LICENSE.md
file included with
this package for the terms.
This license actively proscribes this software being used by and for some industries, countries and activities. If your usage of this software doesn't comply with the terms of this license, then contact me with the details of your use-case to organise the purchase of a license - the cost of which may include a donation to a suitable charity or NGO.