[LLVMdev] ANTLR?

Chris Lattner clattner at apple.com
Sat Jul 11 13:23:13 PDT 2009


On Jul 11, 2009, at 12:40 PM, Vikram S. Adve wrote:

> We are looking for an open source C++ parser other than g++ if  
> possible.  Clang would be great but its C++ support is still some  
> way away and we need something that works or nearly works now.  Does  
> anyone have any experience with ANTLR for parsing C++ and for  
> extending their C++ parser?  Any other feedback on ANTLR in general  
> would be welcome too.  Thanks,

You need a lot more than a traditional parser to parse c++, you have  
to do full template instantiation, partial template specialization etc  
just to be able to correctly parse it.  The "best answer" if you need  
something ASAP is to use Elsa.

-Chris




More information about the llvm-dev mailing list