<div dir="ltr">My gut feeling is that we won't need to change the lexer. Bear in mind, that (same as with everything else in clang-format) we only need to understand the language good enough to format it. There might always be corner cases where we aren't correct, but these are rare in practice.<div>
<br></div><div>In fact, I would like to go ahead and see whether we really hit the limit somewhere and if so, what the problems are. Once we have sufficient information, we can make a good decision on how to continue. Options would be allowing different lexers or post-processing the output of Clang's lexer. I fully agree that we should not modify the lexer to accommodate other languages.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 1, 2013 at 9:17 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 1, 2013 at 1:13 PM, Ryan Gonzalez <span dir="ltr"><<a href="mailto:rymg19@gmail.com" target="_blank">rymg19@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What if the lexer was an overly large, non-abstract base class? Then, the derived classes can just override the tokens as needed.</blockquote>
</div><br></div></div><div class="gmail_extra">(FWIW, I wouldn't try to design changes to the lexer in this thread, in the abstract... If this is an interesting path to pursue, I suspect Daniel or others should produce concrete proposed patches that enable the features needed and minimize the pollution of the lexer with other languages...)</div>
</div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>