ChangeLog 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. 2007-04-04 Raja R Harinath <[email protected]>
  2. * interpreter.cs (Eval) <OpCode.Reference>: Distribute for loop
  3. inside if.
  4. for () if (a) s1; else s2; => if (a) for () s1; else for () s2;
  5. 2007-04-03 Raja R Harinath <[email protected]>
  6. * Regex.cs (~Regex): Don't define in NET_2_0 profile.
  7. 2007-01-02 Raja R Harinath <[email protected]>
  8. Fix #79472
  9. * parser.cs (Parser.GetMapping): Use the actual group numbers to
  10. build the mapping.
  11. 2006-09-28 Andrew Skiba <[email protected]>
  12. * Regex.cs: TARGET_JVM
  13. 2006-05-30 Gert Driesen <[email protected]>
  14. * CaptureCollection.cs: Removed virtual keyword to fix API mismatches.
  15. * MatchCollection.cs: Removed virtual keyword to fix API mismatches.
  16. * GroupCollection.cs: Removed virtual keyword to fix API mismatches.
  17. 2006-05-08 Raja R Harinath <[email protected]>
  18. Fix #78278
  19. Remove 65535-limit on number of repetitions matched by a pattern.
  20. We still have a 65535 limit on the length of a pattern and the
  21. number of groups in a pattern.
  22. * compiler.cs (PatternCompiler.EmitCount): New. Emits an int as
  23. two ushorts into the program stream.
  24. (EmitInfo, EmitRepeat, EmitFastRepeat): Use it to emit integers
  25. rather than shorts.
  26. * interpreter.cs (Intepreter.ReadProgramCount): Read an int
  27. emitted into the program stream.
  28. (Interpreter): Use it. Update counts.
  29. (Interpreter.Eval) [OpCode.Repeat, OpCode.FastRepeat]: Likewise.
  30. * parser.cs (ParseGroup): Pass 0x7ffffff as the max value for '*'
  31. and '+' repetition patterns.
  32. * arch.cs (Info, Repeat, FastRepeat): Update description.
  33. 2006-04-18 Raja R Harinath <[email protected]>
  34. Treat fixed repetitions of simple regexes as simple too.
  35. * syntax.cs (Expression.IsComplex): Make abstract.
  36. (Group.IsComplex, Alternation.IsComplex): Move ...
  37. (CompositeExpression.IsComplex): ... here.
  38. (Group.GetAnchorInfo): Reduce allocations. Avoid creating another
  39. ArrayList, and use a StringBuilder to build up the string.
  40. (Repetition.GetAnchorInfo): Use a StringBuilder to build up the string.
  41. (ExpressionAssertion.IsComplex): Override.
  42. 2006-04-17 Florian Gross <[email protected]>
  43. Raja R Harinath <[email protected]>
  44. * syntax.cs (CharacterClass.Compile): Emit categories after the
  45. character intervals so that the evaluator can pick up the
  46. 'IgnoreCase' flag.
  47. 2006-04-07 Raja R Harinath <[email protected]>
  48. Fix #78007
  49. * interpreter.cs (Interpreter.Eval) [Anchor, Position.StartOfString]:
  50. Don't reset 'ptr' to 0 during forward scan.
  51. Fix #76345
  52. * interpreter.cs (Interpreter.FastEval) [FastRepeat]: If the first
  53. tail operation has a 'negate' flag, avoid the "match next char"
  54. optimization.
  55. Fix #69269
  56. * arch.cs (OpCode.NotCategory): New. Stands for matching a
  57. character _not_ from the given category.
  58. * debug.cs (DisassembleBlock): Handle it.
  59. * compiler.cs (ICompiler.EmitNotCategory): New.
  60. (Compiler.EmitNotCategory): New. Emit OpCode.NotCategory.
  61. * syntax.cs (CharacterClass.Compile): Don't conflate negation of
  62. the character class and negation of the category. Use
  63. EmitNotCategory.
  64. * interpreter.cs (Interpreter.Eval): Pass OpCode.NotCategory to
  65. EvalChar.
  66. (Interpreter.EvalChar): Handle it.
  67. 2006-04-06 Raja R Harinath <[email protected]>
  68. Fix #77487
  69. * interpreter.cs (Eval) [Until, FastUntil]: Set 'deep' to null
  70. when evaluating the tail. Ensure that backtracks don't confuse
  71. the recursion vs. iteration detector.
  72. 2006-04-03 Raja R Harinath <[email protected]>
  73. * interpreter.cs (Eval) [Until, lazy]: Avoid extra evaluation on a
  74. degenerate match.
  75. 2006-03-30 Raja R Harinath <[email protected]>
  76. Fix #77626
  77. * parser.cs (Parser.ParseCharacterClass): Don't automatically
  78. assume there's a range when we see '-'. Ensure that we have seen
  79. at least one other character, and that we aren't already parsing a
  80. range. Handle some more errors.
  81. 2005-12-19 Kornél Pál <[email protected]>
  82. * Regex.cs: Added support for regular expressions compiled to
  83. assemblies by compiling the pattern. This solution ignores existing
  84. CIL code but provides full support for regular expression classes
  85. compiled by MS.NET.
  86. 2005-11-21 Sebastien Pouliot <[email protected]>
  87. * CaptureCollection.cs: Fixed length check.
  88. * Group.cs: Added missing validation for Synchronized method.
  89. * Match.cs: Added missing validation for Synchronized and Result
  90. methods.
  91. * MatchEvaluator.cs: Added [Serializable] for 2.0 profile.
  92. * RegexCompilationInfo.cs: Added missing property validation.
  93. * Regex.cs: Implemented UseOptionC and UseOptionR protected methods
  94. (now documented). Fixed API for 2.0 profile.
  95. * RegexRunner.cs: Stubbed CharInClass for 2.0 profile.
  96. 2005-11-17 Sebastien Pouliot <[email protected]>
  97. * Match.cs: Removed the ": base ()" on the private ctor as it is
  98. unrequired and cause an extra public ctor to added (bug #76736).
  99. * MatchCollection.cs: Add missing virtual to indexer property.
  100. 2005-09-23 Raja R Harinath <[email protected]>
  101. * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Invert the
  102. sense of a test to reflect the code re-organization.
  103. 2005-09-22 Raja R Harinath <[email protected]>
  104. Fix #72152, #72989.
  105. * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
  106. cases of recursion when dealing with eager quantifiers too. We
  107. now avoid recursion when handling the innermost quantifier.
  108. (Interpreter.IntStack, Interpreter.stack): New. Stack to help
  109. implement backtracking in eager quantifiers.
  110. 2005-09-21 Raja R Harinath <[email protected]>
  111. * interpreter.cs (Interpreter.Eval) [OpCode.Until]: Avoid some
  112. cases of recursion when dealing with the minimum count and lazy
  113. quantifiers.
  114. 2005-08-23 Raja R Harinath <[email protected]>
  115. * regex.cs: Remove. Split into ...
  116. * MatchEvaluator.cs, Regex.cs, RegexCompilationInfo.cs,
  117. RegexOptions.cs: ... these. Now every publicly exposed type in
  118. this namespace has its own file.
  119. 2005-07-21 Florian Gross <[email protected]>
  120. * Fixed a bug in category.cs that caused ECMAScript \d to fail.
  121. 2005-07-13 Raja R Harinath <[email protected]>
  122. Make even more lazier.
  123. * MatchCollection.cs (TryToGet): Don't generate match i+1 when
  124. we're looking for match i. Change post-conditions.
  125. (FullList): New helper property. Ensures the list is fully populated.
  126. (Count, CopyTo): Use it.
  127. (Enumerator.Current): Update to new post-conditions of TryToGet.
  128. (Enumerator.MoveNext): Likewise. Don't modify index if we're
  129. beyond the end.
  130. 2005-07-08 Raja R Harinath <[email protected]>
  131. * MatchCollection.cs: Convert to incremental mode.
  132. * regex.cs (Regex.Matches): Update. Pass responsibility of
  133. generating all matches to MatchCollection.
  134. 2005-06-14 Raja R Harinath <[email protected]>
  135. * parser.cs (Parser.ConsumeWhitespace): Add bounds check.
  136. Fix #74753.
  137. * Match.cs (Match) [zero-argument variant]: Make private.
  138. * GroupCollection (Item) [string variant]: Don't look for the
  139. group number in an empty match.
  140. 2005-06-10 Raja R Harinath <[email protected]>
  141. * interpreter.cs (Interpreter.GenerateMatch): Avoid allocating two
  142. intermediate arrays to build the final result.
  143. (Interpreter.GetGroupInfo, Interpreter.PopulateGroup): New helper
  144. functions.
  145. * CaptureCollection.cs (list): Change from ArrayList to list.
  146. (SetValue): New internal helper, used by Interpreter.PopulateGroup.
  147. (Enumerator): Remove helper class.
  148. (IEnumerator.GetEnumerator): Just use list.GetEnumerator.
  149. * GroupCollection.cs: Likewise.
  150. * Group.cs (Group): Move responsibility of populating 'Captures'
  151. to Interpreter.PopulateGroup.
  152. * Match.cs (Match): Move responsibility of populating 'Groups' to
  153. Interpreter.GenerateMatch.
  154. 2005-05-25 Raja R Harinath <[email protected]>
  155. * replace.cs (ReplacementEvaluator.Compile): Rewrite to avoid
  156. creating several intermediate strings. Simplify internal
  157. intermediate representation.
  158. (ReplacementEvaluator.EvaluateAppend): New. Version of Evaluate
  159. that builds the result directly on a passed-in StringBuilder.
  160. (ReplacementEvaluator.Evaluate): Just a wrapper around
  161. EvaluateAppend.
  162. * regex.cs (MatchAppendEvaluator): New internal delegate.
  163. (Regex.Replace): Use MatchAppendEvaluator.
  164. (Regex.Adapter): New class used to adapt a MatchEvaluator to a
  165. MatchAppendEvaluator.
  166. 2005-05-24 Raja R Harinath <[email protected]>
  167. * replace.cs (ReplacementEvaluator.CompileTerm): Fix group
  168. returned by $+.
  169. 2005-05-20 Ben Maurer <[email protected]>
  170. * regex.cs: Some memory allocation optimizations.
  171. 2005-05-20 Raja R Harinath <[email protected]>
  172. Fix #74735.
  173. * replace.cs (ReplacementEvaluator.Compile): Allow CompileTerm to
  174. fail and yet have advanced the pointer. Append the scanned-over
  175. portion to the "literal" being built.
  176. (ReplacementEvaluator.CompileTerm): Don't throw any exceptions.
  177. If a term cannot be recognized, just return null.
  178. * compiler.cs (InterpreterFactory.GroupCount): Fix. The 0'th
  179. index corresponds to Opcode.Info.
  180. * parser.cs (Parser.Unescape): If the string doesn't contain any
  181. '\' character, don't allocate a new string.
  182. * replace.cs (ReplacementEvalutator.Term.AppendResult): Rename
  183. from GetResult. Append to a passed-in StringBuilder rather than
  184. return a string.
  185. (ReplacementEvaluator.Evaluate): Update.
  186. * Capture.cs, Group.cs, Match.cs: New files split out of ...
  187. * match.cs: ... this. Remove.
  188. 2005-02-27 Gonzalo Paniagua Javier <[email protected]>
  189. * parser.cs: stuff inside {} might not be a quantifier. Fixes
  190. bug #69193.
  191. 2005-01-10 Gonzalo Paniagua Javier <[email protected]>
  192. * quicksearch.cs: handle IgnoreCase when getting the shift distance.
  193. Fixes bug #69065. Patch by [email protected].
  194. 2005-01-08 Miguel de Icaza <[email protected]>
  195. * syntax.cs: Applied patch from [email protected] to fix bug
  196. #71077.
  197. * parser.cs: Turns out that \digit sequences are octal sequences
  198. (no leading zero is needed); And the three octal digit rule
  199. applies to the leading zero as well.
  200. This fixes the Unescape method.
  201. 2004-11-29 Gonzalo Paniagua Javier <[email protected]>
  202. * regex.cs: use NextMatch to move on to the next match. Fixes bug
  203. #57274.
  204. 2004-11-09 Atsushi Enomoto <[email protected]>
  205. * parser.cs : cast.
  206. 2004-11-08 Ben Maurer <[email protected]>
  207. * replace.cs, parser.cs: Use stringbuilder for allocation sanity.
  208. 2004-10-21 Joerg Rosenkranz <[email protected]>
  209. * regex.cs: Fixed a bug introduced with the last patch which
  210. prevented any replacements when a postive count is given.
  211. This also happens in all overloads without count parameter.
  212. 2004-10-18 Gonzalo Paniagua Javier <[email protected]>
  213. * regex.cs: in Replace, when count is negative, replacement continues
  214. to the end of the string.
  215. Fixes bug #68398. Patch by Jon Larimer.
  216. 2004-06-10 Gert Driesen <[email protected]>
  217. * RegexRunner.cs: fixed case mismatch of methods
  218. 2004-06-10 Gert Driesen <[email protected]>
  219. * RegexRunner.cs: marked TODO, added missing protected internal
  220. fields, throw NotImplementedException in all methods
  221. 2004-06-10 Gert Driesen <[email protected]>
  222. * RegexRunnerFactory.cs: removed comment, no longer throw exception
  223. from ctor
  224. * regex.cs: fixed public API signature by renaming protected
  225. internal fields and adding destructor, added MonoTODO attribute to
  226. fields and method that are not yet implemented, changed not
  227. implemented methods to throw NotImplementedException instead of
  228. Exception, fixed names of field that are serialized
  229. 2004-06-06 Jambunathan K <[email protected]>
  230. * parser.cs: Fixed issues with Regex.Unescape() identified as part of
  231. debugging bug #58256. The original problem reported was about
  232. inconsistency between the way we treat replacement patterns and the
  233. way microsoft treats the replacement patterns in Regex.Replace(). MS
  234. implementation is buggy and doesn't honour escape sequences in the
  235. replacement patterns, even though the SDK claims otherwise.
  236. 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
  237. * syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
  238. emitting a Category.All if both a category and its negated value are
  239. present.
  240. 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
  241. * syntax.cs: reverting my previous patch. It causes bigger problems.
  242. 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
  243. * category.cs: added LastValue field to mark the end of enum Category.
  244. * syntax.cs: in CharacterClass, use Category.LastValue to get the size
  245. of the array needed. Use a BitArray instead of bool[].
  246. In AddCategory(), don't set the opposite category as false. Fixes
  247. bug #59150. All tests pass.
  248. 2004-05-25 Jackson Harper <[email protected]>
  249. * parser.cs: Allow creating a regular expression using {,n} as the
  250. specified. The min bounds is set to -1, I am not completely sure
  251. if that is what it is supposed to be but MS does not set it to 0
  252. based on testing. Patch by [email protected]. Fixes bug #56761.
  253. 2004-05-12 Dick Porter <[email protected]>
  254. * regex.cs:
  255. * quicksearch.cs:
  256. * RegexRunnerFactory.cs:
  257. * RegexRunner.cs: More public API difference fixes.
  258. * GroupCollection.cs:
  259. * MatchCollection.cs:
  260. * CaptureCollection.cs: Moved GroupCollection, MatchCollection and
  261. CaptureCollection so that they no longer inherit from the
  262. non-standard RegexCollectionBase class. Fixes the API difference.
  263. 2004-04-19 Gonzalo Paniagua Javier <[email protected]>
  264. * arch.cs:
  265. * compiler.cs:
  266. * interpreter.cs:
  267. * parser.cs:
  268. * syntax.cs:
  269. Patch by Eric Durand Tremblay.
  270. 1) Capture inner group when named.
  271. 2) Resolved parse error caused by not capturing inner group
  272. 3) Resolved incorrect capture group
  273. 4) Now, not capturing anything when unnamed ( correct behavior)
  274. 2004-04-19 Gonzalo Paniagua Javier <[email protected]>
  275. * arch.cs:
  276. * compiler.cs:
  277. * interpreter.cs:
  278. * parser.cs:
  279. * syntax.cs: converted to unix line endings.
  280. 2004-03-30 Lluis Sanchez Gual <[email protected]>
  281. * collections.cs: In the indexer, return an empty group if the requested
  282. group is not found.
  283. * match.cs: Added default constructor for Group.
  284. 2004-03-24 Gonzalo Paniagua Javier <[email protected]>
  285. * parser.cs: fixed group numbering.
  286. 2004-03-22 Jackson Harper <[email protected]>
  287. * parser.cs: Use the group number as the name in mapping. Patch by
  288. Gert Driesen.
  289. * regex.cs: Fix off by one error. Patch by Gert Driesen.
  290. 2004-03-17 Francois Beauchemin <[email protected]>
  291. * syntax.cs, interpreter.cs, quicksearch.cs, regex.cs, compiler.cs :
  292. Revised support for RigthToLeft.
  293. quicksearch has now an reverse option.
  294. This fixes bug #54537
  295. * regex.cs, compiler.cs :
  296. Some code to support CILCompiler.
  297. * regex.cs :
  298. Added some undocumented of MS.
  299. 2004-03-16 Gonzalo Paniagua Javier <[email protected]>
  300. * parser.cs: allow a @"\0" escape sequence. Fixes bug #54797.
  301. 2004-02-01 Miguel de Icaza <[email protected]>
  302. * syntax.cs, interval.cs: Applied patch from Marco Cravairo
  303. through Francois Beauchemin who reviewed on the mailing list.
  304. This fixes bug #45976
  305. 2004-01-16 Gonzalo Paniagua Javier <[email protected]>
  306. * parser.cs: an opening brace without a
  307. quantifier do not cause a parse error. Fixes bug #52924.
  308. 2004-01-07 Lluis Sanchez Gual <[email protected]>
  309. * regex.cs: In Split(), if the last match is at the end of the string,
  310. an empty string must be added to the array of results.
  311. 2003-12-15 Sanjay Gupta <[email protected]>
  312. * match.cs: Check for null value before Substring method call.
  313. Fixes bug #52034.
  314. 2003-11-21 Juraj Skripsky <[email protected]>
  315. * quicksearch.cs: Create and use hashtable only for "long" search
  316. strings.
  317. (Search): Use simple scan for a single-character search strings.
  318. (GetChar): Simplify case sensitivity handling.
  319. 2003-11-27 Gonzalo Paniagua Javier <[email protected]>
  320. * interpreter.cs: when evaluating a degenerate match, restore the
  321. RepeatContext if fail. Fixes bug #42529.
  322. 2003-11-22 Jackson Harper <[email protected]>
  323. * regex.cs: Add CultureInvariant flag to RegexOptions.
  324. 2003-11-20 Juraj Skripsky <[email protected]>
  325. * quicksearch.cs: Use a hashtable instead of an array for the
  326. shift table to improve the memory usage.
  327. 2003-11-19 Gonzalo Paniagua Javier <[email protected]>
  328. * regex.cs:
  329. (Split): include capture groups in the results, if any. Fixes bug
  330. #51146.
  331. 2003-07-09 Gonzalo Paniagua Javier <[email protected]>
  332. * regex.cs: patch from Eric Lindvall <[email protected]> that fixes bug
  333. #44830.
  334. 2003-03-05 Miguel de Icaza <[email protected]>
  335. * category.cs (CategoryUtils.CategoryFromName): Use StartsWith
  336. ("Is") instead of a substring for (0,2) which was throwing an
  337. exception causing Category.None to be returned
  338. 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
  339. * collections.cs: fixed bug #30091.
  340. 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
  341. * regex.cs: fixed little mistake (closes #35860).
  342. 2002-11-12 Jackson Harper <[email protected]>
  343. * arch.cs compiler.cs regex.cs: Added mapping attribute to MachineFactories
  344. 2002-11-06 Gonzalo Paniagua Javier <[email protected]>
  345. * parser.cs: detect illegal \ at end of pattern. Fixes 31334.
  346. 2002-10-25 Gonzalo Paniagua Javier <[email protected]>
  347. * parser.cs: applied fix from Tim Haynes ([email protected]) to
  348. solve bug #32807. Also modified GetMapping to return the same as MS.
  349. 2002-08-28 Juli Mallett <[email protected]>
  350. * arch.cs, compiler.cs: Give the interpreter machine a property
  351. for the retrieval of the group count.
  352. * regex.cs: Use the new GroupCount property of the factory to
  353. initialise the current group count, and restructure code to compile
  354. the pattern only the first time it is needed (essentially backing
  355. out the previous revision of regex.cs, to use the new code.)
  356. 2002-08-14 Cesar Octavio Lopez Nataren <[email protected]>
  357. * regex.cs: Added the ctr for ISerializable implementation and
  358. implemented the GetObjectData function.
  359. 2002-07-30 Juli Mallett <[email protected]>
  360. * regex.cs: Fixed bug where the expression would not be
  361. re-evaluated for grouping purposes when factory caches were
  362. used, resulting in no groups being recognised after one call
  363. with a given pattern and no change in options.
  364. 2002-05-13 Dan Lewis <[email protected]>
  365. * regex.cs: Fixed bug in split.
  366. 2002-05-08 Dan Lewis <[email protected]>
  367. * interpreter.cs: Moved to an array-based stack representation
  368. for faster captures.
  369. * match.cs, collections.cs: Decoupled capture representation from
  370. interpreter internals.
  371. * cache.cs: Changed Key type from struct to class for speed.
  372. 2002-04-06 Dan Lewis <[email protected]>
  373. * cache.cs: Object methods should be overridden with "override".
  374. 2002-04-04 Dan Lewis <[email protected]>
  375. * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
  376. added for completeness.
  377. * regex.cs, match.cs, collections.cs: Serializable attribute.
  378. 2002-04-04 Dan Lewis <[email protected]>
  379. * regex.cs: Added static Matches and IsMatch methods.
  380. 2002-04-03 Dan Lewis <[email protected]>
  381. * ChangeLog: Added changelog.
  382. * cache.cs: Fixed bug in MRUList.Evict.