getRuleIndex method
Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found. */
Implementation
int getRuleIndex(String ruleName) {
final ruleIndex = ruleIndexMap[ruleName];
if (ruleIndex != null) return ruleIndex;
return -1;
}