01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10: //
11:
12: package de.uka.ilkd.key.parser;
13:
14: import java.io.Reader;
15:
16: import de.uka.ilkd.key.java.Services;
17: import de.uka.ilkd.key.logic.Namespace;
18: import de.uka.ilkd.key.logic.NamespaceSet;
19: import de.uka.ilkd.key.logic.Term;
20: import de.uka.ilkd.key.logic.sort.Sort;
21: import de.uka.ilkd.key.pp.AbbrevMap;
22:
23: /** A simple interface to parse arbitrary terms.
24: *
25: * @author Hubert Schmid
26: */
27:
28: public interface SimpleTermParser {
29:
30: /** The method reads the input and parses a term with the
31: * specified namespaces. The method ensures, that the term has the
32: * specified sort.
33: * @param sort The expected sort of the term.
34: * @return The parsed term of the specified sort.
35: * @throws ParserException The method throws a ParserException, if
36: * the input could not be parsed correctly or the term has an
37: * invalid sort. */
38: Term parse(Reader in, Sort sort, Services services,
39: Namespace varNS, Namespace func_ns, Namespace sort_ns,
40: Namespace progVar_ns, AbbrevMap scm) throws ParserException;
41:
42: /** The method reads the input and parses a term with the
43: * specified namespaces. The method ensures, that the term has the
44: * specified sort.
45: * @param sort The expected sort of the term.
46: * @return The parsed term of the specified sort.
47: * @throws ParserException The method throws a ParserException, if
48: * the input could not be parsed correctly or the term has an
49: * invalid sort. */
50: Term parse(Reader in, Sort sort, Services services,
51: NamespaceSet nss, AbbrevMap scm) throws ParserException;
52:
53: }
|