1 package antlr.collections;
2
3 import java.util.NoSuchElementException;
4
5 /** A simple stack definition; restrictive in that you cannot
6 * access arbitrary stack elements.
7 *
8 * @author Terence Parr
9 * <a href=http://www.MageLang.com>MageLang Institute</a>
10 */
11 public interface Stack {
12
13
14 public int height();
15 public Object pop() throws NoSuchElementException;
16 public void push(Object o);
17 public Object top() throws NoSuchElementException;
18 }
19