Chris, I'm not sure how good this is, but there does exist a C++ grammar for ANTLR that is pretty actively maintained by Sun Microsystems - <a href="http://hg.netbeans.org/main/file/tip/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/cppparser.g">http://hg.netbeans.org/main/file/tip/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/cppparser.g</a><br clear="all">
<br>Granville<br>
<br><br><div class="gmail_quote">2009/7/11 Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On Jul 11, 2009, at 12:40 PM, Vikram S. Adve wrote:<br>
<br>
> We are looking for an open source C++ parser other than g++ if<br>
> possible.  Clang would be great but its C++ support is still some<br>
> way away and we need something that works or nearly works now.  Does<br>
> anyone have any experience with ANTLR for parsing C++ and for<br>
> extending their C++ parser?  Any other feedback on ANTLR in general<br>
> would be welcome too.  Thanks,<br>
<br>
</div>You need a lot more than a traditional parser to parse c++, you have<br>
to do full template instantiation, partial template specialization etc<br>
just to be able to correctly parse it.  The "best answer" if you need<br>
something ASAP is to use Elsa.<br>
<font color="#888888"><br>
-Chris<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br>