On Sun, 17 Jun 2018, SF Markus Elfring wrote:

> >> Where do you expect that such an empty statement would occur here?
> >
> > Because your rule contained ...;
>
> Yes.
>
>
> > which is a ... followed by an empty statement.
>
> I hoped that a semicolon could be interpreted as the closing delimiter
> for an assignment statement.

No.  That would make the parse amiguous.  While a ... can match a single
expression, to avoid ambiguity, such a ... cannot appear at the beginning
of the expression.  A way around this is to put (...);  That could match
an assignment statement, due to the paren isomorphism.  But that won#t
match return c; because return c is not an expression either.  It's simply
not a complete term.

> > return c; is,
>
> My source code example contained this line.

Yes, but you have to get the ... to match something and the ; to match
something.  If the ; matches the ; at the end of the return, then what
does the ... match?

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to