Class leq

java.lang.Object
  extended by TreeNode
      extended by Expression
          extended by leq

 class leq
extends Expression

Defines AST constructor 'leq'.

See TreeNode for full documentation.


Field Summary
protected  Expression e1
           
protected  Expression e2
           
 
Fields inherited from class TreeNode
lineNumber
 
Constructor Summary
leq(int lineNumber, Expression a1, Expression a2)
          Creates "leq" AST node.
 
Method Summary
 void code(java.io.PrintStream s)
          Generates code for this expression.
 TreeNode copy()
          Creates a copy of this node.
 void dump_with_types(java.io.PrintStream out, int n)
           
 void dump(java.io.PrintStream out, int n)
          Pretty-prints this node to this output stream.
 
Methods inherited from class Expression
dump_type, get_type, set_type
 
Methods inherited from class TreeNode
copy_AbstractSymbol, copy_Boolean, dump_AbstractSymbol, dump_Boolean, dump_line, getLineNumber, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e1

protected Expression e1

e2

protected Expression e2
Constructor Detail

leq

public leq(int lineNumber,
           Expression a1,
           Expression a2)
Creates "leq" AST node.

Parameters:
lineNumber - the line in the source file from which this node came.
a1 - initial value for e1
a2 - initial value for e2
Method Detail

copy

public TreeNode copy()
Description copied from class: TreeNode
Creates a copy of this node.

Specified by:
copy in class TreeNode
Returns:
a copy of this node

dump

public void dump(java.io.PrintStream out,
                 int n)
Description copied from class: TreeNode
Pretty-prints this node to this output stream.

Specified by:
dump in class TreeNode
Parameters:
out - the output stream
n - the number of spaces to indent the output

dump_with_types

public void dump_with_types(java.io.PrintStream out,
                            int n)
Specified by:
dump_with_types in class Expression

code

public void code(java.io.PrintStream s)
Generates code for this expression. This method is to be completed in programming assignment 5. (You may add or remove parameters as you wish.)

Specified by:
code in class Expression
Parameters:
s - the output stream