Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvarofpp/template-antlr4
Template for ANTLR4.
https://github.com/alvarofpp/template-antlr4
antlr4 boilerplate
Last synced: 2 days ago
JSON representation
Template for ANTLR4.
- Host: GitHub
- URL: https://github.com/alvarofpp/template-antlr4
- Owner: alvarofpp
- License: bsd-3-clause
- Created: 2021-12-15T19:18:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-06T22:53:54.000Z (9 months ago)
- Last Synced: 2024-11-05T22:04:11.834Z (2 days ago)
- Topics: antlr4, boilerplate
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Boilerplate for ANTLR4
You can use this template to make your DSL (Domain-Specific Languages) using [ANTLR4][antlr].
In this template, you can use the Makefile to execute commands:
| Command | Description |
|----------------|------------------------------------------|
| `make antlr` | Run ANTLR. |
| `make compile` | Compile files in some cases (like Java). |
| `make grun` | Run the Parse Tree Inspector. |You can find a copy of this document in the [`docs`](docs) folder.
## Getting Started
To start your DSL you must run:
```shell
make init
```You must fill in the data or accept the default values, as in the example below:
```text
--- Project ---
Title ["Title here"]: My first DSL
Description ["Description here"]: A DSL to make "Hello World"--- Code Generation Target ---
Target language ["Java"]: Python3--- Grammar ---
The name of your grammar ["Expr"]: HelloWorldGenerating README.md
Done! (README.md)
Generating Makefile
Done! (Makefile)
Generating src/HelloWorld.g4
Done! (src/HelloWorld.g4)
```[antlr]: https://www.antlr.org/