On Thu, 29 Dec 2011, SF Markus Elfring wrote:
Fatal error: exception Failure("rule starting on line 12: already tagged
token:
C code context
File "pt1.c", line 19, column 20, charpos = 271
around = '"check"', whole content = my_append(my_copy("check", buffer), "
this
out");")
Do I need to adjust my filter pattern a bit more?
http://lists.diku.dk/pipermail/cocci/2011-December/002438.html
How can this error message be resolved?
There is a small discussion here.
http://cocci.ekstranet.diku.dk/wiki/doku.php?id=already_tagged_token_error
In your case, you should adjust the following rule:
@@
identifier pass_through.function;
expression result;
type cast;
@@
(
*function(...)
|
*result = (cast) function(...)
)
to be
@@
identifier pass_through.function;
expression result;
type cast;
@@
(
*function
(...)
|
*result =
(cast) function(...)
)
Your problem is that your example contains eg a(b(x)) and function matches
both a and b. Since the match for a causes it to tag both a and a's
argument list, then the match on b causes an already tagged token error,
on the tokens of b(x).
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)