<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div><br></div><div>On Apr 12, 2010, at 7:12 PM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 11, 2010, at 11:43 AM, David Peixotto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Hi Chris,</div><div><br></div><div>I took a look at modifying the preprocessor output and it was pretty</div><div>straightforward. I have attached a patch that makes the preprocessed output</div><div>less conservative in adding spaces between periods. It will now add a space to</div><div>avoid turning ".. ." into "...", but does not always add a space between two</div><div>consecutive dots.</div><div><br></div><div>The change was done by keeping track of the last two tokens that were output</div><div>and testing against those two tokens to avoid creating "...". Previously only</div><div>the last output token was tracked and tested against, which caused any two</div><div>consecutive . tokens to have a space between them.</div><div><br></div><div>The patch passes all the tests in the tests subdirectory. I modified one test</div><div>to reflect the output changing from ". . ." to ".. .". This output happens to</div><div>match the expected output in the test comment. I also added a test for the</div><div>original case that was causing me problems.</div><div><br></div><div>Please let me know if there are more tests I should run or anything else that</div><div>needs to happen for the patch to be accepted. Thanks!</div></div></div></blockquote></div><br><div>This patch looks great, except that it happens to conflict on mainline.  :(  Please send and updated patch and I'll be happy to apply it for you.  One minor thing is to watch & placement in "<span class="Apple-style-span" style="font-family: Inconsolata; font-size: 12px; ">const Token& PrevPrevTok, "</span></div><div><font class="Apple-style-span" face="Inconsolata"><br></font></div><div><span class="Apple-style-span" style="font-family: Inconsolata; "><span class="Apple-style-span" style="font-family: Helvetica; ">Thanks for working on this!</span></span></div><div><br></div><div><span class="Apple-style-span" style="font-family: Inconsolata; "><span class="Apple-style-span" style="font-family: Helvetica; ">-Chris</span></span></div><div><font class="Apple-style-span" face="Inconsolata"><font class="Apple-style-span" face="Helvetica"><br></font></font></div><div><font class="Apple-style-span" face="Inconsolata"><br></font></div></div></blockquote></div><br></div></body></html>