private Expression parseResults(Expression expr) {
    while (expr instanceof BinaryExpression) {
      BinaryExpression binExpr = (BinaryExpression) expr;
      int type = binExpr.getOperation().getType();
      if (type != Types.RIGHT_SHIFT && type != Types.RIGHT_SHIFT_UNSIGNED) break;
      responses.add(new InteractionResponse(binExpr.getRightExpression(), type == Types.RIGHT_SHIFT_UNSIGNED));
      expr = binExpr.getLeftExpression();
    }
    return expr;
  }
If the given statement is a valid interaction definition, returns the rewritten statement.
If the given statement is not an interaction definition, returns null.
If the given statement is an invalid interaction definition, records a compile error
and returns null.
spock-core/src/main/java/org/spockframework/compiler/InteractionRewriter.java