Closed gperciva closed 2 months ago
I debated between adding p_direct_abstract_declarator_8()
, vs. stuffing it in p_direct_abstract_declarator_3()
.
Putting it in _3
would keep the grammar in the same order as 6.7.6 -- namely, the static
functions going between direct-abstract-declarator_opt [ type-qualifier-list_opt assignment-expression_opt ]
and direct-abstract-declarator_opt [ * ]
. However, when parsing the static
as well, the _3()
we get len(p) == 6
, which is slightly awkward to handle in a function with currently has separate paths for len(p) > 4
or not.
In the end I put it in a new p_direct_abstract_declarator_8()
, but I'm happy to revise that if requested.
This is similar to:
which was revised shortly after in:
The grammar is as defined in C99 6.7.6 Type names, or A.2.2 Declarations (6.7.6).