All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Parsing errors in several headers
@ 2014-10-28 18:24 Jean-Sébastien Pédron
  2014-10-28 18:33 ` Julia Lawall
  0 siblings, 1 reply; 20+ messages in thread
From: Jean-Sébastien Pédron @ 2014-10-28 18:24 UTC (permalink / raw)
  To: cocci

Hi!

I'm very new to Coccinelle and I don't understand why spatch(1) returns
parsing errors on some headers and what I can do about that.

== First example ==

Header to parse:
https://github.com/freebsd/freebsd/blob/master/sys/ofed/include/linux/bitops.h

Full spatch command line and output:
http://pastebin.com/DbNhBAF7

spatch(1) fails to parse the #define at the end of the header. This
#define starts a for() loop and uses functions declared ealier in the
same file.

== Second example ==

Header to parse:
https://github.com/freebsd/freebsd/blob/master/sys/ofed/include/linux/spinlock.h

Full spatch command line and output:
http://pastebin.com/C0h5ZN7r

Here, it doesn't like the last #define again. This #define calls other
macros defined in other headers.

FYI, I'm using Coccinelle 1.0.0rc19 on FreeBSD.

Can somebody help me understand what's wrong here?

Thanks!

-- 
Jean-S?bastien P?dron

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20141028/a7c088ee/attachment.asc>

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-10-29 12:26 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 18:24 [Cocci] Parsing errors in several headers Jean-Sébastien Pédron
2014-10-28 18:33 ` Julia Lawall
2014-10-28 18:51   ` Jean-Sébastien Pédron
2014-10-28 19:10     ` SF Markus Elfring
2014-10-28 19:23       ` Jean-Sébastien Pédron
2014-10-28 20:19         ` Julia Lawall
2014-10-29  8:29         ` SF Markus Elfring
2014-10-29  8:35           ` Jean-Sébastien Pédron
2014-10-29  8:45             ` [Cocci] Addition of preprocessor statements with SmPL SF Markus Elfring
2014-10-29 10:26             ` [Cocci] Parsing errors in several headers Julia Lawall
2014-10-29 10:57               ` [Cocci] Addition of preprocessor statements with SmPL Jean-Sébastien Pédron
2014-10-29 11:01                 ` Julia Lawall
2014-10-29 11:07                 ` Julia Lawall
2014-10-29 11:25                   ` Jean-Sébastien Pédron
2014-10-29 12:26                     ` Jean-Sébastien Pédron
2014-10-29 12:05               ` [Cocci] Parsing errors in several headers SF Markus Elfring
2014-10-29  9:45         ` [Cocci] Addition of preprocessor statements with SmPL SF Markus Elfring
2014-10-29 10:02           ` Julia Lawall
2014-10-29 10:07             ` SF Markus Elfring
2014-10-29 10:23               ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.