+
+ if (RootContext.Documentation != null)
+ Lexer.doc_state = XmlCommentState.Allowed;
+ }
+ | delegate_declaration
+ {
+ if ($1 != null) {
+ Report.Error (524, GetLocation ($1), "`{0}': Interfaces cannot declare classes, structs, interfaces, delegates, enumerations or constants",
+ ((MemberCore)$1).GetSignatureForError ());
+ }
+ }
+ | class_declaration
+ {
+ if ($1 != null) {
+ Report.Error (524, GetLocation ($1), "`{0}': Interfaces cannot declare classes, structs, interfaces, delegates, enumerations or constants",
+ ((MemberCore)$1).GetSignatureForError ());
+ }
+ }
+ | struct_declaration
+ {
+ if ($1 != null) {
+ Report.Error (524, GetLocation ($1), "`{0}': Interfaces cannot declare classes, structs, interfaces, delegates, enumerations or constants",
+ ((MemberCore)$1).GetSignatureForError ());
+ }
+ }
+ | enum_declaration
+ {
+ if ($1 != null) {
+ Report.Error (524, GetLocation ($1), "`{0}': Interfaces cannot declare classes, structs, interfaces, delegates, enumerations or constants",
+ ((MemberCore)$1).GetSignatureForError ());
+ }
+ }
+ | interface_declaration
+ {
+ if ($1 != null) {
+ Report.Error (524, GetLocation ($1), "`{0}': Interfaces cannot declare classes, structs, interfaces, delegates, enumerations or constants",
+ ((MemberCore)$1).GetSignatureForError ());
+ }
+ }
+ | constant_declaration
+ {
+ Report.Error (525, GetLocation ($1), "Interfaces cannot contain fields or constants");