https://github.com/antlr/grammars-v4
Revision 3b26af5ec5cfc28779e609b3f20fc7e6454c51d4 authored by Ken Domino on 15 March 2024, 02:44:56 UTC, committed by GitHub on 15 March 2024, 02:44:56 UTC
* Fix for #4008 Add TypeScript testing. Add "Antlr4ng" TypeScript for future testing , as it is superior to Antlr 4.13.1. Remove grammars that have TypeScript base class code as 4.13.1 does not work with these grammars. * Fix sql/plsql TypeScript target -- does not work for 4.13.1.
1 parent 3433639
Tip revision: 3b26af5ec5cfc28779e609b3f20fc7e6454c51d4 authored by Ken Domino on 15 March 2024, 02:44:56 UTC
[build] Fix for #4008 -- add testing of TypeScript target back (#4010)
[build] Fix for #4008 -- add testing of TypeScript target back (#4010)
Tip revision: 3b26af5
README.md
# Erlang grammar
## Source
[https://bitbucket.org/fenollp/erlang-grammar](https://bitbucket.org/fenollp/erlang-grammar)
## Overview
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](https://github.com/erlang/otp/blob/maint/lib/stdlib/src/erl_parse.yrl).
It is meant for students and people who work on Erlang's syntax.
## Requierements
* [antlr4](http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4)
* Erlang's **erlc** for preprocessing purposes.
## Usage
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
```
Computing file changes ...