Re: Code generation tool
13 Oct 2005 20:38:22 -0400

          From comp.compilers

Related articles
Code generation tool (Doru-Catalin Togea) (2005-10-05)
Re: Code generation tool (Scott Nicol) (2005-10-05)
Re: Code generation tool (Jatin Bhateja) (2005-10-06)
Re: Code generation tool (2005-10-13)
Re: Code generation tool (Eric Eide) (2005-10-13)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 13 Oct 2005 20:38:22 -0400
References: 05-10-038
Keywords: tools
Posted-Date: 13 Oct 2005 20:38:22 EDT


Doru-Catalin Togea wrote:

> I wonder what tools do the CORBA, ICE and the like compilers use to
> translate from their respective IDLs to other languages, like C++,
> Java, Python, and so forth.

Tools used could be lex/flex for generating lexical analyzers,
yacc/bison/antlr etc for parser generation, C/C++/Java/etc for
interfacing to the parser, building internal representation and to
finally map it to the target language. Alternatively, you could hand
code the lexical analyzer, parser etc.

> I need a formalized description of what the output (translation) of
> parsing a structured text (not XML) should be.
> Any ideas?

Can you be more specific on what exactly you are looking for?
Typically, the result of parsing an IDL would be to create an
internal representation of the input interface descriptions. This is
done by associating actions with the grammar nodes. These actions will
typically be C/C++/etc language statements which will build the
internal representation by calling various methods.

The internal representation will consist of data structures to store
the scope information, type information etc. You can decide on what you
want to store in the internal representation based on your translation
needs. Then your translation logic would walk through these structures
and emit output code.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.