uk.ac.man.cs.rainbow.compiler
Class CompilerNode

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.compiler.CompilerThing
        |
        +--uk.ac.man.cs.rainbow.compiler.CompilerNode
Direct Known Subclasses:
CompilerType, Declaration, Expression, FunctionSignature, GreenComponent, Identifier, LabelledPipe, LValue, Network, Pipeline, ProcBody, Program, TablePattern, TableRow, TaggedType, YellowCommand

public abstract class CompilerNode
extends CompilerThing

Superclass of the classes of every node in the parse tree


Field Summary
 CompilerNode next
           
 SourcePosition sourcepos
           
 
Constructor Summary
CompilerNode(SourcePosition sourcepos)
           
 
Method Summary
 void append(CompilerNode next)
           
 void appendNotParent(CompilerNode next)
           
 String dumpNode(int n, String body)
           
 String dumpTree(int n)
           
 CompilerNode getParent()
           
static String indent(int n)
           
 Iterator iterator()
          Walk the list defined by the next field.
 TablePattern list_typecheck(CompilerType typelist, TCEnv env, Errors errors)
           
 TCEnv list_typecheck(TCEnv env, Errors errors)
           
 int listLength()
           
 String listToString(String listSeparator)
           
 void noParent()
           
 RASMList rasm_list(CGEnv env)
           
 RASMList rasm(CGEnv env)
           
 RASMList rasm(GreenEnv env)
           
 void setParent(CompilerNode parent)
           
 String toString()
           
 TablePattern typecheck(CompilerType a_type, TCEnv env, Errors errors)
           
 TCEnv typecheck(TCEnv env, Errors errors)
           
 CompilerType typecheckGreen(TCEnv env, Errors errors, CompilerType input_typeList)
           
 CompilerType typecheckGreen(TCEnv env, Errors errors, CompilerType input_typeList, SourcePosition sourceps)
           
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerThing
className, crashHere, getSerial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

next

public CompilerNode next

sourcepos

public SourcePosition sourcepos
Constructor Detail

CompilerNode

public CompilerNode(SourcePosition sourcepos)
Method Detail

noParent

public void noParent()

getParent

public CompilerNode getParent()

setParent

public void setParent(CompilerNode parent)

append

public void append(CompilerNode next)

appendNotParent

public void appendNotParent(CompilerNode next)

toString

public String toString()
Overrides:
toString in class Object

listToString

public String listToString(String listSeparator)

indent

public static String indent(int n)

dumpNode

public String dumpNode(int n,
                       String body)

dumpTree

public String dumpTree(int n)

listLength

public int listLength()

typecheck

public TCEnv typecheck(TCEnv env,
                       Errors errors)

typecheckGreen

public CompilerType typecheckGreen(TCEnv env,
                                   Errors errors,
                                   CompilerType input_typeList)

typecheckGreen

public CompilerType typecheckGreen(TCEnv env,
                                   Errors errors,
                                   CompilerType input_typeList,
                                   SourcePosition sourceps)

list_typecheck

public TCEnv list_typecheck(TCEnv env,
                            Errors errors)

list_typecheck

public TablePattern list_typecheck(CompilerType typelist,
                                   TCEnv env,
                                   Errors errors)

typecheck

public TablePattern typecheck(CompilerType a_type,
                              TCEnv env,
                              Errors errors)

rasm

public RASMList rasm(CGEnv env)

rasm

public RASMList rasm(GreenEnv env)

rasm_list

public RASMList rasm_list(CGEnv env)

iterator

public Iterator iterator()
Walk the list defined by the next field. Do not update the list while it is being walked...