[antlr-interest] ANTLR (C++) pretty printer?

Loring Craymer craymer at warpiv.com
Thu Jun 1 02:57:16 PDT 2006


Bryan--

I decided to see how fast I could generate one using antlr 2.8 and the 2.7.6
antlr.g.  It took me about three hours to extract the antlr grammar sans
actions and debug a tree grammar by taking advantage of the antlr 2.8 tree
grammar generator.  I then spent about six hours adding in actions to do the
printing (I already had some grammar printing routines lying around).

There are still a few minor bugs to be fixed, and I haven't yet tested the
options (with or without actions, or exceptions, or options, and a few other
flags).  I'll do a little more cleanup tomorrow and then post the result to
antlr.org.

--Loring

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Bryan Ewbank
> Sent: Wednesday, May 31, 2006 12:12 PM
> To: ANTLR Interest
> Subject: [antlr-interest] ANTLR (C++) pretty printer?
> 
> Does anyone know of an ANTLR pretty printer? That is, a program which
> reads ANTLR *.g files and produces another *.g in a standard form?  If
> it makes a difference, I've got C++ actions.
> 
> I'm hoping to head off a vi-emacs style war by saying "here's a tool...".
> 
> Thanks,
> - Bryan Ewbank



More information about the antlr-interest mailing list