1 2005-11-21 Sebastien Pouliot <sebastien@ximian.com>
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
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.
13 2005-11-17 Sebastien Pouliot <sebastien@ximian.com>
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.
19 2005-09-23 Raja R Harinath <rharinath@novell.com>
21 * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Invert the
22 sense of a test to reflect the code re-organization.
24 2005-09-22 Raja R Harinath <rharinath@novell.com>
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.
33 2005-09-21 Raja R Harinath <rharinath@novell.com>
35 * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
36 cases of recursion when dealing with the minimum count and lazy
39 2005-08-23 Raja R Harinath <rharinath@novell.com>
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.
46 2005-07-21 Florian Gross <flgr@ccan.de>
48 * Fixed a bug in category.cs that caused ECMAScript \d to fail.
50 2005-07-13 Raja R Harinath <rharinath@novell.com>
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
61 2005-07-08 Raja R Harinath <rharinath@novell.com>
63 * MatchCollection.cs: Convert to incremental mode.
64 * regex.cs (Regex.Matches): Update. Pass responsibility of
65 generating all matches to MatchCollection.
67 2005-06-14 Raja R Harinath <harinath@gmail.com>
69 * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
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.
76 2005-06-10 Raja R Harinath <rharinath@novell.com>
78 * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
79 intermediate arrays to build the final result.
80 (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
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.
92 2005-05-25 Raja R Harinath <rharinath@novell.com>
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
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.
106 2005-05-24 Raja R Harinath <rharinath@novell.com>
108 * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
111 2005-05-20 Ben Maurer <bmaurer@ximian.com>
113 * regex.cs: Some memory allocation optimizations.
115 2005-05-20 Raja R Harinath <rharinath@novell.com>
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.
124 * compiler.cs (InterpreterFactory.GroupCount): Fix. The 0'th
125 index corresponds to Opcode.Info.
127 * parser.cs (Parser.Unescape): If the string doesn't contain any
128 '\' character, don't allocate a new string.
130 * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
131 from GetResult. Append to a passed-in StringBuilder rather than
133 (ReplacementEvaluator.Evaluate): Update.
135 * Capture.cs, Group.cs, Match.cs: New files split out of ...
136 * match.cs: ... this. Remove.
138 2005-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
140 * parser.cs: stuff inside {} might not be a quantifier. Fixes
143 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
145 * quicksearch.cs: handle IgnoreCase when getting the shift distance.
146 Fixes bug #69065. Patch by mei@work.email.ne.jp.
148 2005-01-08 Miguel de Icaza <miguel@ximian.com>
150 * syntax.cs: Applied patch from mei@work.email.ne.jp to fix bug
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.
157 This fixes the Unescape method.
159 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
161 * regex.cs: use NextMatch to move on to the next match. Fixes bug
164 2004-11-09 Atsushi Enomoto <atsushi@ximian.com>
168 2004-11-08 Ben Maurer <bmaurer@ximian.com>
170 * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
172 2004-10-21 Joerg Rosenkranz <joergr@voelcker.com>
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.
178 2004-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
180 * regex.cs: in Replace, when count is negative, replacement continues
181 to the end of the string.
183 Fixes bug #68398. Patch by Jon Larimer.
185 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
187 * RegexRunner.cs: fixed case mismatch of methods
189 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
191 * RegexRunner.cs: marked TODO, added missing protected internal
192 fields, throw NotImplementedException in all methods
194 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
196 * RegexRunnerFactory.cs: removed comment, no longer throw exception
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
204 2004-06-06 Jambunathan K <kjambunathan@novell.com>
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.
214 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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
220 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
222 * syntax.cs: reverting my previous patch. It causes bigger problems.
224 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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.
232 2004-05-25 Jackson Harper <jackson@ximian.com>
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.
239 2004-05-12 Dick Porter <dick@ximian.com>
243 * RegexRunnerFactory.cs:
244 * RegexRunner.cs: More public API difference fixes.
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.
252 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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)
266 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
272 * syntax.cs: converted to unix line endings.
274 2004-03-30 Lluis Sanchez Gual <lluis@ximian.com>
276 * collections.cs: In the indexer, return an empty group if the requested
278 * match.cs: Added default constructor for Group.
280 2004-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
282 * parser.cs: fixed group numbering.
284 2004-03-22 Jackson Harper <jackson@ximian.com>
286 * parser.cs: Use the group number as the name in mapping. Patch by
288 * regex.cs: Fix off by one error. Patch by Gert Driesen.
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
296 * regex.cs, compiler.cs :
297 Some code to support CILCompiler.
299 Added some undocumented of MS.
301 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
303 * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
305 2004-02-01 Miguel de Icaza <miguel@ximian.com>
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
311 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
313 * parser.cs: an opening brace without a
314 quantifier do not cause a parse error. Fixes bug #52924.
316 2004-01-07 Lluis Sanchez Gual <lluis@ximian.com>
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.
321 2003-12-15 Sanjay Gupta <gsanjay@novell.com>
322 * match.cs: Check for null value before Substring method call.
325 2003-11-21 Juraj Skripsky <js@hotfeet.ch>
327 * quicksearch.cs: Create and use hashtable only for "long" search
330 (Search): Use simple scan for a single-character search strings.
332 (GetChar): Simplify case sensitivity handling.
334 2003-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
336 * interpreter.cs: when evaluating a degenerate match, restore the
337 RepeatContext if fail. Fixes bug #42529.
339 2003-11-22 Jackson Harper <jackson@ximian.com>
341 * regex.cs: Add CultureInvariant flag to RegexOptions.
343 2003-11-20 Juraj Skripsky <js@hotfeet.ch>
345 * quicksearch.cs: Use a hashtable instead of an array for the
346 shift table to improve the memory usage.
348 2003-11-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
351 (Split): include capture groups in the results, if any. Fixes bug
354 2003-07-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
356 * regex.cs: patch from Eric Lindvall <eric@5stops.com> that fixes bug
359 2003-03-05 Miguel de Icaza <miguel@ximian.com>
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
365 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
367 * collections.cs: fixed bug #30091.
369 2002-12-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
371 * regex.cs: fixed little mistake (closes #35860).
373 2002-11-12 Jackson Harper <jackson@latitudegeo.com>
375 * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
377 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
379 * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
381 2002-10-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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.
386 2002-08-28 Juli Mallett <jmallett@FreeBSD.org>
388 * arch.cs, compiler.cs: Give the interpreter machine a property
389 for the retrieval of the group count.
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.)
396 2002-08-14 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
398 * regex.cs: Added the ctr for ISerializable implementation and
399 implemented the GetObjectData function.
401 2002-07-30 Juli Mallett <jmallett@FreeBSD.org>
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.
408 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
410 * regex.cs: Fixed bug in split.
412 2002-05-08 Dan Lewis <dihlewis@yahoo.co.uk>
414 * interpreter.cs: Moved to an array-based stack representation
417 * match.cs, collections.cs: Decoupled capture representation from
418 interpreter internals.
420 * cache.cs: Changed Key type from struct to class for speed.
422 2002-04-06 Dan Lewis <dihlewis@yahoo.co.uk>
424 * cache.cs: Object methods should be overridden with "override".
426 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
428 * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
429 added for completeness.
431 * regex.cs, match.cs, collections.cs: Serializable attribute.
433 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
435 * regex.cs: Added static Matches and IsMatch methods.
437 2002-04-03 Dan Lewis <dihlewis@yahoo.co.uk>
439 * ChangeLog: Added changelog.
441 * cache.cs: Fixed bug in MRUList.Evict.