grule-rule-engine is heavily using ANTLR4 lexer/parser to parse GRL rule. The parser
.go
files were generated by ANTLR4 tools program.
The latest version can be downloaded here (antlr-4.9.2-complete.jar) Or you can always go to ANTLR4 download page
Download the .jar
file and place it somewhere a directory.
Yes, you need Java for this. You can download java from Oracle's Java Download Page. Install java and you're ready to work with ANTLR4.
alias antlr='java -jar /path/to/downloaded/antlr-4.9.2-complete.jar'
To build ANTLR4's golang listener or visitor, go to the directory where you
have your antlr4 grammar .g4
file. And then execute the following command.
antlr -Dlanguage=Go -o parser -package grulev3 -lib . -listener -visitor grulev3.g4