[antlr-interest] ST same line auto-indentation

Bill Andersen bill.andersen at mac.com
Wed Dec 7 08:01:14 PST 2011


Hi folks

I have some data I want to write out like this:

A1	B1
	B2
	B3

A2	B4
	B5

That is, with each A is a list of B's and I'd like to write this indented as above.  I've tried a template that looks like

write(a,blist) ::= <<
<a> <blist; separator="\n">
>>

but that writes like

A1 B1
B2
B3

Changing the template to 

write(a,blist) ::= <<
<a> 
	<blist; separator="\n">
>>

causes correct auto-indent behavior, but I don't want the output to look like this

A1
	B1
	B2
	B3

Any ideas?  Thanks in advance.

	.bill




More information about the antlr-interest mailing list