Module dev.civl.abc

Enum Class ASTNode.NodeKind

java.lang.Object
java.lang.Enum<ASTNode.NodeKind>
dev.civl.abc.ast.node.IF.ASTNode.NodeKind
All Implemented Interfaces:
Serializable, Comparable<ASTNode.NodeKind>, Constable
Enclosing interface:
ASTNode

public static enum ASTNode.NodeKind extends Enum<ASTNode.NodeKind>
The different kind of AST nodes. Every AST node falls into one of the following categories.
  • Enum Constant Details

    • ARRAY_DESIGNATOR

      public static final ASTNode.NodeKind ARRAY_DESIGNATOR
      An array designator occurs in a compound initializer and specifies an index of an array. A node of this kind can be safely cast to ArrayDesignatorNode.
    • COLLECTIVE

      public static final ASTNode.NodeKind COLLECTIVE
      A node representing a CIVL-C collective assertion. Not yet implemented.
    • CONTRACT

      public static final ASTNode.NodeKind CONTRACT
      A node representing a contract item. A node of this kind can be safely cast to ContractNode.
    • DEPENDS_EVENT

      public static final ASTNode.NodeKind DEPENDS_EVENT
    • DECLARATION_LIST

      public static final ASTNode.NodeKind DECLARATION_LIST
      A list of declarations; such a list can occur as an initializer in a for loop, for example. A node of this kind can be safely cast to DeclarationListNode.
    • DESIGNATION

      public static final ASTNode.NodeKind DESIGNATION
      A designation, which can occur in a compound initializer. A designation consists of a sequence of array or field designators to pinpoint a location within a compound structure. A node of this kind can be safely cast to DesignationNode.
    • ENUMERATOR_DECLARATION

      public static final ASTNode.NodeKind ENUMERATOR_DECLARATION
      An enumerator declaration node represents the declaration of a single enumerator constant inside a complete enum definition. A node of this kind can be safely cast to EnumeratorDeclarationNode.
    • EXPRESSION

      public static final ASTNode.NodeKind EXPRESSION
      A node representing an expression. A node of this kind can be safely cast to ExpressionNode.
    • FIELD_DECLARATION

      public static final ASTNode.NodeKind FIELD_DECLARATION
      A single field declaration within a struct or union definition. A node of this kind can be safely cast to FieldDeclarationNode.
    • FIELD_DESIGNATOR

      public static final ASTNode.NodeKind FIELD_DESIGNATOR
      A field designator can occur in a designation, which can occur in a compound initializer. It identifies a particular field in a structure or union. A node of this kind can be safely cast to FieldDesignatorNode.
    • FUNCTION_DECLARATION

      public static final ASTNode.NodeKind FUNCTION_DECLARATION
      A function declaration which is not a function definition, i.e., which does not include the function body. A node of this kind can be safely cast to FunctionDeclarationNode.
    • FUNCTION_DEFINITION

      public static final ASTNode.NodeKind FUNCTION_DEFINITION
      A function definition: this is the declaration of the function that includes the function body. A node of this kind may be safely cast to FunctionDefinitionNode.
    • GENERIC_ASSOCIATION

      public static final ASTNode.NodeKind GENERIC_ASSOCIATION
      A generic association node. Represents an association (TypeNode, ExpressionNode) for use in a GenericSelectionNode. A node of this kind may be safely cast to GenericAssociationNode
    • IDENTIFIER

      public static final ASTNode.NodeKind IDENTIFIER
      An identifier node. Represents an occurrence of an identifier in the program. A node of this kind may be safely cast to IdentifierNode.
    • OMP_NODE

      public static final ASTNode.NodeKind OMP_NODE
      A node representing an OpenMP construct. May be safely cast to OmpNode.
    • OMP_REDUCTION_OPERATOR

      public static final ASTNode.NodeKind OMP_REDUCTION_OPERATOR
      A node representing a reduction operator in an OpenMP reduction clause. May be safely cast to OmpReductionNode.
    • ORDINARY_LABEL

      public static final ASTNode.NodeKind ORDINARY_LABEL
      A node representing a label in a labeled statement. (Does not include a case or default label.) May be safely cast to OrdinaryLabelNode.
    • PAIR

      public static final ASTNode.NodeKind PAIR
      A pair node: a node of type PairNodeinvalid input: '<' S,T > for some types S and T which are subtypes of ASTNode. Such a node has two children, one of type S and one of type T. A node of this kind can be safely cast to PairNodeinvalid input: '<' ?,? >.
    • PRAGMA

      public static final ASTNode.NodeKind PRAGMA
      A pragma node, corresponding to a #pragma directive in the source code. May be safely cast to PragmaNode.
    • RESULT

      public static final ASTNode.NodeKind RESULT
      A "result"" node represents a use of the special variable $result in a post-condition in a CIVL-C procedure contract. It represents the value returned by the procedure. May be safely cast to ResultNode.
    • SCOPE_PARAMETERIZED_DECLARATION

      public static final ASTNode.NodeKind SCOPE_PARAMETERIZED_DECLARATION
      A CIVL-C scope-parameterized declaration. This is soon to be deprecated.
    • SEQUENCE

      public static final ASTNode.NodeKind SEQUENCE
      A node which implement the interface SequenceNode invalid input: '<' T >. This is a node whose children all have type T, where T is a subtype of ASTNode.
    • STATEMENT

      public static final ASTNode.NodeKind STATEMENT
      A node representing a statement. May be safely cast to StatementNode.
    • STATIC_ASSERTION

      public static final ASTNode.NodeKind STATIC_ASSERTION
      A node representing a C11 static assertion. This is a kind of assertion which can be checked at "compile time". A node of this kind may be safely cast to StaticAssertionNode.
    • SWITCH_LABEL

      public static final ASTNode.NodeKind SWITCH_LABEL
      A switch label is either a label of the form case CONSTANT: or default : in a switch statement. A node of this kind may be safely cast to SwitchLabelNode.
    • TYPE

      public static final ASTNode.NodeKind TYPE
      A type node, representing any kind of type. A node of this kind may be safely cast to TypeNode.
    • TYPEDEF

      public static final ASTNode.NodeKind TYPEDEF
      A typedef node, representing a typedef construct in the program. A node of this kind may be safely cast to TypedefDeclarationNode.
    • VARIABLE_DECLARATION

      public static final ASTNode.NodeKind VARIABLE_DECLARATION
      A variable declaration node. A node of this kind can be safely cast to VariableDeclarationNode.
  • Method Details

    • values

      public static ASTNode.NodeKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ASTNode.NodeKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null