src/main/java/com/github/fge/grappa/support/IndexRange.java
public IndexRange mergedWith(final IndexRange other)
    {
        Objects.requireNonNull(other, "other");
        return new IndexRange(Math.min(start, other.start),
            Math.max(end, other.end));
    }
public IndexRange mergedWith(final IndexRange other)
    {
        Objects.requireNonNull(other, "other");
        return new IndexRange(Math.min(start, other.start),
            Math.max(end, other.end));
    }
public IndexRange mergedWith ( final IndexRange other ) { Objects . requireNonNull ( other , "other" ) ; return new IndexRange ( Math . min ( start , other . start ) , Math . max ( end , other . end ) ) ; }
Created a new IndexRange that spans all characters between the smallest and the highest index of the two ranges.

@param other the other range
@return a new IndexRange instance
Created a new IndexRange that spans all characters between the smallest and the highest index of the two ranges .