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

Java.g4 repeated modifier ? #59

Closed
JuanTanamera opened this issue May 8, 2014 · 2 comments
Closed

Java.g4 repeated modifier ? #59

JuanTanamera opened this issue May 8, 2014 · 2 comments

Comments

@JuanTanamera
Copy link

Is it intentional that the grammar accepts constructs such as

public public void myMethod() { }

where a modifier is repeated?

@parrt
Copy link
Member

parrt commented May 8, 2014

yes, there is always a trade-off between trying to enforce too much in syntax versus later with semantic checking. Is very challenging to match one of several elements but at most one using syntax. Often implies delineating all possible combinations.

@parrt parrt closed this as completed May 8, 2014
@JuanTanamera
Copy link
Author

Thanks, I suspected it might be on purpose, but as I am totally new to this it's good to know why. I thought briefly about how it might be fixed but also thought it might be hard!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants