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