this.version = "";
// Look for a "version" in the first line of the rules file:
String versionLine = getVersionLine();
if (versionLine.isEmpty()) {
throw new RuleParseException("Unable to read version from rules file: " +
" version not defined");
}
Matcher m = VERSION_REGEX.matcher(versionLine);
if (!m.matches()) {
throw new RuleParseException("Unable to read version from rules file. " +
"Rules version must be specified on the top of the rules file. " +
"For example: // Version: x.y");
}
this.version = m.group(1);