diff Implab/Automaton/RegularExpressions/Token.cs @ 165:e227e78d72e4 ref20160224

DFA refactoring
author cin
date Mon, 29 Feb 2016 02:02:17 +0300
parents 0526412bbb26
children a0ff6a0e9c44
line wrap: on
line diff
--- a/Implab/Automaton/RegularExpressions/Token.cs	Thu Feb 25 02:11:13 2016 +0300
+++ b/Implab/Automaton/RegularExpressions/Token.cs	Mon Feb 29 02:02:17 2016 +0300
@@ -10,7 +10,7 @@
             return Cat(new EndToken<TTag>());
         }
 
-        public Token<TTag> Tag<T>(T tag) where T : IConvertible {
+        public Token<TTag> Tag(TTag tag) {
             return Cat(new EndToken<TTag>(tag));
         }
 
@@ -48,11 +48,11 @@
             var token = Repeat(min);
 
             for (int i = min; i < max; i++)
-                token = token.Cat( this.Optional() );
+                token = token.Cat( Optional() );
             return token;
         }
 
-        public static Token<TTag> New<T>(params T[] set) where T : struct, IConvertible {
+        public static Token<TTag> New(params int[] set) {
             Safe.ArgumentNotNull(set, "set");
             Token<TTag> token = null;
             foreach(var c in set.Distinct())