Class VerilogExpression

    • Constructor Detail

      • VerilogExpression

        public VerilogExpression()
        Creates a null expression.
      • VerilogExpression

        public VerilogExpression​(ru.ispras.fortress.expression.Node node)
        Creates an expression with the given syntax.
        Parameters:
        node - the expression syntax.
      • VerilogExpression

        public VerilogExpression​(VerilogExpression other)
        Creates a copy of the expression.
        Parameters:
        other - the expression to be copied.
    • Method Detail

      • getNode

        public ru.ispras.fortress.expression.Node getNode()
        Returns the expression representation.
        Returns:
        the expression representation.
      • setNode

        public void setNode​(ru.ispras.fortress.expression.Node node)
        Sets the original representation of the expression and resets the elaborated representation.
        Parameters:
        node - the expression representation.
      • isNull

        public boolean isNull()
        Checks whether the expression is null.
        Returns:
        true iff the expression is null.
      • isValue

        public boolean isValue()
        Checks whether the expression is a value.
        Returns:
        true iff the expression is a value.
      • isVariable

        public boolean isVariable()
        Checks whether the expression is a variable.
        Returns:
        true iff the expression is a variable.
      • isOperation

        public boolean isOperation()
        Checks whether the expression is an operation.
        Returns:
        true iff the expression is an operation.
      • getValue

        public ru.ispras.fortress.expression.NodeValue getValue()
        Returns the value node (if the expression is a value).
        Returns:
        the value node.
      • getLiteral

        public VerilogLiteral getLiteral()
        Returns the literal.
        Returns:
        the literal if the expression is a value.
      • getVariable

        public ru.ispras.fortress.expression.NodeVariable getVariable()
        Returns the variable node (if the expression is a variable).
        Returns:
        the variable node.
      • getOperation

        public ru.ispras.fortress.expression.NodeOperation getOperation()
        Returns the operation node (if the expression is an operation).
        Returns:
        the operation node.
      • isReference

        public boolean isReference()
        Checks whether the expression is a reference.
        Returns:
        true iff the expression is a reference.
      • getReference

        public VerilogReference getReference()
        Returns the reference (if the expression is primary).
        Returns:
        the reference.
      • setReference

        public void setReference​(VerilogReference reference)
        Sets the reference.
        Parameters:
        reference - the reference to be set.
      • getPath

        public VerilogPath getPath()
        Returns the path to the source-code function.
        Returns:
        the path to the function.
      • setPath

        public void setPath​(VerilogPath path)
        Sets a path to the source-code function.
        Parameters:
        path - the path to be set.
      • getAttributes

        public java.util.List<VerilogAttribute> getAttributes()
        Returns the expression attributes.
        Returns:
        the attributes.
      • setAttributes

        public void setAttributes​(java.util.List<VerilogAttribute> attributes)
        Sets the expression attributes.
        Parameters:
        attributes - the attributes to be set.
      • getDeclaration

        public VerilogProcedure getDeclaration()
        Returns the function declaration (for function calls only).
        Returns:
        the function declaration.
      • setDeclaration

        public void setDeclaration​(VerilogProcedure declaration)
        Sets the function declaration (for function calls only).
        Parameters:
        declaration - the function declaration to be set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public VerilogExpression clone()
        Overrides:
        clone in class java.lang.Object