[antlr-interest] Code beautifier-indentation

John D. Mitchell johnm-antlr at non.net
Thu Mar 17 06:59:36 PST 2005


>>>>> "Meena" == Meena Moktali <mmoktali at bphx.dk> writes:
[...]

> HI, I am a newby in ANTLR.I am trying to write a grammar for code
> beautification(proper indentation )according to the looping strutures.
> The source code is that of AppBilder rule(having its own language syntax
> ,similar to HTML).

> Can anybody suggest some sample code or ideas of how to go about this?

How complex is the "beautification"?  I.e., are you literally only changing
indentation or do you need to completely reformat the code?  If it's the
first, you can take some really simple approaches but if it's the latter
than you're into the world of full-on source-to-source transformation.

Take care,
	John


More information about the antlr-interest mailing list