public static boolean isDataTableSeparator(Statement stat) {
    VariableExpression varExpr  = getExpression(stat, VariableExpression.class);
    if (varExpr == null || !DATA_TABLE_SEPARATOR.matcher(varExpr.getName()).matches()) return false;

    Variable accessedVar = varExpr.getAccessedVariable();
    return accessedVar instanceof DynamicVariable;
  }
Checks whether the given statement represents a data table separator.
A data table separator is an expression statement consisting of a
variable expression whose name is two or more underscores and
that does not reference any existing variable, parameter or field.

@param stat the statement to check for being a data table separator
@return whether the given statement is a data table separator
spock-core/src/main/java/org/spockframework/compiler/AstUtil.java