KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > UnexpectedParser


1 /**
2  *
3  */

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