KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > ReturnParser


1 /**
2  *
3  */

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