Andna
Andna

Reputation: 6689

antlr4 generated files - which are required at runtime

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?

Upvotes: 7

Views: 891

Answers (1)

Terence Parr
Terence Parr

Reputation: 5962

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

Upvotes: 12

Related Questions