Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78259 --- shadow/78259 2006-05-01 14:11:24.000000000 -0400 +++ shadow/78259.tmp.3181 2006-05-01 14:11:24.000000000 -0400 @@ -0,0 +1,71 @@ +Bug#: 78259 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: mcs doesn't honor c#'s definition of allowed identifier chars + +Description of Problem: +The C# Specification, 2nd Edition's definition of indentifiers and the +implementation in Mono's C# compiler don't match. The spec allows "A +Unicode character of the class Pc" as part of an identifier. But mcs only +allows the fullwidth low line ("_"). The compiler also doesn't seem to +handle other allowed characters in identifiers, like characters of the +classes Mn, Mc and Cf. + +Steps to reproduce the problem: +1. Enter following code into an editor: + +using System; + +namespace Bla.Blub +{ + + class Foo + { + public static void Main(string[] args) + { + Console.WriteLine("bla"); + } + } + +} + +2. Put the undertie character (U+203F) somewhere in one of the identifiers +"Foo", "Bla", or "Blub" +3. Compile the program + +Actual Results: +A parsing error (CS8025). + +Expected Results: +Compilation without problems. + +How often does this happen? +Always. + +Additional Information: + +The method for checking for a valid identifier char s defined as follows +(in cs-tokenizer.cs): + +static bool is_identifier_part_character (char c) +{ + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || +(c >= '0' && c <= '9') || Char.IsLetter (c); +} + +This doesn't allow many of the characters that the c# specification allows. +It is clearly visible that the undertie for instance is not accepted, +though allowed by the standard. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
