comparison 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
comparison
equal deleted inserted replaced
171:0f70905b4652 172:92d5278d1b10
69 69
70 public bool Contains(T symbol) { 70 public bool Contains(T symbol) {
71 return true; 71 return true;
72 } 72 }
73 73
74 public IEnumerable<T> GetSymbols(int cls) {
75 for (var i = 0; i < m_map.Length; i++)
76 if (m_map[i] == cls)
77 yield return GetSymbolByIndex(i);
78 }
79
74 public abstract int GetSymbolIndex(T symbol); 80 public abstract int GetSymbolIndex(T symbol);
81
82 public abstract T GetSymbolByIndex(int index);
75 83
76 public abstract IEnumerable<T> InputSymbols { get; } 84 public abstract IEnumerable<T> InputSymbols { get; }
77 85
78 /// <summary> 86 /// <summary>
79 /// Gets the translation map from the index of the symbol to it's class this is usefull for the optimized input symbols transtaion. 87 /// Gets the translation map from the index of the symbol to it's class this is usefull for the optimized input symbols transtaion.