/// <summary> /// Поиск терминалов {$, id, const} /// </summary> public void Search_Terminals() { foreach (var terminal in m_terminals) { switch (terminal.m_name) { case "$": { eps = terminal; break; } case "id": { id = terminal; break; } case "const": { constNT = terminal; break; } } } }
public void Read_Regulation() { Grammatics rule_down = new Grammatics(); for (int k = 0; k < m_rule.LongLength; k++) { string[] str = m_rule[k].Split(new[] { " -> " }, StringSplitOptions.RemoveEmptyEntries); if ((Search_nterminals(str[0]))) { m_nterminals.Add(str[0]); } rule_down.m_name = str[1]; rule_down.number = k + 1; m_Rules.Add(rule_down); } }