public class AmbExpr_c extends Expr_c implements AmbExpr
AmbExpr is an ambiguous AST node composed of a single
identifier that must resolve to an expression.Term.Instance| Modifier and Type | Field and Description |
|---|---|
protected Id |
name |
exceptions, reachable| Constructor and Description |
|---|
AmbExpr_c(Position pos,
Id name) |
AmbExpr_c(Position pos,
Id name,
Ext ext) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.List<T> |
acceptCFG(CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order, calling v.edge() for each successor
in succs, if data flows on that edge.
|
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.
|
Node |
exceptionCheck(ExceptionChecker ec)
Check that exceptions are properly propagated throughout the AST.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
Id |
id()
Get the name of the expression.
|
AmbExpr |
id(Id id)
Set the name of the expression.
|
protected <N extends AmbExpr_c> |
id(N n,
Id name) |
java.lang.String |
name()
Get the name of the expression.
|
AmbExpr |
name(java.lang.String name)
Set the name of the expression.
|
Precedence |
precedence()
Get the precedence of the expression.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter. |
protected <N extends AmbExpr_c> |
reconstruct(N n,
Id name)
Reconstruct the expression.
|
java.lang.String |
toString() |
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
booleanValue, buildTypes, byteValue, charValue, constantValue, constantValue, constantValueSet, constantValueSet, doubleValue, dump, extRewrite, floatValue, intValue, isConstant, isConstant, isTypeChecked, lastLang, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type, typeexceptions, exceptions, exceptions, listChild, reachable, reachable, reachableaddDecls, buildTypesEnter, checkConstants, childExpectedType, 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, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitListclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconstantValue, constantValueSet, isConstant, printSubExpr, printSubExpr, typedel, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdgeaddDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride, visitChild, visitListexceptions, exceptions, reachable, reachableprotected Id name
public Precedence precedence()
Exprprecedence in interface Exprprecedence in class Expr_cpublic AmbExpr id(Id id)
AmbExprpublic java.lang.String name()
AmbExprpublic AmbExpr name(java.lang.String name)
AmbExprpublic Node visitChildren(NodeVisitor v)
NodeOpsvisitChildren in interface NodeOpsvisitChildren in class Node_cv - The visitor that will traverse/rewrite the AST.this.public Node disambiguate(AmbiguityRemover ar) throws SemanticException
NodeOpsleave() 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 NodeOpsdisambiguate in class Node_car - The visitor which disambiguates.SemanticExceptionpublic Node typeCheck(TypeChecker tc) throws SemanticException
NodeOpsleave() 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 NodeOpstypeCheck in class Node_ctc - The type checking visitor.SemanticExceptionpublic Node exceptionCheck(ExceptionChecker ec) throws SemanticException
NodeOpsleave() 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.exceptionCheck in interface NodeOpsexceptionCheck in class Term_cec - The visitor.SemanticExceptionpublic void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_cCodeWriter.prettyPrint in interface NodeOpsprettyPrint in class Node_cw - The code writer to which to write.tr - The pretty printer. This is not a visitor.public Term firstChild()
TermOpsfirstChild in interface TermOpsfirstChild in class Term_cpublic <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps