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