(maint) Output extra info for debugging parser and cleanup
This adds output of the token number when an error occurs (it otherwise
only outputs the text representation, and there are several tokens where
the text is the same). This only matters when debugging a grammar and
this behavior is used when @yydebug manually has been set to true.
This commit also cleans up dead comments and removes unused code.