01: package antlr.collections;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.cs.usfca.edu
05: * Software rights: http://www.antlr.org/license.html
06: */
07:
08: import java.util.NoSuchElementException;
09:
10: /** A simple stack definition; restrictive in that you cannot
11: * access arbitrary stack elements.
12: *
13: * @author Terence Parr
14: * <a href=http://www.MageLang.com>MageLang Institute</a>
15: */
16: public interface Stack {
17: public int height();
18:
19: public Object pop() throws NoSuchElementException;
20:
21: public void push(Object o);
22:
23: public Object top() throws NoSuchElementException;
24: }
|