All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci]  disjunction and parens
@ 2013-08-07 15:21 ron minnich
  2013-08-07 15:29 ` [Cocci] " ron minnich
  2013-08-09 10:56 ` [Cocci] " Michael Stefaniuc
  0 siblings, 2 replies; 3+ messages in thread
From: ron minnich @ 2013-08-07 15:21 UTC (permalink / raw)
  To: cocci

I've never been sure what to do about this error:

[rminnich at localhost akaros]$ spatch --sp-file !$ kern/src/chan.c
spatch --sp-file scripts/spatch/waserror.cocci kern/src/chan.c
init_defs_builtins: /usr/share/coccinelle/standard.h
Fatal error: exception Failure("normal parenthesis in line 5 matched
to disjunction parenthesis on line 7 column 0

Spatch is:

@@
type T;
identifier f;
@@
T F(...,
+struct errbuf *errbuf
){...}

What did I do wrong here?
_______________________________________________
Cocci mailing list
Cocci at diku.dk
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

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

* [Cocci]  Re: disjunction and parens
  2013-08-07 15:21 [Cocci] disjunction and parens ron minnich
@ 2013-08-07 15:29 ` ron minnich
  2013-08-09 10:56 ` [Cocci] " Michael Stefaniuc
  1 sibling, 0 replies; 3+ messages in thread
From: ron minnich @ 2013-08-07 15:29 UTC (permalink / raw)
  To: cocci

Coccinnelle is always right, that's the rule.

Fixed spatch:

@@
type T;
identifier f;
@@
T f(...
+, struct errbuf *errbuf)
-)
{...}



On Wed, Aug 7, 2013 at 8:21 AM, ron minnich <rminnich@gmail.com> wrote:
> I've never been sure what to do about this error:
>
> [rminnich at localhost akaros]$ spatch --sp-file !$ kern/src/chan.c
> spatch --sp-file scripts/spatch/waserror.cocci kern/src/chan.c
> init_defs_builtins: /usr/share/coccinelle/standard.h
> Fatal error: exception Failure("normal parenthesis in line 5 matched
> to disjunction parenthesis on line 7 column 0
>
> Spatch is:
>
> @@
> type T;
> identifier f;
> @@
> T F(...,
> +struct errbuf *errbuf
> ){...}
>
> What did I do wrong here?
_______________________________________________
Cocci mailing list
Cocci at diku.dk
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

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

* [Cocci] disjunction and parens
  2013-08-07 15:21 [Cocci] disjunction and parens ron minnich
  2013-08-07 15:29 ` [Cocci] " ron minnich
@ 2013-08-09 10:56 ` Michael Stefaniuc
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Stefaniuc @ 2013-08-09 10:56 UTC (permalink / raw)
  To: cocci

On 08/07/2013 05:21 PM, ron minnich wrote:
> I've never been sure what to do about this error:
> 
> [rminnich at localhost akaros]$ spatch --sp-file !$ kern/src/chan.c
> spatch --sp-file scripts/spatch/waserror.cocci kern/src/chan.c
> init_defs_builtins: /usr/share/coccinelle/standard.h
> Fatal error: exception Failure("normal parenthesis in line 5 matched
> to disjunction parenthesis on line 7 column 0
> 
> Spatch is:
> 
> @@
> type T;
> identifier f;
> @@
> T F(...,
> +struct errbuf *errbuf
> ){...}
> 
> What did I do wrong here?
) is special when it is on the first column in a line. If you add a
space before it, it will just work. It is a good practice to start code
matching lines with a space; like the context lines in the unified diff
format.

bye
	michael

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

end of thread, other threads:[~2013-08-09 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07 15:21 [Cocci] disjunction and parens ron minnich
2013-08-07 15:29 ` [Cocci] " ron minnich
2013-08-09 10:56 ` [Cocci] " Michael Stefaniuc

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.