On Tue, 10 Aug 2010, Lucas De Marchi wrote: > Hi, > > I'd like to know how to deal with "already tagged token" errors. I've > tried several methods to accomplish the following, but either way, > sometimes I get this error. > > What I want to do is to fully parenthesize conditional expressions, so: > > "if (a && b && !c->test)" becomes "if ((a) && (b) && (!c->test))"
&& is a binary operator. I have the impression that it associates as ((a && b) && c). But it seems that you want only to put parentheses on things that don't have nested && operators? In ((a && b) && c) there are two parentheses on the a, and the outer one is considered to be tagging an already tagged token. There is an operator ++ that is supposed to allow additions to accumulate, but it doesn't seem to work in this case. It may be because the associated right parentheses are put in different places. But if what you want is (a) && (b) && (c), then that is another problem, because in that case, the aprentheses don't accumulate. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
