Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

antlr4 generated files - which are required at runtime

Tags:

java

antlr

I wanted to use antlr library for one of my projects. I browsed through available wiki pages on antlr4 website and written my grammar.

Everything looks good but I am wondering about some of the generated files.

I have bunch of .java files (Lexer, Parser, Listener, BaseListener) but I also have two files with .tokens extension. I am wondering if they are needed by generated parser and lexer during runtime or they are just byproduct of java code generation and I do not need to include them in my project?

like image 210
Andna Avatar asked Nov 10 '13 15:11

Andna


1 Answers

.tokens files are not needed at runtime. They are just used for ANTLR to share info between grammars, if necessary.

like image 67
Terence Parr Avatar answered Sep 21 '22 11:09

Terence Parr