-
Notifications
You must be signed in to change notification settings - Fork 258
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
[BUG] Recognize _postfix-expression_ in _is-value-constraint_ #358
Comments
I think the answer may come from what became https://github.com/hsutter/cppfront/wiki/Design-note%3A-Unambiguous-parsing:
I wonder what the order is. I extract the grammar with |
My understanding is that //G is-as-expression:
//G prefix-expression
//G is-as-expression is-type-constraint
//G is-as-expression is-value-constraint
//G is-as-expression as-type-cast before having a chance at is-value-constraint. |
I bring up again the suggestion at the end of #352 (comment). |
The grammar permits the expression of is-value-constraint to be a postfix-expression. But if the postfix-expression is not a primary-expression, it fails as below.
Relevant Cpp2 grammar extract.
Current full Cpp2 grammar extracted from the sources.
Minimal reproducer (https://godbolt.org/z/z6PTPWGro):
Commands:
Expected result: The same as wrapping the postfix-expression in parentheses.
Actual result and error:
The text was updated successfully, but these errors were encountered: