Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a -package foo command line option #11

Closed
parrt opened this issue Feb 14, 2012 · 1 comment
Closed

Make a -package foo command line option #11

parrt opened this issue Feb 14, 2012 · 1 comment

Comments

@parrt
Copy link
Member

parrt commented Feb 14, 2012

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.

parrt added a commit that referenced this issue Feb 15, 2012
@sharwell
Copy link
Member

This option was initially added in 913bb71, then tweaked in the following to a working state:

71276f7
8e3b85d

parrt pushed a commit that referenced this issue Jun 30, 2015
Add properties to enable access to Lexer fields
parrt pushed a commit that referenced this issue Jun 30, 2015
Fixed template to correctly deal with wildcards
Sorry for the delay, this had gotten off my radar
Can you provide a sample grammar that breaks due to this bug?
parrt pushed a commit that referenced this issue Jun 30, 2015
parrt pushed a commit that referenced this issue Nov 7, 2016
@ericvergnaud ericvergnaud mentioned this issue Nov 8, 2016
KvanTTT pushed a commit to KvanTTT/antlr4 that referenced this issue Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants