Use this repo as a base repo for antlr exercises.
You have to install Antlr 4 plugin before any operation.
-
Put in
src/main/antlr
dir all .g4 files. -
Put in
src/main/java
all your java classes.
You can implement Singleton Factory Pattern if you want to generate necessary objects.
You can put in src/main/ other directories for any language you want. -
Put in
src/test/java
dir all your test classes.
You can put all into main java dir, or you can use more practical Unit tests.
You can put in src/main/ other directories for any language you want. -
Put your test resources in
src/test/resources
, start classes or tests and check if all is right!
For any advice, feel free to open an issue, or a pr to improve this template.
I use Github Actions to check build status at any moment! Java CI