KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > TokenStreamRecognitionException


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/TokenStreamRecognitionException.java#5 $
8  */

9
10 /**
11  * Wraps a RecognitionException in a TokenStreamException so you
12  * can pass it along.
13  */

14 public class TokenStreamRecognitionException extends TokenStreamException {
15     public RecognitionException recog;
16
17     public TokenStreamRecognitionException(RecognitionException re) {
18         super(re.getMessage());
19         this.recog = re;
20     }
21
22     public String JavaDoc toString() {
23         return recog.toString();
24     }
25 }
26
Popular Tags