String getRuleName(int index) { if (index >= 0) return parser.ruleNames[index]; return '<rule $index>'; }