Re: Reusing GCJ compiler (James Power)
24 Mar 2003 21:49:27 -0500

          From comp.compilers

Related articles
Reusing GCJ compiler (Vincent Richard) (2003-02-21)
Re: Reusing GCJ compiler (Scott Finnie) (2003-03-09)
Re: Reusing GCJ compiler (2003-03-24)
| List of all articles for this month |

From: (James Power)
Newsgroups: comp.compilers
Date: 24 Mar 2003 21:49:27 -0500
References: 03-02-118 03-03-017
Keywords: yacc, tools, available, XML
Posted-Date: 24 Mar 2003 21:49:27 EST

      I've made a fairly simple change to GNU bison that causes it to
output its parse tree in XML format (rather than the usual list of
grammar rules). If gcc is then rebuilt using the new bison you get a
program that will annotate C, C++ and Java programs with XML tags
describing the syntactic categories of the code. There's still a
little hacking with gcc required, but most of the ugliness is

Details are at:

James Power.

Vincent Richard wrote:
> I am searching for some documentation about reusing GCJ (GNU Java
> compiler) parsing code into my own program. In fact, I want GCJ to
> parse a ".java" file and return all the information useful to
> understand the structure of a Java program (the parsing tree) :
> classes, methods, attributes names/types, etc...
> I have started by checking C source files, but nothing is really clear about
> how to interface with the parser.

Post a followup to this message

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