setting start char index in lexer rules(ANTLR 3)
Seems unnecessary as Lexer.tokenStartChar or whatever is available. Are we setting start unnecessarily i lexer rules? Oh, maybe we need in case they call a lexer rule and ask for token return value
filter tree grammar mode(ANTLR 3)
I think what we really need is a filter mode for trees just like we have for lexer's. This would be almost a declarative approach where you say what trees you want to match and what actions to execute when ...
excessive new StringWriter usage(StringTemplate)
ST.toString(), I create a new StringWriter every time I render a template to string: public String toString(int lineWidth) { StringWriter out = new StringWriter(); // Write the output to a StringWriter StringTemplateWriter wr = group.getStringTemplateWriter(out); ... Worse, that getStringTemplateWriter() call ...
singleton renderers(StringTemplate)
Reexamine and implement: http://www.antlr.org:8080/pipermail/stringtemplateinterest/2006June/000501. html "registering formatter objects as renderers but we expose some properties. The key efficiency thing here is that the wrapper/formatter can be a singleton nowyou don't have to wrap every string in an ...
implement labeled set(ANTLR 3)
Allow label=(A B C) but only if a simple set. No EBNF