[antlr-interest] book, online doc discrepancy?

Adam Connelly adam.rpconnelly at googlemail.com
Mon Jan 7 17:23:57 PST 2008


About the '<' '>' and '$' difference, AFAIK you can specify whether you want
to use AngleBracketLexer or the dollar sign one in the constructor for a
template.

That's maybe one thing that should be standardised.  When I started using
StringTemplate I just loaded individual templates, and used "$name$" style
placeholders.  After a while I ended up creating group files and it took me
a while to figure out why the templates wouldn't work.  Is there a reason
for this difference?

Also, the different comment style between "outside templates in group file"
(C-Style) and within templates is maybe slightly confusing.  Is there a
reason why it wouldn't be possible to just use "<!" "!>" or "$!" "!$"
everywhere?

Adam

On 07/01/2008, Mathew Yeates <myeates at jpl.nasa.gov> wrote:
>
> Thanks.
> hello=stringtemplate.StringTemplate("Hello, $name$")
> works for me.
>
> Terence Parr wrote:
> >
> > On Jan 7, 2008, at 12:57 PM, Mathew Yeates wrote:
> >
> >> Well, str(hello) doesn't work. It seems like attributes are not being
> >> checked when writing.
> >
> > Hmm...probably $name$ is better as it's the default for templates not
> > in a group file.
> > Ter
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080108/be6a0548/attachment.html 


More information about the antlr-interest mailing list