Re: [Cocci] might be bug report, breaking up of a comment

2018-03-12 Thread Robert Larice
Julia Lawall  writes:

> The problem is fixed now.
>
> julia

Thank You !
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] might be bug report, breaking up of a comment

2018-03-11 Thread Julia Lawall


On Sat, 17 Feb 2018, Robert Larice wrote:

> Julia Lawall  writes:
>
> > On Sat, 17 Feb 2018, Robert Larice wrote:
> >
> >> Hello,
> >>
> >>   attached is a small example which seems to
> >> break up a comment line,
> >> thus commenting out following lines.
> >>
> >>   Please look at the "long reuse" line
> >> which will have an open comment when spatch is run,
> >> thus commenting out the following "struct line *options"
> >
> > I also see this undesriable behavior.  Thanks for the report.
> >
> > julia
>
> grepping a bit in the source code I found this:
>   cpp_eat_until_nl
> perhaps in the vicinity of the issue.
>
> and there is this comment somewhere:
>
> (* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
>  * then he has already erased the /* comment. So:
>  * - dont eat the start of the comment otherwise afterwards we are in the 
> middle
>  *   of a comment and so will problably get a parse error somewhere.
>  * - have to recognize comments in cpp_eat_until_nl.
>  *)

The problem is fixed now.

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] might be bug report, breaking up of a comment

2018-02-17 Thread Julia Lawall


On Sat, 17 Feb 2018, Robert Larice wrote:

> Julia Lawall  writes:
>
> > On Sat, 17 Feb 2018, Robert Larice wrote:
> >
> >> Hello,
> >>
> >>   attached is a small example which seems to
> >> break up a comment line,
> >> thus commenting out following lines.
> >>
> >>   Please look at the "long reuse" line
> >> which will have an open comment when spatch is run,
> >> thus commenting out the following "struct line *options"
> >
> > I also see this undesriable behavior.  Thanks for the report.
> >
> > julia
>
> grepping a bit in the source code I found this:
>   cpp_eat_until_nl
> perhaps in the vicinity of the issue.
>
> and there is this comment somewhere:
>
> (* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
>  * then he has already erased the /* comment. So:
>  * - dont eat the start of the comment otherwise afterwards we are in the 
> middle
>  *   of a comment and so will problably get a parse error somewhere.
>  * - have to recognize comments in cpp_eat_until_nl.
>  *)

Thanks for the help, but that's not it at all.  The problem is in the
function get_indent in the file parsing_c/unparse_c.ml.  I'll try to fix
it tomorrow.

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] might be bug report, breaking up of a comment

2018-02-17 Thread Robert Larice
Julia Lawall  writes:

> On Sat, 17 Feb 2018, Robert Larice wrote:
>
>> Hello,
>>
>>   attached is a small example which seems to
>> break up a comment line,
>> thus commenting out following lines.
>>
>>   Please look at the "long reuse" line
>> which will have an open comment when spatch is run,
>> thus commenting out the following "struct line *options"
>
> I also see this undesriable behavior.  Thanks for the report.
>
> julia

grepping a bit in the source code I found this:
  cpp_eat_until_nl
perhaps in the vicinity of the issue.

and there is this comment somewhere:

(* cpp recognize C comments, so when #define xx (yy) /* comment \n ... */
 * then he has already erased the /* comment. So:
 * - dont eat the start of the comment otherwise afterwards we are in the middle
 *   of a comment and so will problably get a parse error somewhere.
 * - have to recognize comments in cpp_eat_until_nl.
 *)

___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] might be bug report, breaking up of a comment

2018-02-17 Thread Julia Lawall


On Sat, 17 Feb 2018, Robert Larice wrote:

> Hello,
>
>   attached is a small example which seems to
> break up a comment line,
> thus commenting out following lines.
>
>   Please look at the "long reuse" line
> which will have an open comment when spatch is run,
> thus commenting out the following "struct line *options"

I also see this undesriable behavior.  Thanks for the report.

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci