private void CheckCMUPAWithLeafRangeNodes(BitSet curpos) {
object[] symbolMatches = new object[symbols.Count];
for (int pos = curpos.NextSet(-1); pos != -1; pos = curpos.NextSet(pos)) {
Position currentPosition = positions[pos];
int symbol = currentPosition.symbol;
if (symbol >= 0) { //its not a range position
if (symbolMatches[symbol] != null) {
throw new UpaException(symbolMatches[symbol], currentPosition.particle);
}
else {
symbolMatches[symbol] = currentPosition.particle;
}
}
}
}