KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > RaiseParser


1 /**
2  *
3  */

4 package jfun.parsec;
5
6 final class RaiseParser<R> extends Parser<R> {
7   private final Object JavaDoc e;
8
9   RaiseParser(String JavaDoc n, Object JavaDoc e) {
10     super(n);
11     this.e = e;
12   }
13
14   boolean apply(final ParseContext ctxt) {
15     ctxt.setError(ParserInternals.newException(e, ctxt));
16     return false;
17   }
18 }
Popular Tags