Interface RegularRangeNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface RegularRangeNode extends ExpressionNode
Represents a CIVL-C regular range expression, which has the form lo .. hi or lo .. hi # step.

The step argument is optional. If absent, it is the same as using 1.

If step is positive, it represents the sequence of integers lo, lo+step, lo+2*step, ..., which is truncated so that all entries are less than or equal to hi.

If step is negative, it represents the sequence hi, hi+step, hi+2* step, ..., which is truncated so that all entries are greater than or equal to lo.

  • Method Details

    • getLow

      ExpressionNode getLow()
      Returns the lower bound argument lo.
      Returns:
      the lower bound
    • setLow

      void setLow(ExpressionNode arg)
      Sets the lower bound argument lo
      Parameters:
      arg - the new lower bound argument
    • getHigh

      ExpressionNode getHigh()
      Returns the upper bound argument hi.
      Returns:
      the lower bound
    • setHigh

      void setHigh(ExpressionNode arg)
      Sets the upper bound argument hi
      Parameters:
      arg - the new upper bound argument
    • getStep

      ExpressionNode getStep()
      Returns the step argument step if it is present, else returns null
      Returns:
      the step argument or null
    • setStep

      void setStep(ExpressionNode arg)
      Sets the step argument step
      Parameters:
      arg - the new step argument