by cinderella_2010 » Wed Apr 14, 2010 10:05 am
hi, I encoutered this problem before, now I fixed it. The problem is about the regular expression of the Event type.
the orginal is like below:
(?<StringRepresentation>\A\s*(?:(?:(?<Comment>(?://.*\n)|(?:/\*(?:[\w\d!@#$%^&*()\[\]<>,.;\\"':|{}`~+=-_?\s]*)?\*/))|(\[\s*(?<Attributes>\w*)[^\[\]]*?\]))\s*)*?(?:(?:(?<Access>protected\s+internal|internal\s+protected|private|public|protected|internal)\s+)?(?:(?<InheritanceModifier>new|abstract|override|virtual)\s+)?(?:(?<Static>static)\s+)?)+event\s+(?<Type>\w+(?:[\w,.\?\[\]])*?(?:\<.*>)*?)\s+(?<Name>(?:\w\<*\>*\.*\d*)+?)\s*(?:(?:\{(?:\s*add\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))?|;)\s*remove\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))|;)?\s*){1,2}\})|;))
my version is :
(?<StringRepresentation>\A\s*(?:(?:(?<Comment>(?://.*\n)|(?:/\*(?:[\w\d!@#$%^&*()\[\]<>,.;\\"':|{}`~+=-_?\s]*)?\*/))|(\[\s*(?<Attributes>\w*)[^\[\]]*?\]))\s*)*?(?:(?:(?<Access>protected\s+internal|internal\s+protected|private|public|protected|internal)\s+)?(?:(?<InheritanceModifier>new|abstract|override|virtual)\s+)?(?:(?<Static>static)\s+)?)+event\s+(?<Type>\w+(?:[\w,.\?\[\]])*?(?:\<.*>)*?)\s+(?<Name>(?:\w\<*\>*\.*\d*)+?)\s*(\s*\=\s*delegate\s*\{\s*\})?(?:(?:\{(?:\s*add\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))?|;)\s*remove\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))|;)?\s*){1,2}\})|;))
now it works.
hope this is helpful