AST
node type Program

General Info

Production
Program : ASTNode ::= Block PredefinedType:TypeDecl*;
Type Hierarchy:
java.lang.Object
  extended by AST.ASTNode<ASTNode>
      extended by AST.Program
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in spec/picojava.ast at line 2

Member Filters

API level:

Aspect:

Constructors

public Program()
public Program(Block p0)

Attributes

syn java.util.Collection errors()
Source
Declared in spec/ErrorCheck.jadd at line 5
Aspect
ErrorCheck
syn Decl localLookup(java.lang.String name)
Source
Declared in spec/NameResolution.jrag at line 92
Aspect
NameResolution
Source
Declared in spec/NullObjects.jrag at line 16
Aspect
NullObjects
Source
Declared in spec/PredefinedTypes.jrag at line 3
Aspect
PredefinedTypes
Source
Declared in spec/PredefinedTypes.jrag at line 10
Aspect
PredefinedTypes

Methods

public Program clone()
              throws java.lang.CloneNotSupportedException
Overrides:clone in class ASTNode<ASTNode>
Throws:
java.lang.CloneNotSupportedException
public Program copy()
Overrides:copy in class ASTNode<ASTNode>
public Program fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public java.lang.String prettyPrint()
Pretty print
Source
Declared in spec/PrettyPrint.jadd at line 26
Aspect
PrettyPrint
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class ASTNode<ASTNode>
protected int numChildren()
Overrides:numChildren in class ASTNode<ASTNode>
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class ASTNode<ASTNode>
public void flushCache()
Overrides:flushCache in class ASTNode<ASTNode>
public void flushCollectionCache()
Overrides:flushCollectionCache in class ASTNode<ASTNode>
public void setBlock(Block node)
Replaces the Block child.
Parameters:
node - The new node to replace the Block child.
public Block getBlock()
Retrieves the Block child.
Returns:
The current node used as the Block child.
Retrieves the Block child.

This method does not invoke AST transformations.

Returns:
The current node used as the Block child.
public void setPredefinedTypeList(List<TypeDecl> list)
Replaces the PredefinedType list.
Parameters:
list - The new list node to be used as the PredefinedType list.
Retrieves the number of children in the PredefinedType list.
Returns:
Number of children in the PredefinedType list.
Retrieves the number of children in the PredefinedType list. Calling this method will not trigger rewrites.
Returns:
Number of children in the PredefinedType list.
Retrieves the element at index i in the PredefinedType list.
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the PredefinedType list.
public boolean hasPredefinedType()
Check whether the PredefinedType list has any children.
Returns:
true if it has at least one child, false otherwise.
public void addPredefinedType(TypeDecl node)
Append an element to the PredefinedType list.
Parameters:
node - The element to append to the PredefinedType list.
public void setPredefinedType(TypeDecl node,
                              int i)
Replaces the PredefinedType list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the child position of the PredefinedType list.
Returns:
The the child position of the PredefinedType list.
Retrieves the PredefinedType list.

This method does not invoke AST transformations.

Returns:
The node representing the PredefinedType list.
Retrieves the PredefinedType list.
Returns:
The node representing the PredefinedType list.
Retrieves the PredefinedType list.

This method does not invoke AST transformations.

Returns:
The node representing the PredefinedType list.
public boolean Define_boolean_isQualified(ASTNode caller,
                                          ASTNode child)
Overrides:Define_boolean_isQualified in class ASTNode<ASTNode>
Source
Declared in spec/ErrorCheck.jadd at line 56
Overrides:Define_Access_qualifier in class ASTNode<ASTNode>
Source
Declared in spec/ErrorCheck.jadd at line 64
public Decl Define_Decl_lookup(ASTNode caller,
                               ASTNode child,
                               java.lang.String name)
Overrides:Define_Decl_lookup in class ASTNode<ASTNode>
Source
Declared in spec/NameResolution.jrag at line 21
Overrides:Define_Decl_unknownDecl in class ASTNode<ASTNode>
Source
Declared in spec/NullObjects.jrag at line 18
Overrides:Define_PrimitiveDecl_booleanType in class ASTNode<ASTNode>
Source
Declared in spec/PredefinedTypes.jrag at line 12
Overrides:rewriteTo in class ASTNode<ASTNode>

Fields

protected int errors_visited
protected boolean errors_computed
protected java.util.Collection errors_value
protected java.util.Map localLookup_String_visited
protected java.util.Map localLookup_String_values
protected int unknownDecl_visited
protected boolean unknownDecl_computed
protected int booleanType_visited
protected boolean booleanType_computed

Inherited Members