KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > ActionParser


1 package jfun.parsec;
2
3 final class ActionParser extends Parser<Object JavaDoc> {
4   private final Runnable JavaDoc action;
5   boolean apply(ParseContext ctxt) {
6     action.run();
7     return true;
8   }
9   ActionParser(String JavaDoc n, Runnable JavaDoc action) {
10     super(n);
11     this.action = action;
12   }
13 }
14
Popular Tags