https://bitbucket.org/fenollp/erlang-grammar
An unofficial Erlang grammar adaptation in ANTLR v4. Typically, the only one on the web.
It is merely extracted from the official non-standard grammar from Erlang/OTP sources.
It is meant for students and people who work on Erlang's syntax.
- antlr4
- Erlang's erlc for preprocessing purposes.
Generate the grammar from Erlang.g4 with:
:::bash
make clean all
Live debug with tree representation:
:::bash
make debug
…type Erlang forms…
^D
Preprocess files in src/ and check Erlang.g4 against preprocessed files in examples/:
:::bash
./check.sh src examples
Check Erlang.g4 against the whole Erlang/OTP's .erl
sources:
:::bash
make check