Interface CAst
- All Known Implementing Classes:
CAstImpl
,CAstValueImpl
public interface CAst
The main interface for creating CAPA Abstract Syntax Trees. This interface provides essentially a
factory for creating AST nodes in a tree structure. There is no strong assumption about the
meaning of specific nodes; however, the `kind' argument to a makeNode call should be a value from
the constants in the CAstNode interface. The other arguments to makeNode calls are child nodes.
The structure of the tree is a matter of agreement between providers and consumers of specific
trees.
- Author:
- Julian Dolby (dolby@us.ibm.com)
-
Method Summary
Modifier and TypeMethodDescriptionmakeConstant
(boolean value) Make a boolean constant node.makeConstant
(char value) Make a char constant node.makeConstant
(double value) Make a double-precision floating point constant node.makeConstant
(float value) Make a single-precision floating point constant node.makeConstant
(int value) Make an integer constant node.makeConstant
(long value) Make a long integer constant node.makeConstant
(short value) Make a short integer constant node.makeConstant
(Object value) Make an arbitrary object constant node.makeNode
(int kind) Make a node of type kind with no children.Make a node of type kind with one child.Make a node of type kind specifying an array of children.Make a node of type kind with two children.Make a node of type kind giving a first child and array of the rest.Make a node of type kind with three children.Make a node of type kind with four children.Make a node of type kind with five children.Make a node of type kind with six children.Make a node of type kind specifying a list of children.Make a new identifier, unqiue to this CAst instance.
-
Method Details
-
makeNode
Make a node of type kind with no children. -
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeConstant
Make a boolean constant node. -
makeConstant
Make a char constant node. -
makeConstant
Make a short integer constant node. -
makeConstant
Make an integer constant node. -
makeConstant
Make a long integer constant node. -
makeConstant
Make a double-precision floating point constant node. -
makeConstant
Make a single-precision floating point constant node. -
makeConstant
-
makeUnique
String makeUnique()Make a new identifier, unqiue to this CAst instance.
-