Steven Sharp wrote: >> This sounds weird, but the LRM does not seem to say anywhere where a >> comment can be placed (unless otherwise specified). I think the general >> rule is that a comment can be placed anywhere white space can. > > You could say that comments are tokens that are ignored. A lot turns on the wordsmithing of this text. I think it belongs in an extensive discussion of preprocessing. Recall that the aboriginal form of "token gluing" relied on a comment that behaved like a token separator at one layer of macro expansion, but would then vanish leaving no whitespace so that the next layer would "glue" the expanded tokens together. I also note that comments cannot appear on `line directives, and perhaps there are other exceptions. Finally, the infamous directives inside comments live with (some of) us still. These contradict the idea that all comments are "ignored" and yet they need to behave outwardly just like comments - either becoming whitespace, or admitting token gluing. (Imagine: a directive mid-token; what a powerful language 8-) gag... > The LRM already states that they are tokens. It fails to say that they > are ignored. It does state that white space is a token, and that it is > ignored. So yes, comments would follow the same rule as white space. > > Steven Sharp > sharp@cadence.com > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Sep 25 11:27:10 2007
This archive was generated by hypermail 2.1.8 : Tue Sep 25 2007 - 11:27:38 PDT