1 /* 2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 /* 26 * COMPONENT_NAME: idl.parser 27 * 28 * ORIGINS: 27 29 * 30 * Licensed Materials - Property of IBM 31 * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999 32 * RMI-IIOP v1.0 33 * 34 */ 35 36 package com.sun.tools.corba.se.idl.constExpr; 37 38 // NOTES: 39 40 import com.sun.tools.corba.se.idl.ConstEntry; 41 import java.math.BigInteger; 42 43 public class DefaultExprFactory implements ExprFactory 44 { 45 public And and (Expression left, Expression right) 46 { 47 return new And (left, right); 48 } // and 49 50 public BooleanAnd booleanAnd (Expression left, Expression right) 51 { 52 return new BooleanAnd (left, right); 53 } // booleanAnd 54 55 public BooleanNot booleanNot (Expression operand) 56 { 57 return new BooleanNot (operand); 58 } // booleanNot 59 60 public BooleanOr booleanOr (Expression left, Expression right) 61 { 62 return new BooleanOr (left, right); 63 } // booleanOr 64 65 public Divide divide (Expression left, Expression right) 66 { 67 return new Divide (left, right); 68 } // divide 69 70 public Equal equal (Expression left, Expression right) 71 { 72 return new Equal (left, right); 73 } // equal 74 75 public GreaterEqual greaterEqual (Expression left, Expression right) 76 { 77 return new GreaterEqual (left, right); 78 } // greaterEqual 79 80 public GreaterThan greaterThan (Expression left, Expression right) 81 { 82 return new GreaterThan (left, right); 83 } // greaterThan 84 85 public LessEqual lessEqual (Expression left, Expression right) 86 { 87 return new LessEqual (left, right); 88 } // lessEqual 89 90 public LessThan lessThan (Expression left, Expression right) 91 { 92 return new LessThan (left, right); 93 } // lessThan 94 95 public Minus minus (Expression left, Expression right) 96 { 97 return new Minus (left, right); 98 } // minus 99 100 public Modulo modulo (Expression left, Expression right) 101 { 102 return new Modulo (left, right); 103 } // modulo 104 105 public Negative negative (Expression operand) 106 { 107 return new Negative (operand); 108 } // negative 109 110 public Not not (Expression operand) 111 { 112 return new Not (operand); 113 } // not 114 115 public NotEqual notEqual (Expression left, Expression right) 116 { 117 return new NotEqual (left, right); 118 } // notEqual 119 120 public Or or (Expression left, Expression right) 121 { 122 return new Or (left, right); 123 } // or 124 125 public Plus plus (Expression left, Expression right) 126 { 127 return new Plus (left, right); 128 } // plus 129 130 public Positive positive (Expression operand) 131 { 132 return new Positive (operand); 133 } // positive 134 135 public ShiftLeft shiftLeft (Expression left, Expression right) 136 { 137 return new ShiftLeft (left, right); 138 } // shiftLeft 139 140 public ShiftRight shiftRight (Expression left, Expression right) 141 { 142 return new ShiftRight (left, right); 143 } // shiftRight 144 145 public Terminal terminal (String representation, Character charValue, 146 boolean isWide ) 147 { 148 return new Terminal (representation, charValue, isWide ); 149 } // ctor 150 151 public Terminal terminal (String representation, Boolean booleanValue) 152 { 153 return new Terminal (representation, booleanValue); 154 } // ctor 155 156 // Support long long <daz> 157 public Terminal terminal (String representation, BigInteger bigIntegerValue) 158 { 159 return new Terminal (representation, bigIntegerValue); 160 } // ctor 161 162 //daz public Terminal terminal (String representation, Long longValue) 163 // { 164 // return new Terminal (representation, longValue); 165 // } // ctor 166 167 public Terminal terminal (String representation, Double doubleValue) 168 { 169 return new Terminal (representation, doubleValue); 170 } // ctor 171 172 public Terminal terminal (String stringValue, boolean isWide ) 173 { 174 return new Terminal (stringValue, isWide); 175 } // ctor 176 177 public Terminal terminal (ConstEntry constReference) 178 { 179 return new Terminal (constReference); 180 } // ctor 181 182 public Times times (Expression left, Expression right) 183 { 184 return new Times (left, right); 185 } // times 186 187 public Xor xor (Expression left, Expression right) 188 { 189 return new Xor (left, right); 190 } // xor 191 } // class DefaultExprFactory