diff Implab/Automaton/IndexedAlphabetBase.cs @ 172:92d5278d1b10 ref20160224

Working on text scanner
author cin
date Mon, 14 Mar 2016 01:19:38 +0300
parents 0f70905b4652
children 0c3c69fe225b
line wrap: on
line diff
--- a/Implab/Automaton/IndexedAlphabetBase.cs	Thu Mar 10 01:19:33 2016 +0300
+++ b/Implab/Automaton/IndexedAlphabetBase.cs	Mon Mar 14 01:19:38 2016 +0300
@@ -71,8 +71,16 @@
             return true;
         }
 
+        public IEnumerable<T> GetSymbols(int cls) {
+            for (var i = 0; i < m_map.Length; i++)
+                if (m_map[i] == cls)
+                    yield return GetSymbolByIndex(i);
+        }
+
         public abstract int GetSymbolIndex(T symbol);
 
+        public abstract T GetSymbolByIndex(int index);
+
         public abstract IEnumerable<T> InputSymbols { get; }
 
         /// <summary>