1 package antlr;2 3 /* ANTLR Translator Generator4 * Project led by Terence Parr at http://www.jGuru.com5 * Software rights: http://www.antlr.org/RIGHTS.html6 *7 * $Id: //depot/code/org.antlr/main/main/antlr/ExceptionSpec.java#4 $8 */9 10 import antlr.collections.impl.Vector;11 12 class ExceptionSpec {13 // Non-null if this refers to a labeled rule14 // Use a token instead of a string to get the line information15 protected Token label;16 17 // List of ExceptionHandler (catch phrases)18 protected Vector handlers;19 20 21 public ExceptionSpec(Token label_) {22 label = label_;23 handlers = new Vector();24 }25 26 public void addHandler(ExceptionHandler handler) {27 handlers.appendElement(handler);28 }29 }30