1 package persistence.antlr.collections;2 3 /* ANTLR Translator Generator4 * Project led by Terence Parr at http://www.jGuru.com5 * Software rights: http://www.antlr.org/license.html6 *7 */8 9 import java.util.NoSuchElementException ;10 11 /** A simple stack definition; restrictive in that you cannot12 * access arbitrary stack elements.13 *14 * @author Terence Parr15 * <a HREF=http://www.MageLang.com>MageLang Institute</a>16 */17 public interface Stack {18 public int height();19 20 public Object pop() throws NoSuchElementException ;21 22 public void push(Object o);23 24 public Object top() throws NoSuchElementException ;25 }26