[antlr-interest] Bug in the C# runtime with case- insensitive literals
gsidier
sidier at enst.fr
Thu Nov 27 08:21:14 PST 2003
Hi,
There appears to be a bug in ANLTR/C# when asking the lexer for case-
insensitive literals -- one never gets them !
The source of the error seems to be this line :
CSharpCodeGenerator.java : line # 1253
println("literals = new Hashtable(new
System.Collections.CaseInsensitiveHashCodeProvider(), null);");
which should be changed to:
println("literals = new Hashtable(new
System.Collections.CaseInsensitiveHashCodeProvider(), new
System.Collections.CaseInsensitiveComparer());");
That is to say, the C# code generated for the literals hashtable is
literals = new Hashtable(new
System.Collections.CaseInsensitiveHashCodeProvider(), null);
when it should be
literals = new Hashtable(new
System.Collections.CaseInsensitiveHashCodeProvider(), new
System.Collections.CaseInsensitiveComparer());
as explained on the Microsoft help page for
CaseInsensitiveHashCodeProvider (you can look it up on MSDN).
Doing this works for me -- has anyone else stumbled across this
problem ?
Thanks,
Gregory Sidier.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list