protected void reportAmbiguity(GrammarSource grammar,HashSet<Terminal> ambiguity,TreeSet<Integer> places,LexicalConflictResolution resolution)
	throws CopperException
	{
		CompilerLogMessageSort severity = (resolution != null) ? CompilerLogMessageSort.LEXICAL_CONFLICT : CompilerLogMessageSort.UNRESOLVED_LEXICAL_CONFLICT;
		HashSet<String> displayNamedAmbiguity = new HashSet<String>();
		for(Terminal t : ambiguity) displayNamedAmbiguity.add(grammar.getDisplayName(t.getId()));
		String ambigHash = PrettyPrinter.iterablePrettyPrint(displayNamedAmbiguity,"   ",PrettyPrinter.getOptimalItemsPerLine(displayNamedAmbiguity,80));
		logger.logLexicalConflict(severity,resolution,places,ambiguity," " + (ambiguity.size() == 2 ? "between" : "among") + " terminals:\n" + ambigHash + (resolution != null ? "\nResolved by " + resolution + "." : ""));		
	}