harpoon.IR.Tree
Class ToCanonicalTree

java.lang.Object
  extended by harpoon.IR.Tree.ToCanonicalTree

public class ToCanonicalTree
extends Object

The ToCanonicalTree class translates tree code to canonical tree code (no ESEQ). Based on the translator to canonical form by Andrew Appel.

Version:
$Id: ToCanonicalTree.java,v 1.4 2002/04/10 03:05:45 cananian Exp $
Author:
Duncan Bryce <duncan@lcs.mit.edu>

Constructor Summary
ToCanonicalTree(TreeFactory tf, Code code)
          Class constructor.
 
Method Summary
 Tree getTree()
          Returns the root of the generated tree code
 TreeDerivation getTreeDerivation()
          Returns a TreeDerivation object for the generated Tree form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToCanonicalTree

public ToCanonicalTree(TreeFactory tf,
                       Code code)
Class constructor.

Parameters:
tf - The TreeFactory which will be used for all elements of the new CanonicalTreeCode.
code - The TreeCode which we wish to translate
Method Detail

getTreeDerivation

public TreeDerivation getTreeDerivation()
Returns a TreeDerivation object for the generated Tree form.


getTree

public Tree getTree()
Returns the root of the generated tree code