[stringtemplate-interest] Newbie Some issues

Micheal J open.zone at virgin.net
Thu Jun 1 01:28:57 PDT 2006


Hi,

> I have issue with calling Templates
> I am using the c#  version 2.3b7 of string Templates  : I 
> have not tried 
> this in the Java version;

Try it and report your findings here.

> The following code segment raises the exception 
> 'antlr.NoViableAltException'
> 
> string tmplt = @"
> group DescDataSet ;
> DescTable(tab) ::= <<
> Hello There
>  >>
> DescDataSet( ds ) ::= <<$ds.Tables:DescTable(tab=it)$>>
> ";
>             StringTemplateGroup stg = new StringTemplateGroup(new 
> StringReader(tmplt), typeof(DefaultTemplateLexer));
> 
> ------------------------------

I'd have used something like:

  DescDataSet( ds ) ::= <<$ds.Tables:{table|DescTable(tab=table)}$>>

or just:

  DescDataSet( ds ) ::= <<$ds.Tables:DescTable()$>>


Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited.



More information about the stringtemplate-interest mailing list