[stringtemplate-interest] string template inconsstent behaviour c# port
Terence Parr
parrt at cs.usfca.edu
Mon Oct 20 10:16:44 PDT 2008
Ah! That could be because the C# version is a bit out of date...it
probably has an iterator for [...] that gets used up and not reset.
Sorry!
Ter
On Oct 18, 2008, at 5:04 AM, Sunil Chandrasekharan wrote:
>
> following produces
> [definition]
> ......
> <t(a=["a","b"])>
> ........
> t(a)::=
> <<
> -repeat 1
> <a>
> -repeat 2
> <a>
> >>
>
> [Produces output]
>
> -repeat 1
> ab
> -repeat 2
>
>
> The list is not getting printed after repeat 2.
> i am using c# and
> stringtemplate build number 3.0.1.6846
> Evaluant.Antlr , 0.3.0.37313
> and antlr.runtime 2.7.7.3
> thanks
> Sunil chandrasekharan
>
>
> On Fri, Oct 17, 2008 at 10:50 AM, Terence Parr <parrt at cs.usfca.edu>
> wrote:
> can you reduce to a simpler version that has same problem?
> Ter
>
> On Oct 13, 2008, at 1:18 PM, Sunil Chandrasekharan wrote:
>
> Hi All,
>
> following string template drops out parameter as they gets excuted
> ........
>
> <type_id_usg_list:{e|
>
> <
> DataCheckExistsOk
> (table
> =
> "USAGE_TYPES
> ",columnList
> =["type_id_usg","units_indicator"],valueList=[{'<e>'},"1"])>}>
>
> ..............
>
> DataCheckExistsOk(table,columnList,valueList)
>
> ::=
>
> <<
>
> select 1
> from <table>
> where
> <columnList,valueList:{c,v|<c>=<v>};separator=" AND ">
>
> ;
>
> EXCEPTION
> WHEN
> NO_DATA_FOUND
> THEN begin dbms_output.put_line(' Data Not Found:Table:'||'<table>'
> || 'KEY='||
> <columnList,valueList:{c,v| '<c>'||<v>};separator=" || ">
> );is_rollback:=true; end;
>
> >>
>
> -------------------------------
>
> produces out put
>
>
> select 1
> from USAGE_TYPES
> where
> type_id_usg='333' AND units_indicator=1
> ;
>
> EXCEPTION
> WHEN
> NO_DATA_FOUND
> THEN begin dbms_output.put_line(' Data Not
> Found:Table:'||'USAGE_TYPES' || 'KEY='||
> );is_rollback:=true; end;
> ----------------------
>
> As you can see as evalution progress some how parameter list
> becomes empty[high lighted text]. in the same template scope
> If you can please add me as user on stringtemplate group as I am
> using externsively and finds string template very useful.
>
> I do not have same issue with single value in parameter list . I use
> the c# port
>
> ie;
>
> <jurisdiction_list:{e|
> <
> DataCheckExistsOk
> (table
> ="JURISDICTIONS",columnList={<["jurisdiction"]>},valueList={<e>})>}>
>
> produces corect o/p
>
> Thansk for your time
>
> regards
>
> Sunil
>
> _______________________________________________
> 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