Bear Giles <bgiles(at)coyotesong(dot)com> writes:
> As an aside, is there any reason to treat TEMP and TEMPORARY as two
> separate identifiers?
Yes: if the lexer folds them together then unreserved_keyword can't
regenerate the equivalent name properly. (Possibly this could be fixed
by making the lexer pass the input string as the value of a keyword
token, but I've not looked at details.)
You might be right that the grammar could benefit from some refactoring,
though I'm not at all sure if that really helps from an
execution-efficiency (number of states) standpoint.
regards, tom lane