Add this for backwards compatibility
[mono.git] / mcs / class / System / System.Text.RegularExpressions / ChangeLog
1 2005-11-21  Sebastien Pouliot  <sebastien@ximian.com> 
2
3         * CaptureCollection.cs: Fixed length check.
4         * Group.cs: Added missing validation for Synchronized method.
5         * Match.cs: Added missing validation for Synchronized and Result 
6         methods.
7         * MatchEvaluator.cs: Added [Serializable] for 2.0 profile.
8         * RegexCompilationInfo.cs: Added missing property validation.
9         * Regex.cs: Implemented UseOptionC and UseOptionR protected methods
10         (now documented). Fixed API for 2.0 profile.
11         * RegexRunner.cs: Stubbed CharInClass for 2.0 profile.
12
13 2005-11-17  Sebastien Pouliot  <sebastien@ximian.com> 
14  
15         * Match.cs: Removed the ": base ()" on the private ctor as it is
16         unrequired and cause an extra public ctor to added (bug #76736).
17         * MatchCollection.cs: Add missing virtual to indexer property.
18
19 2005-09-23  Raja R Harinath  <rharinath@novell.com>
20
21         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Invert the
22         sense of a test to reflect the code re-organization.
23
24 2005-09-22  Raja R Harinath  <rharinath@novell.com>
25
26         Fix #72152, #72989.
27         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
28         cases of recursion when dealing with eager quantifiers too.  We
29         now avoid recursion when handling the innermost quantifier.
30         (Interpreter.IntStack, Interpreter.stack): New.  Stack to help
31         implement backtracking in eager quantifiers.
32
33 2005-09-21  Raja R Harinath  <rharinath@novell.com>
34
35         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
36         cases of recursion when dealing with the minimum count and lazy
37         quantifiers.
38
39 2005-08-23  Raja R Harinath  <rharinath@novell.com>
40
41         * regex.cs: Remove.  Split into ...
42         * MatchEvaluator.cs, Regex.cs, RegexCompilationInfo.cs, 
43         RegexOptions.cs: ... these.  Now every publicly exposed type in
44         this namespace has its own file.
45
46 2005-07-21  Florian Gross  <flgr@ccan.de>
47
48         * Fixed a bug in category.cs that caused ECMAScript \d to fail.
49
50 2005-07-13  Raja R Harinath  <rharinath@novell.com>
51
52         Make even more lazier.
53         * MatchCollection.cs (TryToGet): Don't generate match i+1 when
54         we're looking for match i.  Change post-conditions.
55         (FullList): New helper property.  Ensures the list is fully populated.
56         (Count, CopyTo): Use it.
57         (Enumerator.Current): Update to new post-conditions of TryToGet.
58         (Enumerator.MoveNext): Likewise.  Don't modify index if we're
59         beyond the end.
60
61 2005-07-08  Raja R Harinath  <rharinath@novell.com>
62
63         * MatchCollection.cs: Convert to incremental mode.
64         * regex.cs (Regex.Matches): Update.  Pass responsibility of
65         generating all matches to MatchCollection.
66
67 2005-06-14  Raja R Harinath  <harinath@gmail.com>
68
69         * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
70
71         Fix #74753.
72         * Match.cs (Match) [zero-argument variant]: Make private.
73         * GroupCollection (Item) [string variant]: Don't look for the
74         group number in an empty match.
75
76 2005-06-10  Raja R Harinath  <rharinath@novell.com>
77
78         * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
79         intermediate arrays to build the final result.
80         (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
81         functions.
82         * CaptureCollection.cs (list): Change from ArrayList to list.
83         (SetValue): New internal helper, used by Interpreter.PopulateGroup.
84         (Enumerator): Remove helper class.
85         (IEnumerator.GetEnumerator): Just use list.GetEnumerator.
86         * GroupCollection.cs: Likewise.
87         * Group.cs (Group): Move responsibility of populating 'Captures'
88         to Interpreter.PopulateGroup.
89         * Match.cs (Match): Move responsibility of populating 'Groups' to
90         Interpreter.GenerateMatch.
91
92 2005-05-25  Raja R Harinath  <rharinath@novell.com>
93
94         * replace.cs (ReplacementEvaluator.Compile): Rewrite to avoid
95         creating several intermediate strings.  Simplify internal
96         intermediate representation.
97         (ReplacementEvaluator.EvaluateAppend): New.  Version of Evaluate
98         that builds the result directly on a passed-in StringBuilder.
99         (ReplacementEvaluator.Evaluate): Just a wrapper around
100         EvaluateAppend.
101         * regex.cs (MatchAppendEvaluator): New internal delegate.
102         (Regex.Replace): Use MatchAppendEvaluator.
103         (Regex.Adapter): New class used to adapt a MatchEvaluator to a
104         MatchAppendEvaluator.
105
106 2005-05-24  Raja R Harinath  <rharinath@novell.com>
107
108         * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
109         returned by $+.
110
111 2005-05-20  Ben Maurer  <bmaurer@ximian.com>
112
113         * regex.cs: Some memory allocation optimizations.
114
115 2005-05-20  Raja R Harinath  <rharinath@novell.com>
116
117         Fix #74735.
118         * replace.cs (ReplacementEvaluator.Compile): Allow CompileTerm to
119         fail and yet have advanced the pointer.  Append the scanned-over
120         portion to the "literal" being built.
121         (ReplacementEvaluator.CompileTerm): Don't throw any exceptions.
122         If a term cannot be recognized, just return null.
123
124         * compiler.cs (InterpreterFactory.GroupCount): Fix.  The 0'th
125         index corresponds to Opcode.Info.
126
127         * parser.cs (Parser.Unescape): If the string doesn't contain any
128         '\' character, don't allocate a new string.
129
130         * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
131         from GetResult.  Append to a passed-in StringBuilder rather than
132         return a string.
133         (ReplacementEvaluator.Evaluate): Update.
134         
135         * Capture.cs, Group.cs, Match.cs: New files split out of ...
136         * match.cs: ... this.  Remove.
137
138 2005-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
139
140         * parser.cs: stuff inside {} might not be a quantifier. Fixes
141         bug #69193.
142
143 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
144
145         * quicksearch.cs: handle IgnoreCase when getting the shift distance.
146         Fixes bug #69065. Patch by mei@work.email.ne.jp.
147
148 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
149
150         * syntax.cs: Applied patch from mei@work.email.ne.jp to fix bug
151         #71077.
152
153         * parser.cs: Turns out that \digit sequences are octal sequences
154         (no leading zero is needed);  And the three octal digit rule
155         applies to the leading zero as well.
156
157         This fixes the Unescape method.
158
159 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
160
161         * regex.cs: use NextMatch to move on to the next match. Fixes bug
162         #57274.
163
164 2004-11-09  Atsushi Enomoto  <atsushi@ximian.com>
165
166         * parser.cs : cast.
167
168 2004-11-08  Ben Maurer  <bmaurer@ximian.com>
169
170         * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
171
172 2004-10-21  Joerg Rosenkranz  <joergr@voelcker.com>
173
174         * regex.cs: Fixed a bug introduced with the last patch which
175         prevented any replacements when a postive count is given.
176         This also happens in all overloads without count parameter.
177
178 2004-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
179
180         * regex.cs: in Replace, when count is negative, replacement continues
181         to the end of the string.
182
183         Fixes bug #68398. Patch by Jon Larimer.
184
185 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
186
187         * RegexRunner.cs: fixed case mismatch of methods
188
189 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
190
191         * RegexRunner.cs: marked TODO, added missing protected internal
192         fields, throw NotImplementedException in all methods
193
194 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
195
196         * RegexRunnerFactory.cs: removed comment, no longer throw exception
197         from ctor
198         * regex.cs: fixed public API signature by renaming protected 
199         internal fields and adding destructor, added MonoTODO attribute to
200         fields and method that are not yet implemented, changed not 
201         implemented methods to throw NotImplementedException instead of
202         Exception, fixed names of field that are serialized
203
204 2004-06-06  Jambunathan K <kjambunathan@novell.com>
205         
206         * parser.cs: Fixed issues with Regex.Unescape() identified as part of
207         debugging bug #58256. The original problem reported was about
208         inconsistency between the way we treat replacement patterns and the 
209         way microsoft treats the replacement patterns in Regex.Replace(). MS
210         implementation is buggy and doesn't honour escape sequences in the
211         replacement patterns, even though the SDK claims otherwise.
212
213         
214 2004-06-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
215
216         * syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
217         emitting a Category.All if both a category and its negated value are
218         present.
219
220 2004-06-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
221
222         * syntax.cs: reverting my previous patch. It causes bigger problems.
223
224 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
225
226         * category.cs: added LastValue field to mark the end of enum Category.
227         * syntax.cs: in CharacterClass, use Category.LastValue to get the size
228         of the array needed. Use a BitArray instead of bool[].
229         In AddCategory(), don't set the opposite category as false. Fixes
230         bug #59150. All tests pass.
231
232 2004-05-25  Jackson Harper  <jackson@ximian.com>
233
234         * parser.cs: Allow creating a regular expression using {,n} as the
235         specified. The min bounds is set to -1, I am not completely sure
236         if that is what it is supposed to be but MS does not set it to 0
237         based on testing. Patch by dave-gnome-bugs@earth.li. Fixes bug #56761.
238
239 2004-05-12  Dick Porter  <dick@ximian.com>
240
241         * regex.cs: 
242         * quicksearch.cs: 
243         * RegexRunnerFactory.cs: 
244         * RegexRunner.cs: More public API difference fixes.
245
246         * GroupCollection.cs: 
247         * MatchCollection.cs: 
248         * CaptureCollection.cs: Moved GroupCollection, MatchCollection and
249         CaptureCollection so that they no longer inherit from the
250         non-standard RegexCollectionBase class.  Fixes the API difference.
251
252 2004-04-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
253
254         * arch.cs:
255         * compiler.cs:
256         * interpreter.cs:
257         * parser.cs:
258         * syntax.cs:
259         Patch by Eric Durand Tremblay.
260         1) Capture inner group when named.
261         2) Resolved parse error caused by not capturing inner group
262         3) Resolved incorrect capture group
263         4) Now, not capturing anything when unnamed ( correct behavior)
264
265
266 2004-04-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
267
268         * arch.cs:
269         * compiler.cs:
270         * interpreter.cs:
271         * parser.cs:
272         * syntax.cs: converted to unix line endings.
273
274 2004-03-30  Lluis Sanchez Gual <lluis@ximian.com>
275
276         * collections.cs: In the indexer, return an empty group if the requested
277         group is not found.
278         * match.cs: Added default constructor for Group.
279         
280 2004-03-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
281
282         * parser.cs: fixed group numbering.
283
284 2004-03-22  Jackson Harper  <jackson@ximian.com>
285
286         * parser.cs: Use the group number as the name in mapping. Patch by
287         Gert Driesen.
288         * regex.cs: Fix off by one error. Patch by Gert Driesen.
289
290 2004-03-17  Francois Beauchemin <beauche@softhome.net>
291         * syntax.cs, interpreter.cs, quicksearch.cs, regex.cs, compiler.cs : 
292                 Revised support for RigthToLeft. 
293                 quicksearch has now an reverse option.          
294                 This fixes bug #54537 
295  
296         * regex.cs, compiler.cs :
297                 Some code to support CILCompiler.               
298         * regex.cs : 
299                 Added some undocumented of MS.
300  
301 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
302
303         * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
304
305 2004-02-01  Miguel de Icaza  <miguel@ximian.com>
306
307         * syntax.cs, interval.cs: Applied patch from Marco Cravairo
308         through Francois Beauchemin who reviewed on the mailing list.
309         This fixes bug #45976
310
311 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
312
313         * parser.cs: an opening brace without a
314         quantifier do not cause a parse error. Fixes bug #52924.
315
316 2004-01-07  Lluis Sanchez Gual <lluis@ximian.com>
317
318         * regex.cs: In Split(), if the last match is at the end of the string, 
319         an empty string must be added to the array of results.
320
321 2003-12-15  Sanjay Gupta <gsanjay@novell.com>
322         * match.cs: Check for null value before Substring method call.  
323         Fixes bug #52034.
324
325 2003-11-21  Juraj Skripsky <js@hotfeet.ch>
326
327         * quicksearch.cs: Create and use hashtable only for "long" search 
328         strings. 
329
330         (Search): Use simple scan for a single-character search strings.
331         
332         (GetChar): Simplify case sensitivity handling.
333
334 2003-11-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
335
336         * interpreter.cs: when evaluating a degenerate match, restore the
337         RepeatContext if fail. Fixes bug #42529.
338
339 2003-11-22  Jackson Harper <jackson@ximian.com>
340
341         * regex.cs: Add CultureInvariant flag to RegexOptions.
342         
343 2003-11-20  Juraj Skripsky <js@hotfeet.ch>
344
345         * quicksearch.cs: Use a hashtable instead of an array for the
346         shift table to improve the memory usage.  
347
348 2003-11-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
349
350         * regex.cs:
351         (Split): include capture groups in the results, if any. Fixes bug
352         #51146.
353
354 2003-07-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
355
356         * regex.cs: patch from Eric Lindvall <eric@5stops.com> that fixes bug
357         #44830.
358
359 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
360
361         * category.cs (CategoryUtils.CategoryFromName): Use StartsWith
362         ("Is") instead of a substring for (0,2) which was throwing an
363         exception causing Category.None to be returned
364
365 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
366
367         * collections.cs: fixed bug #30091.
368
369 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
370
371         * regex.cs: fixed little mistake (closes #35860).
372
373 2002-11-12 Jackson Harper <jackson@latitudegeo.com>
374
375         * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
376
377 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
378
379         * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
380
381 2002-10-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
382
383         * parser.cs: applied fix from Tim Haynes (thaynes@openlinksw.com) to
384         solve bug #32807. Also modified GetMapping to return the same as MS.
385
386 2002-08-28  Juli Mallett  <jmallett@FreeBSD.org>
387
388         * arch.cs, compiler.cs: Give the interpreter machine a property
389         for the retrieval of the group count.
390
391         * regex.cs: Use the new GroupCount property of the factory to
392         initialise the current group count, and restructure code to compile
393         the pattern only the first time it is needed (essentially backing
394         out the previous revision of regex.cs, to use the new code.)
395
396 2002-08-14  Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
397
398         * regex.cs: Added the ctr for ISerializable implementation and
399         implemented the GetObjectData function.
400
401 2002-07-30  Juli Mallett  <jmallett@FreeBSD.org>
402
403         * regex.cs: Fixed bug where the expression would not be
404         re-evaluated for grouping purposes when factory caches were
405         used, resulting in no groups being recognised after one call
406         with a given pattern and no change in options.
407
408 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
409
410         * regex.cs: Fixed bug in split.
411
412 2002-05-08  Dan Lewis  <dihlewis@yahoo.co.uk>
413
414         * interpreter.cs: Moved to an array-based stack representation
415         for faster captures.
416
417         * match.cs, collections.cs: Decoupled capture representation from
418         interpreter internals.
419
420         * cache.cs: Changed Key type from struct to class for speed.
421
422 2002-04-06  Dan Lewis  <dihlewis@yahoo.co.uk>
423
424         * cache.cs: Object methods should be overridden with "override".
425
426 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
427
428         * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
429         added for completeness.
430
431         * regex.cs, match.cs, collections.cs: Serializable attribute.
432
433 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
434
435         * regex.cs: Added static Matches and IsMatch methods.
436
437 2002-04-03  Dan Lewis  <dihlewis@yahoo.co.uk>
438
439         * ChangeLog: Added changelog.
440
441         * cache.cs: Fixed bug in MRUList.Evict.