/// Pops the specified number of tokens from the stack and adds them /// to the specified <c>Reduction</c>. public void PopTokensInto(Reduction p_reduction, int p_count) { int start = m_items.Count - p_count; int end = m_items.Count; for (int i = start; i < end; i++) { p_reduction.AddToken((Token)m_items[i]); } m_items.RemoveRange(start, p_count); }
/// Pops the specified number of tokens from the stack and adds them /// to the specified <c>Reduction</c>. public void PopTokensInto(Reduction p_reduction, int p_count) { int start = m_items.Count - p_count; int end = m_items.Count; for (int i = start; i < end; i++) p_reduction.AddToken((Token)m_items[i]); m_items.RemoveRange(start, p_count); }