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