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

Access specifier grammar is not clear #40

Closed
peterwvj opened this issue Dec 14, 2016 · 5 comments
Closed

Access specifier grammar is not clear #40

peterwvj opened this issue Dec 14, 2016 · 5 comments

Comments

@peterwvj
Copy link
Member

peterwvj commented Dec 14, 2016

As explained in overturetool/overture#610 there used to be a minor issue with parsing of access specifiers that has now been fixed. In addition, there is another problem with the way the grammar is defined.

In the LRM the access operation definition nonterminal defines two orderings of keywords. This made sense when it could only be either static or an access specifier, but with pure and async in the mix we have various possibilities, and picking two arbitrary orderings seems strange:

access operation definition = ( [ ‘pure’ ], [ ‘async’ ] [ access ], [ ‘static’ ]) |
( [ ‘pure’ ], [ ‘async’ ] [ ‘static’ ], [ access ]),
operation definition ;

access = ‘public’ | ‘private’ | ‘protected’ ;
@nickbattle nickbattle changed the title Access speciffier grammer is not clear Access specifier grammar is not clear Feb 12, 2017
@paulch42
Copy link

I think Nick's suggestion is

access operation definition =  {'pure'|'async'|access|'static'}, operation definition;

I propose we accept this and the constraint of no duplicates is external to the grammar.

@tomooda
Copy link
Member

tomooda commented Jul 15, 2017

I agree. Nonsense combinations like "public private" can be handled as a semantic issue.

@peterwvj
Copy link
Member Author

The LB support the change proposed, which is also compatible with the tools. The LRM still needs to be updated to reflect this change.

tomooda added a commit to overturetool/documentation that referenced this issue Nov 12, 2017
@tomooda
Copy link
Member

tomooda commented Nov 12, 2017

@peterwvj
Copy link
Member Author

Thanks!

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

3 participants