简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM