polyglot.ext.ibex.ast
Class TerminalDecl_c

java.lang.Object
  extended bypolyglot.ext.jl.ast.Node_c
      extended bypolyglot.ext.jl.ast.Term_c
          extended bypolyglot.ext.ibex.ast.TerminalDecl_c
All Implemented Interfaces:
ClassMember, java.lang.Cloneable, Copy, IbexClassMember, JL, Node, NodeOps, Term, TerminalDecl

public class TerminalDecl_c
extends Term_c
implements TerminalDecl

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
TerminalDecl_c(Position pos, Flags flags, TypeNode type, java.lang.String name)
           
 
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.
 Node disambiguate(AmbiguityRemover ar)
          Remove any remaining ambiguities from the AST.
 NodeVisitor disambiguateEnter(AmbiguityRemover ar)
          Build type objects for the method.
 Term entry()
          Return the first (sub)term performed when evaluating this term.
 Flags flags()
           
 TerminalDecl flags(Flags flags)
           
protected  Terminal makeTerminal(ParserType ct, IbexTypeSystem ts)
           
 java.lang.String name()
           
 TerminalDecl name(java.lang.String name)
           
protected  TerminalDecl_c reconstruct(TypeNode type)
           
 java.util.List rewrite(Rewriter rw)
           
 Terminal terminal()
           
 TerminalDecl terminal(Terminal terminal)
           
 TypeNode type()
           
 TerminalDecl 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, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, dump, enterScope, 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, buildTypesEnter, enterScope, 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

TerminalDecl_c

public TerminalDecl_c(Position pos,
                      Flags flags,
                      TypeNode type,
                      java.lang.String name)
Method Detail

flags

public Flags flags()
Specified by:
flags in interface TerminalDecl

flags

public TerminalDecl flags(Flags flags)
Specified by:
flags in interface TerminalDecl

type

public TypeNode type()
Specified by:
type in interface TerminalDecl

type

public TerminalDecl type(TypeNode type)
Specified by:
type in interface TerminalDecl

name

public java.lang.String name()
Specified by:
name in interface TerminalDecl

name

public TerminalDecl name(java.lang.String name)
Specified by:
name in interface TerminalDecl

terminal

public Terminal terminal()

terminal

public TerminalDecl terminal(Terminal terminal)

reconstruct

protected TerminalDecl_c reconstruct(TypeNode type)

visitChildren

public Node visitChildren(NodeVisitor v)
Description copied from interface: NodeOps
Visit the children of the node.

Specified by:
visitChildren in interface NodeOps
Overrides:
visitChildren in class Node_c

buildTypes

public Node buildTypes(TypeBuilder tb)
                throws SemanticException
Description copied from interface: NodeOps
Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these. These type objects may be ambiguous. Inserts classes into the 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.

Specified by:
buildTypes in interface NodeOps
Overrides:
buildTypes in class Node_c
Throws:
SemanticException

disambiguateEnter

public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
                              throws SemanticException
Build type objects for the method.

Specified by:
disambiguateEnter in interface NodeOps
Overrides:
disambiguateEnter in class Node_c
Throws:
SemanticException

disambiguate

public Node disambiguate(AmbiguityRemover ar)
                  throws SemanticException
Description copied from interface: NodeOps
Remove any remaining ambiguities from the AST. 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.

Specified by:
disambiguate in interface NodeOps
Overrides:
disambiguate in class Node_c
Throws:
SemanticException

addMembersEnter

public NodeVisitor addMembersEnter(AddMemberVisitor am)
Description copied from interface: NodeOps
Adds disambiguated methods and fields to the types. 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.

Specified by:
addMembersEnter in interface NodeOps
Overrides:
addMembersEnter in class Node_c

typeCheck

public Node typeCheck(TypeChecker tc)
               throws SemanticException
Type check the method.

Specified by:
typeCheck in interface NodeOps
Overrides:
typeCheck in class Node_c
Throws:
SemanticException

makeTerminal

protected Terminal makeTerminal(ParserType ct,
                                IbexTypeSystem ts)
                         throws SemanticException
Throws:
SemanticException

entry

public Term entry()
Return the first (sub)term performed when evaluating this term.

Specified by:
entry in interface Term
Specified by:
entry in class Term_c

acceptCFG

public java.util.List acceptCFG(CFGBuilder v,
                                java.util.List succs)
Visit this term in evaluation order.

Specified by:
acceptCFG in interface Term
Specified by:
acceptCFG in class Term_c

rewrite

public java.util.List rewrite(Rewriter rw)
                       throws SemanticException
Specified by:
rewrite in interface IbexClassMember
Throws:
SemanticException