orc.ast.oil
Class Compiler

java.lang.Object
  extended by orc.ast.oil.Compiler
All Implemented Interfaces:
Visitor<Node>

public final class Compiler
extends java.lang.Object
implements Visitor<Node>

Compiles an oil syntax tree into an execution graph. Every node is compiled relative to an "output" node that represents the "rest of the program". Thus the tree of compiled nodes is created bottom up.


Method Summary
static Node compile(Expression expr)
           
static Node compile(Expression expr, Node output)
           
 Node visit(Atomic atomic)
           
 Node visit(Call expr)
           
 Node visit(Catch catchExpr)
           
 Node visit(Constant arg)
           
 Node visit(DeclareDefs expr)
           
 Node visit(DeclareType typeDecl)
           
 Node visit(Field arg)
           
 Node visit(HasType hasType)
           
 Node visit(Isolated expr)
           
 Node visit(Otherwise expr)
           
 Node visit(Parallel expr)
           
 Node visit(Pruning expr)
           
 Node visit(Sequential expr)
           
 Node visit(Site arg)
           
 Node visit(Stop expr)
           
 Node visit(Throw throwExpr)
           
 Node visit(Variable arg)
           
 Node visit(WithLocation expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compile

public static Node compile(Expression expr)

compile

public static Node compile(Expression expr,
                           Node output)

visit

public Node visit(Parallel expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Call expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(DeclareDefs expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Stop expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Pruning expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Sequential expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Otherwise expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(WithLocation expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Constant arg)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Field arg)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Site arg)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Variable arg)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Atomic atomic)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Isolated expr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(HasType hasType)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(DeclareType typeDecl)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Throw throwExpr)
Specified by:
visit in interface Visitor<Node>

visit

public Node visit(Catch catchExpr)
Specified by:
visit in interface Visitor<Node>