In C declarations, the (and any [] ) are part of the variable-ident, as
is the case in the binder grammar. So the original grammar was ambiguous,
as the could be part of the type-expr or the variable-ident
There are situations in which a type-expr with * etc. and without a
variable name are needed, such as in cast expressions. C grammar calls
these abstract declarators.
However, the grammar for a parameter is type-expr id, which permits (and
requires) the non-C declaration style int[] a .
So unless the intention is to encourage the non-C styule of declaration,
the grammar for parameter needs to change as well. I'm going to be
reviewing all of these declaration grammar elements this weekend (in
Brittany I hope). Your comments today would be welcome.
I don't understand this change. As far as I can tell, this would prevent
writing something like
assert list_positive: \forall list p; reachable(root, p) ==> p->content >
0; unless we have an explicit typedef for list .
In C declarations, the (and any [] ) are part of the variable-ident, as is the case in the binder grammar. So the original grammar was ambiguous, as the could be part of the type-expr or the variable-ident
There are situations in which a type-expr with * etc. and without a variable name are needed, such as in cast expressions. C grammar calls these abstract declarators.
However, the grammar for a parameter is type-expr id, which permits (and requires) the non-C declaration style int[] a .
So unless the intention is to encourage the non-C styule of declaration, the grammar for parameter needs to change as well. I'm going to be reviewing all of these declaration grammar elements this weekend (in Brittany I hope). Your comments today would be welcome.
On Tue, Jul 23, 2019 at 5:19 PM Virgile Prevosto notifications@github.com wrote: