[Mono-bugs] [Bug 35257][Min] New - additional comma after attribute_list not allowed

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 Dec 2002 19:17:03 -0000


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 ginga@kit.hi-ho.ne.jp.

http://bugzilla.ximian.com/show_bug.cgi?id=35257

--- shadow/35257	Sat Dec  7 14:17:03 2002
+++ shadow/35257.tmp.9139	Sat Dec  7 14:17:03 2002
@@ -0,0 +1,53 @@
+Bug#: 35257
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ginga@kit.hi-ho.ne.jp               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: additional comma after attribute_list not allowed
+
+I tried to compile such code:
+
+using System;
+using System.ComponentModel;
+
+public class AttributeTest
+{
+	[Category("mcs bug"), Description("this code cannot be 
+compliled;-)"), ]
+	public static void Main(String[] args)
+	{
+	}
+}
+
+...Then mcs failed:
+
+syntax error, expecting IDENTIFIER
+AttributeTest.cs (9,8), Token: CLOSE_BRACKET   : Parsing error
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error
+   at Mono.CSharp.CSharpParser.yyparse(yyInput yyLex) in 
+c:\my\path\to\mcs\mcs\-:line 882
+   at Mono.CSharp.CSharpParser.parse() in c:\my\path\to\mcs\mcs\cs-
+parser.jay:line 3929
+error CS5001: Program AttributeTest.exe does not have an entry point 
+defined
+Compilation failed: 1 error(s), 0 warnings
+
+MS C# compiler allows this code. And C# syntax allows such code
+(See 17.2 of C# syntax: http://msdn.microsoft.com/library/default.asp?
+url=/library/en-us/csspec/html/vclrfcsharpspec_17_2.asp ).
+ECMA spec is equivalent.
+
+Key point is cs-parser.jay line 482.
+
+Such syntax sucks (for me). But current NDoc actually has such code...