antlr/antlr4 — Issue #11: Make a -package foo command line option
Author: parrt
Created: 2012-02-14 18:23:53+00:00
State: open

We sometimes need to know if the generated code is going into a package or whatever the target language called package. For example, when generating interfaces and such, it would be nice to say

import static MyParser.*;

so that we can simply reference FooContext instead of having to prefix it with MyParser. If there is no package specification that we generate in the default package. Due to a limitation in Java, we must prefix the context names with the parser name.