position confusion?
This is nonsense, but I don't see why it shouldn't parse:
@a@
type T;
identifier x;
position p;
@@
T x at p = { };
@b@
type T;
identifier x;
position p;
@@
T x at p = { };
@@
position p != a.p;
position q != b.p;
type T;
identifier x;
@@
*T x at q = {};
->
148 149
Fatal error: exception Failure("meta: parse error: \n = File \"/tmp/test.spatch\", line 17, column 16,??charpos = 148\n????around = 'p', whole content = position q != b.p;\n")
if I replace 'p' by 'q' in @b@, it works fine?
johannes
Quoted 24 lines · Johannes Berg
This is nonsense, but I don't see why it shouldn't parse:
@a@
type T;
identifier x;
position p;
@@
T x at p = { };@b@
type T;
identifier x;
position p;
@@
T x at p = { };@@
position p != a.p;
position q != b.p;
type T;
identifier x;
@@
*T x at q = {};
Quoted 6 lines
->
148 149
Fatal error: exception Failure("meta: parse error: \n = File \"/tmp/test.spatch\", line 17, column 16,??charpos = 148\n????around = 'p', whole content = position q != b.p;\n")if I replace 'p' by 'q' in @b@, it works fine?
Yes. It's stupid, but the declaration of p on the line position p != a.p; somehow takes over the name p. To fix someday.
julia
Quoted 7 lines
johannes
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
Quoted 1 line · Johannes Berg
This is nonsense, but I don't see why it shouldn't parse:
Hi,
Quoted 11 lines
@a@
type T;
identifier x;
position p;
@@
T x at p = { };@b@
type T;
identifier x;
position p;
This should be "position p != a.p;".
Quoted 6 lines
@@
T x at p = { };@@
position p != a.p;
position q != b.p;
And here no need to put constraint for q.
position p != {a.p, b.p};
position q;
Quoted 18 lines
type T;
identifier x;
@@
*T x at q = {};->
148 149
Fatal error: exception Failure("meta: parse error: \n = File \"/tmp/test.spatch\", line 17, column 16, charpos = 148\n around = 'p', whole content = position q != b.p;\n")if I replace 'p' by 'q' in @b@, it works fine?
johannes
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
Quoted 12 lines · Vaishali Thakkar
Quoted 1 line · Johannes Berg
This is nonsense, but I don't see why it shouldn't parse:
Hi,
Quoted 7 lines
@a@
type T;
identifier x;
position p;
@@
T x at p = { };
Quoted 6 lines
Quoted 4 lines
@b@
type T;
identifier x;
position p;This should be "position p != a.p;".
That has no effect on the point I was trying to make. I told you the spatch was nonsense ... :)
Quoted 8 lines
Quoted 6 lines
@@
T x at p = { };@@
position p != a.p;
position q != b.p;And here no need to put constraint for q.
There was no need to put a constraint anyway, again, the whole patch made no sense. But assume I wanted to have p and q in different positions, or whatever. Note that I didn't even *use* @p in the rule, so you're making wrong assumptions.
Quoted 1 line
position p != {a.p, b.p};
Nevertheless, that's something I learned.
johannes
Quoted 30 lines · Johannes Berg
Quoted 12 lines · Vaishali Thakkar
Quoted 1 line · Johannes Berg
This is nonsense, but I don't see why it shouldn't parse:
Hi,
Quoted 7 lines
@a@
type T;
identifier x;
position p;
@@
T x at p = { };Quoted 6 lines
Quoted 4 lines
@b@
type T;
identifier x;
position p;This should be "position p != a.p;".
That has no effect on the point I was trying to make. I told you the spatch was nonsense ... :)
Quoted 7 lines
Quoted 6 lines
@@
T x at p = { };@@
position p != a.p;
position q != b.p;
Quoted 6 lines
Quoted 1 line
And here no need to put constraint for q.
There was no need to put a constraint anyway, again, the whole patch made no sense. But assume I wanted to have p and q in different positions, or whatever. Note that I didn't even *use* @p in the rule, so you're making wrong assumptions.
Got your point now. Just tried to solve the parsing error in the previous mail. :)
Quoted 6 lines
Quoted 1 line
position p != {a.p, b.p};
Nevertheless, that's something I learned.
johannes
But assume I wanted to have p and q in different
Quoted 4 lines
Quoted 2 lines
positions, or whatever. Note that I didn't even *use* @p in the rule,
Got your point now. Just tried to solve the parsing error in the? previous mail. :)
:)
Although, had I known the "!= {a.p, b.p}" thing you pointed out to me, then I never would've run into this parsing problem to start with :) Thanks!
johannes