1 2005-08-23 Raja R Harinath <rharinath@novell.com>
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.
8 2005-07-21 Florian Gross <flgr@ccan.de>
10 * Fixed a bug in category.cs that caused ECMAScript \d to fail.
12 2005-07-13 Raja R Harinath <rharinath@novell.com>
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
23 2005-07-08 Raja R Harinath <rharinath@novell.com>
25 * MatchCollection.cs: Convert to incremental mode.
26 * regex.cs (Regex.Matches): Update. Pass responsibility of
27 generating all matches to MatchCollection.
29 2005-06-14 Raja R Harinath <harinath@gmail.com>
31 * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
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.
38 2005-06-10 Raja R Harinath <rharinath@novell.com>
40 * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
41 intermediate arrays to build the final result.
42 (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
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.
54 2005-05-25 Raja R Harinath <rharinath@novell.com>
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
63 * regex.cs (MatchAppendEvaluator): New internal delegate.
64 (Regex.Replace): Use MatchAppendEvaluator.
65 (Regex.Adapter): New class used to adapt a MatchEvaluator to a
68 2005-05-24 Raja R Harinath <rharinath@novell.com>
70 * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
73 2005-05-20 Ben Maurer <bmaurer@ximian.com>
75 * regex.cs: Some memory allocation optimizations.
77 2005-05-20 Raja R Harinath <rharinath@novell.com>
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.
86 * compiler.cs (InterpreterFactory.GroupCount): Fix. The 0'th
87 index corresponds to Opcode.Info.
89 * parser.cs (Parser.Unescape): If the string doesn't contain any
90 '\' character, don't allocate a new string.
92 * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
93 from GetResult. Append to a passed-in StringBuilder rather than
95 (ReplacementEvaluator.Evaluate): Update.
97 * Capture.cs, Group.cs, Match.cs: New files split out of ...
98 * match.cs: ... this. Remove.
100 2005-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
102 * parser.cs: stuff inside {} might not be a quantifier. Fixes
105 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
107 * quicksearch.cs: handle IgnoreCase when getting the shift distance.
108 Fixes bug #69065. Patch by mei@work.email.ne.jp.
110 2005-01-08 Miguel de Icaza <miguel@ximian.com>
112 * syntax.cs: Applied patch from mei@work.email.ne.jp to fix bug
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.
119 This fixes the Unescape method.
121 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
123 * regex.cs: use NextMatch to move on to the next match. Fixes bug
126 2004-11-09 Atsushi Enomoto <atsushi@ximian.com>
130 2004-11-08 Ben Maurer <bmaurer@ximian.com>
132 * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
134 2004-10-21 Joerg Rosenkranz <joergr@voelcker.com>
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.
140 2004-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
142 * regex.cs: in Replace, when count is negative, replacement continues
143 to the end of the string.
145 Fixes bug #68398. Patch by Jon Larimer.
147 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
149 * RegexRunner.cs: fixed case mismatch of methods
151 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
153 * RegexRunner.cs: marked TODO, added missing protected internal
154 fields, throw NotImplementedException in all methods
156 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
158 * RegexRunnerFactory.cs: removed comment, no longer throw exception
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
166 2004-06-06 Jambunathan K <kjambunathan@novell.com>
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.
176 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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
182 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
184 * syntax.cs: reverting my previous patch. It causes bigger problems.
186 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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.
194 2004-05-25 Jackson Harper <jackson@ximian.com>
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.
201 2004-05-12 Dick Porter <dick@ximian.com>
205 * RegexRunnerFactory.cs:
206 * RegexRunner.cs: More public API difference fixes.
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.
214 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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)
228 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
234 * syntax.cs: converted to unix line endings.
236 2004-03-30 Lluis Sanchez Gual <lluis@ximian.com>
238 * collections.cs: In the indexer, return an empty group if the requested
240 * match.cs: Added default constructor for Group.
242 2004-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
244 * parser.cs: fixed group numbering.
246 2004-03-22 Jackson Harper <jackson@ximian.com>
248 * parser.cs: Use the group number as the name in mapping. Patch by
250 * regex.cs: Fix off by one error. Patch by Gert Driesen.
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
258 * regex.cs, compiler.cs :
259 Some code to support CILCompiler.
261 Added some undocumented of MS.
263 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
265 * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
267 2004-02-01 Miguel de Icaza <miguel@ximian.com>
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
273 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
275 * parser.cs: an opening brace without a
276 quantifier do not cause a parse error. Fixes bug #52924.
278 2004-01-07 Lluis Sanchez Gual <lluis@ximian.com>
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.
283 2003-12-15 Sanjay Gupta <gsanjay@novell.com>
284 * match.cs: Check for null value before Substring method call.
287 2003-11-21 Juraj Skripsky <js@hotfeet.ch>
289 * quicksearch.cs: Create and use hashtable only for "long" search
292 (Search): Use simple scan for a single-character search strings.
294 (GetChar): Simplify case sensitivity handling.
296 2003-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
298 * interpreter.cs: when evaluating a degenerate match, restore the
299 RepeatContext if fail. Fixes bug #42529.
301 2003-11-22 Jackson Harper <jackson@ximian.com>
303 * regex.cs: Add CultureInvariant flag to RegexOptions.
305 2003-11-20 Juraj Skripsky <js@hotfeet.ch>
307 * quicksearch.cs: Use a hashtable instead of an array for the
308 shift table to improve the memory usage.
310 2003-11-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
313 (Split): include capture groups in the results, if any. Fixes bug
316 2003-07-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
318 * regex.cs: patch from Eric Lindvall <eric@5stops.com> that fixes bug
321 2003-03-05 Miguel de Icaza <miguel@ximian.com>
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
327 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
329 * collections.cs: fixed bug #30091.
331 2002-12-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
333 * regex.cs: fixed little mistake (closes #35860).
335 2002-11-12 Jackson Harper <jackson@latitudegeo.com>
337 * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
339 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
341 * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
343 2002-10-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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.
348 2002-08-28 Juli Mallett <jmallett@FreeBSD.org>
350 * arch.cs, compiler.cs: Give the interpreter machine a property
351 for the retrieval of the group count.
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.)
358 2002-08-14 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
360 * regex.cs: Added the ctr for ISerializable implementation and
361 implemented the GetObjectData function.
363 2002-07-30 Juli Mallett <jmallett@FreeBSD.org>
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.
370 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
372 * regex.cs: Fixed bug in split.
374 2002-05-08 Dan Lewis <dihlewis@yahoo.co.uk>
376 * interpreter.cs: Moved to an array-based stack representation
379 * match.cs, collections.cs: Decoupled capture representation from
380 interpreter internals.
382 * cache.cs: Changed Key type from struct to class for speed.
384 2002-04-06 Dan Lewis <dihlewis@yahoo.co.uk>
386 * cache.cs: Object methods should be overridden with "override".
388 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
390 * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
391 added for completeness.
393 * regex.cs, match.cs, collections.cs: Serializable attribute.
395 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
397 * regex.cs: Added static Matches and IsMatch methods.
399 2002-04-03 Dan Lewis <dihlewis@yahoo.co.uk>
401 * ChangeLog: Added changelog.
403 * cache.cs: Fixed bug in MRUList.Evict.