Parse a declarator or an abstract declarator.
(parse-declarator-or-abstract-declarator parstate) → (mv erp declor/absdeclor span new-parstate)
This is called when expecting either a declarator or an abstract declarator (this happens in a parameter declaration, after establishing that the parameter declarator is present). Thus, this parsing function returns a possibly ambiguous declarator or abstract declarator.
We try to parse both a declarator and an abstract declarator, using the checkpointing and backtracking feature. If only one succeeds, there is no ambiguity, and we return either a declarator or an abstract declarator (wrapped). If both succeed, there is an ambiguity, which we return as such. If none succeeds, it is an error.
A complication is that an abstract declarator
may be a prefix of a declarator,
e.g.