|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.ext.jl.ast.Node_c
polyglot.ext.jl.ast.Term_c
polyglot.ext.ibex.ast.RuleDecl_c
Node representing a semantic action.
Field Summary |
Fields inherited from class polyglot.ext.jl.ast.Term_c |
reachable |
Fields inherited from class polyglot.ext.jl.ast.Node_c |
del, ext, position |
Constructor Summary | |
RuleDecl_c(Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
java.util.List choices,
boolean isStart)
|
Method Summary | |
java.util.List |
acceptCFG(CFGBuilder v,
java.util.List succs)
Visit this term in evaluation order. |
NodeVisitor |
addMembersEnter(AddMemberVisitor am)
Adds disambiguated methods and fields to the types. |
Node |
buildTypes(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these. |
NodeVisitor |
buildTypesEnter(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these. |
java.util.List |
choices()
|
RuleDecl |
choices(java.util.List choices)
|
CodeInstance |
codeInstance()
|
Node |
disambiguate(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST. |
NodeVisitor |
disambiguateEnter(AmbiguityRemover ar)
Build type objects for the method. |
Context |
enterScope(Context c)
Push a new scope upon entering this node, and add any declarations to the context that should be in scope when visiting children of this node. |
Term |
entry()
Return the first (sub)term performed when evaluating this term. |
Flags |
flags()
|
RuleDecl |
flags(Flags flags)
|
boolean |
isStart()
|
RuleDecl |
isStart(boolean isStart)
|
protected Nonterminal |
makeNonterminal(ParserType ct,
IbexTypeSystem ts)
|
java.lang.String |
name()
|
RuleDecl |
name(java.lang.String name)
|
Nonterminal |
nonterminal()
|
RuleDecl |
nonterminal(Nonterminal nonterminal)
|
protected RuleDecl_c |
reconstruct(TypeNode type,
java.util.List choices)
|
java.util.List |
rewrite(Rewriter rw)
|
TypeNode |
type()
|
RuleDecl |
type(TypeNode type)
|
Node |
typeCheck(TypeChecker tc)
Type check the method. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the node. |
Methods inherited from class polyglot.ext.jl.ast.Term_c |
listEntry, reachable, reachable |
Methods inherited from class polyglot.ext.jl.ast.Node_c |
addDecls, addMembers, addMembersOverride, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, dump, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, prettyPrint, print, printBlock, printSubStmt, throwTypes, toString, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, addMembers, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheckEnter |
Methods inherited from interface polyglot.util.Copy |
copy |
Methods inherited from interface polyglot.ast.Term |
reachable, reachable |
Constructor Detail |
public RuleDecl_c(Position pos, Flags flags, TypeNode type, java.lang.String name, java.util.List choices, boolean isStart)
Method Detail |
public Flags flags()
flags
in interface RuleDecl
public RuleDecl flags(Flags flags)
flags
in interface RuleDecl
public TypeNode type()
type
in interface RuleDecl
public RuleDecl type(TypeNode type)
type
in interface RuleDecl
public java.lang.String name()
name
in interface RuleDecl
public RuleDecl name(java.lang.String name)
name
in interface RuleDecl
public boolean isStart()
isStart
in interface RuleDecl
public RuleDecl isStart(boolean isStart)
isStart
in interface RuleDecl
public java.util.List choices()
choices
in interface RuleDecl
public RuleDecl choices(java.util.List choices)
choices
in interface RuleDecl
public Nonterminal nonterminal()
public RuleDecl nonterminal(Nonterminal nonterminal)
public CodeInstance codeInstance()
protected RuleDecl_c reconstruct(TypeNode type, java.util.List choices)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Node_c
public NodeVisitor buildTypesEnter(TypeBuilder tb) throws SemanticException
NodeOps
TypeSystem
.
This method is called by the enter()
method of the
visitor. The * method should perform work that should be done
before visiting the children of the node. The method may return
this
or a new copy of the node on which
visitChildren()
and leave()
will be
invoked.
buildTypesEnter
in interface NodeOps
buildTypesEnter
in class Node_c
SemanticException
public Node buildTypes(TypeBuilder tb) throws SemanticException
NodeOps
TypeSystem
.
This method is called by the 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.
buildTypes
in interface NodeOps
buildTypes
in class Node_c
SemanticException
public NodeVisitor disambiguateEnter(AmbiguityRemover ar) throws SemanticException
disambiguateEnter
in interface NodeOps
disambiguateEnter
in class Node_c
SemanticException
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.
disambiguate
in interface NodeOps
disambiguate
in class Node_c
SemanticException
public NodeVisitor addMembersEnter(AddMemberVisitor am)
NodeOps
enter()
method of the
visitor. The * method should perform work that should be done
before visiting the children of the node. The method may return
this
or a new copy of the node on which
visitChildren()
and leave()
will be
invoked.
addMembersEnter
in interface NodeOps
addMembersEnter
in class Node_c
public Context enterScope(Context c)
NodeOps
addDecls
when leaving the node
for that.
enterScope
in interface NodeOps
enterScope
in class Node_c
c
- the current Context
Context
to be used for visiting this node.public Node typeCheck(TypeChecker tc) throws SemanticException
typeCheck
in interface NodeOps
typeCheck
in class Node_c
SemanticException
protected Nonterminal makeNonterminal(ParserType ct, IbexTypeSystem ts) throws SemanticException
SemanticException
public Term entry()
entry
in interface Term
entry
in class Term_c
public java.util.List acceptCFG(CFGBuilder v, java.util.List succs)
acceptCFG
in interface Term
acceptCFG
in class Term_c
public java.util.List rewrite(Rewriter rw) throws SemanticException
rewrite
in interface IbexClassMember
SemanticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |