01: package antlr;
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 antlr.collections.impl.Vector;
09:
10: class ExceptionSpec {
11: // Non-null if this refers to a labeled rule
12: // Use a token instead of a string to get the line information
13: protected Token label;
14:
15: // List of ExceptionHandler (catch phrases)
16: protected Vector handlers;
17:
18: public ExceptionSpec(Token label_) {
19: label = label_;
20: handlers = new Vector();
21: }
22:
23: public void addHandler(ExceptionHandler handler) {
24: handlers.appendElement(handler);
25: }
26: }
|