public class AmbAssign_c extends Assign_c implements AmbAssign
AmbAssign
represents a Java assignment expression to
an ambiguous expression.Assign.Operator
Term.Instance
exceptions, reachable
ADD_ASSIGN, ASSIGN, BIT_AND_ASSIGN, BIT_OR_ASSIGN, BIT_XOR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, MUL_ASSIGN, SHL_ASSIGN, SHR_ASSIGN, SUB_ASSIGN, USHR_ASSIGN
Constructor and Description |
---|
AmbAssign_c(Position pos,
Expr left,
Assign.Operator op,
Expr right) |
AmbAssign_c(Position pos,
Expr left,
Assign.Operator op,
Expr right,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
protected void |
acceptCFGAssign(CFGBuilder<?> v)
Construct a CFG for this assignment when the assignment operator
is ASSIGN (i.e., the normal, simple assignment =).
|
protected void |
acceptCFGOpAssign(CFGBuilder<?> v)
Construct a CFG for this assignment when the assignment operator
is of the form op= for some operation op.
|
Node |
copy(NodeFactory nf)
Produce a copy of this node using the given NodeFactory.
|
Node |
disambiguate(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
acceptCFG, childExpectedType, dump, left, left, left, operator, operator, operator, precedence, prettyPrint, reconstruct, right, right, right, throwsArithmeticException, throwTypes, toString, visitChildren
booleanValue, buildTypes, byteValue, charValue, constantValue, constantValue, constantValueSet, constantValueSet, doubleValue, extRewrite, floatValue, intValue, isConstant, isConstant, isTypeChecked, lastLang, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type, type
exceptionCheck, exceptions, exceptions, exceptions, listChild, reachable, reachable, reachable
addDecls, buildTypesEnter, checkConstants, copy, copy, copyIfNeeded, del, del, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, isDisambiguated, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
left, left, operator, operator, right, right, throwsArithmeticException
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
exceptions, exceptions, reachable, reachable
public AmbAssign_c(Position pos, Expr left, Assign.Operator op, Expr right)
public AmbAssign_c(Position pos, Expr left, Assign.Operator op, Expr right, Ext ext)
public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Assign_c
protected void acceptCFGAssign(CFGBuilder<?> v)
Assign_c
acceptCFGAssign
in class Assign_c
protected void acceptCFGOpAssign(CFGBuilder<?> v)
Assign_c
acceptCFGOpAssign
in class Assign_c
public Node disambiguate(AmbiguityRemover ar) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.
The node should not assume that its children have been disambiguated.
If it depends on a child being disambiguated,
it may just return this
without doing any work.disambiguate
in interface NodeOps
disambiguate
in class Node_c
ar
- The visitor which disambiguates.SemanticException
public Node typeCheck(TypeChecker tc) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.typeCheck
in interface NodeOps
typeCheck
in class Assign_c
tc
- The type checking visitor.SemanticException