cetus.hir
Class CommaExpression
java.lang.Object
cetus.hir.Expression
cetus.hir.CommaExpression
- All Implemented Interfaces:
- Printable, Traversable, java.lang.Cloneable, java.lang.Comparable<Expression>
public class CommaExpression
- extends Expression
Represents expressions separated by the comma
operator in C or C++. The entire expression evaluates
to the last expression in the list.
|
Method Summary |
void |
addExpression(Expression expr)
|
java.lang.Object |
clone()
Creates and returns a deep copy of this expression. |
static void |
defaultPrint(CommaExpression expr,
java.io.OutputStream stream)
Prints a CommaExpression to a stream. |
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently
created objects will use the supplied method. |
java.lang.String |
toString()
Every expression class should override toString method. |
| Methods inherited from class cetus.hir.Expression |
compareTo, equals, equals2, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verify |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CommaExpression
public CommaExpression(java.util.List expr_list)
addExpression
public void addExpression(Expression expr)
clone
public java.lang.Object clone()
- Description copied from class:
Expression
- Creates and returns a deep copy of this expression.
- Overrides:
clone in class Expression
- Returns:
- a deep copy of this expression.
defaultPrint
public static void defaultPrint(CommaExpression expr,
java.io.OutputStream stream)
- Prints a CommaExpression to a stream.
- Parameters:
expr - The expression to print.stream - The stream on which to print the expression.
toString
public java.lang.String toString()
- Description copied from class:
Expression
- Every expression class should override toString method.
- Overrides:
toString in class Expression
setClassPrintMethod
public static void setClassPrintMethod(java.lang.reflect.Method m)
- Overrides the class print method, so that all subsequently
created objects will use the supplied method.
- Parameters:
m - The new print method.