[Mono-bugs] [Bug 40473][Cri] Changed - Wrong parsing of global attributes

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 28 Mar 2003 10:40:35 -0500 (EST)


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 gvaish@adobe.com.

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

--- shadow/40473	Fri Mar 28 10:38:36 2003
+++ shadow/40473.tmp.1083	Fri Mar 28 10:40:35 2003
@@ -39,6 +39,41 @@
  Error in grammar.
 
 ------- Additional Comments From gvaish@adobe.com  2003-03-28 10:38 -------
 Created an attachment (id=3854)
 Test case for bug #40473
 
+
+------- Additional Comments From gvaish@adobe.com  2003-03-28 10:40 -------
+Need to modify the rule:
+
+<snip file="cs-parser.jay">
+namespace_declaration
+    : opt_attributes NAMESPACE qualified_identifier
+    {
+        Attributes attrs = (Attributes) $1;
+
+        if (attrs != null) {
+            foreach (AttributeSection asec in attrs.AttributeSections)
+            if (asec.Target == "assembly")
+                RootContext.AddGlobalAttributeSection 
+(current_container,
+asec);
+        }
+
+        current_namespace = RootContext.Tree.RecordNamespace
+(current_namespace, file, (string) $3);
+    }
+
+</snip>
+
+  to:
+
+<modified_rule>
+    if(asec.Target == "assembly")
+        RootContext.AddGlobalAttributeSection(current_container, 
+asec);
+    else
+        Reports.Error("Cannot apply non-assembly attribute to a 
+namespace");
+</modified_rule>
+