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: package de.uka.ilkd.key.pp;
12:
13: import java.io.IOException;
14:
15: import de.uka.ilkd.key.logic.Term;
16: import de.uka.ilkd.key.util.pp.Layouter;
17:
18: /** Hack! The class {@link LogicPrinter} contains the code for
19: * printing formulas and terms, and restricts acccess to the low level
20: * methods. But the {@link SeqentPrinter} can only print terms, that
21: * it knows. Because of the access limitations, it is not possible to
22: * invoke these methodsfrom other packages.
23: *
24: * This class wraps these methods and make them available public. This
25: * class should only be used by the ASM term printer class.
26: *
27: * @author Hubert Schmid */
28:
29: public class AbstractAsmPrinter {
30:
31: protected AbstractAsmPrinter() {
32: }
33:
34: public static Layouter layouter(LogicPrinter sp) {
35: return sp.getLayouter();
36: }
37:
38: public static void markStartSub(LogicPrinter sp) {
39: sp.markStartSub();
40: }
41:
42: public static void markEndSub(LogicPrinter sp) {
43: sp.markEndSub();
44: }
45:
46: public static void startTerm(LogicPrinter sp, int size) {
47: sp.startTerm(size);
48: }
49:
50: public static void maybeParens(LogicPrinter sp, Term t, int ass)
51: throws IOException {
52: sp.maybeParens(t, ass);
53: }
54:
55: }
|