Hi Peter,

This is fixed in the 3.3.1 release from last week. Here is a link to the
instructions which I keep updated. It includes a link to release 3.3.1 in
section 1.3.

http://www.tunnelvisionlabs.com/downloads/antlr/ANTLRCSharp3_VS2010.xps

Thanks,
Sam

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Peter Crowther
Sent: Thursday, February 24, 2011 6:15 AM
To: [email protected]
Subject: [antlr-interest] Antlr 3.3, CSharp3 target, StringTemplate: Invalid
code generated for a template rewrite

Source fragment (it's a tree grammar, long story):
-- snip --
federation_query    : ^(FEDERATIONQUERY namespace_part? warranties_part?
select_statement) -> federation_query(select={select_statement}) ;
-- snip --

Generated code fragment:
-- snip --
            // TEMPLATE REWRITE
            // 15:89: -> federation_query(select=select_statement)
            {
                retval.Template =
templateLib.GetInstanceOf("federation_query",
                new STAttrMap().put("select", select_statement));
            }


            }
-- snip --

Error:
-- snip --
The type or namespace name 'STAttrMap' could not be found (are you missing a
using directive or an assembly reference?)
-- snip --

In C#, the second parameter of GetInstanceOf() is
IDictionary<string,object>.  Note that IDictionary does not define put(key,
value) - the .Net equivalent is Add(key, value).  Is this a holdover from an
incomplete Java translation?  How might I debug it?

All ideas welcome!

- Peter
--
Peter Crowther, Director, Melandra Limited

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to