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