jfun.parsec
Interface Catch<T>
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- Catch1
public interface Catch<T>
- extends java.io.Serializable
To catch a pseudo-exception 'thrown' from a Parser.
A pseudo-exception is not a real java exception.
It only affects the execution of a parser and can only be caught by Parsers.tryParser method.
- Author:
- Ben Yu
2004-11-12
Method Summary |
Parser<T> |
catchException(java.lang.Object v,
java.lang.Object e)
in case of a pseudo-exception e happens, user can specify what Parser to use. |
catchException
Parser<T> catchException(java.lang.Object v,
java.lang.Object e)
- in case of a pseudo-exception e happens, user can specify what Parser to use.
- Parameters:
v
- the return value of the exceptional parser.e
- the exception thrown.
- Returns:
- the new Parser object.