On Wed, 25 May 2011, Francis Galiegue wrote:
> On Wed, May 25, 2011 at 07:51, Julia Lawall <[email protected]> wrote:
> > On Tue, 24 May 2011, Francis Galiegue wrote:
> >
> >> ... Which is slowly making progress.
> >>
> >> Why, to declare a local variable, you have to declare:
> >>
> >> local idexpression x;
> >>
> >> and not:
> >>
> >> local identifier x;
> >>
> >> ?
> >>
> >> I know that identifiers can also match function names, but what
> >> special meaning does idexpression have in this context?
> >
> > For an idexpression you can specify a type.
> >
> > Also, in general an identifier is just a name, like a string. If might
> > for example be a structure field. A structure field has no notion of
> > being local.
> >
> > julia
> >
>
> 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.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)