[LLVMdev] ANTLR?

Granville Barnett granvillebarnett at googlemail.com
Sat Jul 11 16:35:04 PDT 2009


>
> For a LL(1) parser, it might be a little bit difficult to parse complex
> grammar like C++, but it might work.
>

ANTLR is an LL(*) parser, i.e. it will resolve parsing ambiguities by
looking ahead as many tokens required in order to choose the correct
alternative. Of course, you can fix the lookahead for ANTLR within the
preamble of the grammar.

As I mentioned earlier I think the C++ grammar I linked to is *pretty* good,
but then Vikram wants something more end-to-end based on his response to my
comment.

Granville


2009/7/11 Mai, Haohui <haohui.mai at gmail.com>

>  For a LL(1) parser, it might be a little bit difficult to parse complex
> grammar like C++, but it might work.
>
> ANTLR worked great when other codes were written in Java, but it was a
> little bit painful when using other languages like python.
>
> I worked on it two years ago. I guess they might have some improvement now.
>
> Haohui
>
>
> On 07/11/2009 02: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,
>
> --Vikram
> *Associate Professor, Computer Science*
> *University of Illinois at Urbana-Champaign*
> *http://llvm.org/~vadve <http://llvm.org/%7Evadve>*
>
>  *P.S.   Sorry for the spam. I know this question is not directly LLVM
> related but it is peripherally related and this list is the best source I
> could think of for C++ parsing experience.*
>
> ------------------------------
>
> _______________________________________________
> LLVM Developers mailing listLLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090712/282d80ec/attachment.html>


More information about the llvm-dev mailing list