[antlr-interest] Question: ANTLR and LLVM ... + Clang

Douglas Godfrey douglasgodfrey at gmail.com
Sat Jun 18 09:26:00 PDT 2011

The SemanticDesigns C++ frontend, like all of their frontend(s) is intended
for code analysis and transformation, not compiling.

Semantic Designs' tools are based on the old Reasoning Systems Inc.
tools: Refine
and Intervista.

Semantic Designs' tools parse a source language into an Symbol Table and AST
with more features than
the Antlr AST. The tools then take the Symbol Table and AST and either do
code analysis or reverse compile
the AST into new source code in the same or a different language. The tools
no not interface with a compiler
backend or machine code generator.

On Sat, Jun 18, 2011 at 5:19 AM, Ruslan Zasukhin <
ruslan_zasukhin at valentina-db.com> wrote:

> 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]
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address

More information about the antlr-interest mailing list