Ping.<br><br><div class="gmail_quote">On Thu, Jul 19, 2012 at 4:05 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Doug, would you mind looking over this when you have time? It's a bit of a new direction for tentative parsing.<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 12:19 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you're waiting on me, go ahead. My suggestion was just a "peephole"<br>
suggestion.<br>
<span><font color="#888888"><br>
--Sean Silva<br>
</font></span><div><div><br>
On Thu, Jul 12, 2012 at 9:18 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<br>
> Patch rebased to ToT.<br>
><br>
><br>
> On Sun, Jul 8, 2012 at 2:11 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<br>
>><br>
>> Ping.<br>
>><br>
>><br>
>> On Fri, Jun 29, 2012 at 12:49 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>><br>
>> wrote:<br>
>>><br>
>>> On Fri, Jun 29, 2012 at 11:46 AM, Sean Silva <<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>> wrote:<br>
>>>><br>
>>>> +      case ANK_TentativeDecl:<br>
>>>> +      case ANK_TemplateName:<br>
>>>> +        // These two shouldn't happen.<br>
>>>> +      case ANK_Unresolved:<br>
>>>>         break;<br>
>>>><br>
>>>> assert?<br>
>>><br>
>>><br>
>>> Sorry, I forgot to update that comment after some refactoring. The second<br>
>>> case is possible (but only for ill-formed code), and the first case is<br>
>>> completely harmless. I've updated and simplified this code to remove the<br>
>>> switch entirely:<br>
>>><br>
>>>   case tok::identifier: {<br>
>>>     Token Next = NextToken();<br>
>>>     if (Next.is(tok::colon)) { // C99 6.8.1: labeled-statement<br>
>>>       // identifier ':' statement<br>
>>>       return ParseLabeledStatement(Attrs);<br>
>>>     }<br>
>>><br>
>>>     // Look up the identifier, and typo-correct it to a keyword if it's<br>
>>> not<br>
>>>     // found.<br>
>>>     if (Next.isNot(tok::coloncolon)) {<br>
>>>       // CorrectionCandidateCallback by default allows typo-correction to<br>
>>>       // anything which can appear at the start of a statement.<br>
>>>       CorrectionCandidateCallback DefaultValidator;<br>
>>>       if (TryAnnotateName(/*IsAddressOfOperand*/false, &DefaultValidator)<br>
>>>             == ANK_Error) {<br>
>>>         // Handle errors here by skipping up to the next semicolon or<br>
>>> '}', and<br>
>>>         // eat the semicolon if that's what stopped us.<br>
>>>         SkipUntil(tok::r_brace, /*StopAtSemi=*/true,<br>
>>> /*DontConsume=*/true);<br>
>>>         if (Tok.is(tok::semi))<br>
>>>           ConsumeToken();<br>
>>>         return StmtError();<br>
>>>       }<br>
>>><br>
>>>       // If the identifier was typo-corrected, try again.<br>
>>>       if (Tok.isNot(tok::identifier))<br>
>>>         goto Retry;<br>
>>>     }<br>
>>><br>
>>>     // Fall through<br>
>>>   }<br>
>>><br>
>><br>
><br>
><br>
</div></div><div><div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>