Re: [Cocci] comma operator

2012-02-02 Thread Julia Lawall
On Thu, 2 Feb 2012, Mansour Moufid wrote: On Thu, Feb 2, 2012 at 9:03 AM, Julia Lawall wrote: Not at the moment.  I can try to add it. It's no big deal, I can work around it. OK, I will look into it anyway, since if one person wants it, so might someone else... julia Thanks for the wo

Re: [Cocci] comma operator

2012-02-02 Thread Mansour Moufid
On Thu, Feb 2, 2012 at 9:03 AM, Julia Lawall wrote: > Not at the moment.  I can try to add it. It's no big deal, I can work around it. Thanks for the work on Coccinelle, btw, seems like a great tool. Mansour ___ Cocci mailing list Cocci@diku.dk http:/

Re: [Cocci] comma operator

2012-02-02 Thread Julia Lawall
On Thu, 2 Feb 2012, Mansour Moufid wrote: Hello, I'm trying to use the comma operator in a patch. For example: @@ identifier x; @@ - x = 5; + x = (3, 5); to patch: int main(void) { int x; x = 5; return 0; } I get a parse error... Is it possible to u

[Cocci] comma operator

2012-02-02 Thread Mansour Moufid
Hello, I'm trying to use the comma operator in a patch. For example: @@ identifier x; @@ - x = 5; + x = (3, 5); to patch: int main(void) { int x; x = 5; return 0; } I get a parse error... Is it possible to use the comma operator in a patch at

Re: [Cocci] Comma operator and literal replacement

2011-01-22 Thread Philipp Kutin
Hah, typical of me not to think of the obvious solution. Thanks for the help and quick reply. Julia Lawall wrote: On Sat, 22 Jan 2011, Håkon Løvdal wrote: On 21 January 2011 23:38, Philipp Kutin wrote: Hi, I'm trying to do my first steps with Coccinelle but can't get the following to work:

Re: [Cocci] Comma operator and literal replacement

2011-01-22 Thread Julia Lawall
On Sat, 22 Jan 2011, Håkon Løvdal wrote: > On 21 January 2011 23:38, Philipp Kutin wrote: > > Hi, > > > > I'm trying to do my first steps with Coccinelle but can't get the following > > to work: basically, for debugging, I want to implement a poor man's array > > bound check by doing something li

Re: [Cocci] Comma operator and literal replacement

2011-01-22 Thread Håkon Løvdal
On 21 January 2011 23:38, Philipp Kutin wrote: > Hi, > > I'm trying to do my first steps with Coccinelle but can't get the following > to work: basically, for debugging, I want to implement a poor man's array > bound check by doing something like > > @@ > expression E; > @@ > > - sprite[E] > + spr

Re: [Cocci] Comma operator and literal replacement

2011-01-21 Thread Julia Lawall
On Fri, 21 Jan 2011, Philipp Kutin wrote: > Hi, > > I'm trying to do my first steps with Coccinelle but can't get the following to > work: basically, for debugging, I want to implement a poor man's array bound > check by doing something like > > @@ > expression E; > @@ > > - sprite[E] > + sprit

[Cocci] Comma operator and literal replacement

2011-01-21 Thread Philipp Kutin
Hi, I'm trying to do my first steps with Coccinelle but can't get the following to work: basically, for debugging, I want to implement a poor man's array bound check by doing something like @@ expression E; @@ - sprite[E] + sprite[{( int tmp=E; (tmp<0 ? (*(int*)123=234) : tmp) )}] . Since G