[antlr-interest] Re: announcing 1.0.2 release of StringTemplate template engine
Mark D. Anderson
mda at discerning.com
Wed Oct 15 21:51:17 PDT 2003
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
> StringTemplate is a really good example (umm...if I do say so myself)
> of how to use ANTLR to build an interpreter (ANTLR converts templates
> into text + trees. To execute them, a tree parser walks the trees and
> executes the actions, spitting out text etc...).
I was hoping it might also be a really good example of how to do
switching of token streams as a way to implement lexical states for
embedded languages.
That is, along the lines of the "multilex" example in the antlr
distribution.
But instead I find a hand-written implementation in StringTemplate.java
with charAt(cp) ... cp++ etc.
Surely this does not set a good example for impressionable young
people? :)
In particular, for the cases where StringTemplate is going to be used on
html templates, it'd be nice to be able to be able to offer validation of
the html chunks.
I don't see how delimeter escaping is done btw.
-mda
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list