bf6c292a9531f775a7c51f85357e2d7ef6cfc1f6
[mono.git] / mcs / class / System / System.Text.RegularExpressions / ChangeLog
1 2009-01-12  Jb Evain  <jbevain@novell.com>
2
3         * RxInterpreter.cs: set trace_rx to false for NET_2_1.
4         * Regex.cs: set old_rx to false for NET_2_1.
5
6 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
7
8         * RxInterpreter.cs: Add support for constant strings in anchors. Fixes
9         #464135.
10
11 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
12
13         * cache.cs: avoid infinite loop.
14
15 2008-11-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
16
17         * cache.cs:
18         * Regex.cs: honor CacheSize value.
19
20 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
21
22         * RxInterpreter.cs: Fix pc computation in various opcodes. Fixes #443841.
23
24 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
25
26         * CILCompiler.cs: Implement Reference opcode.
27
28 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
29
30         * CILCompiler.cs: Implement SubExpression opcode.
31         
32         * CILCompiler.cs: Save and restore strpos in the Test opcode. Fixes
33         #439947.
34
35 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
36
37         * CILCompiler.cs: Implement Test opcode.
38
39 2008-10-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
40
41         * RxInterpreter.cs: implement missing Unicode* opcodes and
42         StringReverseIgnoreCase.
43
44 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
45
46         * RxOp.cs: Remove unused Generic opcodes.
47
48         * RxCompiler.cs: Emit opcodes with flags using methods which can be 
49         overriden by CILCompiler.cs, so we only have to override a few methods.
50
51         * CILCompiler.cs: Simplify based on the RxCompiler changes. Implement
52         UnicodeString opcode. Throw a NotImplementedException when an unsupported
53         opcode is encountered, since the IL compiler is now believed to be feature 
54         complete.
55
56 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
57
58         * RxInterpreter.cs CILCompiler.cs gen-interp.cs: Fix the reading of short 
59         values from the instruction stream.
60
61         * RxOp.cs: Add some missing unicode opcodes.
62
63         * gen-interp.cs RxInterpreter.cs: Generate Bitmap/UnicodeBitmap opcodes too.
64
65         * CILCompiler.cs (EmitEvalMethodBody): Add an 'end_pc' argument to mark the
66         end of the bytecode range which needs to be compiled. Use it to avoid
67         compiling the same bytecode multiple times in various opcodes. Fix
68         RxOp.Jump implementation. Add implementation for unicode opcodes.
69
70 2008-10-09  Zoltan Varga  <vargaz@gmail.com>
71
72         * CILCompiler.cs: Implement NoBitmap/NoBitmapIgnoreCase. Fixes #432172.
73
74 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
75
76         * gen-interp.cs: New file to generate the all variants of the character 
77         checking opcodes in RxInterpreter.cs.
78
79         * RxInterpreter.cs: Replace hand written code with code generated by
80         gen-interp.cs.
81         
82         * RxInterpreter.cs: Fix the failure case of the No<XXX> opcodes. Fixes
83         #426142.
84
85 2008-09-13  Zoltan Varga  <vargaz@gmail.com>
86
87         * RxInterpreter.cs RxCompiler.cs: Implement some missing Category opcodes.
88
89 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
90
91         * CILCompiler.cs: Override ICompiler.EmitSet too so we set op_flags for 
92         Bitmap opcodes too. Fixes #424073.
93
94 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
95
96         * Regex.cs: Make the new regex interpreter+compiler the default.
97
98 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
99
100         * RxInterpreter.cs: Port the Anchor+StartOfString optimization from the old
101         interpreter. Add credits.
102
103         * RxCompiler.cs (EmitString): Lowercase the string if ignore is true.
104
105         * CILCompiler.cs: Fix the setting of the match position in the
106         anchor+char optimization.
107         
108         * CILCompiler.cs: Implement FastRepeatLazy.
109
110         * CILCompiler.cs: Get rid of commented out code. Also get rid of
111         frame.local_strpos_res, since the generated code already set Arg1 to
112         the same value.
113
114 2008-08-30  Zoltan Varga  <vargaz@gmail.com>
115
116         * CILCompiler.cs: Initialize all mi_ variables lazily.
117         
118         * CILCompiler.cs: Implement FastRepeat.
119
120         * RxInterpreter.cs: Add back SetStartOfMatch, make it protected so as to
121         avoid a warning.
122
123         * CILCompiler.cs RxOp.cs: Merge lots of changes from RxInterpreter.cs,
124         refactor the code.
125
126 2008-08-29  Zoltan Varga  <vargaz@gmail.com>
127
128         * RxInterpreter.cs RxCompiler.cs RxOp.cs: Implement/fix this so all the
129         regex tests now run. The Repeat code is taken from the old interpreter.
130
131 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
132
133         * RxInterpreter.cs RxCompiler.cs RxOp.cs: Add support for 
134         Category.AnySingleline.
135
136 2008-08-27  Zoltan Varga  <vargaz@gmail.com>
137
138         * RxCompiler.cs: Use Array.Copy since Buffer.BlockCopy operates on bytes.
139         
140 2008-07-31  Jb Evain  <jbevain@novell.com>
141
142         * BaseMachine.cs: clean up for NET_2_1.
143
144 2008-06-05  Roei Erez  <roeie@mainsoft.com>
145
146         * JvmReMachine.jvm.cs: Fix a bug in match that contains
147         empty group at the end.
148
149 2008-04-13  Jb Evain  <jbevain@novell.com>
150
151         * Regex.cs: update undocumented fields for the 2.1 profile.
152         Merged from the Moonlight 2 branch.
153
154 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
155
156         * CILCompiler.cs: Implement StringIgnoreCase.
157         
158         * CILCompiler.cs: Implement grouping support.
159
160         * CILCompiler.cs: Implement character groups.
161
162 2008-02-25  Zoltan Varga  <vargaz@gmail.com>
163
164         * CILCompiler.cs: Implement lots of missing opcodes.
165
166 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
167
168         * CILCompiler.cs (EmitEvalMethodBody): Check for the not-yet supported
169         groups.Count > 1.
170
171 Thu Feb 14 19:03:00 CET 2008 Paolo Molaro <lupus@ximian.com>
172
173         * RxCompiler.cs, RxInterpreter.cs, RxOp.cs, CILCompiler.cs : support for word
174         boundary position opcodes, ignorecase backreference and more capture
175         work.
176
177 Thu Feb 14 17:11:10 CET 2008 Paolo Molaro <lupus@ximian.com>
178
179         * RxCompiler.cs, RxInterpreter.cs, RxOp.cs: replace EcmaDigit with
180         Range, fixed matching of "" =~ /$/, implementedt TestCharGroup.
181         Fixes and other misc opcodes implemented.
182
183 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
184
185         * CILCompiler.cs: Restructure some code to avoid a branch inside a loop.
186         
187         * CILCompiler.cs: Fix the unsafe string matching code.
188
189         * CILCompiler.cs: Improved version which emits only one method in most cases.
190
191         * CILCompiler.cs: Fix some comments.
192
193         * CILCompiler.cs: New file, extracted from RxCompiler.cs.
194
195         * RxInterpreter.cs RxCompiler.cs: First version of regex IL compiler.
196
197 Wed Feb 13 13:18:12 CET 2008 Paolo Molaro <lupus@ximian.com>
198
199         * RxCompiler.cs, RxInterpreter.cs, RxOp.cs: unicode categories and
200         some grouping/capture support.
201
202 Tue Feb 12 19:16:49 CET 2008 Paolo Molaro <lupus@ximian.com>
203
204         * RxCompiler.cs, RxInterpreter.cs, RxOp.cs: experimental new
205         interpreter.
206
207 2008-02-10  Zoltan Varga  <vargaz@gmail.com>
208
209         * replace.cs (NeedsGroupsOrCaptures): New property. Determines whenever the
210         replacement process needs access to the groups or captures properties of the
211         Match object.
212
213         * Group.cs: Add an internal ctor which avoids allocations.
214
215         * Match.cs: Ditto.
216
217         * BaseMachine.cs interpreter.cs: Add an optimization to avoid fully creating
218         Match objects during Replace () if the replacement string is simple.
219
220         * BaseMachine.cs Regex.cs: Make LTRReplace and RTLReplace instance methods to 
221         avoid creating two machines for each Regex.Replace () call.
222
223         * interpreter.cs (Eval): Remove a needless string allocation.
224
225 2007-12-04  Arina Itkes <arinai@mainsoft.com>
226
227         * parser.cs: Max value of m for a construct {n,m} is 2147483647.
228
229 2007-11-15  Miguel de Icaza  <miguel@novell.com>
230
231         * Revert the patch from Juraj Skripsky as it made the class
232         non-thread safe (see #341986).
233
234 2007-11-08  Raja R Harinath  <harinath@gmail.com>
235
236         Fix 324390
237         * BaseMachine.cs (LTRReplace): Don't use non-advancement of 'ptr'
238         to deduce absence of matches -- a match can have length 0.
239         (RTLReplace): Likewise.
240
241 2007-11-07  Raja R Harinath  <harinath@gmail.com>
242
243         Support RegexOptions.RightToLeft in Replace().
244         * BaseMachine.cs (Replace): Use either LTRReplace or RTLReplace
245         based on regex.
246         (LTRReplace): Make internal and rename the MatchAppendEvaluator
247         version of Replace to this.
248         (RTLReplace): New.
249         * Regex.cs (Replace): Use LTRReplace and RTLReplace from BaseMachine.
250         * replace.cs (ReplacementEvaluator.Evaluate): Optimize simple case.
251         Based on patch by Stephane Delcroix.
252
253         * replace.cs (Compile): Don't unescape string.
254
255 2007-11-01  Gert Driesen  <drieseng@users.sourceforge.net>
256
257         * Match.cs: Do not throw NotSupportedException on zero-length
258         replacement argument.
259
260 2007-10-29 Arina Itkes <arinai@mainsoft.com>
261
262         * Regex.cs: Moving creation of Regex machine to ctor.
263         It increases an initialization time of Regex but reduce a 
264         process time while APIs calling. Also it solves the problem 
265         of missed multi thread synchronization.
266
267 2007-10-29 Arina Itkes <arinai@mainsoft.com>
268         
269         * Match.cs: Fix for Result method of Match. Throwing an exception 
270         if Result method was called on a failed Match. 
271
272 2007-10-24  Juraj Skripsky <js@hotfeet.ch>
273
274         * Regex.cs: Store and re-use IMachine, no need to re-instantiate
275         it every time we're matching.
276         
277 2007-10-24 Arina Itkes <arinai@mainsoft.com>
278
279         * Regex.cs Match.cs arch.cs compiler.cs interpreter.cs
280          Refactoring of Interpreter with extracting of base abstract class 
281          that executes some methods that were moved from Regex and Match classes.
282          Added a field that maps group numbers to group names in Regex for 
283          improvement of performance of GroupNameFromNumber method.
284
285 2007-10-21  Gert Driesen  <drieseng@users.sourceforge.net>
286
287         * RegexTest.cs: Removed. Test was already moved to the appropriate
288         location. 
289
290 2007-06-21  Juraj Skripsky <js@hotfeet.ch>
291
292         * quicksearch.ch: Optimization. Add byte array as skip table for
293         chars <= 255, falling back to the hashtable for chars > 255 and
294         skip distances > 255.
295
296 2007-04-18  Raja R Harinath  <rharinath@novell.com>
297
298         Fix #80554
299         * parser.cs (ResolveReferences): Don't throw an expression if a
300         capture assertion reference cannot be resolved.
301         (ParseGroupingConstruct): Provide fallback expression to a capture
302         assertion.
303         * syntax.cs (CaptureAssertion): If the bareword doesn't refer to
304         the name of a capture group, fallback to treating it as a literal
305         expression.
306
307 2007-04-04  Raja R Harinath  <rharinath@novell.com>
308
309         * interpreter.cs (Eval) <OpCode.Reference>: Distribute for loop
310         inside if.
311         for () if (a) s1; else s2; => if (a) for () s1; else for () s2;
312
313 2007-04-03  Raja R Harinath  <rharinath@novell.com>
314
315         * Regex.cs (~Regex): Don't define in NET_2_0 profile.
316
317 2007-01-02  Raja R Harinath  <rharinath@novell.com>
318
319         Fix #79472
320         * parser.cs (Parser.GetMapping): Use the actual group numbers to
321         build the mapping.
322
323 2006-09-28  Andrew Skiba  <andrews@mainsoft.com>
324
325         * Regex.cs: TARGET_JVM
326
327 2006-05-30  Gert Driesen  <drieseng@users.sourceforge.net>
328
329         * CaptureCollection.cs: Removed virtual keyword to fix API mismatches.
330         * MatchCollection.cs: Removed virtual keyword to fix API mismatches.
331         * GroupCollection.cs: Removed virtual keyword to fix API mismatches.
332
333 2006-05-08  Raja R Harinath  <rharinath@novell.com>
334
335         Fix #78278
336         Remove 65535-limit on number of repetitions matched by a pattern.
337         We still have a 65535 limit on the length of a pattern and the
338         number of groups in a pattern.
339         * compiler.cs (PatternCompiler.EmitCount): New.  Emits an int as
340         two ushorts into the program stream.
341         (EmitInfo, EmitRepeat, EmitFastRepeat): Use it to emit integers
342         rather than shorts.
343         * interpreter.cs (Intepreter.ReadProgramCount): Read an int
344         emitted into the program stream.
345         (Interpreter): Use it.  Update counts.
346         (Interpreter.Eval) [OpCode.Repeat, OpCode.FastRepeat]: Likewise.
347         * parser.cs (ParseGroup): Pass 0x7ffffff as the max value for '*'
348         and '+' repetition patterns.
349         * arch.cs (Info, Repeat, FastRepeat): Update description.
350
351 2006-04-18  Raja R Harinath  <rharinath@novell.com>
352
353         Treat fixed repetitions of simple regexes as simple too.
354         * syntax.cs (Expression.IsComplex): Make abstract.
355         (Group.IsComplex, Alternation.IsComplex): Move ...
356         (CompositeExpression.IsComplex): ... here.
357         (Group.GetAnchorInfo): Reduce allocations.  Avoid creating another
358         ArrayList, and use a StringBuilder to build up the string.
359         (Repetition.GetAnchorInfo): Use a StringBuilder to build up the string.
360         (ExpressionAssertion.IsComplex): Override.
361
362 2006-04-17  Florian Gross  <flgr@ccan.de>
363             Raja R Harinath  <rharinath@novell.com>
364
365         * syntax.cs (CharacterClass.Compile): Emit categories after the
366         character intervals so that the evaluator can pick up the
367         'IgnoreCase' flag.
368
369 2006-04-07  Raja R Harinath  <rharinath@novell.com>
370
371         Fix #78007
372         * interpreter.cs (Interpreter.Eval) [Anchor, Position.StartOfString]:
373         Don't reset 'ptr' to 0 during forward scan.
374
375         Fix #76345
376         * interpreter.cs (Interpreter.FastEval) [FastRepeat]: If the first
377         tail operation has a 'negate' flag, avoid the "match next char"
378         optimization.
379
380         Fix #69269
381         * arch.cs (OpCode.NotCategory): New.  Stands for matching a
382         character _not_ from the given category.
383         * debug.cs (DisassembleBlock): Handle it.
384         * compiler.cs (ICompiler.EmitNotCategory): New.
385         (Compiler.EmitNotCategory): New.  Emit OpCode.NotCategory.
386         * syntax.cs (CharacterClass.Compile): Don't conflate negation of
387         the character class and negation of the category.  Use
388         EmitNotCategory.
389         * interpreter.cs (Interpreter.Eval): Pass OpCode.NotCategory to
390         EvalChar.
391         (Interpreter.EvalChar): Handle it.
392
393 2006-04-06  Raja R Harinath  <rharinath@novell.com>
394
395         Fix #77487
396         * interpreter.cs (Eval) [Until, FastUntil]: Set 'deep' to null
397         when evaluating the tail.  Ensure that backtracks don't confuse
398         the recursion vs. iteration detector.
399
400 2006-04-03  Raja R Harinath  <rharinath@novell.com>
401
402         * interpreter.cs (Eval) [Until, lazy]: Avoid extra evaluation on a
403         degenerate match.
404
405 2006-03-30  Raja R Harinath  <harinath@gmail.com>
406
407         Fix #77626
408         * parser.cs (Parser.ParseCharacterClass): Don't automatically
409         assume there's a range when we see '-'.  Ensure that we have seen
410         at least one other character, and that we aren't already parsing a
411         range.  Handle some more errors.
412
413 2005-12-19  Kornél Pál  <kornelpal@hotmail.com>
414
415         * Regex.cs: Added support for regular expressions compiled to
416           assemblies by compiling the pattern. This solution ignores existing
417           CIL code but provides full support for regular expression classes
418           compiled by MS.NET.
419
420 2005-11-21  Sebastien Pouliot  <sebastien@ximian.com> 
421
422         * CaptureCollection.cs: Fixed length check.
423         * Group.cs: Added missing validation for Synchronized method.
424         * Match.cs: Added missing validation for Synchronized and Result 
425         methods.
426         * MatchEvaluator.cs: Added [Serializable] for 2.0 profile.
427         * RegexCompilationInfo.cs: Added missing property validation.
428         * Regex.cs: Implemented UseOptionC and UseOptionR protected methods
429         (now documented). Fixed API for 2.0 profile.
430         * RegexRunner.cs: Stubbed CharInClass for 2.0 profile.
431
432 2005-11-17  Sebastien Pouliot  <sebastien@ximian.com> 
433  
434         * Match.cs: Removed the ": base ()" on the private ctor as it is
435         unrequired and cause an extra public ctor to added (bug #76736).
436         * MatchCollection.cs: Add missing virtual to indexer property.
437
438 2005-09-23  Raja R Harinath  <rharinath@novell.com>
439
440         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Invert the
441         sense of a test to reflect the code re-organization.
442
443 2005-09-22  Raja R Harinath  <rharinath@novell.com>
444
445         Fix #72152, #72989.
446         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
447         cases of recursion when dealing with eager quantifiers too.  We
448         now avoid recursion when handling the innermost quantifier.
449         (Interpreter.IntStack, Interpreter.stack): New.  Stack to help
450         implement backtracking in eager quantifiers.
451
452 2005-09-21  Raja R Harinath  <rharinath@novell.com>
453
454         * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
455         cases of recursion when dealing with the minimum count and lazy
456         quantifiers.
457
458 2005-08-23  Raja R Harinath  <rharinath@novell.com>
459
460         * regex.cs: Remove.  Split into ...
461         * MatchEvaluator.cs, Regex.cs, RegexCompilationInfo.cs, 
462         RegexOptions.cs: ... these.  Now every publicly exposed type in
463         this namespace has its own file.
464
465 2005-07-21  Florian Gross  <flgr@ccan.de>
466
467         * Fixed a bug in category.cs that caused ECMAScript \d to fail.
468
469 2005-07-13  Raja R Harinath  <rharinath@novell.com>
470
471         Make even more lazier.
472         * MatchCollection.cs (TryToGet): Don't generate match i+1 when
473         we're looking for match i.  Change post-conditions.
474         (FullList): New helper property.  Ensures the list is fully populated.
475         (Count, CopyTo): Use it.
476         (Enumerator.Current): Update to new post-conditions of TryToGet.
477         (Enumerator.MoveNext): Likewise.  Don't modify index if we're
478         beyond the end.
479
480 2005-07-08  Raja R Harinath  <rharinath@novell.com>
481
482         * MatchCollection.cs: Convert to incremental mode.
483         * regex.cs (Regex.Matches): Update.  Pass responsibility of
484         generating all matches to MatchCollection.
485
486 2005-06-14  Raja R Harinath  <harinath@gmail.com>
487
488         * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
489
490         Fix #74753.
491         * Match.cs (Match) [zero-argument variant]: Make private.
492         * GroupCollection (Item) [string variant]: Don't look for the
493         group number in an empty match.
494
495 2005-06-10  Raja R Harinath  <rharinath@novell.com>
496
497         * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
498         intermediate arrays to build the final result.
499         (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
500         functions.
501         * CaptureCollection.cs (list): Change from ArrayList to list.
502         (SetValue): New internal helper, used by Interpreter.PopulateGroup.
503         (Enumerator): Remove helper class.
504         (IEnumerator.GetEnumerator): Just use list.GetEnumerator.
505         * GroupCollection.cs: Likewise.
506         * Group.cs (Group): Move responsibility of populating 'Captures'
507         to Interpreter.PopulateGroup.
508         * Match.cs (Match): Move responsibility of populating 'Groups' to
509         Interpreter.GenerateMatch.
510
511 2005-05-25  Raja R Harinath  <rharinath@novell.com>
512
513         * replace.cs (ReplacementEvaluator.Compile): Rewrite to avoid
514         creating several intermediate strings.  Simplify internal
515         intermediate representation.
516         (ReplacementEvaluator.EvaluateAppend): New.  Version of Evaluate
517         that builds the result directly on a passed-in StringBuilder.
518         (ReplacementEvaluator.Evaluate): Just a wrapper around
519         EvaluateAppend.
520         * regex.cs (MatchAppendEvaluator): New internal delegate.
521         (Regex.Replace): Use MatchAppendEvaluator.
522         (Regex.Adapter): New class used to adapt a MatchEvaluator to a
523         MatchAppendEvaluator.
524
525 2005-05-24  Raja R Harinath  <rharinath@novell.com>
526
527         * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
528         returned by $+.
529
530 2005-05-20  Ben Maurer  <bmaurer@ximian.com>
531
532         * regex.cs: Some memory allocation optimizations.
533
534 2005-05-20  Raja R Harinath  <rharinath@novell.com>
535
536         Fix #74735.
537         * replace.cs (ReplacementEvaluator.Compile): Allow CompileTerm to
538         fail and yet have advanced the pointer.  Append the scanned-over
539         portion to the "literal" being built.
540         (ReplacementEvaluator.CompileTerm): Don't throw any exceptions.
541         If a term cannot be recognized, just return null.
542
543         * compiler.cs (InterpreterFactory.GroupCount): Fix.  The 0'th
544         index corresponds to Opcode.Info.
545
546         * parser.cs (Parser.Unescape): If the string doesn't contain any
547         '\' character, don't allocate a new string.
548
549         * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
550         from GetResult.  Append to a passed-in StringBuilder rather than
551         return a string.
552         (ReplacementEvaluator.Evaluate): Update.
553         
554         * Capture.cs, Group.cs, Match.cs: New files split out of ...
555         * match.cs: ... this.  Remove.
556
557 2005-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
558
559         * parser.cs: stuff inside {} might not be a quantifier. Fixes
560         bug #69193.
561
562 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
563
564         * quicksearch.cs: handle IgnoreCase when getting the shift distance.
565         Fixes bug #69065. Patch by mei@work.email.ne.jp.
566
567 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
568
569         * syntax.cs: Applied patch from mei@work.email.ne.jp to fix bug
570         #71077.
571
572         * parser.cs: Turns out that \digit sequences are octal sequences
573         (no leading zero is needed);  And the three octal digit rule
574         applies to the leading zero as well.
575
576         This fixes the Unescape method.
577
578 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
579
580         * regex.cs: use NextMatch to move on to the next match. Fixes bug
581         #57274.
582
583 2004-11-09  Atsushi Enomoto  <atsushi@ximian.com>
584
585         * parser.cs : cast.
586
587 2004-11-08  Ben Maurer  <bmaurer@ximian.com>
588
589         * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
590
591 2004-10-21  Joerg Rosenkranz  <joergr@voelcker.com>
592
593         * regex.cs: Fixed a bug introduced with the last patch which
594         prevented any replacements when a postive count is given.
595         This also happens in all overloads without count parameter.
596
597 2004-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
598
599         * regex.cs: in Replace, when count is negative, replacement continues
600         to the end of the string.
601
602         Fixes bug #68398. Patch by Jon Larimer.
603
604 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
605
606         * RegexRunner.cs: fixed case mismatch of methods
607
608 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
609
610         * RegexRunner.cs: marked TODO, added missing protected internal
611         fields, throw NotImplementedException in all methods
612
613 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
614
615         * RegexRunnerFactory.cs: removed comment, no longer throw exception
616         from ctor
617         * regex.cs: fixed public API signature by renaming protected 
618         internal fields and adding destructor, added MonoTODO attribute to
619         fields and method that are not yet implemented, changed not 
620         implemented methods to throw NotImplementedException instead of
621         Exception, fixed names of field that are serialized
622
623 2004-06-06  Jambunathan K <kjambunathan@novell.com>
624         
625         * parser.cs: Fixed issues with Regex.Unescape() identified as part of
626         debugging bug #58256. The original problem reported was about
627         inconsistency between the way we treat replacement patterns and the 
628         way microsoft treats the replacement patterns in Regex.Replace(). MS
629         implementation is buggy and doesn't honour escape sequences in the
630         replacement patterns, even though the SDK claims otherwise.
631
632         
633 2004-06-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
634
635         * syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
636         emitting a Category.All if both a category and its negated value are
637         present.
638
639 2004-06-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
640
641         * syntax.cs: reverting my previous patch. It causes bigger problems.
642
643 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
644
645         * category.cs: added LastValue field to mark the end of enum Category.
646         * syntax.cs: in CharacterClass, use Category.LastValue to get the size
647         of the array needed. Use a BitArray instead of bool[].
648         In AddCategory(), don't set the opposite category as false. Fixes
649         bug #59150. All tests pass.
650
651 2004-05-25  Jackson Harper  <jackson@ximian.com>
652
653         * parser.cs: Allow creating a regular expression using {,n} as the
654         specified. The min bounds is set to -1, I am not completely sure
655         if that is what it is supposed to be but MS does not set it to 0
656         based on testing. Patch by dave-gnome-bugs@earth.li. Fixes bug #56761.
657
658 2004-05-12  Dick Porter  <dick@ximian.com>
659
660         * regex.cs: 
661         * quicksearch.cs: 
662         * RegexRunnerFactory.cs: 
663         * RegexRunner.cs: More public API difference fixes.
664
665         * GroupCollection.cs: 
666         * MatchCollection.cs: 
667         * CaptureCollection.cs: Moved GroupCollection, MatchCollection and
668         CaptureCollection so that they no longer inherit from the
669         non-standard RegexCollectionBase class.  Fixes the API difference.
670
671 2004-04-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
672
673         * arch.cs:
674         * compiler.cs:
675         * interpreter.cs:
676         * parser.cs:
677         * syntax.cs:
678         Patch by Eric Durand Tremblay.
679         1) Capture inner group when named.
680         2) Resolved parse error caused by not capturing inner group
681         3) Resolved incorrect capture group
682         4) Now, not capturing anything when unnamed ( correct behavior)
683
684
685 2004-04-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
686
687         * arch.cs:
688         * compiler.cs:
689         * interpreter.cs:
690         * parser.cs:
691         * syntax.cs: converted to unix line endings.
692
693 2004-03-30  Lluis Sanchez Gual <lluis@ximian.com>
694
695         * collections.cs: In the indexer, return an empty group if the requested
696         group is not found.
697         * match.cs: Added default constructor for Group.
698         
699 2004-03-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
700
701         * parser.cs: fixed group numbering.
702
703 2004-03-22  Jackson Harper  <jackson@ximian.com>
704
705         * parser.cs: Use the group number as the name in mapping. Patch by
706         Gert Driesen.
707         * regex.cs: Fix off by one error. Patch by Gert Driesen.
708
709 2004-03-17  Francois Beauchemin <beauche@softhome.net>
710         * syntax.cs, interpreter.cs, quicksearch.cs, regex.cs, compiler.cs : 
711                 Revised support for RigthToLeft. 
712                 quicksearch has now an reverse option.          
713                 This fixes bug #54537 
714  
715         * regex.cs, compiler.cs :
716                 Some code to support CILCompiler.               
717         * regex.cs : 
718                 Added some undocumented of MS.
719  
720 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
721
722         * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
723
724 2004-02-01  Miguel de Icaza  <miguel@ximian.com>
725
726         * syntax.cs, interval.cs: Applied patch from Marco Cravairo
727         through Francois Beauchemin who reviewed on the mailing list.
728         This fixes bug #45976
729
730 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
731
732         * parser.cs: an opening brace without a
733         quantifier do not cause a parse error. Fixes bug #52924.
734
735 2004-01-07  Lluis Sanchez Gual <lluis@ximian.com>
736
737         * regex.cs: In Split(), if the last match is at the end of the string, 
738         an empty string must be added to the array of results.
739
740 2003-12-15  Sanjay Gupta <gsanjay@novell.com>
741         * match.cs: Check for null value before Substring method call.  
742         Fixes bug #52034.
743
744 2003-11-21  Juraj Skripsky <js@hotfeet.ch>
745
746         * quicksearch.cs: Create and use hashtable only for "long" search 
747         strings. 
748
749         (Search): Use simple scan for a single-character search strings.
750         
751         (GetChar): Simplify case sensitivity handling.
752
753 2003-11-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
754
755         * interpreter.cs: when evaluating a degenerate match, restore the
756         RepeatContext if fail. Fixes bug #42529.
757
758 2003-11-22  Jackson Harper <jackson@ximian.com>
759
760         * regex.cs: Add CultureInvariant flag to RegexOptions.
761         
762 2003-11-20  Juraj Skripsky <js@hotfeet.ch>
763
764         * quicksearch.cs: Use a hashtable instead of an array for the
765         shift table to improve the memory usage.  
766
767 2003-11-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
768
769         * regex.cs:
770         (Split): include capture groups in the results, if any. Fixes bug
771         #51146.
772
773 2003-07-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
774
775         * regex.cs: patch from Eric Lindvall <eric@5stops.com> that fixes bug
776         #44830.
777
778 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
779
780         * category.cs (CategoryUtils.CategoryFromName): Use StartsWith
781         ("Is") instead of a substring for (0,2) which was throwing an
782         exception causing Category.None to be returned
783
784 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
785
786         * collections.cs: fixed bug #30091.
787
788 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
789
790         * regex.cs: fixed little mistake (closes #35860).
791
792 2002-11-12 Jackson Harper <jackson@latitudegeo.com>
793
794         * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
795
796 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
797
798         * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
799
800 2002-10-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
801
802         * parser.cs: applied fix from Tim Haynes (thaynes@openlinksw.com) to
803         solve bug #32807. Also modified GetMapping to return the same as MS.
804
805 2002-08-28  Juli Mallett  <jmallett@FreeBSD.org>
806
807         * arch.cs, compiler.cs: Give the interpreter machine a property
808         for the retrieval of the group count.
809
810         * regex.cs: Use the new GroupCount property of the factory to
811         initialise the current group count, and restructure code to compile
812         the pattern only the first time it is needed (essentially backing
813         out the previous revision of regex.cs, to use the new code.)
814
815 2002-08-14  Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
816
817         * regex.cs: Added the ctr for ISerializable implementation and
818         implemented the GetObjectData function.
819
820 2002-07-30  Juli Mallett  <jmallett@FreeBSD.org>
821
822         * regex.cs: Fixed bug where the expression would not be
823         re-evaluated for grouping purposes when factory caches were
824         used, resulting in no groups being recognised after one call
825         with a given pattern and no change in options.
826
827 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
828
829         * regex.cs: Fixed bug in split.
830
831 2002-05-08  Dan Lewis  <dihlewis@yahoo.co.uk>
832
833         * interpreter.cs: Moved to an array-based stack representation
834         for faster captures.
835
836         * match.cs, collections.cs: Decoupled capture representation from
837         interpreter internals.
838
839         * cache.cs: Changed Key type from struct to class for speed.
840
841 2002-04-06  Dan Lewis  <dihlewis@yahoo.co.uk>
842
843         * cache.cs: Object methods should be overridden with "override".
844
845 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
846
847         * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
848         added for completeness.
849
850         * regex.cs, match.cs, collections.cs: Serializable attribute.
851
852 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
853
854         * regex.cs: Added static Matches and IsMatch methods.
855
856 2002-04-03  Dan Lewis  <dihlewis@yahoo.co.uk>
857
858         * ChangeLog: Added changelog.
859
860         * cache.cs: Fixed bug in MRUList.Evict.