Andy,
I believe N must be an integral literal constant in all cases, as
opposed to a constant expression.This is so the parser can create the
enum names without having to evaluate any expressions. And yes it should
be a positive integral literal constant.
(1+1) is a not a literal, it is an expression.
The BNF only allows 'integral_number', which are literals like 1,2,3,
4'd5, 'b00110
Dave
Andy Tsay wrote:
>Hi,
>
>Please help to clarify Table 3-3 Enum Element Ranges on page 19
>of SV3.1a LRM.
>
>Question 1: Do 'integral constant' and 'integral literal constant'
> mean the same thing?
> In name[N], N must be an integral constant.
> In name[N] = C, N must be an integral literal constant.
>Question 2: Are the following examples allowed?
> name[1+1] // Is (1+1) an integral literal constant?
> name[-1]
> name[0]
>
>Does the LRM require N to be a positive integral constant expression
>over the integral literal(s)?
>
>Thanks for the help.
>
>Regards,
>Andy
>
>
>
>
>
>
>
-- -- David.Rich@Synopsys.com Technical Marketing Consultant and/or Principal Product Engineer http://www.SystemVerilog.org tele: 650-584-4026 cell: 510-589-2625Received on Tue Jul 20 13:17:42 2004
This archive was generated by hypermail 2.1.8 : Tue Jul 20 2004 - 13:17:47 PDT