c++ code generation tool from AIDL

I want to design a tool which generates c++ interface from android interface definition language.In short i am designing an aidl compiler.I am facing tough time as i dont know how to develop AST (Abstract syntax tree) for cpp. Any ideas are welcome.

Regards,
Sasidhar.
Do you need to develop the compiler from scratch?

Have you looked at Android's own the AIDL compiler? Could that be adapted to generate C++ rather than Java (various newsgroups suggest people have looked into this)

And as...

AIDL (Android Interface Definition Language) is similar to other IDLs you might have worked with.

From: Android Interface Definition Language (AIDL)
http://developer.android.com/guide/components/aidl.html

... you could start off with an open source (regular) idl compiler and adapt it to work with AIDL?

(Allowing for licensing restrictions.) If nothing else, these implementations might help you decide how you want to go about it?

(I know about MIDL rather than AIDL. If AIDL is based a restricted subset of IDL, then a simpler approach might be possible?)

There don't appear be any about, but there are:

#1 the GDL (GNU Data Language) compiler (which can handle refgular IDL)
http://gnudatalanguage.sourceforge.net/
(source code browsable here:
http://gnudatalanguage.cvs.sourceforge.net/gnudatalanguage/ )

#2 the (OMG) IDL compiler -- part of the omniORB project:
http://omniorb.sourceforge.net/
(source code browsable here:
http://omniorb.cvs.sourceforge.net/viewvc/omniorb/ )

#3 the idl compiler included as part of the OSF DCE 1.2.2 Reference source:
http://www.opengroup.org/dce/
http://www.opengroup.org/dce/download/
(but this might be a pain to build going by:

My IDL compiler patches include a GNU Makefile so that
you can build the IDL compiler standalone without the rest of DCE and ODE.

Where can I get a free DCE IDL compiler for AIX and Solaris?
https://groups.google.com/forum/?fromgroups#!topic/comp.unix.misc/u1y6PUJfp9Y )

Andy
Last edited on
I had seen the source code for aidl compiler.The lex and yacc files are there in it and generate_java files in it.I dont want to build the compiler from scratch.I need to make adjustments or generate new files such that c++ interface can be generated .

Now to get the c++ interface,is it sufficient if i write generate_cpp files or is there a need to change the AST files also.

Thanks.

Regards,
Sasidhar
Last edited on
i have no any IDEA for this time..
Topic archived. No new replies allowed.