[antlr-interest] New article on StringTemplates and Treewalkers

Stephen Cheng scheng at innaworks.com
Wed Jan 11 11:55:37 PST 2006


> > (Note GCC is a good example of genericity both on the front and back
> > ends.)
> 
> Right, I'm familiar with the gcc 4.0 architecture. IIRC it only supports
> C/C++ with gcc-specific extensions and Java as input,
> and executable and Java bytecode as output. Good luck on getting it to
> input or output ML, Haskell, or Lisp :)
> 
> >

We have studied GCC in details as well.

Ultimately an architecture is really defined by what it is *NOT* designed to
do. The GCC IR and back-end is only designed to generate low level machine
code for register-based machine. The IR really does not have enough
information to handle generation to Java bytecode (or .NET CLR) which is a
stack-based machine. The support for Java bytecode output is a hack - it has
a wholly separate IR and so forth, and this is why it would be extremely
unlikely to ever see a GCC C++ to java bytecode compiler.

I don't know enough about ML, Haskell or LISP, however I don't see why the
GCC IR and backend is not powerful to cope with ML, Haskell, LISP. However
obviously a lot of work needs to be done to create a front end to
"translate" ML, Haskell or LISP to the GCC IR.

Cheers,
Stephen Cheng
CEO Innaworks

mBooster (www.innaworks.com) - the world's first true optimizing compiler
for J2ME




More information about the antlr-interest mailing list