r173850 - [Doc parsing] Patch to parse Doxygen-supported HTML character

jahanian fjahanian at apple.com
Wed Jan 30 08:10:07 PST 2013


On Jan 30, 2013, at 6:48 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Wed, Jan 30, 2013 at 2:01 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> On Wed, Jan 30, 2013 at 1:42 AM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>>> +StringRef Lexer::HTMLDoxygenCharacterReference(StringRef Name) const {
>>> +  return llvm::StringSwitch<StringRef>(Name)
>>> +  .Case("copy", helperResolveHTMLHexCharacterReference(0x000A9))
>>> +  .Case("trade",        helperResolveHTMLHexCharacterReference(0x02122))
>>> +  .Case("reg",  helperResolveHTMLHexCharacterReference(0x000AE))
>> 
>> ...
>> 
>> Is based on the subset described in
>> http://www.stack.nl/~dimitri/doxygen/manual/htmlcmds.html ?
>> 
>> I think we can do better than this:
>> 
>> (1) linear search is not great;
>> (2) allocation is not great either.
>> 
>> This needs some tablegen magic -- will try to hack up something tomorrow.
> 
> Reimplemented in r173931, r173934.

Thanks.
- Fariborz

> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-commits mailing list