From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,65f843fd61eafb22 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.glorb.com!atl-c08.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!KNOLOGY.NET-a2kHrUvQQWlmc!not-for-mail Date: Tue, 23 May 2006 15:40:15 -0500 From: "Marc A. Criley" User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Can I get access to an AST of parsed ADA code? References: <1148411956.791815.32040@j33g2000cwa.googlegroups.com> In-Reply-To: <1148411956.791815.32040@j33g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <1017f$4473732d$45491254$31569@KNOLOGY.NET> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 1017f4473732de0ecb7f131569 Xref: g2news2.google.com comp.lang.ada:4388 Date: 2006-05-23T15:40:15-05:00 List-Id: ssaammee@gmail.com wrote: > I have legacy ADA and C++ code, and I need to export this code into an > XML format so I can create a tool to analyze and work with it. I tried > various tree-dump-* commands with g++ and didn't find anything that > looked to be read-able or anything that was at a high level like my > code (GIMPLE was much to low level for me because I want to maintain > variable names and such). > > Is there a way I can access the parser for either C++ or ADA so that I > can access a high level parsed version of my code? If not, can a parser > dump command be recommended? For C++ you can use GCC_XML from http://www.gccxml.org/HTML/Index.html, and for Ada you have ASIS2XML, http://www.pushface.org/asis2xml. For Ada the code will have to be compilable by a version of GNAT with its corresponding ASIS implementation. -- Marc A. Criley -- McKae Technologies -- www.mckae.com -- DTraq - XPath In Ada - XML EZ Out