Just curious, what was the original motivation behind this enum range syntax? How is it considered useful to generate a bunch of enum names like n_1, n_2, ..., n_10 automatically?
And I don't really want to suggest adding any new features, but why is this automatic name generation facility only defined for enums? Why not for wires?
Paul
----- Original Message -----
From: "Steven Sharp" <sharp@cadence.com>
To: "Greg Jaxon" <Greg.Jaxon@synopsys.com>, djones@xtreme-eda.com, "Dave Rich" <Dave_Rich@mentor.com>
Cc: "shalom bresticker" <shalom.bresticker@intel.com>, sv-bc@eda.org
Sent: Monday, March 22, 2010 4:09:53 PM
Subject: RE: [sv-bc] enum range with keyword
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. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Mar 22 14:19:16 2010
This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 14:19:19 PDT