[antlr-interest] C# rules cannot return chars
Micheal J
open.zone at virgin.net
Tue Jul 3 05:13:53 PDT 2007
Hi,
> Hi,
>
> for the C# target, a rule like
>
> test returns [ char value ] :
> 'test' { $value = 'a'; }
> ;
>
> produces code whose compilation fails with
>
> error CS0031: Constant value '0' cannot be converted to a 'char'
>
> The work-around is obviously to return an object containing a
> char, but
> still, somebody might be interested in fixing the problem...
> BTW what's
> the official way to report ANTLR bugs (for the C# target)?
> http://www.antlr.org:8888/browse/ANTLR sems to be read-only?
>
You just did ;-)
Thanks for the report. Do you have a simple grammar that demonstrates this?
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very limited.
More information about the antlr-interest
mailing list