[antlr-interest] How to extend Java language using ANTLR

Terence Parr parrt at cs.usfca.edu
Mon Jan 17 13:51:30 PST 2005


On Jan 16, 2005, at 9:35 PM, Tony O'Hagan wrote:

>
> I'm considering writing a source to source translator that will extend
> the Java language to include some additional expressions, statements
> and possibly some modified type constructs - all of which will map to
> Java source code.
>
> Q. What approach would you recommend to minimize the code generation 
> effort?

For input-output pairs that are very similar, use the 
TokenStreamRewriteEngine; works to good effect, I believe.

http://www.antlr.org/article/rewrite.engine/index.tml

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





More information about the antlr-interest mailing list