[antlr-interest] ignoring auto template construction for now

Terence Parr parrt at cs.usfca.edu
Fri Apr 4 15:43:58 PDT 2008


Hi. decided it's too hard to get a perfect solution in short order.  i  
easily added auto temp construction but got stuck thinking about  
efficiency and hidden channel stuff.

For now, i realized I can just add this to rules that must return the  
text by default, which suits my purposes with output=template and  
rewrite=true at moment:

@after {
if ( $st==null ) {
	StringTemplate t = %{"<element>"};
	%t.element = $text;
	$st = t;
}
}

Ter


More information about the antlr-interest mailing list