parser: rename and re-type token id symbols
parser: rename and re-type token id symbols

The token field of the symbol structure is a token identifier (and
*not* the pointer to a token structure).  It is only ever assigned a
token_id value, so change its type to the token_id enumerated type,
and reinforce it by using token_id as the name of the field.

Similarly, change the id field of the token structure to have the
token_id enumerated type.

Change the token id arguments passed to symbol_add(), token_expect(),
and token_accept() functions to have the token_id enumerated type,
and rename them token_id.  Note that for symbol_add() this means we
need to add the default case to the switch, to avoid a compiler
warning.

Signed-off-by: Alex Elder <f429030cf5c0faf36fac3d102073b6e63a647baa@linaro.org>
Message-Id: <20211001232338.769309-19-f429030cf5c0faf36fac3d102073b6e63a647baa@linaro.org>
Signed-off-by: Bjorn Andersson <6e6fda072d932515099508d6d220572c68e9add5@linaro.org>

andersson/qmic