01: /*
02: * @(#)ParseEnvironment.java 1.2 04/12/06
03: *
04: * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.lang;
10:
11: /**
12: * This class defines how to handle ParseException thrown by the parser. The
13: * instances can be passed to Pnuts.parse(..) method in order to customize the
14: * way of error recovery of parsing.
15: */
16: public interface ParseEnvironment {
17:
18: /**
19: * Thie method defines how to deal with parse errors
20: *
21: * @param e
22: * a ParseException object passed by the parser
23: * @exception ParseException
24: * this method may rethrow the ParseException
25: */
26: void handleParseException(ParseException e) throws ParseException;
27: }
|