This would be illegal by the BNF. It requires enum_identifier, and a
keyword is not an identifier.
Also, the main reason keywords are reserved is so that lexical analysis
can recognize keywords without messy context dependence. That applies
just as much in this situation as in any other. It doesn't matter to
lexical analysis that the eventual formed identifiers aren't keywords.
Lexical analysis is dealing with the input source text, not the formed
identifiers.
If the formed identifiers come out to be keywords (e.g. pull0), that
doesn't present any problem for lexical analysis, since it isn't having
to process those keywords in its input text. It does make it impossible
for the user to refer to those formed identifiers elsewhere without
using an escaped identifier. An escaped identifier should work, because
the LRM specifies that the identifier name is the name without the
backslash or terminating white space. So \pull0 refers to an identifier
with the name pull0, which matches the formed identifier.
Steven Sharp
sharp@cadence.com
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Mar 22 13:10:08 2010
This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 13:10:11 PDT