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