Отделите свою работу. Имеете регулярное выражение:
([a-z]+)\((.*)\)
Первая группа будет содержать идентификатор, второй - параметры. Затем выполните следующие действия:
private static final Pattern PATTERN = Pattern.compile("([a-z]+)\\((.*)\\)");
// ...
final Matcher m = Pattern.matcher(input);
if (!m.matches())
// No match! Deal with it.
// If match, then:
final String identifier = m.group(1);
final String params = m.group(2);
// Test if there is a paren
params.indexOf('(') != -1;
Замените [a-z]+
каким бы то ни было идентификатором в Fortran.