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.java.expression.operator;
12:
13: import de.uka.ilkd.key.java.Expression;
14: import de.uka.ilkd.key.java.PrettyPrinter;
15: import de.uka.ilkd.key.java.visitor.Visitor;
16: import de.uka.ilkd.key.util.ExtList;
17:
18: /**
19: * Minus.
20: * @author <TT>AutoDoc</TT>
21: */
22:
23: public class Minus extends BinaryOperator {
24:
25: /**
26: * Minus.
27: * @param children an ExtList with all children of this node
28: * the first children in list will be the one on the left
29: * side, the second the one on the right side.
30: */
31:
32: public Minus(ExtList children) {
33: super (children);
34: }
35:
36: public Minus(Expression lhs, Expression rhs) {
37: super (lhs, rhs);
38: }
39:
40: /**
41: * Get precedence.
42: * @return the int value.
43: */
44:
45: public int getPrecedence() {
46: return 3;
47: }
48:
49: /**
50: * Get notation.
51: * @return the int value.
52: */
53:
54: public int getNotation() {
55: return INFIX;
56: }
57:
58: /** calls the corresponding method of a visitor in order to
59: * perform some action/transformation on this element
60: * @param v the Visitor
61: */
62: public void visit(Visitor v) {
63: v.performActionOnMinus(this );
64: }
65:
66: public void prettyPrint(PrettyPrinter p) throws java.io.IOException {
67: p.printMinus(this);
68: }
69:
70: }
|