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