On Thu, 26 May 2011, Francis Galiegue wrote:

> On Wed, May 25, 2011 at 14:45, Julia Lawall <[email protected]> wrote:
> > On Wed, 25 May 2011, Francis Galiegue wrote:
> >
> [...]
> >>
> >> Hmm, can you give me an example of a "local idexpression" which is may
> >> _not_ be considered as an identifier? ie, why is it "idexpression" and
> >> not "identifier"?
> >
> > It's the other way around.  A structure field name is an identifier, but
> > is not an idexpression. An idexpression is an expression, something like 3
> > + 4, but it happens to be expressed as a sequence of characters.  It is
> > something that has a type and a value.  In a->b, b does not itself have a
> > value.
> >
> 
> Hmm err, OK, but you cannot really match "3 + 4" with an idexpression, can 
> you?

No, not at all.  It was an example of an expression.  Perhaps it was not 
such a clear example.  An idexpression is an expression, like 3 + 4 is an 
expression, but an idexpression is one that is also an identifier.

> * it has a type: 3 + 4 has a type (int by default), but you cannot
> declare 3 + 4;
> * it has a value: well, obviously.
> 
> Or do you exclude the space from "a sequence of characters"?

Yes.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to