[antlr-interest] Question: ANTLR and LLVM ... + Clang
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Sat Jun 18 02:19:50 PDT 2011
On 6/17/11 8:22 PM, "Kevin J. Cummings" <cummings at kjchome.homeip.net> wrote:
Hi Kevin,
Well, don't know why you think they cannot be compared.
ANTLR - is Parser -> AST ->TreeParser
Clang
contains also parser -- own, seems to be hand-made,
then they have more logic phases.
On this page very good explained how C++ FrontEnd is bigger
of parser
http://www.semanticdesigns.com/Products/FrontEnds/CppFrontEnd.html
So again, if we have task to proceed C++ sources, we may choose between:
1) ANTLR and develop or use some C++ grammar,
then spend time on (all/some) features describe on above page
2) take in hands complete C++ Frontend and ...DONE?
For now I see two strong enough such frontends.
Clang and SemanticDesign (which I cannot test it seems as demo).
=============
> ANTLR is a tool which can help you build compiler front-ends. If you
> were industrious enough, you could re-write CLang using ANTLR.
>
> ANTLR is primarily a JAVA tool (you at least need JAVA to run the tool
> to compile your grammar), but can be used to produce other targeted
> languages (C/C++, Python, etc) for your actual front-end. While the C++
> support is minimal in version 3 (better in version 2.7, but lacking in
> some of the ST support) resulting in much use of C code which can be
> compiled using C++, you could use it to interface directly to the LLVM
> IR API if you wanted to. But, I think Ter's example is probably the way
> to go, at least until Version 4 starts to grow and we see what kind of
> C++ runtime support will exist for ANTLR v4.
>
>> When one should prefer Clang vs ANTLR or reverse?
>> Your opinions?
>
> I think you are asking the wrong question here. Please compare apples
> to apples, and not to cucumbers.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the antlr-interest
mailing list