[Cocci] how to use "#pragma" in rules

Gregory Mounie Gregory.Mounie at imag.fr
Thu Jan 12 19:03:58 CET 2012


  Hello,

  I am just a beginner in coccinelle thus my question may have a simple 
solution. Sorry if I miss it in the doc.

  Is it possible to use a "#pragma string1 string2 string3" in a spatch ?

  I did not find #pragma in the formal grammar description, just #include

  and I did not succed to avoid "#" Lexer_cocci.Lexical("unrecognised 
symbol, in token rule: #")

  Ideally, I would like to get the pragma string in a python script of 
the spatch :-)

  Thanks in advance,
  Grégory


More information about the Cocci mailing list