Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvarofpp/docker-antlr4
A docker image for ANTLR4.
https://github.com/alvarofpp/docker-antlr4
antlr4 docker docker-image
Last synced: 2 days ago
JSON representation
A docker image for ANTLR4.
- Host: GitHub
- URL: https://github.com/alvarofpp/docker-antlr4
- Owner: alvarofpp
- License: bsd-3-clause
- Created: 2021-12-11T17:37:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-06T23:00:25.000Z (9 months ago)
- Last Synced: 2024-02-07T03:37:17.434Z (9 months ago)
- Topics: antlr4, docker, docker-image
- Language: Makefile
- Homepage: https://hub.docker.com/r/alvarofpp/antlr4
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker image for ANTLR4
[![Docker Hub](https://img.shields.io/badge/-Docker_Hub-0062cc?style=for-the-badge&logo=Docker&logoColor=white)][docker-hub]
A docker image based in Alpine for [ANTLR4][antlr4], inspired by the [official image][antlr4-docker].
```shell
docker pull alvarofpp/antlr4
```> If you want to start a project using ANTLR4, I recommend using the following boilerplate:
[alvarofpp/boilerplate-antlr4][boilerplate-antlr4].## How to use
Generate files from your grammar:
```shell
docker run --rm -u $(id -u) -v $(pwd):/work alvarofpp/antlr4 antlr -Dlanguage=Java Expr.g4
```Compile:
```shell
docker run --rm -u $(id -u) -v $(pwd):/work alvarofpp/antlr4 javac src/Expr*.java
```View using the GUI (tested on Ubuntu 20.04.3 LTS):
```shell
docker run --rm -u $(id -u) -it \
-e DISPLAY=$(hostname -I | cut -f1 -d' '):0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd)/src:/work alvarofpp/antlr4 grun Expr prog -gui
```[antlr4]: https://github.com/antlr/antlr4
[antlr4-docker]: https://github.com/antlr/antlr4/tree/master/docker
[boilerplate-antlr4]: https://github.com/alvarofpp/boilerplate-antlr4
[docker-hub]: https://hub.docker.com/r/alvarofpp/antlr4