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