KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > ExceptionSpec


1 package antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/RIGHTS.html
6  *
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 rule
14
// Use a token instead of a string to get the line information
15
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
Popular Tags