Module dev.civl.mc

Interface RegularRangeExpression

All Superinterfaces:
Expression, Sourceable

public interface RegularRangeExpression extends Expression
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

      Expression getLow()
      Returns the lower bound argument lo.
      Returns:
      the lower bound
    • getHigh

      Expression getHigh()
      Returns the upper bound argument hi.
      Returns:
      the lower bound
    • getStep

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