Parse a declaration or a statement.
(parse-declaration-or-statement parstate) → (mv erp decl/stmt span new-parstate)
This is called when a block item may be a declaration or an expression statement, which have a complex syntactic overlap, as explained in amb-decl/stmt. Thus, this parsing function returns a possibly ambiguous declaration or statement.
We try to parse both a declaration and an expression followed by a semicolon (note that a declaration always ends in semicolon). If only one succeeds, there is no ambiguity, and we return either a declaration or a statement (wrapped); since the statement is always an expression statement, we actually return an expression in this case. If both succeed, there is an ambiguity, which we return as such. If none succeeds, it is an error.