/** * Returns a look-ahead set with all conflicts between two * look-ahead sets. * * @param pattern the pattern name being analyzed * @param location the pattern location * @param set1 the first look-ahead set * @param set2 the second look-ahead set * * @return a look-ahead set with the conflicts found * * @throws ParserCreationException if an inherent ambiguity was * found among the look-ahead sets */ private LookAheadSet FindConflicts(string pattern, string location, LookAheadSet set1, LookAheadSet set2) { LookAheadSet result; result = set1.CreateIntersection(set2); if (result.IsRepetitive()) { ThrowAmbiguityException(pattern, location, result); } return(result); }
/** * Returns a look-ahead set with all conflicts between two * look-ahead sets. * * @param pattern the pattern name being analyzed * @param location the pattern location * @param set1 the first look-ahead set * @param set2 the second look-ahead set * * @return a look-ahead set with the conflicts found * * @throws ParserCreationException if an inherent ambiguity was * found among the look-ahead sets */ private LookAheadSet FindConflicts(string pattern, string location, LookAheadSet set1, LookAheadSet set2) { LookAheadSet result; result = set1.CreateIntersection(set2); if (result.IsRepetitive()) { ThrowAmbiguityException(pattern, location, result); } return result; }