So, the antlr4 C++ god's (Mike Lischke's) website states that everything in the parser was translated to C++. As such, what exactly does the jar do in the c++ implementation? More importantly, does my resulting program require the JVM after compilation?
Asked
Active
Viewed 72 times
1 Answers
3
ANTLR is generally composed of three parts:
- the code generator tool, aka front end, coded in Java
- a set of language specific code templates (python, java, ...)
- a set of language specific runtimes, aka backends
Depending on the language attribute of the options block (default: java) the tool selects the corresponding template for generation of the parser, lexer, and visitor/listener files.
The generated files only require their language specific backend to run. And, of course, any dependencies explicitly required by that backend.
So, no JVM is required to execute a C++ lexer/parser -- the JVM is only required for code generation.

GRosenberg
- 5,843
- 2
- 19
- 23