I think that there are more side-effecting expressions that you should
consider, eg E += E2, etc.
The following lines from the SmPL lexer shows the operators that are
supported:
| "-=" { start_line true; mkassign Ast.Minus lexbuf }
| "+=" { start_line true; mkassign Ast.Plus lexbuf }
| "*=" { start_line true; mkassign Ast.Mul lexbuf }
| "/=" { start_line true; mkassign Ast.Div lexbuf }
| "%=" { start_line true; mkassign Ast.Mod lexbuf }
| "&=" { start_line true; mkassign Ast.And lexbuf }
| "|=" { start_line true; mkassign Ast.Or lexbuf }
| "^=" { start_line true; mkassign Ast.Xor lexbuf }
| ">?=" { start_line true; mkassign Ast.Max lexbuf }
| "<?=" { start_line true; mkassign Ast.Min lexbuf }
| "<<=" { start_line true; mkassign Ast.DecLeft lexbuf }
| ">>=" { start_line true; mkassign Ast.DecRight lexbuf }
Also, if the output from -D patch is sometimes undesirable, it would be
useful to mention that in the initial comments about the semantic patch,
so that the user knows that there is something to look for. The
convention seems to be to put such comments after //#
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci