RE: [sv-bc] "." operator?

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Fri Apr 30 2004 - 11:47:35 PDT

There are contexts in which . can follow a more
general expression. See method_call_root in A.8.2.

-- Brad

p.s. But most .'s are part of hierarchical_identifiers.

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
Rishiyur S. Nikhil
Sent: Friday, April 30, 2004 10:50 AM
To: Francoise Martinolle
Cc: sv-bc@eda.org
Subject: Re: [sv-bc] "." operator?

In a phrase: x.y

there is no impediment to x being an expression, either semantically
or practically. In fact, when we select a member of an element of
an array, e.g., arr[23].y
the LHS is indeed an expression (arr[23]).

However, y cannot be an expression: it has to be a known member name.

Since y cannot be an expression, I don't think of '.' as an operator,
i.e., it's RHS is not an expression, it is always a member name.
In a sense, one could think of '.y' as a post-fix operator on an expression.

Nikhil

Francoise Martinolle wrote:

> Is the " . "an operator?
>
> Can you write the following:
> typedef struct
> {
> logic MEMBER
> integer DATA;
> } mystruct;
>
> mystruct S1, S2;
> reg r;
>
> *r = (cond ? S1 : S2).MEMBER;
>
>
> *In any case, I did not find anything in the formal BNF which allows the
> above; however the . is listed as an operator in table 7.2
>
> Francoise
> '
Received on Fri Apr 30 11:48:32 2004

This archive was generated by hypermail 2.1.8 : Fri Apr 30 2004 - 11:48:36 PDT