On Sat, 13 Aug 2005, Arnaldo Carvalho de Melo wrote:
>
> That is, if you don't get too disgusted with this hack 8)
I'm too disgusted.
I don't like how you have that magic "preprocess_only(NULL, 0, NULL)" as a
marker, but I also don't much like how you end up relying on lib.c to do
the separator logic. You should just move _all_ of that logic into the
preprocess() function, since preprocessors might want to do a lot better
than the stupid example I did.
In short, why not just pass in the whole token_struct list, and let the
"preprocess_only()" function just see it all in one go. If it wants to
print it out, it can copy the existing "make up some whitespace around the
tokens" logic, but it's not necessarily the case that it needs/cares about
that at all. So why feed things one token at a time together with
whitespace hints that are somethign that the other side can really just
calculate itself?
What alternative preprocessor output stuff do you want, anyway?
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html