code: private int[] parseEdgeLengthContext(GDLParser.EdgeLengthContext lengthCtx) {
      int lowerBound = 0;
      int upperBound = 0;
  
      if(lengthCtx != null) {
        int children = lengthCtx.getChildCount();
  
        if (children == 4) { // [*1..2]
          lowerBound = terminalNodeToInt(lengthCtx.IntegerLiteral(0));
          upperBound = terminalNodeToInt(lengthCtx.IntegerLiteral(1));
        } else if (children == 3) { // [*..2]
          upperBound = terminalNodeToInt(lengthCtx.IntegerLiteral(0));
  
        } else if (children == 2) { // [*1]
          lowerBound = terminalNodeToInt(lengthCtx.IntegerLiteral(0));
        } else { // [*]
          lowerBound = 0;
          upperBound = 0;
        }
      } else {
        // regular edge
        lowerBound = 1;
        upperBound = 1;
      }
      return new int[] { lowerBound, upperBound };
    }
docs: Parses an {@code EdgeLengthContext} and returns the indicated Range
  
  @param lengthCtx the edges length context
  @return int array representing lower and upper bound