public static void SetTokens(YyLexer tks, Hashtable h) { foreach (Dfa dfa in (IEnumerable)h.Values) { if (dfa.m_tokens == null) { dfa.m_tokens = tks; Dfa.SetTokens(tks, dfa.m_map); } } }
public static void SetTokens(YyLexer tks, Hashtable h) // needed after deserialisation { foreach (Dfa v in h.Values) { if (v.m_tokens != null) { continue; } v.m_tokens = tks; Dfa.SetTokens(tks, v.m_map); } }
// Deserializing public void GetDfa() { if (tokens.Count > 0) { return; } Serialiser f = new Serialiser(arr); m_encoding = (Encoding)f.Deserialise(); toupper = (bool)f.Deserialise(); cats = (Hashtable)f.Deserialise(); m_gencat = (UnicodeCategory)f.Deserialise(); usingEOF = (bool)f.Deserialise(); starts = (Hashtable)f.Deserialise(); Dfa.SetTokens(this, starts); tokens = (Hashtable)f.Deserialise(); }
public void GetDfa() { if (this.tokens.Count > 0) { return; } Serialiser serialiser = new Serialiser(this.arr); serialiser.VersionCheck(); this.m_encoding = (Encoding)serialiser.Deserialise(); this.toupper = (bool)serialiser.Deserialise(); this.cats = (Hashtable)serialiser.Deserialise(); this.m_gencat = (UnicodeCategory)serialiser.Deserialise(); this.usingEOF = (bool)serialiser.Deserialise(); this.starts = (Hashtable)serialiser.Deserialise(); Dfa.SetTokens(this, this.starts); this.tokens = (Hashtable)serialiser.Deserialise(); this.reswds = (Hashtable)serialiser.Deserialise(); }