KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > ManyParser


1 /**
2  *
3  */

4 package jfun.parsec;
5
6 final class ManyParser extends Parser<_> {
7   private final Parser<?> p;
8
9   ManyParser(String JavaDoc n, Parser<?> p) {
10     super(n);
11     this.p = p;
12   }
13
14   boolean apply(final ParseContext ctxt) {
15     if (ParserInternals.run_many(p, ctxt)) {
16       return ParserInternals.returnValue(null, ctxt);
17     } else
18       return false;
19   }
20 }
Popular Tags