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