Re: Code generation tool

murdesi@yahoo.com
13 Oct 2005 20:38:22 -0400

          From comp.compilers

Related articles
Code generation tool doru-cat@student.matnat.uio.no (Doru-Catalin Togea) (2005-10-05)
Re: Code generation tool snicol@apk.net (Scott Nicol) (2005-10-05)
Re: Code generation tool jatin.bhateja@amdocs.com (Jatin Bhateja) (2005-10-06)
Re: Code generation tool murdesi@yahoo.com (2005-10-13)
Re: Code generation tool eeide@cs.utah.edu (Eric Eide) (2005-10-13)
| List of all articles for this month |
From: murdesi@yahoo.com
Newsgroups: comp.compilers
Date: 13 Oct 2005 20:38:22 -0400
Organization: http://groups.google.com
References: 05-10-038
Keywords: tools
Posted-Date: 13 Oct 2005 20:38:22 EDT

Hi,


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.


Regards,
Murali


Post a followup to this message

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