public void Rebalance() { if (_Right != null) { if (_Right._Operator != null && _Right._Operator.Priority <= _Operator.Priority) { RebalanceLeft(); _Parent.Rebalance(); } else if (_Right._Operator != null) { _Right.Rebalance(); } } }
public ParseTree(string Source, List <Operator <T> > Operators, Dictionary <string, Generator <T> > Sets) { _Head = new ParseNode <T>(Source, Operators, Sets); _Head.Rebalance(); _Head = _Head.GetRoot(); }