2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
authorDan Lewis <dan@mono-cvs.ximian.com>
Thu, 4 Apr 2002 07:49:51 +0000 (07:49 -0000)
committerDan Lewis <dan@mono-cvs.ximian.com>
Thu, 4 Apr 2002 07:49:51 +0000 (07:49 -0000)
* RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
added for completeness.

* regex.cs, match.cs, collections.cs: Serializable attribute.

svn path=/trunk/mcs/; revision=3610

mcs/class/System/System.Text.RegularExpressions/ChangeLog
mcs/class/System/System.Text.RegularExpressions/RegexRunner.cs [new file with mode: 0644]
mcs/class/System/System.Text.RegularExpressions/RegexRunnerFactory.cs [new file with mode: 0644]
mcs/class/System/System.Text.RegularExpressions/collections.cs
mcs/class/System/System.Text.RegularExpressions/match.cs
mcs/class/System/System.Text.RegularExpressions/regex.cs

index 70ca1faee38c18a163b67c4ac324257becb879b8..9f7c816b3945f7d6e27b472d315239bd1d5214c9 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
+
+       * RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
+       added for completeness.
+
+       * regex.cs, match.cs, collections.cs: Serializable attribute.
+
 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
 
        * regex.cs: Added static Matches and IsMatch methods.
diff --git a/mcs/class/System/System.Text.RegularExpressions/RegexRunner.cs b/mcs/class/System/System.Text.RegularExpressions/RegexRunner.cs
new file mode 100644 (file)
index 0000000..dfed1ad
--- /dev/null
@@ -0,0 +1,92 @@
+//\r
+// assembly:   System\r
+// namespace:  System.Text.RegularExpressions\r
+// file:       RegexRunner.cs\r
+//\r
+// author:     Dan Lewis (dihlewis@yahoo.co.uk)\r
+//             (c) 2002\r
+\r
+using System;\r
+\r
+namespace System.Text.RegularExpressions {\r
+       \r
+       public abstract class RegexRunner {\r
+               // constructor\r
+       \r
+               protected internal RegexRunner () {\r
+                       throw new NotImplementedException ("RegexRunner is not supported by Mono.");\r
+               }\r
+\r
+               // protected abstract\r
+\r
+               protected abstract bool FindFirstChar ();\r
+\r
+               protected abstract void Go ();\r
+\r
+               protected abstract void InitTrackCount ();\r
+\r
+               // protected methods\r
+\r
+               protected void Capture (int capnum, int start, int end) {\r
+               }\r
+\r
+               protected static bool CharInSet (char ch, string set, string category) {\r
+                       return false;\r
+               }\r
+\r
+               protected void Crawl (int i) {\r
+               }\r
+\r
+               protected int CrawlPos () {\r
+                       return 0;\r
+               }\r
+\r
+               protected void DoubleCrawl () {\r
+               }\r
+\r
+               protected void DoubleStack () {\r
+               }\r
+\r
+               protected void DoubleTrack () {\r
+               }\r
+\r
+               protected void EnsureStorage () {\r
+               }\r
+\r
+               protected bool IsBoundary (int index, int startpos, int endpos) {\r
+                       return false;\r
+               }\r
+\r
+               protected bool IsECMABoundary (int index, int startpos, int endpos) {\r
+                       return false;\r
+               }\r
+\r
+               protected bool IsMatched (int cap) {\r
+                       return false;\r
+               }\r
+\r
+               protected int MatchIndex (int cap) {\r
+                       return 0;\r
+               }\r
+\r
+               protected int MatchLength (int cap) {\r
+                       return 0;\r
+               }\r
+\r
+               protected int PopCrawl () {\r
+                       return 0;\r
+               }\r
+\r
+               protected void TransferCapture (int capnum, int uncapnum, int start, int end) {\r
+               }\r
+\r
+               protected void Uncapture () {\r
+               }\r
+\r
+               // internal\r
+               \r
+               protected internal Match Scan (Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick) {\r
+                       return null;\r
+               }\r
+       }\r
+}\r
diff --git a/mcs/class/System/System.Text.RegularExpressions/RegexRunnerFactory.cs b/mcs/class/System/System.Text.RegularExpressions/RegexRunnerFactory.cs
new file mode 100644 (file)
index 0000000..895ff16
--- /dev/null
@@ -0,0 +1,20 @@
+//\r
+// assembly:   System\r
+// namespace:  System.Text.RegularExpressions\r
+// file:       RegexRunnerFactory.cs\r
+//\r
+// author:     Dan Lewis (dihlewis@yahoo.co.uk)\r
+//             (c) 2002\r
+\r
+using System;\r
+\r
+namespace System.Text.RegularExpressions {\r
+       \r
+       public abstract class RegexRunnerFactory {\r
+               protected RegexRunnerFactory () {\r
+                       throw new NotImplementedException ("RegexRunnerFactory is not supported by Mono.");\r
+               }\r
+\r
+               protected internal abstract RegexRunner CreateInstance ();\r
+       }\r
+}\r
index 6f2407990e0efcf1e367a44289270f5de839461f..d5270321c8ad480a25e3c6692aaf5d8e1d0b7e1d 100644 (file)
@@ -105,6 +105,7 @@ namespace System.Text.RegularExpressions {
                }\r
        }\r
 \r
+       [Serializable]\r
        public class GroupCollection : RegexCollectionBase, ICollection, IEnumerable {\r
                public Group this[int i] {\r
                        get { return (Group)list[i]; }\r
@@ -114,6 +115,7 @@ namespace System.Text.RegularExpressions {
                }\r
        }\r
 \r
+       [Serializable]\r
        public class MatchCollection : RegexCollectionBase, ICollection, IEnumerable {\r
                public virtual Match this[int i] {\r
                        get { return (Match)list[i]; }\r
index b2bc5dcca9d7b21a30547473e3c780baeb100cc0..87f4afbfc9dae9b3bae4fa9863003e520f5038ce 100644 (file)
@@ -120,6 +120,7 @@ namespace System.Text.RegularExpressions {
                private Capture previous;\r
        }\r
 \r
+       [Serializable]\r
        public class Group : Capture {\r
                public static Group Synchronized (Group inner) {\r
                        return inner;   // is this enough?\r
@@ -147,6 +148,7 @@ namespace System.Text.RegularExpressions {
                private CaptureCollection captures;\r
        }\r
 \r
+       [Serializable]\r
        public class Match : Group {\r
                public static Match Empty {\r
                        get { return empty; }\r
index a8ca101f11dacfdc07929398a351737126c196c7..3c373d804044520af04c24d8a9dec1e93278737b 100644 (file)
@@ -357,6 +357,7 @@ namespace System.Text.RegularExpressions {
                private int group_count;\r
        }\r
 \r
+       [Serializable]\r
        public class RegexCompilationInfo {\r
                public RegexCompilationInfo (string pattern, RegexOptions options, string name, string full_namespace, bool is_public) {\r
                        this.pattern = pattern;\r