* Regex.cs (GetGroupIndex): New.
(GroupNameFromNumber): Use it.
* GroupCollection.cs (.ctor): Introduce 'gap' argument. It is the
index of the first group whose group number differs from its index.
(Item.get): Likewise.
svn path=/trunk/mcs/; revision=140284
Fix#74753.
* Match.cs (Match) [zero-argument variant]: Make private.
* GroupCollection (Item) [string variant]: Don't look for the
group number in an empty match.
In Test/System.Text.RegularExpressions:
* RegexBugs.cs (NameLookupInEmptyMatch): New test from #74753.
svn path=/trunk/mcs/; revision=45958
intermediate arrays to build the final result.
(Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
functions.
* CaptureCollection.cs (list): Change from ArrayList to list.
(SetValue): New internal helper, used by Interpreter.PopulateGroup.
(Enumerator): Remove helper class.
(IEnumerator.GetEnumerator): Just use list.GetEnumerator.
* GroupCollection.cs: Likewise.
* Group.cs (Group): Move responsibility of populating 'Captures'
to Interpreter.PopulateGroup.
* Match.cs (Match): Move responsibility of populating 'Groups' to
Interpreter.GenerateMatch.
This reduced the time for 100000 iterations of the 'regex'[1] benchmark
from 63s to 53s.
svn path=/trunk/mcs/; revision=45757
* GroupCollection.cs:
* MatchCollection.cs:
* CaptureCollection.cs: Moved GroupCollection, MatchCollection and
CaptureCollection so that they no longer inherit from the
non-standard RegexCollectionBase class. Fixes the API difference.
svn path=/trunk/mcs/; revision=27175