1 2006-09-28 Andrew Skiba <andrews@mainsoft.com>
5 2006-05-30 Gert Driesen <drieseng@users.sourceforge.net>
7 * CaptureCollection.cs: Removed virtual keyword to fix API mismatches.
8 * MatchCollection.cs: Removed virtual keyword to fix API mismatches.
9 * GroupCollection.cs: Removed virtual keyword to fix API mismatches.
11 2006-05-08 Raja R Harinath <rharinath@novell.com>
14 Remove 65535-limit on number of repetitions matched by a pattern.
15 We still have a 65535 limit on the length of a pattern and the
16 number of groups in a pattern.
17 * compiler.cs (PatternCompiler.EmitCount): New. Emits an int as
18 two ushorts into the program stream.
19 (EmitInfo, EmitRepeat, EmitFastRepeat): Use it to emit integers
21 * interpreter.cs (Intepreter.ReadProgramCount): Read an int
22 emitted into the program stream.
23 (Interpreter): Use it. Update counts.
24 (Interpreter.Eval) [OpCode.Repeat, OpCode.FastRepeat]: Likewise.
25 * parser.cs (ParseGroup): Pass 0x7ffffff as the max value for '*'
26 and '+' repetition patterns.
27 * arch.cs (Info, Repeat, FastRepeat): Update description.
29 2006-04-18 Raja R Harinath <rharinath@novell.com>
31 Treat fixed repetitions of simple regexes as simple too.
32 * syntax.cs (Expression.IsComplex): Make abstract.
33 (Group.IsComplex, Alternation.IsComplex): Move ...
34 (CompositeExpression.IsComplex): ... here.
35 (Group.GetAnchorInfo): Reduce allocations. Avoid creating another
36 ArrayList, and use a StringBuilder to build up the string.
37 (Repetition.GetAnchorInfo): Use a StringBuilder to build up the string.
38 (ExpressionAssertion.IsComplex): Override.
40 2006-04-17 Florian Gross <flgr@ccan.de>
41 Raja R Harinath <rharinath@novell.com>
43 * syntax.cs (CharacterClass.Compile): Emit categories after the
44 character intervals so that the evaluator can pick up the
47 2006-04-07 Raja R Harinath <rharinath@novell.com>
50 * interpreter.cs (Interpreter.Eval) [Anchor, Position.StartOfString]:
51 Don't reset 'ptr' to 0 during forward scan.
54 * interpreter.cs (Interpreter.FastEval) [FastRepeat]: If the first
55 tail operation has a 'negate' flag, avoid the "match next char"
59 * arch.cs (OpCode.NotCategory): New. Stands for matching a
60 character _not_ from the given category.
61 * debug.cs (DisassembleBlock): Handle it.
62 * compiler.cs (ICompiler.EmitNotCategory): New.
63 (Compiler.EmitNotCategory): New. Emit OpCode.NotCategory.
64 * syntax.cs (CharacterClass.Compile): Don't conflate negation of
65 the character class and negation of the category. Use
67 * interpreter.cs (Interpreter.Eval): Pass OpCode.NotCategory to
69 (Interpreter.EvalChar): Handle it.
71 2006-04-06 Raja R Harinath <rharinath@novell.com>
74 * interpreter.cs (Eval) [Until, FastUntil]: Set 'deep' to null
75 when evaluating the tail. Ensure that backtracks don't confuse
76 the recursion vs. iteration detector.
78 2006-04-03 Raja R Harinath <rharinath@novell.com>
80 * interpreter.cs (Eval) [Until, lazy]: Avoid extra evaluation on a
83 2006-03-30 Raja R Harinath <harinath@gmail.com>
86 * parser.cs (Parser.ParseCharacterClass): Don't automatically
87 assume there's a range when we see '-'. Ensure that we have seen
88 at least one other character, and that we aren't already parsing a
89 range. Handle some more errors.
91 2005-12-19 Kornél Pál <kornelpal@hotmail.com>
93 * Regex.cs: Added support for regular expressions compiled to
94 assemblies by compiling the pattern. This solution ignores existing
95 CIL code but provides full support for regular expression classes
98 2005-11-21 Sebastien Pouliot <sebastien@ximian.com>
100 * CaptureCollection.cs: Fixed length check.
101 * Group.cs: Added missing validation for Synchronized method.
102 * Match.cs: Added missing validation for Synchronized and Result
104 * MatchEvaluator.cs: Added [Serializable] for 2.0 profile.
105 * RegexCompilationInfo.cs: Added missing property validation.
106 * Regex.cs: Implemented UseOptionC and UseOptionR protected methods
107 (now documented). Fixed API for 2.0 profile.
108 * RegexRunner.cs: Stubbed CharInClass for 2.0 profile.
110 2005-11-17 Sebastien Pouliot <sebastien@ximian.com>
112 * Match.cs: Removed the ": base ()" on the private ctor as it is
113 unrequired and cause an extra public ctor to added (bug #76736).
114 * MatchCollection.cs: Add missing virtual to indexer property.
116 2005-09-23 Raja R Harinath <rharinath@novell.com>
118 * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Invert the
119 sense of a test to reflect the code re-organization.
121 2005-09-22 Raja R Harinath <rharinath@novell.com>
124 * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
125 cases of recursion when dealing with eager quantifiers too. We
126 now avoid recursion when handling the innermost quantifier.
127 (Interpreter.IntStack, Interpreter.stack): New. Stack to help
128 implement backtracking in eager quantifiers.
130 2005-09-21 Raja R Harinath <rharinath@novell.com>
132 * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
133 cases of recursion when dealing with the minimum count and lazy
136 2005-08-23 Raja R Harinath <rharinath@novell.com>
138 * regex.cs: Remove. Split into ...
139 * MatchEvaluator.cs, Regex.cs, RegexCompilationInfo.cs,
140 RegexOptions.cs: ... these. Now every publicly exposed type in
141 this namespace has its own file.
143 2005-07-21 Florian Gross <flgr@ccan.de>
145 * Fixed a bug in category.cs that caused ECMAScript \d to fail.
147 2005-07-13 Raja R Harinath <rharinath@novell.com>
149 Make even more lazier.
150 * MatchCollection.cs (TryToGet): Don't generate match i+1 when
151 we're looking for match i. Change post-conditions.
152 (FullList): New helper property. Ensures the list is fully populated.
153 (Count, CopyTo): Use it.
154 (Enumerator.Current): Update to new post-conditions of TryToGet.
155 (Enumerator.MoveNext): Likewise. Don't modify index if we're
158 2005-07-08 Raja R Harinath <rharinath@novell.com>
160 * MatchCollection.cs: Convert to incremental mode.
161 * regex.cs (Regex.Matches): Update. Pass responsibility of
162 generating all matches to MatchCollection.
164 2005-06-14 Raja R Harinath <harinath@gmail.com>
166 * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
169 * Match.cs (Match) [zero-argument variant]: Make private.
170 * GroupCollection (Item) [string variant]: Don't look for the
171 group number in an empty match.
173 2005-06-10 Raja R Harinath <rharinath@novell.com>
175 * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
176 intermediate arrays to build the final result.
177 (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
179 * CaptureCollection.cs (list): Change from ArrayList to list.
180 (SetValue): New internal helper, used by Interpreter.PopulateGroup.
181 (Enumerator): Remove helper class.
182 (IEnumerator.GetEnumerator): Just use list.GetEnumerator.
183 * GroupCollection.cs: Likewise.
184 * Group.cs (Group): Move responsibility of populating 'Captures'
185 to Interpreter.PopulateGroup.
186 * Match.cs (Match): Move responsibility of populating 'Groups' to
187 Interpreter.GenerateMatch.
189 2005-05-25 Raja R Harinath <rharinath@novell.com>
191 * replace.cs (ReplacementEvaluator.Compile): Rewrite to avoid
192 creating several intermediate strings. Simplify internal
193 intermediate representation.
194 (ReplacementEvaluator.EvaluateAppend): New. Version of Evaluate
195 that builds the result directly on a passed-in StringBuilder.
196 (ReplacementEvaluator.Evaluate): Just a wrapper around
198 * regex.cs (MatchAppendEvaluator): New internal delegate.
199 (Regex.Replace): Use MatchAppendEvaluator.
200 (Regex.Adapter): New class used to adapt a MatchEvaluator to a
201 MatchAppendEvaluator.
203 2005-05-24 Raja R Harinath <rharinath@novell.com>
205 * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
208 2005-05-20 Ben Maurer <bmaurer@ximian.com>
210 * regex.cs: Some memory allocation optimizations.
212 2005-05-20 Raja R Harinath <rharinath@novell.com>
215 * replace.cs (ReplacementEvaluator.Compile): Allow CompileTerm to
216 fail and yet have advanced the pointer. Append the scanned-over
217 portion to the "literal" being built.
218 (ReplacementEvaluator.CompileTerm): Don't throw any exceptions.
219 If a term cannot be recognized, just return null.
221 * compiler.cs (InterpreterFactory.GroupCount): Fix. The 0'th
222 index corresponds to Opcode.Info.
224 * parser.cs (Parser.Unescape): If the string doesn't contain any
225 '\' character, don't allocate a new string.
227 * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
228 from GetResult. Append to a passed-in StringBuilder rather than
230 (ReplacementEvaluator.Evaluate): Update.
232 * Capture.cs, Group.cs, Match.cs: New files split out of ...
233 * match.cs: ... this. Remove.
235 2005-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
237 * parser.cs: stuff inside {} might not be a quantifier. Fixes
240 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
242 * quicksearch.cs: handle IgnoreCase when getting the shift distance.
243 Fixes bug #69065. Patch by mei@work.email.ne.jp.
245 2005-01-08 Miguel de Icaza <miguel@ximian.com>
247 * syntax.cs: Applied patch from mei@work.email.ne.jp to fix bug
250 * parser.cs: Turns out that \digit sequences are octal sequences
251 (no leading zero is needed); And the three octal digit rule
252 applies to the leading zero as well.
254 This fixes the Unescape method.
256 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
258 * regex.cs: use NextMatch to move on to the next match. Fixes bug
261 2004-11-09 Atsushi Enomoto <atsushi@ximian.com>
265 2004-11-08 Ben Maurer <bmaurer@ximian.com>
267 * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
269 2004-10-21 Joerg Rosenkranz <joergr@voelcker.com>
271 * regex.cs: Fixed a bug introduced with the last patch which
272 prevented any replacements when a postive count is given.
273 This also happens in all overloads without count parameter.
275 2004-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
277 * regex.cs: in Replace, when count is negative, replacement continues
278 to the end of the string.
280 Fixes bug #68398. Patch by Jon Larimer.
282 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
284 * RegexRunner.cs: fixed case mismatch of methods
286 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
288 * RegexRunner.cs: marked TODO, added missing protected internal
289 fields, throw NotImplementedException in all methods
291 2004-06-10 Gert Driesen <drieseng@users.sourceforge.net>
293 * RegexRunnerFactory.cs: removed comment, no longer throw exception
295 * regex.cs: fixed public API signature by renaming protected
296 internal fields and adding destructor, added MonoTODO attribute to
297 fields and method that are not yet implemented, changed not
298 implemented methods to throw NotImplementedException instead of
299 Exception, fixed names of field that are serialized
301 2004-06-06 Jambunathan K <kjambunathan@novell.com>
303 * parser.cs: Fixed issues with Regex.Unescape() identified as part of
304 debugging bug #58256. The original problem reported was about
305 inconsistency between the way we treat replacement patterns and the
306 way microsoft treats the replacement patterns in Regex.Replace(). MS
307 implementation is buggy and doesn't honour escape sequences in the
308 replacement patterns, even though the SDK claims otherwise.
311 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
313 * syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
314 emitting a Category.All if both a category and its negated value are
317 2004-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
319 * syntax.cs: reverting my previous patch. It causes bigger problems.
321 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
323 * category.cs: added LastValue field to mark the end of enum Category.
324 * syntax.cs: in CharacterClass, use Category.LastValue to get the size
325 of the array needed. Use a BitArray instead of bool[].
326 In AddCategory(), don't set the opposite category as false. Fixes
327 bug #59150. All tests pass.
329 2004-05-25 Jackson Harper <jackson@ximian.com>
331 * parser.cs: Allow creating a regular expression using {,n} as the
332 specified. The min bounds is set to -1, I am not completely sure
333 if that is what it is supposed to be but MS does not set it to 0
334 based on testing. Patch by dave-gnome-bugs@earth.li. Fixes bug #56761.
336 2004-05-12 Dick Porter <dick@ximian.com>
340 * RegexRunnerFactory.cs:
341 * RegexRunner.cs: More public API difference fixes.
343 * GroupCollection.cs:
344 * MatchCollection.cs:
345 * CaptureCollection.cs: Moved GroupCollection, MatchCollection and
346 CaptureCollection so that they no longer inherit from the
347 non-standard RegexCollectionBase class. Fixes the API difference.
349 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
356 Patch by Eric Durand Tremblay.
357 1) Capture inner group when named.
358 2) Resolved parse error caused by not capturing inner group
359 3) Resolved incorrect capture group
360 4) Now, not capturing anything when unnamed ( correct behavior)
363 2004-04-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
369 * syntax.cs: converted to unix line endings.
371 2004-03-30 Lluis Sanchez Gual <lluis@ximian.com>
373 * collections.cs: In the indexer, return an empty group if the requested
375 * match.cs: Added default constructor for Group.
377 2004-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
379 * parser.cs: fixed group numbering.
381 2004-03-22 Jackson Harper <jackson@ximian.com>
383 * parser.cs: Use the group number as the name in mapping. Patch by
385 * regex.cs: Fix off by one error. Patch by Gert Driesen.
387 2004-03-17 Francois Beauchemin <beauche@softhome.net>
388 * syntax.cs, interpreter.cs, quicksearch.cs, regex.cs, compiler.cs :
389 Revised support for RigthToLeft.
390 quicksearch has now an reverse option.
391 This fixes bug #54537
393 * regex.cs, compiler.cs :
394 Some code to support CILCompiler.
396 Added some undocumented of MS.
398 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
400 * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
402 2004-02-01 Miguel de Icaza <miguel@ximian.com>
404 * syntax.cs, interval.cs: Applied patch from Marco Cravairo
405 through Francois Beauchemin who reviewed on the mailing list.
406 This fixes bug #45976
408 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
410 * parser.cs: an opening brace without a
411 quantifier do not cause a parse error. Fixes bug #52924.
413 2004-01-07 Lluis Sanchez Gual <lluis@ximian.com>
415 * regex.cs: In Split(), if the last match is at the end of the string,
416 an empty string must be added to the array of results.
418 2003-12-15 Sanjay Gupta <gsanjay@novell.com>
419 * match.cs: Check for null value before Substring method call.
422 2003-11-21 Juraj Skripsky <js@hotfeet.ch>
424 * quicksearch.cs: Create and use hashtable only for "long" search
427 (Search): Use simple scan for a single-character search strings.
429 (GetChar): Simplify case sensitivity handling.
431 2003-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
433 * interpreter.cs: when evaluating a degenerate match, restore the
434 RepeatContext if fail. Fixes bug #42529.
436 2003-11-22 Jackson Harper <jackson@ximian.com>
438 * regex.cs: Add CultureInvariant flag to RegexOptions.
440 2003-11-20 Juraj Skripsky <js@hotfeet.ch>
442 * quicksearch.cs: Use a hashtable instead of an array for the
443 shift table to improve the memory usage.
445 2003-11-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
448 (Split): include capture groups in the results, if any. Fixes bug
451 2003-07-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
453 * regex.cs: patch from Eric Lindvall <eric@5stops.com> that fixes bug
456 2003-03-05 Miguel de Icaza <miguel@ximian.com>
458 * category.cs (CategoryUtils.CategoryFromName): Use StartsWith
459 ("Is") instead of a substring for (0,2) which was throwing an
460 exception causing Category.None to be returned
462 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
464 * collections.cs: fixed bug #30091.
466 2002-12-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
468 * regex.cs: fixed little mistake (closes #35860).
470 2002-11-12 Jackson Harper <jackson@latitudegeo.com>
472 * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
474 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
476 * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
478 2002-10-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
480 * parser.cs: applied fix from Tim Haynes (thaynes@openlinksw.com) to
481 solve bug #32807. Also modified GetMapping to return the same as MS.
483 2002-08-28 Juli Mallett <jmallett@FreeBSD.org>
485 * arch.cs, compiler.cs: Give the interpreter machine a property
486 for the retrieval of the group count.
488 * regex.cs: Use the new GroupCount property of the factory to
489 initialise the current group count, and restructure code to compile
490 the pattern only the first time it is needed (essentially backing
491 out the previous revision of regex.cs, to use the new code.)
493 2002-08-14 Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
495 * regex.cs: Added the ctr for ISerializable implementation and
496 implemented the GetObjectData function.
498 2002-07-30 Juli Mallett <jmallett@FreeBSD.org>
500 * regex.cs: Fixed bug where the expression would not be
501 re-evaluated for grouping purposes when factory caches were
502 used, resulting in no groups being recognised after one call
503 with a given pattern and no change in options.
505 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
507 * regex.cs: Fixed bug in split.
509 2002-05-08 Dan Lewis <dihlewis@yahoo.co.uk>
511 * interpreter.cs: Moved to an array-based stack representation
514 * match.cs, collections.cs: Decoupled capture representation from
515 interpreter internals.
517 * cache.cs: Changed Key type from struct to class for speed.
519 2002-04-06 Dan Lewis <dihlewis@yahoo.co.uk>
521 * cache.cs: Object methods should be overridden with "override".
523 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
525 * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
526 added for completeness.
528 * regex.cs, match.cs, collections.cs: Serializable attribute.
530 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
532 * regex.cs: Added static Matches and IsMatch methods.
534 2002-04-03 Dan Lewis <dihlewis@yahoo.co.uk>
536 * ChangeLog: Added changelog.
538 * cache.cs: Fixed bug in MRUList.Evict.