[stringtemplate-interest] Newbie Some issues

Terence Parr parrt at cs.usfca.edu
Thu Jun 1 10:32:42 PDT 2006


On May 31, 2006, at 3:34 PM, Kenny Cockburn wrote:

> 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;
> 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));
>
> ------------------------------
>
> if I change the template call from :DescTable(tab=it) to :DescTable 
> (it) I do not get any exception is this expected behaviour ?

That is not expected behavior...hmm...pretty sure we have a unit test  
that does that...argh!
Ter


More information about the stringtemplate-interest mailing list