[antlr-interest] C# issue about action code with generic type.
韩锴
isaachanstar at gmail.com
Mon Aug 30 01:16:00 PDT 2010
Hi, All,
I encounter some troubles when try to embedded action code with generic type
in C#. Here is my case:
list: LIST_TYPE { var _list = new List<$LIST_TYPE.text>(); }
;
My purpose here is getting generic type from LIST_TYPE, and create a generic
list, such as List<string>, List<int> and so on. However, $LIST_TYPE.text
returns a string value, which makes compile failed. Any suggestion?
--
Han kai
"To iterate is human, to recurse divine." - L. Peter Deutsch
More information about the antlr-interest
mailing list