spiglet.visitor
Interface GJVoidVisitor<A>

All Known Implementing Classes:
GJVoidDepthFirst

public interface GJVoidVisitor<A>

All GJ void visitors must implement this interface.


Method Summary
 void visit(BinOp n, A argu)
           operator -> Operator() temp -> Temp() simpleExp -> SimpleExp()
 void visit(Call n, A argu)
           nodeToken -> "CALL" simpleExp -> SimpleExp() nodeToken1 -> "(" nodeListOptional -> ( Temp() )* nodeToken2 -> ")"
 void visit(CJumpStmt n, A argu)
           nodeToken -> "CJUMP" temp -> Temp() label -> Label()
 void visit(ErrorStmt n, A argu)
           nodeToken -> "ERROR"
 void visit(Exp n, A argu)
           nodeChoice -> Call() | HAllocate() | BinOp() | SimpleExp()
 void visit(Goal n, A argu)
           nodeToken -> "MAIN" stmtList -> StmtList() nodeToken1 -> "END" nodeListOptional -> ( Procedure() )* nodeToken2 -> <EOF>
 void visit(HAllocate n, A argu)
           nodeToken -> "HALLOCATE" simpleExp -> SimpleExp()
 void visit(HLoadStmt n, A argu)
           nodeToken -> "HLOAD" temp -> Temp() temp1 -> Temp() integerLiteral -> IntegerLiteral()
 void visit(HStoreStmt n, A argu)
           nodeToken -> "HSTORE" temp -> Temp() integerLiteral -> IntegerLiteral() temp1 -> Temp()
 void visit(IntegerLiteral n, A argu)
           nodeToken -> <INTEGER_LITERAL>
 void visit(JumpStmt n, A argu)
           nodeToken -> "JUMP" label -> Label()
 void visit(Label n, A argu)
           nodeToken -> <IDENTIFIER>
 void visit(MoveStmt n, A argu)
           nodeToken -> "MOVE" temp -> Temp() exp -> Exp()
 void visit(NodeList n, A argu)
           
 void visit(NodeListOptional n, A argu)
           
 void visit(NodeOptional n, A argu)
           
 void visit(NodeSequence n, A argu)
           
 void visit(NodeToken n, A argu)
           
 void visit(NoOpStmt n, A argu)
           nodeToken -> "NOOP"
 void visit(Operator n, A argu)
           nodeChoice -> "LT" | "PLUS" | "MINUS" | "TIMES"
 void visit(PrintStmt n, A argu)
           nodeToken -> "PRINT" simpleExp -> SimpleExp()
 void visit(Procedure n, A argu)
           label -> Label() nodeToken -> "[" integerLiteral -> IntegerLiteral() nodeToken1 -> "]" stmtExp -> StmtExp()
 void visit(SimpleExp n, A argu)
           nodeChoice -> Temp() | IntegerLiteral() | Label()
 void visit(Stmt n, A argu)
           nodeChoice -> NoOpStmt() | ErrorStmt() | CJumpStmt() | JumpStmt() | HStoreStmt() | HLoadStmt() | MoveStmt() | PrintStmt()
 void visit(StmtExp n, A argu)
           nodeToken -> "BEGIN" stmtList -> StmtList() nodeToken1 -> "RETURN" simpleExp -> SimpleExp() nodeToken2 -> "END"
 void visit(StmtList n, A argu)
           nodeListOptional -> ( ( Label() )? Stmt() )*
 void visit(Temp n, A argu)
           nodeToken -> "TEMP" integerLiteral -> IntegerLiteral()
 

Method Detail

visit

void visit(NodeList n,
           A argu)

visit

void visit(NodeListOptional n,
           A argu)

visit

void visit(NodeOptional n,
           A argu)

visit

void visit(NodeSequence n,
           A argu)

visit

void visit(NodeToken n,
           A argu)

visit

void visit(Goal n,
           A argu)
 nodeToken -> "MAIN"
 stmtList -> StmtList()
 nodeToken1 -> "END"
 nodeListOptional -> ( Procedure() )*
 nodeToken2 -> <EOF>
 


visit

void visit(StmtList n,
           A argu)
 nodeListOptional -> ( ( Label() )? Stmt() )*
 


visit

void visit(Procedure n,
           A argu)
 label -> Label()
 nodeToken -> "["
 integerLiteral -> IntegerLiteral()
 nodeToken1 -> "]"
 stmtExp -> StmtExp()
 


visit

void visit(Stmt n,
           A argu)
 nodeChoice -> NoOpStmt()
       | ErrorStmt()
       | CJumpStmt()
       | JumpStmt()
       | HStoreStmt()
       | HLoadStmt()
       | MoveStmt()
       | PrintStmt()
 


visit

void visit(NoOpStmt n,
           A argu)
 nodeToken -> "NOOP"
 


visit

void visit(ErrorStmt n,
           A argu)
 nodeToken -> "ERROR"
 


visit

void visit(CJumpStmt n,
           A argu)
 nodeToken -> "CJUMP"
 temp -> Temp()
 label -> Label()
 


visit

void visit(JumpStmt n,
           A argu)
 nodeToken -> "JUMP"
 label -> Label()
 


visit

void visit(HStoreStmt n,
           A argu)
 nodeToken -> "HSTORE"
 temp -> Temp()
 integerLiteral -> IntegerLiteral()
 temp1 -> Temp()
 


visit

void visit(HLoadStmt n,
           A argu)
 nodeToken -> "HLOAD"
 temp -> Temp()
 temp1 -> Temp()
 integerLiteral -> IntegerLiteral()
 


visit

void visit(MoveStmt n,
           A argu)
 nodeToken -> "MOVE"
 temp -> Temp()
 exp -> Exp()
 


visit

void visit(PrintStmt n,
           A argu)
 nodeToken -> "PRINT"
 simpleExp -> SimpleExp()
 


visit

void visit(Exp n,
           A argu)
 nodeChoice -> Call()
       | HAllocate()
       | BinOp()
       | SimpleExp()
 


visit

void visit(StmtExp n,
           A argu)
 nodeToken -> "BEGIN"
 stmtList -> StmtList()
 nodeToken1 -> "RETURN"
 simpleExp -> SimpleExp()
 nodeToken2 -> "END"
 


visit

void visit(Call n,
           A argu)
 nodeToken -> "CALL"
 simpleExp -> SimpleExp()
 nodeToken1 -> "("
 nodeListOptional -> ( Temp() )*
 nodeToken2 -> ")"
 


visit

void visit(HAllocate n,
           A argu)
 nodeToken -> "HALLOCATE"
 simpleExp -> SimpleExp()
 


visit

void visit(BinOp n,
           A argu)
 operator -> Operator()
 temp -> Temp()
 simpleExp -> SimpleExp()
 


visit

void visit(Operator n,
           A argu)
 nodeChoice -> "LT"
       | "PLUS"
       | "MINUS"
       | "TIMES"
 


visit

void visit(SimpleExp n,
           A argu)
 nodeChoice -> Temp()
       | IntegerLiteral()
       | Label()
 


visit

void visit(Temp n,
           A argu)
 nodeToken -> "TEMP"
 integerLiteral -> IntegerLiteral()
 


visit

void visit(IntegerLiteral n,
           A argu)
 nodeToken -> <INTEGER_LITERAL>
 


visit

void visit(Label n,
           A argu)
 nodeToken -> <IDENTIFIER>