[stringtemplate-interest] trouble loading templates from a file
Colin Bean
ccbean at gmail.com
Wed Jul 12 16:35:01 PDT 2006
Actually, I think this is partially 2.3b7's fault. According to
Terrence (link below), the default group delimiter in 2.3b7 has
changed from "$..$" to "<...>", so in your example 2.3b7 thinks that
"getSite" is an attribute.
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2006-May/000407.html
To answer your first question, you can include a literal $ or <
(whichever the delimiter is)by just escaping it with a backslash (\$,
\<), but 2.3b will probaby have trouble with the $..$ attributes. To
change the default delimiter, you need to pass a different lexer to
the StringTemplateGroup constructor. Here's what's available for 2.2
(so to get 2.2 to behave like 2.3 beta, you'd use an
AngleBracketTemplateLexer):
http://www.stringtemplate.org/doc/api/org/antlr/stringtemplate/language/package-summary.html
Don't know what your options are in 2.3b (don't have a copy of it on
hand), but hopefully if you examine the package the names will be be
self explanitory.
-Colin
On 7/12/06, William Surowiec <wsurowiec at gmail.com> wrote:
> Well, I can report one facet affecting me in this thread: I can get my code
> working with version 2.2 of stringtemplate but not 2.3b7.
>
> I've done a lot of code changes today and possibly I've created something
> that shouldn't work in 2.2 and does not work in 2.3 - but I know i will not
> find that out tonight.
>
> I will share what I find, even if it supports my wife's conviction that I am
> an idiot.
>
> Bill
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
>
>
More information about the stringtemplate-interest
mailing list