avrora.core.isdl.ast
Class MapBitRangeAssignStmt

java.lang.Object
  extended byavrora.core.isdl.ast.Stmt
      extended byavrora.core.isdl.ast.AssignStmt
          extended byavrora.core.isdl.ast.MapBitRangeAssignStmt

public class MapBitRangeAssignStmt
extends AssignStmt

The MapBitRangeAssignment class represents an assignment to a range of bits of an element within a map.


Field Summary
 int high_bit
          The high_bit field stores the highest bit of the range of bits being assigned.
 Expr index
          The expr field stores a references to the expression which is evaluated to yield the expr into the map.
 int low_bit
          The low_bit field stores the lowest bit of the range of bits being assigned.
 Token mapname
          The typename field stores a reference to the name of the map whose element is being assigned to.
 
Fields inherited from class avrora.core.isdl.ast.AssignStmt
expr
 
Constructor Summary
MapBitRangeAssignStmt(java.lang.String m, Expr i, int l, int h, Expr e)
          The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.
MapBitRangeAssignStmt(Token m, Expr i, int l, int h, Expr e)
          The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.
MapBitRangeAssignStmt(Token m, Expr i, Token l, Token h, Expr e)
          The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.
 
Method Summary
 Stmt accept(StmtRebuilder r, java.lang.Object env)
          The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.
 void accept(StmtVisitor v)
          The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.
 java.lang.String toString()
          The toString() method recursively converts this statement to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mapname

public final Token mapname
The typename field stores a reference to the name of the map whose element is being assigned to.


index

public final Expr index
The expr field stores a references to the expression which is evaluated to yield the expr into the map.


low_bit

public final int low_bit
The low_bit field stores the lowest bit of the range of bits being assigned.


high_bit

public final int high_bit
The high_bit field stores the highest bit of the range of bits being assigned.

Constructor Detail

MapBitRangeAssignStmt

public MapBitRangeAssignStmt(Token m,
                             Expr i,
                             Token l,
                             Token h,
                             Expr e)
The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.

Parameters:
m - the string name of the map as a token
i - the expression representing the expr into the map
l - the low bit of the range as a token
h - the high bit of the range as a token
e - the expression representing the right hand side of the assignment

MapBitRangeAssignStmt

public MapBitRangeAssignStmt(Token m,
                             Expr i,
                             int l,
                             int h,
                             Expr e)
The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.

Parameters:
m - the string name of the map as a token
i - the expression representing the expr into the map
l - the low bit of the range as an integer
h - the high bit of the range as an integer
e - the expression representing the right hand side of the assignment

MapBitRangeAssignStmt

public MapBitRangeAssignStmt(java.lang.String m,
                             Expr i,
                             int l,
                             int h,
                             Expr e)
The constructor for the MapAssignStmt class initializes the public final fields in this class that refer to the elements of the assignment.

Parameters:
m - the string name of the map as a token
i - the expression representing the expr into the map
l - the low bit of the range as an integer
h - the high bit of the range as an integer
e - the expression representing the right hand side of the assignment
Method Detail

accept

public void accept(StmtVisitor v)
The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine.

Specified by:
accept in class Stmt
Parameters:
v - the visitor to accept

toString

public java.lang.String toString()
The toString() method recursively converts this statement to a string.

Returns:
a string representation of this statement

accept

public Stmt accept(StmtRebuilder r,
                   java.lang.Object env)
The accept() method implements one half of the visitor pattern for visiting the abstract syntax trees representing the code of a particular instruction or subroutine. The StmtRebuilder interface allows visitors to rearrange and rebuild the statements.

Specified by:
accept in class Stmt
Parameters:
r - the visitor to accept
Returns:
the result of calling the appropriate visit() of the rebuilder passed